@contentstack/cli-migration 1.3.0 → 1.3.1
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/oclif.manifest.json +2 -8
- package/package.json +3 -3
- package/src/commands/cm/stacks/migration.js +3 -6
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ $ npm install -g @contentstack/cli-migration
|
|
|
21
21
|
$ csdx COMMAND
|
|
22
22
|
running command...
|
|
23
23
|
$ csdx (--version)
|
|
24
|
-
@contentstack/cli-migration/1.3.
|
|
24
|
+
@contentstack/cli-migration/1.3.1 linux-x64 node-v16.20.0
|
|
25
25
|
$ csdx --help [COMMAND]
|
|
26
26
|
USAGE
|
|
27
27
|
$ csdx COMMAND
|
package/oclif.manifest.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "1.3.
|
|
2
|
+
"version": "1.3.1",
|
|
3
3
|
"commands": {
|
|
4
4
|
"cm:stacks:migration": {
|
|
5
5
|
"id": "cm:stacks:migration",
|
|
@@ -27,9 +27,6 @@
|
|
|
27
27
|
"char": "k",
|
|
28
28
|
"description": "With this flag add the API key of your stack.",
|
|
29
29
|
"multiple": false,
|
|
30
|
-
"dependsOn": [
|
|
31
|
-
"authtoken"
|
|
32
|
-
],
|
|
33
30
|
"exclusive": [
|
|
34
31
|
"alias"
|
|
35
32
|
]
|
|
@@ -39,10 +36,7 @@
|
|
|
39
36
|
"type": "option",
|
|
40
37
|
"char": "a",
|
|
41
38
|
"description": "Use this flag to add the management token alias.",
|
|
42
|
-
"multiple": false
|
|
43
|
-
"exclusive": [
|
|
44
|
-
"authtoken"
|
|
45
|
-
]
|
|
39
|
+
"multiple": false
|
|
46
40
|
},
|
|
47
41
|
"file-path": {
|
|
48
42
|
"name": "file-path",
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-migration",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.1",
|
|
4
4
|
"author": "@contentstack",
|
|
5
5
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@contentstack/cli-command": "^1.2.
|
|
8
|
-
"@contentstack/cli-utilities": "^1.
|
|
7
|
+
"@contentstack/cli-command": "^1.2.2",
|
|
8
|
+
"@contentstack/cli-utilities": "^1.3.1",
|
|
9
9
|
"@contentstack/management": "^1.6.1",
|
|
10
10
|
"@oclif/command": "^1.8.16",
|
|
11
11
|
"@oclif/config": "^1.18.3",
|
|
@@ -12,7 +12,7 @@ const { Parser } = require('../../../modules');
|
|
|
12
12
|
const { ActionList } = require('../../../actions');
|
|
13
13
|
const fs = require('fs');
|
|
14
14
|
const chalk = require('chalk');
|
|
15
|
-
const {
|
|
15
|
+
const { printFlagDeprecation, managementSDKClient, flags, isAuthenticated } = require('@contentstack/cli-utilities');
|
|
16
16
|
|
|
17
17
|
const { ApiError, SchemaValidator, MigrationError, FieldValidator } = require('../../../validators');
|
|
18
18
|
|
|
@@ -49,7 +49,7 @@ class MigrationCommand extends Command {
|
|
|
49
49
|
const { branch } = migrationCommandFlags || {};
|
|
50
50
|
const filePath = migrationCommandFlags['file-path'] || migrationCommandFlags.filePath;
|
|
51
51
|
const multi = migrationCommandFlags.multiple || migrationCommandFlags.multi;
|
|
52
|
-
const authtoken =
|
|
52
|
+
const authtoken = isAuthenticated();
|
|
53
53
|
const apiKey = migrationCommandFlags['api-key'] || migrationCommandFlags['stack-api-key'];
|
|
54
54
|
const alias = migrationCommandFlags['alias'] || migrationCommandFlags['management-token-alias'];
|
|
55
55
|
const config = migrationCommandFlags['config'];
|
|
@@ -81,7 +81,7 @@ class MigrationCommand extends Command {
|
|
|
81
81
|
set('config', mapInstance, configObj);
|
|
82
82
|
}
|
|
83
83
|
|
|
84
|
-
const APIClient = await managementSDKClient({ host: this.cmaHost })
|
|
84
|
+
const APIClient = await managementSDKClient({ host: this.cmaHost });
|
|
85
85
|
let stackSDKInstance;
|
|
86
86
|
if (branch) {
|
|
87
87
|
set(BRANCH, mapInstance, branch);
|
|
@@ -235,13 +235,11 @@ MigrationCommand.flags = {
|
|
|
235
235
|
'stack-api-key': flags.string({
|
|
236
236
|
char: 'k',
|
|
237
237
|
description: 'With this flag add the API key of your stack.',
|
|
238
|
-
dependsOn: ['authtoken'],
|
|
239
238
|
exclusive: ['alias'],
|
|
240
239
|
}),
|
|
241
240
|
alias: flags.string({
|
|
242
241
|
char: 'a',
|
|
243
242
|
description: 'Use this flag to add the management token alias.',
|
|
244
|
-
exclusive: ['authtoken'],
|
|
245
243
|
}),
|
|
246
244
|
'file-path': flags.string({
|
|
247
245
|
description: 'Use this flag to provide the path of the file of the migration script provided by the user.',
|
|
@@ -258,7 +256,6 @@ MigrationCommand.flags = {
|
|
|
258
256
|
description: '[optional] inline configuration, <key1>:<value1>',
|
|
259
257
|
multiple: true,
|
|
260
258
|
}),
|
|
261
|
-
|
|
262
259
|
multiple: flags.boolean({
|
|
263
260
|
description: 'This flag helps you to migrate multiple content files in a single instance.',
|
|
264
261
|
}),
|