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: 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