@contentstack/cli-migration 1.4.2 → 1.5.0
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/LICENSE +1 -1
- package/README.md +2 -2
- package/package.json +5 -5
- package/src/utils/error-helper.js +6 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@ The Contentstack CLI’s “Migration” plugin allows developers to automate th
|
|
|
5
5
|
[](https://oclif.io)
|
|
6
6
|
[](https://npmjs.org/package/@contentstack/cli-migration)
|
|
7
7
|
[](https://npmjs.org/package/@contentstack/cli-migration)
|
|
8
|
-
[](https://github.com
|
|
8
|
+
[](https://github.com/***REMOVED***/cli-migration/blob/master/package.json)
|
|
9
9
|
|
|
10
10
|
<!-- toc -->
|
|
11
11
|
* [@contentstack/cli-migration](#contentstackcli-migration)
|
|
@@ -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.
|
|
24
|
+
@contentstack/cli-migration/1.5.0 darwin-arm64 node-v20.8.0
|
|
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
|
+
"version": "1.5.0",
|
|
4
4
|
"author": "@contentstack",
|
|
5
5
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@contentstack/cli-command": "~1.2.16",
|
|
8
|
-
"@contentstack/cli-utilities": "~1.5.
|
|
8
|
+
"@contentstack/cli-utilities": "~1.5.12",
|
|
9
9
|
"async": "^3.2.4",
|
|
10
10
|
"callsites": "^3.1.0",
|
|
11
11
|
"cardinal": "^2.1.1",
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"winston": "^3.7.2"
|
|
17
17
|
},
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@oclif/test": "^2.
|
|
19
|
+
"@oclif/test": "^2.5.6",
|
|
20
20
|
"chai": "^4.3.4",
|
|
21
21
|
"eslint": "^8.18.0",
|
|
22
22
|
"globby": "^10.0.2",
|
|
23
23
|
"husky": "^8.0.3",
|
|
24
24
|
"jsdoc": "^4.0.0",
|
|
25
|
-
"jsdoc-to-markdown": "^
|
|
25
|
+
"jsdoc-to-markdown": "^8.0.0",
|
|
26
26
|
"mkdirp": "^1.0.4",
|
|
27
27
|
"nock": "^13.1.1",
|
|
28
28
|
"nyc": "^15.1.0",
|
|
@@ -66,4 +66,4 @@
|
|
|
66
66
|
"cm:migration": "O-MGRTN"
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
|
-
}
|
|
69
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
const { highlight } = require('cardinal');
|
|
2
2
|
const { keys } = Object;
|
|
3
3
|
const chalk = require('chalk');
|
|
4
|
+
const isEmpty = require('lodash/isEmpty')
|
|
4
5
|
|
|
5
6
|
const { readFile } = require('./fs-helper');
|
|
6
7
|
const groupBy = require('./group-by');
|
|
@@ -50,10 +51,11 @@ module.exports = (errors) => {
|
|
|
50
51
|
|
|
51
52
|
messages.push(`${fileErrorsMessage}${errorMessages}`);
|
|
52
53
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) {
|
|
55
|
+
console.error('Migration error---', errors);
|
|
56
|
+
} else {
|
|
57
|
+
console.log(messages.join('\n'));
|
|
58
|
+
}
|
|
57
59
|
// eslint-disable-next-line
|
|
58
60
|
console.log(chalk`{bold.red Migration unsuccessful}`);
|
|
59
61
|
};
|