From d234333a749fff42a309dfc0aac84215344dcfc8 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 27 Mar 2024 16:48:05 +0530 Subject: [PATCH 1/3] removed the filter option from tables of workflow and extension and resolved content not overwritten in import backup folder --- packages/contentstack-audit/src/audit-base-command.ts | 2 +- packages/contentstack-audit/src/modules/extensions.ts | 1 + packages/contentstack-audit/src/modules/workflows.ts | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/contentstack-audit/src/audit-base-command.ts b/packages/contentstack-audit/src/audit-base-command.ts index 4fefdf67fb..a4eaefc6aa 100644 --- a/packages/contentstack-audit/src/audit-base-command.ts +++ b/packages/contentstack-audit/src/audit-base-command.ts @@ -329,7 +329,7 @@ export abstract class AuditBaseCommand extends BaseCommand) { if ( this.fix && - !(this.config.flags['copy-dir'] || this.config.flags['external-config']?.skipConfirm) && - (this.config.flags.yes || (await ux.confirm(commonMsg.FIX_CONFIRMATION))) + (this.config.flags['copy-dir'] || + this.config.flags['external-config']?.skipConfirm || + this.config.flags.yes || + (await ux.confirm(commonMsg.FIX_CONFIRMATION))) ) { writeFileSync( join(this.folderPath, this.config.moduleConfig[this.moduleName].fileName), From 1656e8ad81034bb59378013cbeedc791a71f9201 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 27 Mar 2024 16:57:37 +0530 Subject: [PATCH 2/3] added filter back --- packages/contentstack-audit/src/audit-base-command.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/contentstack-audit/src/audit-base-command.ts b/packages/contentstack-audit/src/audit-base-command.ts index a4eaefc6aa..4fefdf67fb 100644 --- a/packages/contentstack-audit/src/audit-base-command.ts +++ b/packages/contentstack-audit/src/audit-base-command.ts @@ -329,7 +329,7 @@ export abstract class AuditBaseCommand extends BaseCommand Date: Wed, 27 Mar 2024 19:21:50 +0530 Subject: [PATCH 3/3] removed the request body from the errors logged --- .../contentstack-migration/src/utils/error-helper.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/contentstack-migration/src/utils/error-helper.js b/packages/contentstack-migration/src/utils/error-helper.js index 649e16ef99..0ed05d4166 100644 --- a/packages/contentstack-migration/src/utils/error-helper.js +++ b/packages/contentstack-migration/src/utils/error-helper.js @@ -86,8 +86,15 @@ module.exports = (errors, filePath) => { messages.push(`${fileErrorsMessage}${errorMessages}`); logger.log('error', errorLogs); } + if (errors?.request) { + errors.data = errors.request?.data; + delete errors.request; + } + if (errors?.message) { + delete errors.message; + } if (isEmpty(messages) && errors !== undefined && isEmpty(errorsByFile)) { - logger.log('error', errors); + logger.log('error', { errors: errors }); console.log(chalk`{bold.red Migration unsuccessful}`); } else { logger.log('error', { error: messages.join('\n') });