@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Contentstack
3
+ Copyright (c) 2024 Contentstack
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -5,7 +5,7 @@ The Contentstack CLI’s “Migration” plugin allows developers to automate th
5
5
  [![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)
6
6
  [![Version](https://img.shields.io/npm/v/@contentstack/cli-migration.svg)](https://npmjs.org/package/@contentstack/cli-migration)
7
7
  [![Downloads/week](https://img.shields.io/npm/dw/@contentstack/cli-migration.svg)](https://npmjs.org/package/@contentstack/cli-migration)
8
- [![License](https://img.shields.io/npm/l/@contentstack/cli-migration.svg)](https://github.com/ninadhatkar/cli-migration/blob/master/package.json)
8
+ [![License](https://img.shields.io/npm/l/@contentstack/cli-migration.svg)](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.4.2 darwin-arm64 node-v20.8.0
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.4.2",
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.9",
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.2.10",
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": "^7.0.1",
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
- // eslint-disable-next-line
54
- // console.error(chalk`{red.bold Validation failed}\n\n`);
55
- // eslint-disable-next-line
56
- console.log(messages.join('\n'));
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
  };