@contentstack/cli-migration 1.3.9 → 1.3.11

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
@@ -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.9 linux-x64 node-v18.16.1
24
+ @contentstack/cli-migration/1.3.11 darwin-arm64 node-v20.3.1
25
25
  $ csdx --help [COMMAND]
26
26
  USAGE
27
27
  $ csdx COMMAND
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@contentstack/cli-migration",
3
- "version": "1.3.9",
3
+ "version": "1.3.11",
4
4
  "author": "@contentstack",
5
5
  "bugs": "https://github.com/contentstack/cli/issues",
6
6
  "dependencies": {
7
- "@contentstack/cli-command": "^1.2.10",
8
- "@contentstack/cli-utilities": "^1.5.0",
7
+ "@contentstack/cli-command": "~1.2.11",
8
+ "@contentstack/cli-utilities": "~1.5.1",
9
9
  "@oclif/command": "^1.8.16",
10
10
  "@oclif/config": "^1.18.3",
11
11
  "async": "^3.2.4",
@@ -160,7 +160,13 @@ class MigrationCommand extends Command {
160
160
  requests.splice(0, requests.length);
161
161
  } catch (error) {
162
162
  // errorHandler(null, null, null, error)
163
- this.log(error);
163
+ if (error.message) {
164
+ this.log(error.message);
165
+ } else if (error.errorMessage) {
166
+ this.log(error.errorMessage);
167
+ }else{
168
+ this.log(error)
169
+ }
164
170
  }
165
171
  }
166
172
 
@@ -1,126 +0,0 @@
1
- {
2
- "version": "1.3.9",
3
- "commands": {
4
- "cm:stacks:migration": {
5
- "id": "cm:stacks:migration",
6
- "description": "Contentstack migration script.",
7
- "strict": true,
8
- "usage": "cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]",
9
- "pluginName": "@contentstack/cli-migration",
10
- "pluginAlias": "@contentstack/cli-migration",
11
- "pluginType": "core",
12
- "aliases": [
13
- "cm:migration"
14
- ],
15
- "examples": [
16
- "$ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>",
17
- "$ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>",
18
- "$ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>",
19
- "$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>",
20
- "$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path> ",
21
- "$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>"
22
- ],
23
- "flags": {
24
- "stack-api-key": {
25
- "name": "stack-api-key",
26
- "type": "option",
27
- "char": "k",
28
- "description": "With this flag add the API key of your stack.",
29
- "multiple": false,
30
- "exclusive": [
31
- "alias"
32
- ]
33
- },
34
- "alias": {
35
- "name": "alias",
36
- "type": "option",
37
- "char": "a",
38
- "description": "Use this flag to add the management token alias.",
39
- "multiple": false
40
- },
41
- "file-path": {
42
- "name": "file-path",
43
- "type": "option",
44
- "description": "Use this flag to provide the path of the file of the migration script provided by the user.",
45
- "multiple": false
46
- },
47
- "branch": {
48
- "name": "branch",
49
- "type": "option",
50
- "char": "B",
51
- "description": "Use this flag to add the branch name where you want to perform the migration.",
52
- "multiple": false
53
- },
54
- "config-file": {
55
- "name": "config-file",
56
- "type": "option",
57
- "description": "[optional] Path of the JSON configuration file",
58
- "multiple": false
59
- },
60
- "config": {
61
- "name": "config",
62
- "type": "option",
63
- "description": "[optional] inline configuration, <key1>:<value1>",
64
- "multiple": true
65
- },
66
- "multiple": {
67
- "name": "multiple",
68
- "type": "boolean",
69
- "description": "This flag helps you to migrate multiple content files in a single instance.",
70
- "allowNo": false
71
- },
72
- "api-key": {
73
- "name": "api-key",
74
- "type": "option",
75
- "char": "k",
76
- "description": "With this flag add the API key of your stack.",
77
- "hidden": true,
78
- "multiple": false,
79
- "exclusive": [
80
- "alias"
81
- ]
82
- },
83
- "authtoken": {
84
- "name": "authtoken",
85
- "type": "boolean",
86
- "char": "A",
87
- "description": "Use this flag to use the auth token of the current session. After logging in CLI, an auth token is generated for each new session.",
88
- "hidden": true,
89
- "allowNo": false,
90
- "dependsOn": [
91
- "api-key"
92
- ],
93
- "exclusive": [
94
- "alias"
95
- ]
96
- },
97
- "management-token-alias": {
98
- "name": "management-token-alias",
99
- "type": "option",
100
- "description": "alias of the management token",
101
- "hidden": true,
102
- "multiple": false,
103
- "exclusive": [
104
- "authtoken"
105
- ]
106
- },
107
- "filePath": {
108
- "name": "filePath",
109
- "type": "option",
110
- "char": "n",
111
- "description": "Use this flag to provide the path of the file of the migration script provided by the user.",
112
- "hidden": true,
113
- "multiple": false
114
- },
115
- "multi": {
116
- "name": "multi",
117
- "type": "boolean",
118
- "description": "This flag helps you to migrate multiple content files in a single instance.",
119
- "hidden": true,
120
- "allowNo": false
121
- }
122
- },
123
- "args": {}
124
- }
125
- }
126
- }