@contentstack/cli-cm-import 1.13.2 → 1.13.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
|
@@ -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/1.13.
|
|
50
|
+
@contentstack/cli-cm-import/1.13.3 linux-x64 node-v18.19.0
|
|
51
51
|
$ csdx --help [COMMAND]
|
|
52
52
|
USAGE
|
|
53
53
|
$ csdx COMMAND
|
|
@@ -27,7 +27,7 @@ class ImportCommand extends cli_command_1.Command {
|
|
|
27
27
|
(0, utils_1.log)(importConfig, `The log has been stored at '${node_path_1.default.join(importConfig.backupDir, 'logs', 'import')}'`, 'success');
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
(0, utils_1.log)({ data: backupDir }, `Failed to import stack content - ${(0, utils_1.formatError)(error)}`, 'error');
|
|
30
|
+
(0, utils_1.log)({ data: backupDir !== null && backupDir !== void 0 ? backupDir : node_path_1.default.join(backupDir || __dirname, 'logs', 'import') }, `Failed to import stack content - ${(0, utils_1.formatError)(error)}`, 'error');
|
|
31
31
|
(0, utils_1.log)({ data: backupDir }, `The log has been stored at ${{ data: backupDir } ? node_path_1.default.join(backupDir || __dirname, 'logs', 'import') : node_path_1.default.join(__dirname, 'logs')}`, 'info');
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -10,6 +10,7 @@ const file_helper_1 = require("./file-helper");
|
|
|
10
10
|
const interactive_1 = require("./interactive");
|
|
11
11
|
const login_handler_1 = tslib_1.__importDefault(require("./login-handler"));
|
|
12
12
|
const setupConfig = async (importCmdFlags) => {
|
|
13
|
+
var _a;
|
|
13
14
|
let config = (0, merge_1.default)({}, config_1.default);
|
|
14
15
|
// setup the config
|
|
15
16
|
if (importCmdFlags['config']) {
|
|
@@ -33,7 +34,7 @@ const setupConfig = async (importCmdFlags) => {
|
|
|
33
34
|
}
|
|
34
35
|
const managementTokenAlias = importCmdFlags['management-token-alias'] || importCmdFlags['alias'];
|
|
35
36
|
if (managementTokenAlias) {
|
|
36
|
-
const { token, apiKey } = cli_utilities_1.configHandler.get(`tokens.${managementTokenAlias}`);
|
|
37
|
+
const { token, apiKey } = (_a = cli_utilities_1.configHandler.get(`tokens.${managementTokenAlias}`)) !== null && _a !== void 0 ? _a : {};
|
|
37
38
|
config.management_token = token;
|
|
38
39
|
config.apiKey = apiKey;
|
|
39
40
|
if (!config.management_token) {
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED