@contentstack/cli-cm-export 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 +1 -1
- package/lib/commands/cm/stacks/export.js +2 -1
- package/lib/config/index.js +1 -0
- package/lib/export/modules/global-fields.js +2 -1
- package/lib/export/modules/taxonomies.js +2 -1
- package/lib/types/default-config.d.ts +1 -0
- package/lib/types/index.d.ts +0 -7
- package/oclif.manifest.json +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export
|
|
|
48
48
|
$ csdx COMMAND
|
|
49
49
|
running command...
|
|
50
50
|
$ csdx (--version)
|
|
51
|
-
@contentstack/cli-cm-export/1.16.
|
|
51
|
+
@contentstack/cli-cm-export/1.16.2 linux-x64 node-v22.15.0
|
|
52
52
|
$ csdx --help [COMMAND]
|
|
53
53
|
USAGE
|
|
54
54
|
$ csdx COMMAND
|
|
@@ -16,7 +16,8 @@ class ExportCommand extends cli_command_1.Command {
|
|
|
16
16
|
// Note setting host to create cma client
|
|
17
17
|
exportConfig.host = this.cmaHost;
|
|
18
18
|
exportConfig.region = this.region;
|
|
19
|
-
|
|
19
|
+
if (this.developerHubUrl)
|
|
20
|
+
exportConfig.developerHubBaseUrl = this.developerHubUrl;
|
|
20
21
|
if (this.personalizeUrl)
|
|
21
22
|
exportConfig.modules.personalize.baseURL[exportConfig.region.name] = this.personalizeUrl;
|
|
22
23
|
exportDir = (0, cli_utilities_1.sanitizePath)(exportConfig.cliLogsPath || exportConfig.data || exportConfig.exportDir);
|
package/lib/config/index.js
CHANGED
|
@@ -15,6 +15,7 @@ class GlobalFieldsExport extends base_class_1.default {
|
|
|
15
15
|
asc: 'updated_at',
|
|
16
16
|
include_count: true,
|
|
17
17
|
limit: this.globalFieldsConfig.limit,
|
|
18
|
+
include_global_field_schema: true
|
|
18
19
|
};
|
|
19
20
|
this.globalFieldsDirPath = path.resolve((0, cli_utilities_1.sanitizePath)(exportConfig.data), (0, cli_utilities_1.sanitizePath)(exportConfig.branchName || ''), (0, cli_utilities_1.sanitizePath)(this.globalFieldsConfig.dirName));
|
|
20
21
|
this.globalFields = [];
|
|
@@ -36,7 +37,7 @@ class GlobalFieldsExport extends base_class_1.default {
|
|
|
36
37
|
if (skip) {
|
|
37
38
|
this.qs.skip = skip;
|
|
38
39
|
}
|
|
39
|
-
let globalFieldsFetchResponse = await this.stackAPIClient.globalField().query(this.qs).find();
|
|
40
|
+
let globalFieldsFetchResponse = await this.stackAPIClient.globalField({ api_version: '3.2' }).query(this.qs).find();
|
|
40
41
|
if (Array.isArray(globalFieldsFetchResponse.items) && globalFieldsFetchResponse.items.length > 0) {
|
|
41
42
|
this.sanitizeAttribs(globalFieldsFetchResponse.items);
|
|
42
43
|
skip += this.globalFieldsConfig.limit || 100;
|
|
@@ -12,6 +12,7 @@ class ExportTaxonomies extends base_class_1.default {
|
|
|
12
12
|
super({ exportConfig, stackAPIClient });
|
|
13
13
|
this.taxonomies = {};
|
|
14
14
|
this.taxonomiesConfig = exportConfig.modules.taxonomies;
|
|
15
|
+
this.qs = { include_count: true, limit: this.taxonomiesConfig.limit || 100, skip: 0 };
|
|
15
16
|
}
|
|
16
17
|
async start() {
|
|
17
18
|
(0, utils_1.log)(this.exportConfig, 'Starting taxonomies export', 'info');
|
|
@@ -48,7 +49,7 @@ class ExportTaxonomies extends base_class_1.default {
|
|
|
48
49
|
const taxonomiesCount = count !== undefined ? count : items === null || items === void 0 ? void 0 : items.length;
|
|
49
50
|
if (items === null || items === void 0 ? void 0 : items.length) {
|
|
50
51
|
this.sanitizeTaxonomiesAttribs(items);
|
|
51
|
-
skip += this.
|
|
52
|
+
skip += this.qs.limit || 100;
|
|
52
53
|
if (skip >= taxonomiesCount) {
|
|
53
54
|
return;
|
|
54
55
|
}
|
package/lib/types/index.d.ts
CHANGED
|
@@ -96,13 +96,6 @@ export interface StackConfig {
|
|
|
96
96
|
dependencies?: Modules[];
|
|
97
97
|
limit?: number;
|
|
98
98
|
}
|
|
99
|
-
export interface TaxonomiesConfig {
|
|
100
|
-
dirName: string;
|
|
101
|
-
fileName: string;
|
|
102
|
-
invalidKeys: string[];
|
|
103
|
-
dependencies?: Modules[];
|
|
104
|
-
limit?: number;
|
|
105
|
-
}
|
|
106
99
|
export { default as DefaultConfig } from './default-config';
|
|
107
100
|
export { default as ExportConfig } from './export-config';
|
|
108
101
|
export * from './marketplace-app';
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-export",
|
|
3
3
|
"description": "Contentstack CLI plugin to export content from stack",
|
|
4
|
-
"version": "1.16.
|
|
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-command": "~1.5.0",
|
|
9
|
-
"@contentstack/cli-variants": "~1.2.
|
|
10
|
-
"@oclif/core": "^4.
|
|
11
|
-
"@contentstack/cli-utilities": "~1.
|
|
9
|
+
"@contentstack/cli-variants": "~1.2.1",
|
|
10
|
+
"@oclif/core": "^4.3.0",
|
|
11
|
+
"@contentstack/cli-utilities": "~1.12.0",
|
|
12
12
|
"async": "^3.2.6",
|
|
13
13
|
"big-json": "^3.2.0",
|
|
14
14
|
"bluebird": "^3.7.2",
|
|
@@ -22,20 +22,20 @@
|
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@contentstack/cli-auth": "~1.4.0",
|
|
25
|
-
"@contentstack/cli-config": "~1.
|
|
25
|
+
"@contentstack/cli-config": "~1.12.0",
|
|
26
26
|
"@contentstack/cli-dev-dependencies": "~1.3.0",
|
|
27
|
-
"@oclif/plugin-help": "^6.2.
|
|
28
|
-
"@oclif/test": "^4.1.
|
|
27
|
+
"@oclif/plugin-help": "^6.2.28",
|
|
28
|
+
"@oclif/test": "^4.1.13",
|
|
29
29
|
"@types/big-json": "^3.2.5",
|
|
30
30
|
"@types/mkdirp": "^1.0.2",
|
|
31
31
|
"@types/progress-stream": "^2.0.5",
|
|
32
|
-
"dotenv": "^16.
|
|
32
|
+
"dotenv": "^16.5.0",
|
|
33
33
|
"dotenv-expand": "^9.0.0",
|
|
34
34
|
"eslint": "^8.57.1",
|
|
35
|
-
"eslint-config-oclif": "^6.0.
|
|
35
|
+
"eslint-config-oclif": "^6.0.62",
|
|
36
36
|
"mocha": "10.8.2",
|
|
37
37
|
"nyc": "^15.1.0",
|
|
38
|
-
"oclif": "^4.17.
|
|
38
|
+
"oclif": "^4.17.46",
|
|
39
39
|
"ts-node": "^10.9.2",
|
|
40
40
|
"typescript": "^4.9.5"
|
|
41
41
|
},
|