@contentstack/cli-cm-export 1.5.1 → 1.5.3

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
@@ -38,7 +38,7 @@ $ npm install -g @contentstack/cli-cm-export
38
38
  $ csdx COMMAND
39
39
  running command...
40
40
  $ csdx (--version)
41
- @contentstack/cli-cm-export/1.5.1 linux-x64 node-v16.20.0
41
+ @contentstack/cli-cm-export/1.5.3 linux-x64 node-v16.20.0
42
42
  $ csdx --help [COMMAND]
43
43
  USAGE
44
44
  $ csdx COMMAND
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.1",
2
+ "version": "1.5.3",
3
3
  "commands": {
4
4
  "cm:stacks:export": {
5
5
  "id": "cm:stacks:export",
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-export",
3
3
  "description": "Contentstack CLI plugin to export content from stack",
4
- "version": "1.5.1",
4
+ "version": "1.5.3",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
- "@contentstack/cli-command": "^1.2.2",
9
- "@contentstack/cli-utilities": "^1.3.1",
8
+ "@contentstack/cli-command": "^1.2.4",
9
+ "@contentstack/cli-utilities": "^1.4.1",
10
10
  "@oclif/command": "^1.8.16",
11
11
  "@oclif/config": "^1.18.3",
12
12
  "async": "^3.2.4",
@@ -23,9 +23,9 @@
23
23
  "winston": "^3.7.2"
24
24
  },
25
25
  "devDependencies": {
26
- "@contentstack/cli-auth": "^1.3.1",
27
- "@contentstack/cli-config": "^1.3.1",
28
- "@contentstack/cli-dev-dependencies": "^1.2.0",
26
+ "@contentstack/cli-auth": "^1.3.3",
27
+ "@contentstack/cli-config": "^1.4.1",
28
+ "@contentstack/cli-dev-dependencies": "^1.2.2",
29
29
  "@oclif/plugin-help": "^5.1.19",
30
30
  "@oclif/test": "^1.2.6",
31
31
  "assert": "^2.0.0",
@@ -38,7 +38,7 @@
38
38
  "mocha": "10.1.0",
39
39
  "nyc": "^15.1.0",
40
40
  "sinon": "^15.0.1",
41
- "oclif": "^3.1.2"
41
+ "oclif": "^3.8.1"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=14.0.0"
@@ -84,4 +84,4 @@
84
84
  },
85
85
  "main": "./src/commands/cm/stacks/export.js",
86
86
  "repository": "https://github.com/contentstack/cli"
87
- }
87
+ }
@@ -77,7 +77,10 @@ class ContentTypesExport {
77
77
 
78
78
  async writeContentTypes(contentTypes) {
79
79
  function write(contentType) {
80
- return fileHelper.writeFile(path.join(this.contentTypesPath, contentType.uid + '.json'), contentType);
80
+ return fileHelper.writeFile(
81
+ path.join(this.contentTypesPath,
82
+ `${contentType.uid === 'schema' ? 'schema|1' : contentType.uid}.json`),
83
+ contentType);
81
84
  }
82
85
  await executeTask(contentTypes, write.bind(this), { concurrency: this.writeConcurrency });
83
86
  return fileHelper.writeFile(path.join(this.contentTypesPath, 'schema.json'), contentTypes);
@@ -90,7 +90,7 @@ module.exports = class ExportGlobalFields {
90
90
  self.global_fields.push(globalField);
91
91
  });
92
92
  skip += self.limit;
93
- if (skip > globalFieldResponse.count) {
93
+ if (skip >= globalFieldResponse.count) {
94
94
  return resolve();
95
95
  }
96
96
  return self.getGlobalFields(skip, globalFieldConfig).then(resolve).catch(reject);