diff --git a/package-lock.json b/package-lock.json index 5203d1bc2e..5966723986 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23533,7 +23533,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.4", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -24230,7 +24230,7 @@ "dependencies": { "@colors/colors": "^1.5.0", "@contentstack/cli-cm-export": "~1.10.4", - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "async": "^3.2.4", @@ -25268,7 +25268,7 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.13.2", + "version": "1.13.3", "license": "MIT", "dependencies": { "@contentstack/cli-audit": "^1.3.3", @@ -25843,7 +25843,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "inquirer": "8.2.4", diff --git a/packages/contentstack-clone/package.json b/packages/contentstack-clone/package.json index e7a9b9a29e..ba05673879 100644 --- a/packages/contentstack-clone/package.json +++ b/packages/contentstack-clone/package.json @@ -6,7 +6,7 @@ "bugs": "https://github.com/rohitmishra209/cli-cm-clone/issues", "dependencies": { "@contentstack/cli-cm-export": "~1.10.4", - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "@colors/colors": "^1.5.0", diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 22a6d0dee9..517df7977f 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.13.2", + "version": "1.13.3", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-import/src/commands/cm/stacks/import.ts b/packages/contentstack-import/src/commands/cm/stacks/import.ts index 047a528453..eba9275aff 100644 --- a/packages/contentstack-import/src/commands/cm/stacks/import.ts +++ b/packages/contentstack-import/src/commands/cm/stacks/import.ts @@ -141,7 +141,7 @@ export default class ImportCommand extends Command { 'success', ); } catch (error) { - log({ data: backupDir } as ImportConfig, `Failed to import stack content - ${formatError(error)}`, 'error'); + log({ data: backupDir ?? path.join(backupDir || __dirname, 'logs', 'import') } as ImportConfig, `Failed to import stack content - ${formatError(error)}`, 'error'); log( { data: backupDir } as ImportConfig, `The log has been stored at ${ diff --git a/packages/contentstack-import/src/utils/import-config-handler.ts b/packages/contentstack-import/src/utils/import-config-handler.ts index 1421a3e5c6..233a47ff00 100644 --- a/packages/contentstack-import/src/utils/import-config-handler.ts +++ b/packages/contentstack-import/src/utils/import-config-handler.ts @@ -35,7 +35,7 @@ const setupConfig = async (importCmdFlags: any): Promise => { const managementTokenAlias = importCmdFlags['management-token-alias'] || importCmdFlags['alias']; if (managementTokenAlias) { - const { token, apiKey } = configHandler.get(`tokens.${managementTokenAlias}`); + const { token, apiKey } = configHandler.get(`tokens.${managementTokenAlias}`) ?? {}; config.management_token = token; config.apiKey = apiKey; if (!config.management_token) { diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index 044e5f36b2..2322efead6 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -5,7 +5,7 @@ "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "inquirer": "8.2.4", diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 0ce39a0d37..c18497ca49 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -30,7 +30,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.4", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.2", + "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index d08035c340..d76f8211f5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -18,7 +18,7 @@ importers: '@contentstack/cli-cm-clone': ~1.9.0 '@contentstack/cli-cm-export': ~1.10.4 '@contentstack/cli-cm-export-to-csv': ~1.6.2 - '@contentstack/cli-cm-import': ~1.13.2 + '@contentstack/cli-cm-import': ~1.13.3 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 @@ -424,7 +424,7 @@ importers: specifiers: '@colors/colors': ^1.5.0 '@contentstack/cli-cm-export': ~1.10.4 - '@contentstack/cli-cm-import': ~1.13.2 + '@contentstack/cli-cm-import': ~1.13.3 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.11 '@oclif/test': ^1.2.7 @@ -986,7 +986,7 @@ importers: packages/contentstack-seed: specifiers: - '@contentstack/cli-cm-import': ~1.13.2 + '@contentstack/cli-cm-import': ~1.13.3 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.11 '@oclif/plugin-help': ^5.1.19