@contentstack/cli-cm-import 1.28.1 → 1.28.3
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
CHANGED
|
@@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
|
|
|
47
47
|
$ csdx COMMAND
|
|
48
48
|
running command...
|
|
49
49
|
$ csdx (--version)
|
|
50
|
-
@contentstack/cli-cm-import/1.28.
|
|
50
|
+
@contentstack/cli-cm-import/1.28.3 linux-x64 node-v22.20.0
|
|
51
51
|
$ csdx --help [COMMAND]
|
|
52
52
|
USAGE
|
|
53
53
|
$ csdx COMMAND
|
|
@@ -91,9 +91,8 @@ FLAGS
|
|
|
91
91
|
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
92
92
|
workflows, custom-roles, personalize projects, and taxonomies.
|
|
93
93
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
94
|
-
--branch-alias=<value>
|
|
95
|
-
|
|
96
|
-
main branch.
|
|
94
|
+
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
|
|
95
|
+
specified, the content is imported into the main branch by default.
|
|
97
96
|
--exclude-global-modules Excludes the branch-independent module from the import operation.
|
|
98
97
|
--import-webhook-status=<option> [default: disable] [default: disable] (optional) This webhook state keeps the
|
|
99
98
|
same state of webhooks as the source stack. <options: disable|current>
|
|
@@ -160,9 +159,8 @@ FLAGS
|
|
|
160
159
|
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
|
|
161
160
|
workflows, custom-roles, personalize projects, and taxonomies.
|
|
162
161
|
-y, --yes [optional] Force override all Marketplace prompts.
|
|
163
|
-
--branch-alias=<value>
|
|
164
|
-
|
|
165
|
-
main branch.
|
|
162
|
+
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
|
|
163
|
+
specified, the content is imported into the main branch by default.
|
|
166
164
|
--exclude-global-modules Excludes the branch-independent module from the import operation.
|
|
167
165
|
--import-webhook-status=<option> [default: disable] [default: disable] (optional) This webhook state keeps the
|
|
168
166
|
same state of webhooks as the source stack. <options: disable|current>
|
|
@@ -133,7 +133,7 @@ ImportCommand.flags = {
|
|
|
133
133
|
exclusive: ['branch-alias'],
|
|
134
134
|
}),
|
|
135
135
|
'branch-alias': cli_utilities_1.flags.string({
|
|
136
|
-
description: "
|
|
136
|
+
description: "Specify the branch alias where you want to import your content. If not specified, the content is imported into the main branch by default.",
|
|
137
137
|
exclusive: ['branch'],
|
|
138
138
|
}),
|
|
139
139
|
'import-webhook-status': cli_utilities_1.flags.string({
|
|
@@ -139,7 +139,7 @@ class ImportWorkflows extends base_class_1.default {
|
|
|
139
139
|
utils_1.fsUtil.writeFile(this.workflowUidMapperPath, this.workflowUidMapper);
|
|
140
140
|
};
|
|
141
141
|
const onReject = ({ error, apiData }) => {
|
|
142
|
-
var _a, _b;
|
|
142
|
+
var _a, _b, _c;
|
|
143
143
|
const err = (error === null || error === void 0 ? void 0 : error.message) ? JSON.parse(error.message) : error;
|
|
144
144
|
const { name, uid } = apiData;
|
|
145
145
|
cli_utilities_1.log.debug(`Workflow '${name}' (${uid}) failed to import`, this.importConfig.context);
|
|
@@ -149,7 +149,7 @@ class ImportWorkflows extends base_class_1.default {
|
|
|
149
149
|
}
|
|
150
150
|
else {
|
|
151
151
|
this.failedWebhooks.push(apiData);
|
|
152
|
-
if (error.errors['workflow_stages.0.users']) {
|
|
152
|
+
if ((_c = error.errors) === null || _c === void 0 ? void 0 : _c['workflow_stages.0.users']) {
|
|
153
153
|
cli_utilities_1.log.error("Failed to import Workflows as you've specified certain roles in the Stage transition and access rules section. We currently don't import roles to the stack.", this.importConfig.context);
|
|
154
154
|
}
|
|
155
155
|
else {
|
|
@@ -19,7 +19,7 @@ const setupBranchConfig = async (config, stackAPIClient) => {
|
|
|
19
19
|
.find()
|
|
20
20
|
.then(({ items }) => items);
|
|
21
21
|
if (branches.length) {
|
|
22
|
-
cli_utilities_1.log.info(`
|
|
22
|
+
cli_utilities_1.log.info(`The stack is branch-enabled, and branches exist. By default, content will be imported into the main branch.`);
|
|
23
23
|
config.branchName = 'main';
|
|
24
24
|
cli_utilities_1.log.debug(`Setting default target branch to 'main'`);
|
|
25
25
|
}
|
package/oclif.manifest.json
CHANGED
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
"type": "option"
|
|
112
112
|
},
|
|
113
113
|
"branch-alias": {
|
|
114
|
-
"description": "
|
|
114
|
+
"description": "Specify the branch alias where you want to import your content. If not specified, the content is imported into the main branch by default.",
|
|
115
115
|
"exclusive": [
|
|
116
116
|
"branch"
|
|
117
117
|
],
|
|
@@ -212,5 +212,5 @@
|
|
|
212
212
|
]
|
|
213
213
|
}
|
|
214
214
|
},
|
|
215
|
-
"version": "1.28.
|
|
215
|
+
"version": "1.28.3"
|
|
216
216
|
}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-import",
|
|
3
3
|
"description": "Contentstack CLI plugin to import content into stack",
|
|
4
|
-
"version": "1.28.
|
|
4
|
+
"version": "1.28.3",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-audit": "~1.
|
|
8
|
+
"@contentstack/cli-audit": "~1.15.0",
|
|
9
9
|
"@contentstack/cli-command": "~1.6.1",
|
|
10
|
-
"@contentstack/cli-utilities": "~1.14.
|
|
10
|
+
"@contentstack/cli-utilities": "~1.14.4",
|
|
11
11
|
"@contentstack/management": "~1.22.0",
|
|
12
|
-
"@contentstack/cli-variants": "~1.3.
|
|
12
|
+
"@contentstack/cli-variants": "~1.3.4",
|
|
13
13
|
"@oclif/core": "^4.3.0",
|
|
14
14
|
"big-json": "^3.2.0",
|
|
15
15
|
"bluebird": "^3.7.2",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
"@types/mkdirp": "^1.0.2",
|
|
33
33
|
"@types/mocha": "^8.2.3",
|
|
34
34
|
"@types/node": "^14.18.63",
|
|
35
|
+
"@types/rewire": "^2.5.30",
|
|
35
36
|
"@types/tar": "^6.1.13",
|
|
36
37
|
"@types/uuid": "^9.0.8",
|
|
37
38
|
"@typescript-eslint/eslint-plugin": "^5.62.0",
|
|
@@ -40,6 +41,7 @@
|
|
|
40
41
|
"mocha": "^10.8.2",
|
|
41
42
|
"nyc": "^15.1.0",
|
|
42
43
|
"oclif": "^4.17.46",
|
|
44
|
+
"rewire": "^9.0.1",
|
|
43
45
|
"ts-node": "^10.9.2",
|
|
44
46
|
"typescript": "^4.9.5"
|
|
45
47
|
},
|
|
@@ -57,7 +59,8 @@
|
|
|
57
59
|
"lint": "eslint src/**/*.ts",
|
|
58
60
|
"format": "eslint src/**/*.ts --fix",
|
|
59
61
|
"test:integration": "mocha --forbid-only \"test/run.test.js\" --integration-test --timeout 60000",
|
|
60
|
-
"test:unit": "mocha --forbid-only \"test/unit
|
|
62
|
+
"test:unit:report": "nyc --extension .ts mocha --forbid-only \"test/unit/**/*.test.ts\"",
|
|
63
|
+
"test:unit": "mocha --forbid-only \"test/**/*.test.ts\""
|
|
61
64
|
},
|
|
62
65
|
"engines": {
|
|
63
66
|
"node": ">=14.0.0"
|