@contentstack/cli-cm-export 1.9.0 → 1.9.1
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/export/modules/marketplace-apps.js +1 -2
- package/lib/export/modules-js/marketplace-apps.js +3 -3
- package/lib/utils/file-helper.js +1 -1
- package/lib/utils/marketplace-app-helper.d.ts +1 -2
- package/lib/utils/marketplace-app-helper.js +2 -2
- package/oclif.manifest.json +1 -1
- package/package.json +5 -5
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.9.
|
|
51
|
+
@contentstack/cli-cm-export/1.9.1 linux-x64 node-v18.18.0
|
|
52
52
|
$ csdx --help [COMMAND]
|
|
53
53
|
USAGE
|
|
54
54
|
$ csdx COMMAND
|
|
@@ -47,12 +47,11 @@ class ExportMarketplaceApps extends base_class_1.default {
|
|
|
47
47
|
async getAllStackSpecificApps(skip = 0) {
|
|
48
48
|
const data = await (0, utils_1.getStackSpecificApps)({
|
|
49
49
|
developerHubBaseUrl: this.developerHubBaseUrl,
|
|
50
|
-
httpClient: this.httpClient,
|
|
51
50
|
config: this.exportConfig,
|
|
52
51
|
skip,
|
|
53
52
|
});
|
|
54
53
|
const { data: apps, count } = data;
|
|
55
|
-
if (!this.nodeCrypto && (0, find_1.default)(apps, (app) => (0, isEmpty_1.default)(app.configuration))) {
|
|
54
|
+
if (!this.nodeCrypto && (0, find_1.default)(apps, (app) => !(0, isEmpty_1.default)(app.configuration))) {
|
|
56
55
|
this.nodeCrypto = await (0, utils_1.createNodeCryptoInstance)(this.exportConfig);
|
|
57
56
|
}
|
|
58
57
|
const stackApps = (0, map_1.default)(apps, (app) => {
|
|
@@ -26,7 +26,7 @@ module.exports = class ExportMarketplaceApps {
|
|
|
26
26
|
}
|
|
27
27
|
this.developerHubBaseUrl = this.config.developerHubBaseUrl || (await getDeveloperHubUrl(this.config));
|
|
28
28
|
this.appSdkAxiosInstance = await managementSDKClient({
|
|
29
|
-
|
|
29
|
+
endpoint: this.developerHubBaseUrl,
|
|
30
30
|
});
|
|
31
31
|
await this.getOrgUid();
|
|
32
32
|
const httpClient = new HttpClient();
|
|
@@ -54,7 +54,7 @@ module.exports = class ExportMarketplaceApps {
|
|
|
54
54
|
log(this.config, formatError(error), 'error');
|
|
55
55
|
console.log(error);
|
|
56
56
|
});
|
|
57
|
-
if (tempStackData
|
|
57
|
+
if (tempStackData === null || tempStackData === void 0 ? void 0 : tempStackData.org_uid) {
|
|
58
58
|
this.config.org_uid = tempStackData.org_uid;
|
|
59
59
|
}
|
|
60
60
|
}
|
|
@@ -65,7 +65,7 @@ module.exports = class ExportMarketplaceApps {
|
|
|
65
65
|
for (const [index, app] of _.entries(installedApps)) {
|
|
66
66
|
await this.getAppConfigurations(client, installedApps, [+index, app]);
|
|
67
67
|
}
|
|
68
|
-
|
|
68
|
+
fileHelper.writeFileSync(path.join(this.marketplaceAppPath, this.marketplaceAppConfig.fileName), installedApps);
|
|
69
69
|
log(this.config, chalk.green('All the marketplace apps have been exported successfully'), 'success');
|
|
70
70
|
}
|
|
71
71
|
else {
|
package/lib/utils/file-helper.js
CHANGED
|
@@ -85,7 +85,7 @@ const writeLargeFile = function (filePath, data) {
|
|
|
85
85
|
const stringifyStream = big_json_1.default.createStringifyStream({
|
|
86
86
|
body: data,
|
|
87
87
|
});
|
|
88
|
-
|
|
88
|
+
let writeStream = fs.createWriteStream(filePath, 'utf-8');
|
|
89
89
|
stringifyStream.pipe(writeStream);
|
|
90
90
|
writeStream.on('finish', () => {
|
|
91
91
|
resolve('');
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import { NodeCrypto
|
|
1
|
+
import { NodeCrypto } from '@contentstack/cli-utilities';
|
|
2
2
|
import { ExportConfig } from '../types';
|
|
3
3
|
export declare const getDeveloperHubUrl: (exportConfig: ExportConfig) => Promise<any>;
|
|
4
4
|
export declare function getOrgUid(config: ExportConfig): Promise<string>;
|
|
5
5
|
export declare function createNodeCryptoInstance(config: ExportConfig): Promise<NodeCrypto>;
|
|
6
6
|
export declare const getStackSpecificApps: (params: {
|
|
7
7
|
developerHubBaseUrl: string;
|
|
8
|
-
httpClient: HttpClient;
|
|
9
8
|
config: ExportConfig;
|
|
10
9
|
skip: number;
|
|
11
10
|
}) => Promise<any>;
|
|
@@ -46,9 +46,9 @@ async function createNodeCryptoInstance(config) {
|
|
|
46
46
|
}
|
|
47
47
|
exports.createNodeCryptoInstance = createNodeCryptoInstance;
|
|
48
48
|
const getStackSpecificApps = async (params) => {
|
|
49
|
-
const { developerHubBaseUrl,
|
|
49
|
+
const { developerHubBaseUrl, config, skip } = params;
|
|
50
50
|
const appSdkAxiosInstance = await (0, cli_utilities_1.managementSDKClient)({
|
|
51
|
-
|
|
51
|
+
endpoint: developerHubBaseUrl,
|
|
52
52
|
});
|
|
53
53
|
return appSdkAxiosInstance.axiosInstance
|
|
54
54
|
.get(`${developerHubBaseUrl}/installations?target_uids=${config.source_stack}&skip=${skip}`, {
|
package/oclif.manifest.json
CHANGED
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.9.
|
|
4
|
+
"version": "1.9.1",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "~1.2.
|
|
9
|
-
"@contentstack/cli-utilities": "~1.5.
|
|
8
|
+
"@contentstack/cli-command": "~1.2.13",
|
|
9
|
+
"@contentstack/cli-utilities": "~1.5.3",
|
|
10
10
|
"@oclif/core": "^2.9.3",
|
|
11
11
|
"async": "^3.2.4",
|
|
12
12
|
"big-json": "^3.2.0",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"winston": "^3.7.2"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@contentstack/cli-auth": "~1.3.
|
|
27
|
+
"@contentstack/cli-auth": "~1.3.14",
|
|
28
28
|
"@contentstack/cli-config": "~1.4.11",
|
|
29
29
|
"@contentstack/cli-dev-dependencies": "~1.2.3",
|
|
30
30
|
"@oclif/plugin-help": "^5.1.19",
|
|
@@ -98,4 +98,4 @@
|
|
|
98
98
|
}
|
|
99
99
|
},
|
|
100
100
|
"repository": "https://github.com/contentstack/cli"
|
|
101
|
-
}
|
|
101
|
+
}
|