Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion packages/contentstack-import-setup/messages/index.json
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
{}
{
"IMPORT_SETUP_SUCCESS": "Backup folder and mapper files have been successfully created for the stack using the API key %s.",
"IMPORT_SETUP_BACKUP_PATH": "The backup folder has been created at '%s'."
}
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,23 @@ export default class ImportSetupCommand extends Command {

CLIProgressManager.printGlobalSummary();

log.success(
`Backup folder and mapper files have been successfully created for the stack using the API key ${importSetupConfig.apiKey}.`,
importSetupConfig.context,
);
log.success(
`The backup folder has been created at '${pathValidator(path.join(importSetupConfig.backupDir))}'.`,
importSetupConfig.context,
const successMessage = messageHandler.parse('IMPORT_SETUP_SUCCESS', importSetupConfig.apiKey);
const backupPathMessage = messageHandler.parse(
'IMPORT_SETUP_BACKUP_PATH',
pathValidator(path.join(importSetupConfig.backupDir)),
);

log.success(successMessage, importSetupConfig.context);
log.success(backupPathMessage, importSetupConfig.context);

// log.success maps to the info level, which is suppressed on the console for
// progress-supported modules when showConsoleLogs is false. Print the backup
// folder path directly so it is always visible, regardless of that setting.
const showConsoleLogs = configHandler.get('log')?.showConsoleLogs ?? false;
if (!showConsoleLogs) {
cliux.print(successMessage);
cliux.print(backupPathMessage);
}
} catch (error) {
CLIProgressManager.printGlobalSummary();
handleAndLogError(error);
Expand Down
Loading