@contentstack/cli-cm-export 1.2.0 → 1.2.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
CHANGED
|
@@ -38,7 +38,7 @@ $ npm install -g @contentstack/cli-cm-export
|
|
|
38
38
|
$ csdx COMMAND
|
|
39
39
|
running command...
|
|
40
40
|
$ csdx (-v|--version|version)
|
|
41
|
-
@contentstack/cli-cm-export/1.2.
|
|
41
|
+
@contentstack/cli-cm-export/1.2.1 darwin-arm64 node-v18.11.0
|
|
42
42
|
$ csdx --help [COMMAND]
|
|
43
43
|
USAGE
|
|
44
44
|
$ csdx COMMAND
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.2.
|
|
1
|
+
{"version":"1.2.1","commands":{"cm:stacks:export":{"id":"cm:stacks:export","description":"Export content from a stack","usage":"cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]","pluginName":"@contentstack/cli-cm-export","pluginType":"core","aliases":["cm:export"],"examples":["csdx cm:stacks:export --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir>","csdx cm:stacks:export --config <path/to/config/dir>","csdx cm:stacks:export --alias <management_token_alias>","csdx cm:stacks:export --alias <management_token_alias> --data-dir <path/to/export/destination/dir>","csdx cm:stacks:export --alias <management_token_alias> --config <path/to/config/file>","csdx cm:stacks:export --module <single module name>","csdx cm:stacks:export --branch [optional] branch name"],"flags":{"config":{"name":"config","type":"option","char":"c","description":"[optional] path of the config"},"stack-uid":{"name":"stack-uid","type":"option","char":"s","description":"API key of the source stack","hidden":true},"stack-api-key":{"name":"stack-api-key","type":"option","char":"k","description":"API key of the source stack"},"data":{"name":"data","type":"option","description":"path or location to store the data","hidden":true},"data-dir":{"name":"data-dir","type":"option","char":"d","description":"path or location to store the data"},"alias":{"name":"alias","type":"option","char":"a","description":"alias of the management token"},"management-token-alias":{"name":"management-token-alias","type":"option","description":"alias of the management token","hidden":true},"auth-token":{"name":"auth-token","type":"boolean","char":"A","description":"to use auth token","hidden":true,"allowNo":false},"module":{"name":"module","type":"option","char":"m","description":"[optional] specific module name"},"content-types":{"name":"content-types","type":"option","char":"t","description":"[optional] content type"},"branch":{"name":"branch","type":"option","char":"B","description":"[optional] branch name"},"secured-assets":{"name":"secured-assets","type":"boolean","description":"[optional] use when assets are secured","allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -28,8 +28,8 @@ module.exports = class ExportCustomRoles {
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
async start() {
|
|
31
|
+
const self = this;
|
|
31
32
|
try {
|
|
32
|
-
const self = this;
|
|
33
33
|
addlogs(this.config, 'Starting roles export', 'success');
|
|
34
34
|
|
|
35
35
|
const rolesFolderPath = path.resolve(this.config.data, this.config.branchName || '', this.rolesConfig.dirName);
|
|
@@ -47,7 +47,7 @@ module.exports = class ExportCustomRoles {
|
|
|
47
47
|
return;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
-
await getCustomRolesLocales(
|
|
50
|
+
await self.getCustomRolesLocales(
|
|
51
51
|
customRoles,
|
|
52
52
|
path.join(rolesFolderPath, self.rolesConfig.customRolesLocalesFileName),
|
|
53
53
|
this.client,
|
|
@@ -14,7 +14,6 @@ const { formatError } = require('../util');
|
|
|
14
14
|
let config = require('../../config/default');
|
|
15
15
|
const { writeFile } = require('../util/helper');
|
|
16
16
|
const { addlogs: log } = require('../util/log');
|
|
17
|
-
let stack = require('../util/contentstack-management-sdk');
|
|
18
17
|
const { getDeveloperHubUrl, getInstalledExtensions } = require('../util/marketplace-app-helper');
|
|
19
18
|
|
|
20
19
|
module.exports = class ExportMarketplaceApps {
|
|
@@ -126,7 +125,7 @@ module.exports = class ExportMarketplaceApps {
|
|
|
126
125
|
cb();
|
|
127
126
|
})
|
|
128
127
|
.catch((err) => {
|
|
129
|
-
|
|
128
|
+
log(self.config, `Failed to export ${app.title} app config ${formatError(error)}`, 'error');
|
|
130
129
|
console.log(err);
|
|
131
130
|
cb();
|
|
132
131
|
});
|
|
@@ -145,7 +144,7 @@ module.exports = class ExportMarketplaceApps {
|
|
|
145
144
|
);
|
|
146
145
|
})
|
|
147
146
|
.catch((error) => {
|
|
148
|
-
|
|
147
|
+
log(self.config, `Failed to export marketplace-apps ${formatError(error)}`, 'error');
|
|
149
148
|
reject(error);
|
|
150
149
|
});
|
|
151
150
|
});
|