@contentstack/cli-cm-import-setup 1.0.1 → 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/config/index.js +2 -0
- 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 +3 -15
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.
|
|
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
|
package/lib/config/index.js
CHANGED
|
@@ -9,6 +9,8 @@ const config = {
|
|
|
9
9
|
// host:'https://azure-eu-api.contentstack.com/v3',
|
|
10
10
|
// use below hosts for gcp-na region
|
|
11
11
|
// host:'https://gcp-na-api.contentstack.com',
|
|
12
|
+
// use below hosts for gcp-eu region
|
|
13
|
+
// host:'https://gcp-eu-api.contentstack.com',
|
|
12
14
|
// pass locale, only to migrate entries from that locale
|
|
13
15
|
// not passing `locale` will migrate all the locales present
|
|
14
16
|
// locales: ['fr-fr'],
|
|
@@ -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,29 +1,22 @@
|
|
|
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.
|
|
4
|
+
"version": "1.1.2",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "~1.3.
|
|
9
|
-
"@contentstack/cli-utilities": "~1.
|
|
8
|
+
"@contentstack/cli-command": "~1.3.3",
|
|
9
|
+
"@contentstack/cli-utilities": "~1.9.0",
|
|
10
10
|
"@oclif/core": "^3.27.0",
|
|
11
11
|
"big-json": "^3.2.0",
|
|
12
|
-
"bluebird": "^3.7.2",
|
|
13
12
|
"chalk": "^4.1.2",
|
|
14
|
-
"debug": "^4.4.0",
|
|
15
13
|
"fs-extra": "^11.1.1",
|
|
16
14
|
"lodash": "^4.17.21",
|
|
17
|
-
"marked": "^4.3.0",
|
|
18
15
|
"merge": "^2.1.1",
|
|
19
16
|
"mkdirp": "^1.0.4",
|
|
20
|
-
"promise-limit": "^2.7.0",
|
|
21
|
-
"tslib": "^2.8.1",
|
|
22
|
-
"uuid": "^9.0.1",
|
|
23
17
|
"winston": "^3.17.0"
|
|
24
18
|
},
|
|
25
19
|
"devDependencies": {
|
|
26
|
-
"@oclif/test": "^4.1.6",
|
|
27
20
|
"@types/big-json": "^3.2.5",
|
|
28
21
|
"@types/bluebird": "^3.5.42",
|
|
29
22
|
"@types/chai": "^4.3.20",
|
|
@@ -31,20 +24,15 @@
|
|
|
31
24
|
"@types/mkdirp": "^1.0.2",
|
|
32
25
|
"@types/mocha": "^8.2.3",
|
|
33
26
|
"@types/node": "^14.18.63",
|
|
34
|
-
"@types/sinon": "^10.0.20",
|
|
35
27
|
"@types/tar": "^6.1.13",
|
|
36
28
|
"@types/uuid": "^9.0.8",
|
|
37
29
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
38
30
|
"chai": "^4.5.0",
|
|
39
31
|
"eslint": "^8.57.1",
|
|
40
32
|
"eslint-config-oclif": "^4.0.0",
|
|
41
|
-
"globby": "^10.0.2",
|
|
42
33
|
"mocha": "^10.8.2",
|
|
43
34
|
"nyc": "^15.1.0",
|
|
44
35
|
"oclif": "^3.17.2",
|
|
45
|
-
"rimraf": "^2.7.1",
|
|
46
|
-
"sinon": "^11.1.2",
|
|
47
|
-
"tmp": "^0.2.3",
|
|
48
36
|
"ts-node": "^10.9.2",
|
|
49
37
|
"typescript": "^4.9.5"
|
|
50
38
|
},
|