@contentstack/cli-cm-import 2.0.0-beta.4 → 2.0.0-beta.5

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/2.0.0-beta.4 linux-x64 node-v22.22.0
50
+ @contentstack/cli-cm-import/2.0.0-beta.5 linux-x64 node-v22.22.0
51
51
  $ csdx --help [COMMAND]
52
52
  USAGE
53
53
  $ csdx COMMAND
@@ -37,8 +37,10 @@ class ContentTypesImport extends base_class_1.default {
37
37
  ]);
38
38
  // Initialize composable studio paths if config exists
39
39
  if (this.importConfig.modules['composable-studio']) {
40
- this.composableStudioSuccessPath = path.join((0, cli_utilities_1.sanitizePath)(this.importConfig.data), 'mapper', this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
41
- this.composableStudioExportPath = path.join((0, cli_utilities_1.sanitizePath)(this.importConfig.data), this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
40
+ // Use contentDir as fallback if data is not available
41
+ const basePath = this.importConfig.data || this.importConfig.contentDir;
42
+ this.composableStudioSuccessPath = path.join((0, cli_utilities_1.sanitizePath)(basePath), 'mapper', this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
43
+ this.composableStudioExportPath = path.join((0, cli_utilities_1.sanitizePath)(basePath), this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
42
44
  }
43
45
  else {
44
46
  this.composableStudioSuccessPath = '';
@@ -34,8 +34,10 @@ class EntriesImport extends base_class_1.default {
34
34
  this.localesPath = path.resolve((0, cli_utilities_1.sanitizePath)(importConfig.contentDir), (0, cli_utilities_1.sanitizePath)(importConfig.modules.locales.dirName), (0, cli_utilities_1.sanitizePath)(importConfig.modules.locales.fileName));
35
35
  // Initialize composable studio paths if config exists
36
36
  if (this.importConfig.modules['composable-studio']) {
37
- this.composableStudioSuccessPath = path.join((0, cli_utilities_1.sanitizePath)(this.importConfig.data), 'mapper', this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
38
- this.composableStudioExportPath = path.join((0, cli_utilities_1.sanitizePath)(this.importConfig.data), this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
37
+ // Use contentDir as fallback if data is not available
38
+ const basePath = this.importConfig.data || this.importConfig.contentDir;
39
+ this.composableStudioSuccessPath = path.join((0, cli_utilities_1.sanitizePath)(basePath), 'mapper', this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
40
+ this.composableStudioExportPath = path.join((0, cli_utilities_1.sanitizePath)(basePath), this.importConfig.modules['composable-studio'].dirName, this.importConfig.modules['composable-studio'].fileName);
39
41
  }
40
42
  else {
41
43
  this.composableStudioSuccessPath = '';
@@ -168,5 +168,5 @@
168
168
  ]
169
169
  }
170
170
  },
171
- "version": "2.0.0-beta.4"
171
+ "version": "2.0.0-beta.5"
172
172
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-import",
3
3
  "description": "Contentstack CLI plugin to import content into stack",
4
- "version": "2.0.0-beta.4",
4
+ "version": "2.0.0-beta.5",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {