@contentstack/cli-cm-import-setup 1.1.0 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/utils/import-config-handler.js +2 -2
- package/lib/utils/logger.js +5 -2
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import-setup
|
|
|
47
47
|
$ csdx COMMAND
|
|
48
48
|
running command...
|
|
49
49
|
$ csdx (--version)
|
|
50
|
-
@contentstack/cli-cm-import-setup/1.1.
|
|
50
|
+
@contentstack/cli-cm-import-setup/1.1.2 linux-x64 node-v22.14.0
|
|
51
51
|
$ csdx --help [COMMAND]
|
|
52
52
|
USAGE
|
|
53
53
|
$ csdx COMMAND
|
|
@@ -20,13 +20,13 @@ const setupConfig = async (importCmdFlags) => {
|
|
|
20
20
|
// }
|
|
21
21
|
// config = merge.recursive(config, externalConfig);
|
|
22
22
|
// }
|
|
23
|
-
config.contentDir = importCmdFlags['data'] || importCmdFlags['data-dir'] || config.data || (await (0, interactive_1.askContentDir)());
|
|
23
|
+
config.contentDir = (0, cli_utilities_1.sanitizePath)(importCmdFlags['data'] || importCmdFlags['data-dir'] || config.data || (await (0, interactive_1.askContentDir)()));
|
|
24
24
|
const pattern = /[*$%#<>{}!&?]/g;
|
|
25
25
|
if (pattern.test(config.contentDir)) {
|
|
26
26
|
cli_utilities_1.cliux.print(`\nPlease add a directory path without any of the special characters: (*,&,{,},[,],$,%,<,>,?,!)`, {
|
|
27
27
|
color: 'yellow',
|
|
28
28
|
});
|
|
29
|
-
config.contentDir = await (0, interactive_1.askContentDir)();
|
|
29
|
+
config.contentDir = (0, cli_utilities_1.sanitizePath)(await (0, interactive_1.askContentDir)());
|
|
30
30
|
}
|
|
31
31
|
config.contentDir = config.contentDir.replace(/['"]/g, '');
|
|
32
32
|
config.contentDir = path.resolve(config.contentDir);
|
package/lib/utils/logger.js
CHANGED
|
@@ -22,7 +22,10 @@ function returnString(args) {
|
|
|
22
22
|
.map(function (item) {
|
|
23
23
|
if (item && typeof item === 'object') {
|
|
24
24
|
try {
|
|
25
|
-
|
|
25
|
+
const redactedObject = (0, cli_utilities_1.redactObject)(item);
|
|
26
|
+
if (redactedObject && typeof redactedObject === 'object') {
|
|
27
|
+
return JSON.stringify(redactedObject);
|
|
28
|
+
}
|
|
26
29
|
}
|
|
27
30
|
catch (error) { }
|
|
28
31
|
return item;
|
|
@@ -122,7 +125,7 @@ function init(_logPath) {
|
|
|
122
125
|
};
|
|
123
126
|
}
|
|
124
127
|
const log = async (config, message, type) => {
|
|
125
|
-
config.cliLogsPath = config.cliLogsPath || config.data || path.join(__dirname, 'logs');
|
|
128
|
+
config.cliLogsPath = (0, cli_utilities_1.sanitizePath)(config.cliLogsPath || config.data || path.join(__dirname, 'logs'));
|
|
126
129
|
// ignoring the type argument, as we are not using it to create a logfile anymore
|
|
127
130
|
if (type !== 'error') {
|
|
128
131
|
// removed type argument from init method
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-import-setup",
|
|
3
3
|
"description": "Contentstack CLI plugin to setup the mappers and configurations for the import command",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@contentstack/cli-command": "~1.3.3",
|
|
9
|
-
"@contentstack/cli-utilities": "~1.
|
|
9
|
+
"@contentstack/cli-utilities": "~1.9.0",
|
|
10
10
|
"@oclif/core": "^3.27.0",
|
|
11
11
|
"big-json": "^3.2.0",
|
|
12
12
|
"chalk": "^4.1.2",
|