@contentstack/cli-cm-import 1.15.2 → 1.15.4

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.15.2 linux-x64 node-v18.20.2
50
+ @contentstack/cli-cm-import/1.15.4 linux-x64 node-v18.20.2
51
51
  $ csdx --help [COMMAND]
52
52
  USAGE
53
53
  $ csdx COMMAND
@@ -220,7 +220,7 @@ class ImportAssets extends base_class_1.default {
220
220
  return this.environments.hasOwnProperty(environment);
221
221
  });
222
222
  const environments = (0, uniq_1.default)((0, map_1.default)(publishDetails, ({ environment }) => this.environments[environment].name));
223
- const locales = (0, map_1.default)(publishDetails, 'locale');
223
+ const locales = (0, uniq_1.default)((0, map_1.default)(publishDetails, 'locale'));
224
224
  asset.locales = locales;
225
225
  asset.environments = environments;
226
226
  apiOptions.uid = this.assetsUidMap[asset.uid];
@@ -33,6 +33,7 @@ export default class ContentTypesImport extends BaseClass {
33
33
  private taxonomiesPath;
34
34
  taxonomies: Record<string, unknown>;
35
35
  private extPendingPath;
36
+ private isExtensionsUpdate;
36
37
  constructor({ importConfig, stackAPIClient }: ModuleClassParams);
37
38
  start(): Promise<any>;
38
39
  seedCTs(): Promise<any>;
@@ -15,6 +15,7 @@ const content_type_helper_1 = require("../../utils/content-type-helper");
15
15
  class ContentTypesImport extends base_class_1.default {
16
16
  constructor({ importConfig, stackAPIClient }) {
17
17
  super({ importConfig, stackAPIClient });
18
+ this.isExtensionsUpdate = false;
18
19
  this.cTsConfig = importConfig.modules['content-types'];
19
20
  this.gFsConfig = importConfig.modules['global-fields'];
20
21
  this.reqConcurrency = this.cTsConfig.writeConcurrency || this.importConfig.writeConcurrency;
@@ -66,7 +67,9 @@ class ContentTypesImport extends base_class_1.default {
66
67
  }
67
68
  (0, utils_1.log)(this.importConfig, 'Updating the extensions...', 'success');
68
69
  await this.updatePendingExtensions();
69
- (0, utils_1.log)(this.importConfig, 'Successfully updated the extensions.', 'success');
70
+ if (this.isExtensionsUpdate) {
71
+ (0, utils_1.log)(this.importConfig, 'Successfully updated the extensions.', 'success');
72
+ }
70
73
  await this.updatePendingGFs().catch((error) => {
71
74
  (0, utils_1.log)(this.importConfig, `Error while updating pending global field ${(0, utils_1.formatError)(error)}`, 'error');
72
75
  });
@@ -200,6 +203,7 @@ class ContentTypesImport extends base_class_1.default {
200
203
  (0, utils_1.log)(this.importConfig, `No extensions found to be updated.`, 'success');
201
204
  return;
202
205
  }
206
+ this.isExtensionsUpdate = true;
203
207
  const onSuccess = ({ response, apiData: { uid, title } = { uid: null, title: '' } }) => {
204
208
  (0, utils_1.log)(this.importConfig, `Successfully updated the '${response.title}' extension.`, 'success');
205
209
  };
@@ -71,6 +71,9 @@ const getConfirmationToCreateApps = async (privateApps, config) => {
71
71
  }
72
72
  }
73
73
  }
74
+ else {
75
+ return Promise.resolve(true);
76
+ }
74
77
  }
75
78
  else {
76
79
  return Promise.resolve(true);
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.15.2",
2
+ "version": "1.15.4",
3
3
  "commands": {
4
4
  "cm:stacks:import": {
5
5
  "id": "cm:stacks:import",
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-import",
3
3
  "description": "Contentstack CLI plugin to import content into stack",
4
- "version": "1.15.2",
4
+ "version": "1.15.4",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-audit": "~1.5.4",
8
+ "@contentstack/cli-audit": "~1.6.0",
9
9
  "@contentstack/cli-command": "~1.2.16",
10
10
  "@contentstack/cli-utilities": "~1.6.0",
11
11
  "@contentstack/management": "~1.15.3",