@contentstack/cli-cm-import 1.16.0 → 1.16.2

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.16.0 linux-x64 node-v18.20.3
50
+ @contentstack/cli-cm-import/1.16.2 linux-x64 node-v18.20.4
51
51
  $ csdx --help [COMMAND]
52
52
  USAGE
53
53
  $ csdx COMMAND
@@ -16,6 +16,7 @@ const lookupExtension = function (config, schema, preserveStackVersion, installe
16
16
  const fs = new cli_utilities_1.FsUtility({ basePath: config.backupDir });
17
17
  const extensionPath = (0, node_path_1.join)(config.backupDir, 'mapper/extensions', 'uid-mapping.json');
18
18
  const globalfieldsPath = (0, node_path_1.join)(config.backupDir, 'mapper/globalfields', 'uid-mapping.json');
19
+ const marketPlaceAppsPath = (0, node_path_1.join)(config.backupDir, 'mapper/marketplace_apps', 'uid-mapping.json');
19
20
  for (let i in schema) {
20
21
  if (schema[i].data_type === 'group') {
21
22
  (0, exports.lookupExtension)(config, schema[i].schema, preserveStackVersion, installedExtensions);
@@ -72,10 +73,14 @@ const lookupExtension = function (config, schema, preserveStackVersion, installe
72
73
  else if (schema[i].data_type === 'json' && schema[i].hasOwnProperty('plugins') && schema[i].plugins.length > 0) {
73
74
  const newPluginUidsArray = [];
74
75
  const data = fs.readFile(extensionPath);
76
+ const marketPlaceAppsData = fs.readFile(marketPlaceAppsPath);
75
77
  schema[i].plugins.forEach((extension_key_value) => {
76
78
  if (data && data.hasOwnProperty(extension_key_value)) {
77
79
  newPluginUidsArray.push(data[extension_key_value]);
78
80
  }
81
+ else if (marketPlaceAppsData && marketPlaceAppsData.extension_uid && marketPlaceAppsData.extension_uid.hasOwnProperty(extension_key_value)) {
82
+ newPluginUidsArray.push(marketPlaceAppsData.extension_uid[extension_key_value]);
83
+ }
79
84
  });
80
85
  schema[i].plugins = newPluginUidsArray;
81
86
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.16.0",
2
+ "version": "1.16.2",
3
3
  "commands": {
4
4
  "cm:stacks:import": {
5
5
  "id": "cm:stacks:import",
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-import",
3
3
  "description": "Contentstack CLI plugin to import content into stack",
4
- "version": "1.16.0",
4
+ "version": "1.16.2",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
8
  "@contentstack/cli-audit": "~1.6.3",
9
- "@contentstack/cli-command": "~1.2.18",
10
- "@contentstack/cli-utilities": "~1.6.3",
9
+ "@contentstack/cli-command": "~1.2.19",
10
+ "@contentstack/cli-utilities": "~1.7.0",
11
11
  "@contentstack/management": "~1.15.3",
12
12
  "@oclif/core": "^3.26.5",
13
13
  "big-json": "^3.2.0",
@@ -21,7 +21,7 @@
21
21
  "mkdirp": "^1.0.4",
22
22
  "promise-limit": "^2.7.0",
23
23
  "tslib": "^2.4.1",
24
- "uuid": "^9.0.0",
24
+ "uuid": "^9.0.1",
25
25
  "winston": "^3.7.2"
26
26
  },
27
27
  "devDependencies": {