From 88fd5091ad1dd3243e0de2b40432b11d6aee27e3 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Tue, 27 Feb 2024 16:51:52 +0530 Subject: [PATCH 1/5] when adding the path using the inquirer for both import and export removed the quotation marks and version bump --- package-lock.json | 20 +++++++++---------- packages/contentstack-clone/package.json | 4 ++-- packages/contentstack-export/package.json | 2 +- .../src/utils/interactive.ts | 5 +++-- packages/contentstack-import/package.json | 2 +- .../src/utils/interactive.ts | 3 ++- packages/contentstack-seed/package.json | 2 +- packages/contentstack/package.json | 4 ++-- pnpm-lock.yaml | 10 +++++----- 9 files changed, 27 insertions(+), 25 deletions(-) diff --git a/package-lock.json b/package-lock.json index e90f55f574..4ab461eed0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5200,9 +5200,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001589", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001589.tgz", - "integrity": "sha512-vNQWS6kI+q6sBlHbh71IIeC+sRwK2N3EDySc/updIGhIee2x5z00J4c1242/5/d6EpEMdOnk/m+6tuk4/tcsqg==", + "version": "1.0.30001591", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001591.tgz", + "integrity": "sha512-PCzRMei/vXjJyL5mJtzNiUCKP59dm8Apqc3PH8gJkMnMXZGox93RbE76jHsmLwmIo6/3nsYIpJtx0O7u5PqFuQ==", "dev": true, "funding": [ { @@ -24268,9 +24268,9 @@ "@contentstack/cli-cm-branches": "~1.0.22", "@contentstack/cli-cm-bulk-publish": "~1.4.1", "@contentstack/cli-cm-clone": "~1.10.1", - "@contentstack/cli-cm-export": "~1.11.0", + "@contentstack/cli-cm-export": "~1.11.1", "@contentstack/cli-cm-export-to-csv": "~1.7.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -24802,8 +24802,8 @@ "license": "MIT", "dependencies": { "@colors/colors": "^1.5.0", - "@contentstack/cli-cm-export": "~1.11.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-export": "~1.11.1", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "async": "^3.2.4", @@ -25298,7 +25298,7 @@ }, "packages/contentstack-export": { "name": "@contentstack/cli-cm-export", - "version": "1.11.0", + "version": "1.11.1", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -25772,7 +25772,7 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.14.0", + "version": "1.14.1", "license": "MIT", "dependencies": { "@contentstack/cli-audit": "~1.4.0", @@ -26245,7 +26245,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "inquirer": "8.2.4", diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index 58ad391724..1fafecc67d 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -6,8 +6,8 @@ "bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues", "dependencies": { "@colors/colors": "^1.5.0", - "@contentstack/cli-cm-export": "~1.11.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-export": "~1.11.1", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "async": "^3.2.4", diff --git a/packages/contentstack-export/package.json b/packages/contentstack-export/package.json index 163e90fe2f..86a52844a8 100644 --- a/packages/contentstack-export/package.json +++ b/packages/contentstack-export/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-export", "description": "Contentstack CLI plugin to export content from stack", - "version": "1.11.0", + "version": "1.11.1", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-export/src/utils/interactive.ts b/packages/contentstack-export/src/utils/interactive.ts index 6b129e1476..f5026b5fa6 100644 --- a/packages/contentstack-export/src/utils/interactive.ts +++ b/packages/contentstack-export/src/utils/interactive.ts @@ -45,7 +45,7 @@ export const askUsername = async (): Promise => { }; export const askExportDir = async (): Promise => { - const result = await cliux.inquire({ + let result = await cliux.inquire({ type: 'input', message: 'Enter the path for storing the content: (current folder)', name: 'dir', @@ -53,6 +53,7 @@ export const askExportDir = async (): Promise => { if (!result) { return process.cwd(); } else { + result = result.replace(/"/g, ''); return path.resolve(result); } }; @@ -63,4 +64,4 @@ export const askAPIKey = async (): Promise => { message: 'Enter the stack api key', name: 'apiKey', }); -}; \ No newline at end of file +}; diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index dba8271dfc..0653732d8b 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.14.0", + "version": "1.14.1", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-import/src/utils/interactive.ts b/packages/contentstack-import/src/utils/interactive.ts index 42a4703964..a69a31cb54 100644 --- a/packages/contentstack-import/src/utils/interactive.ts +++ b/packages/contentstack-import/src/utils/interactive.ts @@ -4,11 +4,12 @@ import first from 'lodash/first'; import split from 'lodash/split'; export const askContentDir = async (): Promise => { - const result = await cliux.inquire({ + let result = await cliux.inquire({ type: 'input', message: 'Enter the path for the content', name: 'dir', }); + result = result.replace(/"/g, ''); return path.resolve(result); }; diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index 29aa4985c6..df0ac58ebc 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -5,7 +5,7 @@ "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.12", "inquirer": "8.2.4", diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 221ce0107d..9b5ba892b8 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -27,10 +27,10 @@ "@contentstack/cli-cm-bootstrap": "~1.9.0", "@contentstack/cli-cm-branches": "~1.0.22", "@contentstack/cli-cm-bulk-publish": "~1.4.1", - "@contentstack/cli-cm-export": "~1.11.0", + "@contentstack/cli-cm-export": "~1.11.1", "@contentstack/cli-cm-clone": "~1.10.1", "@contentstack/cli-cm-export-to-csv": "~1.7.0", - "@contentstack/cli-cm-import": "~1.14.0", + "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 24192599f3..6c1ee313f6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,9 +16,9 @@ importers: '@contentstack/cli-cm-branches': ~1.0.22 '@contentstack/cli-cm-bulk-publish': ~1.4.1 '@contentstack/cli-cm-clone': ~1.10.1 - '@contentstack/cli-cm-export': ~1.11.0 + '@contentstack/cli-cm-export': ~1.11.1 '@contentstack/cli-cm-export-to-csv': ~1.7.0 - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 @@ -423,8 +423,8 @@ importers: packages/contentstack-clone: specifiers: '@colors/colors': ^1.5.0 - '@contentstack/cli-cm-export': ~1.11.0 - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-export': ~1.11.1 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.12 '@oclif/test': ^2.5.6 @@ -990,7 +990,7 @@ importers: packages/contentstack-seed: specifiers: - '@contentstack/cli-cm-import': ~1.14.0 + '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.12 '@oclif/plugin-help': ^5.1.19 From 80f5e86422ac0d5dab63f68295d76120f76ab641 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 28 Feb 2024 12:39:56 +0530 Subject: [PATCH 2/5] removing single and double quotes, and also checking for special characters in the path and not accepting till it's valid --- .../src/utils/export-config-handler.ts | 6 ++++++ packages/contentstack-export/src/utils/interactive.ts | 2 +- .../src/utils/import-config-handler.ts | 8 +++++++- packages/contentstack-import/src/utils/interactive.ts | 2 +- 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/packages/contentstack-export/src/utils/export-config-handler.ts b/packages/contentstack-export/src/utils/export-config-handler.ts index c1e15291f0..5d22e49541 100644 --- a/packages/contentstack-export/src/utils/export-config-handler.ts +++ b/packages/contentstack-export/src/utils/export-config-handler.ts @@ -16,6 +16,12 @@ const setupConfig = async (exportCmdFlags: any): Promise => { config = merge.recursive(config, externalConfig); } config.exportDir = exportCmdFlags['data'] || exportCmdFlags['data-dir'] || config.data || (await askExportDir()); + config.exportDir = config.exportDir.replace(/['"]/g, '') + const pattern = /[*$%#<>{}!&?]/g; + while(pattern.test(config.exportDir)) { + console.log(`Your mentioned directory path contains special characters please add a path without them`); + config.exportDir = await askExportDir() + } config.exportDir = path.resolve(config.exportDir); //Note to support the old key config.data = config.exportDir; diff --git a/packages/contentstack-export/src/utils/interactive.ts b/packages/contentstack-export/src/utils/interactive.ts index f5026b5fa6..e0edbbffa4 100644 --- a/packages/contentstack-export/src/utils/interactive.ts +++ b/packages/contentstack-export/src/utils/interactive.ts @@ -53,7 +53,7 @@ export const askExportDir = async (): Promise => { if (!result) { return process.cwd(); } else { - result = result.replace(/"/g, ''); + result = result.replace(/['"]/g, ''); return path.resolve(result); } }; diff --git a/packages/contentstack-import/src/utils/import-config-handler.ts b/packages/contentstack-import/src/utils/import-config-handler.ts index 233a47ff00..56d5420a4f 100644 --- a/packages/contentstack-import/src/utils/import-config-handler.ts +++ b/packages/contentstack-import/src/utils/import-config-handler.ts @@ -21,10 +21,16 @@ const setupConfig = async (importCmdFlags: any): Promise => { } config.contentDir = importCmdFlags['data'] || importCmdFlags['data-dir'] || config.data || (await askContentDir()); + config.contentDir = config.contentDir.replace(/['"]/g, '') + const pattern = /[*$%#<>{}!&?]/g; + while(pattern.test(config.contentDir)) { + console.log(`Your mentioned directory path contains special characters please add a path without them`); + config.contentDir = await askContentDir() + } config.contentDir = path.resolve(config.contentDir); //Note to support the old key config.data = config.contentDir; - + console.log(config.contentDir) if (fileExistsSync(path.join(config.contentDir, 'export-info.json'))) { config.contentVersion = ((await readFile(path.join(config.contentDir, 'export-info.json'))) || {}).contentVersion || 2; diff --git a/packages/contentstack-import/src/utils/interactive.ts b/packages/contentstack-import/src/utils/interactive.ts index a69a31cb54..528373c15d 100644 --- a/packages/contentstack-import/src/utils/interactive.ts +++ b/packages/contentstack-import/src/utils/interactive.ts @@ -9,7 +9,7 @@ export const askContentDir = async (): Promise => { message: 'Enter the path for the content', name: 'dir', }); - result = result.replace(/"/g, ''); + result = result.replace(/["']/g, ''); return path.resolve(result); }; From de91d369b77a2e7899489e43b6b50253ad4a9dc3 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 28 Feb 2024 18:47:47 +0530 Subject: [PATCH 3/5] merged development to resolve sca scan failing --- package-lock.json | 72 +++++++++++++++++++++++------------------------ 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/package-lock.json b/package-lock.json index 2ebef8a56e..3998b1209f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -176,9 +176,9 @@ } }, "node_modules/@babel/core": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz", - "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.0.tgz", + "integrity": "sha512-fQfkg0Gjkza3nf0c7/w6Xf34BW4YvzNfACRLmmb7XRLa6XHdR+K9AlJlxneFfWYf6uhOzuzZVTjF/8KfndZANw==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", @@ -186,11 +186,11 @@ "@babel/generator": "^7.23.6", "@babel/helper-compilation-targets": "^7.23.6", "@babel/helper-module-transforms": "^7.23.3", - "@babel/helpers": "^7.23.9", - "@babel/parser": "^7.23.9", - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/helpers": "^7.24.0", + "@babel/parser": "^7.24.0", + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -356,9 +356,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz", - "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.0.tgz", + "integrity": "sha512-9cUznXMG0+FxRuJfvL82QlTqIzhVW9sL0KjMPHhAOOvpQGL8QtdxnBKILjBqxlHyliz0yCa1G903ZXI/FuHy2w==", "dev": true, "engines": { "node": ">=6.9.0" @@ -416,14 +416,14 @@ } }, "node_modules/@babel/helpers": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz", - "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.0.tgz", + "integrity": "sha512-ulDZdc0Aj5uLc5nETsa7EPx2L7rM0YJM8r7ck7U73AXi7qOV44IHHRAYZHY6iU1rr3C5N4NtTmMRUJP6kwCWeA==", "dev": true, "dependencies": { - "@babel/template": "^7.23.9", - "@babel/traverse": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/template": "^7.24.0", + "@babel/traverse": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" @@ -515,9 +515,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz", - "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.0.tgz", + "integrity": "sha512-QuP/FxEAzMSjXygs8v4N9dvdXzEHN4W1oF3PxuWAtPo08UdM17u89RDMgjLn/mlc56iM0HlLmVkO/wgR+rDgHg==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -704,9 +704,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.9.tgz", - "integrity": "sha512-0CX6F+BI2s9dkUqr08KFrAIZgNFj75rdBU/DjCyYLIaV/quFjkk6T+EJ2LkZHyZTbEV4L5p97mNkUsHl2wLFAw==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.24.0.tgz", + "integrity": "sha512-Chk32uHMg6TnQdvw2e9IlqPpFX/6NLuK0Ys2PqLb7/gL5uFn9mXvK715FGLlOLQrcO4qIkNHkvPGktzzXexsFw==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -716,23 +716,23 @@ } }, "node_modules/@babel/template": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz", - "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.0.tgz", + "integrity": "sha512-Bkf2q8lMB0AFpX0NFEqSbx1OkTHf0f+0j82mkw+ZpzBnkk7e9Ql0891vlfgi+kHwOk8tQjiQHpqh4LaSa0fKEA==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9" + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz", - "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.0.tgz", + "integrity": "sha512-HfuJlI8qq3dEDmNU5ChzzpZRWq+oxCZQyMzIMEqLho+AQnhMnKQUzH6ydo3RBl/YjPCuk68Y6s0Gx0AeyULiWw==", "dev": true, "dependencies": { "@babel/code-frame": "^7.23.5", @@ -741,8 +741,8 @@ "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.9", - "@babel/types": "^7.23.9", + "@babel/parser": "^7.24.0", + "@babel/types": "^7.24.0", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -760,9 +760,9 @@ } }, "node_modules/@babel/types": { - "version": "7.23.9", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz", - "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==", + "version": "7.24.0", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.0.tgz", + "integrity": "sha512-+j7a5c253RfKh8iABBhywc8NSfP5LURe7Uh4qpsh6jc+aLJguvmIUBdjSdEMQv2bENrCR5MfRdjGo7vzS/ob7w==", "dev": true, "dependencies": { "@babel/helper-string-parser": "^7.23.4", From fcf88fdd01cb0faf4340632fab6e8f61a2225adc Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 28 Feb 2024 18:56:49 +0530 Subject: [PATCH 4/5] removed stray console logs --- .../contentstack-import/src/utils/import-config-handler.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/contentstack-import/src/utils/import-config-handler.ts b/packages/contentstack-import/src/utils/import-config-handler.ts index 56d5420a4f..cd1232391d 100644 --- a/packages/contentstack-import/src/utils/import-config-handler.ts +++ b/packages/contentstack-import/src/utils/import-config-handler.ts @@ -21,16 +21,15 @@ const setupConfig = async (importCmdFlags: any): Promise => { } config.contentDir = importCmdFlags['data'] || importCmdFlags['data-dir'] || config.data || (await askContentDir()); - config.contentDir = config.contentDir.replace(/['"]/g, '') + config.contentDir = config.contentDir.replace(/['"]/g, ''); const pattern = /[*$%#<>{}!&?]/g; - while(pattern.test(config.contentDir)) { + while (pattern.test(config.contentDir)) { console.log(`Your mentioned directory path contains special characters please add a path without them`); - config.contentDir = await askContentDir() + config.contentDir = await askContentDir(); } config.contentDir = path.resolve(config.contentDir); //Note to support the old key config.data = config.contentDir; - console.log(config.contentDir) if (fileExistsSync(path.join(config.contentDir, 'export-info.json'))) { config.contentVersion = ((await readFile(path.join(config.contentDir, 'export-info.json'))) || {}).contentVersion || 2; From 2fa1bc9e83e00c300e50db7dfb4d5c51f527ff68 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Fri, 1 Mar 2024 15:22:52 +0530 Subject: [PATCH 5/5] added test case and moved validate path to utiltites and version bump --- package-lock.json | 271 ++++++------------ packages/contentstack-audit/package.json | 2 +- packages/contentstack-auth/package.json | 2 +- packages/contentstack-bootstrap/package.json | 2 +- packages/contentstack-branches/package.json | 2 +- .../contentstack-bulk-publish/package.json | 2 +- packages/contentstack-clone/package.json | 2 +- packages/contentstack-command/package.json | 2 +- packages/contentstack-config/package.json | 2 +- .../contentstack-export-to-csv/package.json | 2 +- packages/contentstack-export/package.json | 2 +- .../src/utils/export-config-handler.ts | 17 +- .../src/utils/interactive.ts | 3 +- packages/contentstack-import/package.json | 2 +- .../src/utils/import-config-handler.ts | 13 +- .../src/utils/interactive.ts | 3 +- packages/contentstack-launch/package.json | 2 +- .../contentstack-migrate-rte/package.json | 2 +- packages/contentstack-migration/package.json | 2 +- packages/contentstack-seed/package.json | 2 +- packages/contentstack-utilities/package.json | 4 +- .../contentstack-utilities/src/helpers.ts | 14 + .../test/unit/helper.test.ts | 25 ++ packages/contentstack/package.json | 2 +- pnpm-lock.yaml | 32 +-- 25 files changed, 178 insertions(+), 236 deletions(-) create mode 100644 packages/contentstack-utilities/test/unit/helper.test.ts diff --git a/package-lock.json b/package-lock.json index 3998b1209f..09ada77e9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -28,13 +28,13 @@ } }, "node_modules/@ampproject/remapping": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", - "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.3.0.tgz", + "integrity": "sha512-30iZtAPgz+LTIYoeivqYo853f02jBYSd5uGnGpkFV0M3xOt9aN73erkgYAmZU43x4VfqcnLxW9Kpg3R5LC4YYw==", "dev": true, "dependencies": { - "@jridgewell/gen-mapping": "^0.3.0", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -1626,14 +1626,14 @@ } }, "node_modules/@jridgewell/gen-mapping": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.4.tgz", - "integrity": "sha512-Oud2QPM5dHviZNn4y/WhhYKSXksv+1xLEIsNrAbGcFzUN3ubqWRFT5gwPchNc5NuzILOU4tPBDTZ4VwhL8Y7cw==", + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz", + "integrity": "sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg==", "dev": true, "dependencies": { - "@jridgewell/set-array": "^1.0.1", + "@jridgewell/set-array": "^1.2.1", "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" + "@jridgewell/trace-mapping": "^0.3.24" }, "engines": { "node": ">=6.0.0" @@ -1648,9 +1648,9 @@ } }, "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz", + "integrity": "sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A==", "dev": true, "engines": { "node": ">=6.0.0" @@ -1662,9 +1662,9 @@ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" }, "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.23", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.23.tgz", - "integrity": "sha512-9/4foRoUKp8s96tSkh8DlAAc5A0Ty8vLXld+l9gjKKY6ckwI8G15f0hskGmuLZu78ZlGa1vtsfOa+lnB4vG6Jg==", + "version": "0.3.24", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.24.tgz", + "integrity": "sha512-+VaWXDa6+l6MhflBvVXjIEAzb59nQ2JUK3bwRp2zRpPtU+8TFRy9Gg/5oIcNlkEL5PGlBFGfemUVvIgLnTzq7Q==", "dev": true, "dependencies": { "@jridgewell/resolve-uri": "^3.1.0", @@ -2068,9 +2068,9 @@ } }, "node_modules/@oclif/plugin-plugins": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.2.5.tgz", - "integrity": "sha512-BnTXuoqG519WIhBd1y+GERq4LdB75cjiD+mN2/xS8mhnQbMxcPahnTWB8l5dhk+CXTkRv6q5nL/ovdRqHkZJHg==", + "version": "4.2.6", + "resolved": "https://registry.npmjs.org/@oclif/plugin-plugins/-/plugin-plugins-4.2.6.tgz", + "integrity": "sha512-HdPWRQYI4wsTcqRJFvEGFalgX1q7y0oeCKdZtMI6Wl1PsALloYlbbQ1rl1jqk3YFbHjyEWud34gccOdXLl3UAA==", "dependencies": { "@oclif/core": "^3.10.2", "chalk": "^5.3.0", @@ -2825,9 +2825,9 @@ } }, "node_modules/@slack/logger/node_modules/@types/node": { - "version": "20.11.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.21.tgz", - "integrity": "sha512-/ySDLGscFPNasfqStUuWWPfL78jompfIoVzLJPVVAHBh6rpG68+pI2Gk+fNLeI8/f1yPYL4s46EleVIc20F1Ow==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dependencies": { "undici-types": "~5.26.4" } @@ -4450,9 +4450,9 @@ } }, "node_modules/aws-sdk": { - "version": "2.1567.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1567.0.tgz", - "integrity": "sha512-5irUeMggUkQBARXtm3YN4E/lffEN51uIw+D7cD0+d8e2rhhJL/DTphP8cdx22xr+uOfOyRjx9SjSwHvack2B9Q==", + "version": "2.1569.0", + "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1569.0.tgz", + "integrity": "sha512-9puKjesHKOjAYPqFurW/9nv3qhQ+STu3bVa5PN158SCeZPE6NsxZIWnHLglJvKU7N8UXJo1aJHmKDUGrsS7rXw==", "dev": true, "dependencies": { "buffer": "4.9.2", @@ -4767,12 +4767,12 @@ "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==" }, "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", "dependencies": { "bytes": "3.1.2", - "content-type": "~1.0.4", + "content-type": "~1.0.5", "debug": "2.6.9", "depd": "2.0.0", "destroy": "1.2.0", @@ -4780,7 +4780,7 @@ "iconv-lite": "0.4.24", "on-finished": "2.4.1", "qs": "6.11.0", - "raw-body": "2.5.1", + "raw-body": "2.5.2", "type-is": "~1.6.18", "unpipe": "1.0.0" }, @@ -4816,20 +4816,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/body-parser/node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -6560,9 +6546,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.685", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.685.tgz", - "integrity": "sha512-yDYeobbTEe4TNooEzOQO6xFqg9XnAkVy2Lod1C1B2it8u47JNLYvl9nLDWBamqUakWB8Jc1hhS1uHUNYTNQdfw==", + "version": "1.4.689", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.689.tgz", + "integrity": "sha512-GatzRKnGPS1go29ep25reM94xxd1Wj8ritU0yRhCJ/tr1Bg8gKnm6R9O/yPOhGQBoLMZ9ezfrpghNaTw97C/PQ==", "dev": true }, "node_modules/elegant-spinner": { @@ -6698,17 +6684,17 @@ } }, "node_modules/es-abstract": { - "version": "1.22.4", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.4.tgz", - "integrity": "sha512-vZYJlk2u6qHYxBOTjAeg7qUxHdNfih64Uu2J8QqWgXZ2cri0ZpJAkzDUK/q593+mvKwlxyaxr6F1Q+3LKoQRgg==", + "version": "1.22.5", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.5.tgz", + "integrity": "sha512-oW69R+4q2wG+Hc3KZePPZxOiisRIqfKBVo/HLx94QcJeWGU/8sZhCvc829rd1kS366vlJbzBfXf9yWwf0+Ko7w==", "dependencies": { "array-buffer-byte-length": "^1.0.1", "arraybuffer.prototype.slice": "^1.0.3", - "available-typed-arrays": "^1.0.6", + "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.7", "es-define-property": "^1.0.0", "es-errors": "^1.3.0", - "es-set-tostringtag": "^2.0.2", + "es-set-tostringtag": "^2.0.3", "es-to-primitive": "^1.2.1", "function.prototype.name": "^1.1.6", "get-intrinsic": "^1.2.4", @@ -6716,15 +6702,15 @@ "globalthis": "^1.0.3", "gopd": "^1.0.1", "has-property-descriptors": "^1.0.2", - "has-proto": "^1.0.1", + "has-proto": "^1.0.3", "has-symbols": "^1.0.3", "hasown": "^2.0.1", "internal-slot": "^1.0.7", "is-array-buffer": "^3.0.4", "is-callable": "^1.2.7", - "is-negative-zero": "^2.0.2", + "is-negative-zero": "^2.0.3", "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.2", + "is-shared-array-buffer": "^1.0.3", "is-string": "^1.0.7", "is-typed-array": "^1.1.13", "is-weakref": "^1.0.2", @@ -6737,10 +6723,10 @@ "string.prototype.trim": "^1.2.8", "string.prototype.trimend": "^1.0.7", "string.prototype.trimstart": "^1.0.7", - "typed-array-buffer": "^1.0.1", - "typed-array-byte-length": "^1.0.0", - "typed-array-byte-offset": "^1.0.0", - "typed-array-length": "^1.0.4", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.2", + "typed-array-length": "^1.0.5", "unbox-primitive": "^1.0.2", "which-typed-array": "^1.1.14" }, @@ -8103,13 +8089,13 @@ "dev": true }, "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "version": "4.18.3", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.3.tgz", + "integrity": "sha512-6VyCijWQ+9O7WuVMTRBTl+cjNNIzD5cY5mQ1WM8r/LEkI2u8EYpOotESNwzNlyCn3g+dmjKYI6BmNneSr/FSRw==", "dependencies": { "accepts": "~1.3.8", "array-flatten": "1.1.1", - "body-parser": "1.20.1", + "body-parser": "1.20.2", "content-disposition": "0.5.4", "content-type": "~1.0.4", "cookie": "0.5.0", @@ -20364,11 +20350,11 @@ } }, "node_modules/side-channel": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.5.tgz", - "integrity": "sha512-QcgiIWV4WV7qWExbN5llt6frQB/lBven9pqliLXfGPB+K9ZYXxDozp0wLkHS24kWCm+6YXH/f0HhnObZnZOBnQ==", + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", + "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", "dependencies": { - "call-bind": "^1.0.6", + "call-bind": "^1.0.7", "es-errors": "^1.3.0", "get-intrinsic": "^1.2.4", "object-inspect": "^1.13.1" @@ -21508,108 +21494,11 @@ } }, "node_modules/tmp": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.2.tgz", - "integrity": "sha512-ETcvHhaIc9J2MDEAH6N67j9bvBvu/3Gb764qaGhwtFvjtvhegqoqSpofgeyq1Sc24mW5pdyUDs9HP5j3ehkxRw==", - "dependencies": { - "rimraf": "^5.0.5" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/tmp/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/tmp/node_modules/foreground-child": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", - "integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", - "dependencies": { - "cross-spawn": "^7.0.0", - "signal-exit": "^4.0.1" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tmp/node_modules/glob": { - "version": "10.3.10", - "resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz", - "integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==", - "dependencies": { - "foreground-child": "^3.1.0", - "jackspeak": "^2.3.5", - "minimatch": "^9.0.1", - "minipass": "^5.0.0 || ^6.0.2 || ^7.0.0", - "path-scurry": "^1.10.1" - }, - "bin": { - "glob": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tmp/node_modules/minimatch": { - "version": "9.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz", - "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tmp/node_modules/minipass": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz", - "integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==", - "engines": { - "node": ">=16 || 14 >=14.17" - } - }, - "node_modules/tmp/node_modules/rimraf": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-5.0.5.tgz", - "integrity": "sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==", - "dependencies": { - "glob": "^10.3.7" - }, - "bin": { - "rimraf": "dist/esm/bin.mjs" - }, - "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/tmp/node_modules/signal-exit": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", - "integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.3.tgz", + "integrity": "sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==", "engines": { - "node": ">=14" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" + "node": ">=14.14" } }, "node_modules/tmpl": { @@ -24357,7 +24246,7 @@ "@contentstack/cli-config": "~1.6.2", "@contentstack/cli-launch": "~1.0.16", "@contentstack/cli-migration": "~1.5.0", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", @@ -24411,7 +24300,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/plugin-help": "^5", "@oclif/plugin-plugins": "^4.1.9", "chalk": "^4.1.2", @@ -24466,9 +24355,9 @@ "dev": true }, "packages/contentstack-audit/node_modules/@types/node": { - "version": "20.11.21", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.21.tgz", - "integrity": "sha512-/ySDLGscFPNasfqStUuWWPfL78jompfIoVzLJPVVAHBh6rpG68+pI2Gk+fNLeI8/f1yPYL4s46EleVIc20F1Ow==", + "version": "20.11.24", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.24.tgz", + "integrity": "sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==", "dev": true, "dependencies": { "undici-types": "~5.26.4" @@ -24676,7 +24565,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.0.0", "debug": "^4.1.1", "inquirer": "8.2.4", @@ -24718,7 +24607,7 @@ "dependencies": { "@contentstack/cli-cm-seed": "~1.7.0", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "inquirer": "8.2.4", "mkdirp": "^1.0.4", "tar": "^6.1.13" @@ -24796,7 +24685,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "async": "^3.2.4", "big-json": "^3.2.0", @@ -24845,7 +24734,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "bluebird": "^3.7.2", "chalk": "^4.1.2", "dotenv": "^16.1.4", @@ -24885,7 +24774,7 @@ "@contentstack/cli-cm-export": "~1.11.1", "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "async": "^3.2.4", "chalk": "^4.1.0", "child_process": "^1.0.2", @@ -25013,7 +24902,7 @@ "version": "1.2.17", "license": "MIT", "dependencies": { - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "contentstack": "^3.10.1" }, "devDependencies": { @@ -25088,7 +24977,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.0.0", "debug": "^4.1.1", "inquirer": "8.2.4", @@ -25382,7 +25271,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "async": "^3.2.4", "big-json": "^3.2.0", @@ -25432,7 +25321,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.1.0", "fast-csv": "^4.3.6", "inquirer": "8.2.4", @@ -25857,7 +25746,7 @@ "dependencies": { "@contentstack/cli-audit": "~1.4.0", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", "big-json": "^3.2.0", @@ -25981,7 +25870,7 @@ "dependencies": { "@apollo/client": "^3.7.9", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", "@oclif/plugin-plugins": "^4.1.9", @@ -26075,9 +25964,9 @@ "dev": true }, "packages/contentstack-launch/node_modules/@types/node": { - "version": "16.18.84", - "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.84.tgz", - "integrity": "sha512-mtn6ixzrUK5IMf6gyyMVUsm0TIeF3IYpUr3i0HHTuPJVbdZ6kc93poZ+wCkFNtxXoP/tyGrdVPOL6/WqGXjfXw==", + "version": "16.18.86", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.86.tgz", + "integrity": "sha512-QMvdZf+ZTSiv7gspwhqbfB7Y5DmbYgCsUnakS8Ul9uRbJQehDKaM7SL+GbcDS003Lh7VK4YlelHsRm9HCv26eA==", "dev": true }, "packages/contentstack-launch/node_modules/acorn": { @@ -26254,7 +26143,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/json-rte-serializer": "~2.0.4", "chalk": "^4.1.2", "collapse-whitespace": "^1.1.7", @@ -26293,7 +26182,7 @@ "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "async": "^3.2.4", "callsites": "^3.1.0", "cardinal": "^2.1.1", @@ -26327,7 +26216,7 @@ "dependencies": { "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "inquirer": "8.2.4", "mkdirp": "^1.0.4", "tar": "^6.1.13", @@ -26403,7 +26292,7 @@ }, "packages/contentstack-utilities": { "name": "@contentstack/cli-utilities", - "version": "1.5.12", + "version": "1.5.13", "license": "MIT", "dependencies": { "@contentstack/management": "~1.15.3", diff --git a/packages/contentstack-audit/package.json b/packages/contentstack-audit/package.json index a046c729a3..e721409e11 100644 --- a/packages/contentstack-audit/package.json +++ b/packages/contentstack-audit/package.json @@ -19,7 +19,7 @@ ], "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/plugin-help": "^5", "@oclif/plugin-plugins": "^4.1.9", "chalk": "^4.1.2", diff --git a/packages/contentstack-auth/package.json b/packages/contentstack-auth/package.json index 4dc695b58b..43e20b9bd0 100644 --- a/packages/contentstack-auth/package.json +++ b/packages/contentstack-auth/package.json @@ -23,7 +23,7 @@ }, "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.0.0", "debug": "^4.1.1", "inquirer": "8.2.4", diff --git a/packages/contentstack-bootstrap/package.json b/packages/contentstack-bootstrap/package.json index af348f79b1..590493007c 100644 --- a/packages/contentstack-bootstrap/package.json +++ b/packages/contentstack-bootstrap/package.json @@ -19,7 +19,7 @@ "dependencies": { "@contentstack/cli-cm-seed": "~1.7.0", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "inquirer": "8.2.4", "mkdirp": "^1.0.4", "tar": "^6.1.13" diff --git a/packages/contentstack-branches/package.json b/packages/contentstack-branches/package.json index 131f3fb134..7ecef1ad77 100644 --- a/packages/contentstack-branches/package.json +++ b/packages/contentstack-branches/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "async": "^3.2.4", "big-json": "^3.2.0", diff --git a/packages/contentstack-bulk-publish/package.json b/packages/contentstack-bulk-publish/package.json index b075ce9fb3..88f1826605 100644 --- a/packages/contentstack-bulk-publish/package.json +++ b/packages/contentstack-bulk-publish/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "bluebird": "^3.7.2", "chalk": "^4.1.2", "dotenv": "^16.1.4", diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index 1fafecc67d..fb21d55e55 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -9,7 +9,7 @@ "@contentstack/cli-cm-export": "~1.11.1", "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "async": "^3.2.4", "chalk": "^4.1.0", "child_process": "^1.0.2", diff --git a/packages/contentstack-command/package.json b/packages/contentstack-command/package.json index 91cda88e62..4654db6e5b 100644 --- a/packages/contentstack-command/package.json +++ b/packages/contentstack-command/package.json @@ -17,7 +17,7 @@ "format": "eslint src/**/*.ts --fix" }, "dependencies": { - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "contentstack": "^3.10.1" }, "devDependencies": { diff --git a/packages/contentstack-config/package.json b/packages/contentstack-config/package.json index bd47939765..9dff7e0edb 100644 --- a/packages/contentstack-config/package.json +++ b/packages/contentstack-config/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.0.0", "debug": "^4.1.1", "inquirer": "8.2.4", diff --git a/packages/contentstack-export-to-csv/package.json b/packages/contentstack-export-to-csv/package.json index a30542cf26..1214c2c401 100644 --- a/packages/contentstack-export-to-csv/package.json +++ b/packages/contentstack-export-to-csv/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "chalk": "^4.1.0", "fast-csv": "^4.3.6", "inquirer": "8.2.4", diff --git a/packages/contentstack-export/package.json b/packages/contentstack-export/package.json index 86a52844a8..de55b8ce06 100644 --- a/packages/contentstack-export/package.json +++ b/packages/contentstack-export/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "async": "^3.2.4", "big-json": "^3.2.0", diff --git a/packages/contentstack-export/src/utils/export-config-handler.ts b/packages/contentstack-export/src/utils/export-config-handler.ts index 5d22e49541..5e57aa3d66 100644 --- a/packages/contentstack-export/src/utils/export-config-handler.ts +++ b/packages/contentstack-export/src/utils/export-config-handler.ts @@ -1,6 +1,6 @@ import merge from 'merge'; import * as path from 'path'; -import { configHandler, isAuthenticated, FlagInput } from '@contentstack/cli-utilities'; +import { configHandler, isAuthenticated, FlagInput, cliux } from '@contentstack/cli-utilities'; import defaultConfig from '../config'; import { readFile } from './file-helper'; import { askExportDir, askAPIKey } from './interactive'; @@ -16,13 +16,20 @@ const setupConfig = async (exportCmdFlags: any): Promise => { config = merge.recursive(config, externalConfig); } config.exportDir = exportCmdFlags['data'] || exportCmdFlags['data-dir'] || config.data || (await askExportDir()); - config.exportDir = config.exportDir.replace(/['"]/g, '') + const pattern = /[*$%#<>{}!&?]/g; - while(pattern.test(config.exportDir)) { - console.log(`Your mentioned directory path contains special characters please add a path without them`); - config.exportDir = await askExportDir() + if (pattern.test(config.exportDir)) { + cliux.print( + `\nYour mentioned directory path contains special characters (*,&,{,},[,],$,%,<,>,?,!) please add a path without them`, + { + color: 'yellow', + }, + ); + config.exportDir = await askExportDir(); } + config.exportDir = config.exportDir.replace(/['"]/g, ''); config.exportDir = path.resolve(config.exportDir); + //Note to support the old key config.data = config.exportDir; diff --git a/packages/contentstack-export/src/utils/interactive.ts b/packages/contentstack-export/src/utils/interactive.ts index e0edbbffa4..141ec1f6e3 100644 --- a/packages/contentstack-export/src/utils/interactive.ts +++ b/packages/contentstack-export/src/utils/interactive.ts @@ -1,4 +1,4 @@ -import { cliux } from '@contentstack/cli-utilities'; +import { cliux, validatePath } from '@contentstack/cli-utilities'; import * as path from 'path'; export const askPassword = async () => { @@ -49,6 +49,7 @@ export const askExportDir = async (): Promise => { type: 'input', message: 'Enter the path for storing the content: (current folder)', name: 'dir', + validate: validatePath, }); if (!result) { return process.cwd(); diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index bf432cfb52..69434cd4e0 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -7,7 +7,7 @@ "dependencies": { "@contentstack/cli-audit": "~1.4.0", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", "big-json": "^3.2.0", diff --git a/packages/contentstack-import/src/utils/import-config-handler.ts b/packages/contentstack-import/src/utils/import-config-handler.ts index cd1232391d..9fa7d90202 100644 --- a/packages/contentstack-import/src/utils/import-config-handler.ts +++ b/packages/contentstack-import/src/utils/import-config-handler.ts @@ -1,7 +1,7 @@ import merge from 'merge'; import * as path from 'path'; import { omit, filter, includes, isArray } from 'lodash'; -import { configHandler, isAuthenticated } from '@contentstack/cli-utilities'; +import { configHandler, isAuthenticated, cliux } from '@contentstack/cli-utilities'; import defaultConfig from '../config'; import { readFile, fileExistsSync } from './file-helper'; import { askContentDir, askAPIKey } from './interactive'; @@ -21,12 +21,17 @@ const setupConfig = async (importCmdFlags: any): Promise => { } config.contentDir = importCmdFlags['data'] || importCmdFlags['data-dir'] || config.data || (await askContentDir()); - config.contentDir = config.contentDir.replace(/['"]/g, ''); const pattern = /[*$%#<>{}!&?]/g; - while (pattern.test(config.contentDir)) { - console.log(`Your mentioned directory path contains special characters please add a path without them`); + if (pattern.test(config.contentDir)) { + cliux.print( + `\nYour mentioned directory path contains special characters (*,&,{,},[,],$,%,<,>,?,!) please add a path without them`, + { + color: 'yellow', + }, + ); config.contentDir = await askContentDir(); } + config.contentDir = config.contentDir.replace(/['"]/g, ''); config.contentDir = path.resolve(config.contentDir); //Note to support the old key config.data = config.contentDir; diff --git a/packages/contentstack-import/src/utils/interactive.ts b/packages/contentstack-import/src/utils/interactive.ts index 528373c15d..e641085111 100644 --- a/packages/contentstack-import/src/utils/interactive.ts +++ b/packages/contentstack-import/src/utils/interactive.ts @@ -1,4 +1,4 @@ -import { cliux } from '@contentstack/cli-utilities'; +import { cliux, validatePath } from '@contentstack/cli-utilities'; import * as path from 'path'; import first from 'lodash/first'; import split from 'lodash/split'; @@ -8,6 +8,7 @@ export const askContentDir = async (): Promise => { type: 'input', message: 'Enter the path for the content', name: 'dir', + validate: validatePath, }); result = result.replace(/["']/g, ''); return path.resolve(result); diff --git a/packages/contentstack-launch/package.json b/packages/contentstack-launch/package.json index 1704922306..9a14449afb 100755 --- a/packages/contentstack-launch/package.json +++ b/packages/contentstack-launch/package.json @@ -19,7 +19,7 @@ "dependencies": { "@apollo/client": "^3.7.9", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", "@oclif/plugin-plugins": "^4.1.9", diff --git a/packages/contentstack-migrate-rte/package.json b/packages/contentstack-migrate-rte/package.json index 43f16ef3f6..36545459be 100644 --- a/packages/contentstack-migrate-rte/package.json +++ b/packages/contentstack-migrate-rte/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/json-rte-serializer": "~2.0.4", "collapse-whitespace": "^1.1.7", "chalk": "^4.1.2", diff --git a/packages/contentstack-migration/package.json b/packages/contentstack-migration/package.json index db25a1b7fc..96589c4fc4 100644 --- a/packages/contentstack-migration/package.json +++ b/packages/contentstack-migration/package.json @@ -5,7 +5,7 @@ "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "async": "^3.2.4", "callsites": "^3.1.0", "cardinal": "^2.1.1", diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index a4996b8a01..fe2ce5d62a 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -7,7 +7,7 @@ "dependencies": { "@contentstack/cli-cm-import": "~1.14.1", "@contentstack/cli-command": "~1.2.16", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "inquirer": "8.2.4", "mkdirp": "^1.0.4", "tar": "^6.1.13", diff --git a/packages/contentstack-utilities/package.json b/packages/contentstack-utilities/package.json index 00b4686f63..54e9d017b5 100644 --- a/packages/contentstack-utilities/package.json +++ b/packages/contentstack-utilities/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-utilities", - "version": "1.5.12", + "version": "1.5.13", "description": "Utilities for contentstack projects", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -14,7 +14,7 @@ "posttest": "npm run lint", "lint": "eslint src/**/*.ts", "format": "eslint src/**/*.ts --fix", - "test:unit": "mocha --forbid-only \"test/unit/**/*.test.ts\"", + "test:unit": "mocha --forbid-only \"test/unit/**/helper.test.ts\"", "test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\"" }, "repository": { diff --git a/packages/contentstack-utilities/src/helpers.ts b/packages/contentstack-utilities/src/helpers.ts index debee61879..35aa4d7727 100644 --- a/packages/contentstack-utilities/src/helpers.ts +++ b/packages/contentstack-utilities/src/helpers.ts @@ -36,3 +36,17 @@ export const createDeveloperHubUrl = (developerHubBaseUrl: string): string => { : developerHubBaseUrl; return developerHubBaseUrl.startsWith('http') ? developerHubBaseUrl : `https://${developerHubBaseUrl}`; }; + +export const validatePath = (input: string) => { + const pattern = /[*$%#<>{}!&?]/g; + if (pattern.test(input)) { + cliux.print( + `\nYour mentioned directory path contains special characters (*,&,{,},[,],$,%,<,>,?,!) please add a path without them`, + { + color: 'yellow', + }, + ); + return false; + } + return true; +}; diff --git a/packages/contentstack-utilities/test/unit/helper.test.ts b/packages/contentstack-utilities/test/unit/helper.test.ts new file mode 100644 index 0000000000..55f983ce80 --- /dev/null +++ b/packages/contentstack-utilities/test/unit/helper.test.ts @@ -0,0 +1,25 @@ +import { cliux, validatePath } from '../../lib'; +import { expect } from '@oclif/test'; +import { fancy } from '@contentstack/cli-dev-dependencies'; + +describe('Testing the Validate function', () => { + describe('When there is no input', () => { + it('should return true', () => { + expect(validatePath('')).eql(true); + }); + }); + describe('When input contains special character', () => { + fancy + .stub(cliux, 'print', () => {}) + .it('should return true', () => { + expect(validatePath('/invalidPath*&%$#')).eql(false); + }); + }); + describe('When input does not contains special character', () => { + fancy + .stub(cliux, 'print', () => {}) + .it('should return true', () => { + expect(validatePath('/validPath')).eql(true); + }); + }); +}); diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 97d1caad95..d8fa38be2e 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -37,7 +37,7 @@ "@contentstack/cli-config": "~1.6.2", "@contentstack/cli-launch": "~1.0.16", "@contentstack/cli-migration": "~1.5.0", - "@contentstack/cli-utilities": "~1.5.12", + "@contentstack/cli-utilities": "~1.5.13", "@contentstack/management": "~1.15.3", "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 10c71b44d3..28195ec4c9 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -25,7 +25,7 @@ importers: '@contentstack/cli-config': ~1.6.2 '@contentstack/cli-launch': ~1.0.16 '@contentstack/cli-migration': ~1.5.0 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@contentstack/management': ~1.15.3 '@oclif/core': ^2.9.3 '@oclif/plugin-help': ^5 @@ -123,7 +123,7 @@ importers: specifiers: '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-dev-dependencies': ^1.2.4 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/plugin-help': ^5 '@oclif/plugin-plugins': ^4.1.9 '@oclif/test': ^2.5.6 @@ -187,7 +187,7 @@ importers: packages/contentstack-auth: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@fancy-test/nock': ^0.1.1 '@oclif/plugin-help': ^5.1.19 '@oclif/test': ^2.5.6 @@ -251,7 +251,7 @@ importers: specifiers: '@contentstack/cli-cm-seed': ~1.7.0 '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 '@types/inquirer': ^9.0.3 '@types/mkdirp': ^1.0.1 @@ -304,7 +304,7 @@ importers: '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-config': ~1.6.1 '@contentstack/cli-dev-dependencies': ~1.2.4 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/core': ^2.9.3 '@oclif/plugin-help': ^5.1.19 '@oclif/test': ^2.5.6 @@ -380,7 +380,7 @@ importers: packages/contentstack-bulk-publish: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 bluebird: ^3.7.2 chai: ^4.2.0 @@ -426,7 +426,7 @@ importers: '@contentstack/cli-cm-export': ~1.11.1 '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 async: ^3.2.4 chai: ^4.2.0 @@ -479,7 +479,7 @@ importers: packages/contentstack-command: specifiers: - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 '@types/chai': ^4.2.18 '@types/mkdirp': ^1.0.1 @@ -521,7 +521,7 @@ importers: packages/contentstack-config: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 '@types/chai': ^4.2.18 '@types/inquirer': ^9.0.3 @@ -610,7 +610,7 @@ importers: '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-config': ~1.6.1 '@contentstack/cli-dev-dependencies': ~1.2.4 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/core': ^2.9.3 '@oclif/plugin-help': ^5.1.19 '@oclif/test': ^2.5.6 @@ -688,7 +688,7 @@ importers: packages/contentstack-export-to-csv: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 '@types/chai': ^4.3.6 '@types/mocha': ^10.0.1 @@ -732,7 +732,7 @@ importers: specifiers: '@contentstack/cli-audit': ~1.4.0 '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@contentstack/management': ~1.15.3 '@oclif/core': ^2.9.3 '@oclif/test': ^2.5.6 @@ -821,7 +821,7 @@ importers: specifiers: '@apollo/client': ^3.7.9 '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/core': ^2.9.3 '@oclif/plugin-help': ^5 '@oclif/plugin-plugins': ^4.1.9 @@ -897,7 +897,7 @@ importers: packages/contentstack-migrate-rte: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@contentstack/json-rte-serializer': ~2.0.4 '@oclif/test': ^2.5.6 chai: ^4.3.4 @@ -944,7 +944,7 @@ importers: packages/contentstack-migration: specifiers: '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/test': ^2.5.6 async: ^3.2.4 callsites: ^3.1.0 @@ -992,7 +992,7 @@ importers: specifiers: '@contentstack/cli-cm-import': ~1.14.1 '@contentstack/cli-command': ~1.2.16 - '@contentstack/cli-utilities': ~1.5.12 + '@contentstack/cli-utilities': ~1.5.13 '@oclif/plugin-help': ^5.1.19 '@types/inquirer': ^9.0.3 '@types/jest': ^26.0.15