Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ fileignoreconfig:
checksum: ae766694424841b8ca67c0dc072a4bc9a8451f41d43166697b6757d0f8173553
- filename: .husky/pre-commit
checksum: 1b9367d219802de2e3a8af9c5c698e0c255c00af89339d73bdbb8acf5275079f
version: ""
- filename: src/util/index.ts
checksum: 8c4600145acb0319051df4237b7e753af93465419d14d5fe97c211050f6da405
version: ""
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/datasync-content-store-filesystem",
"version": "2.1.3",
"version": "2.1.4",
"description": "Datasync content store library - saves data in filesystem",
"main": "./dist",
"types": "./typings",
Expand Down
9 changes: 4 additions & 5 deletions src/fs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
*/

import { debug as Debug } from 'debug'
import { existsSync, unlinkSync } from 'fs'
import { existsSync, unlinkSync, mkdirSync } from 'fs'
import { cloneDeep, compact } from 'lodash'
import mkdirp from 'mkdirp'
import { join, sep } from 'path'
import { readFile, writeFile } from './util/fs'
import { getFileFieldPaths } from './util/get-file-fields'
Expand Down Expand Up @@ -167,7 +166,7 @@ export class FilesystemStore {
contentTypePathKeys.splice(contentTypePathKeys.length - 1)
const contentTypeFolderPath = join.apply(contentTypePathKeys)

mkdirp.sync(contentTypeFolderPath)
mkdirSync(contentTypeFolderPath)
await writeFile(contentTypePath, JSON.stringify([schema]))
}

Expand Down Expand Up @@ -218,7 +217,7 @@ export class FilesystemStore {
}
} else {
// create folder, if it does not exist!
mkdirp.sync(assetFolderPath)
mkdirSync(assetFolderPath)
await writeFile(assetPath, JSON.stringify([data]))
}

Expand Down Expand Up @@ -501,7 +500,7 @@ export class FilesystemStore {
}
} else {
// entry folder does not exist!
mkdirp.sync(entryFolderPath)
mkdirSync(entryFolderPath)

await writeFile(entryPath, JSON.stringify([entry]))
}
Expand Down
Loading