Skip to content

Commit

Permalink
ui text update
Browse files Browse the repository at this point in the history
  • Loading branch information
cs-raj committed Mar 8, 2024
1 parent e702414 commit a674682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 3 additions & 3 deletions packages/contentstack-audit/src/messages/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const commonMsg = {
CONFIG: 'Path of the external config',
DATA_DIR: 'Path where the data is stored',
FIX_CONFIRMATION: 'Would you like to overwrite existing file.?',
EXTENSION_FIX_WARN: `Extension {uid} named '{title}' will be removed.`,
EXTENSION_FIX_CONFIRMATION: `Would you like to overwrite existing file.?`,
EXTENSION_FIX_WARN: `The extension associated with UID {uid} and title '{title}' will be removed.`,
EXTENSION_FIX_CONFIRMATION: `Would you like to overwrite existing file?`,
};

const auditMsg = {
Expand All @@ -30,7 +30,7 @@ const auditMsg = {
FINAL_REPORT_PATH: "Reports ready. Please find the reports at '{path}'.",
SCAN_CT_SUCCESS_MSG: "Successfully completed the scanning of {module} '{title}'.",
SCAN_ENTRY_SUCCESS_MSG: "Successfully completed the scanning of {module} ({local}) '{title}'.",
SCAN_EXT_SUCCESS_MSG: "Successfully completed the scanning of {module} titled '{title}' having uid '{uid}'.",
SCAN_EXT_SUCCESS_MSG: "Successfully completed scanning the {module} titled '{title}' with UID '{uid}'",
AUDIT_CMD_DESCRIPTION: 'Perform audits and find possible errors in the exported Contentstack data',
};

Expand Down
3 changes: 1 addition & 2 deletions packages/contentstack-audit/src/modules/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,10 @@ export default class Extensions {
for (const ext of missingCtInExtensions) {
const { uid, title } = ext;
const fixedCts = ext?.scope?.content_types.filter((ct) => !this.missingCts.has(ct));
if (fixedCts?.length) {
if (fixedCts?.length && newExtensionSchema[uid]?.scope) {
newExtensionSchema[uid].scope.content_types = fixedCts;
} else {
this.log($t(commonMsg.EXTENSION_FIX_WARN, { title: title, uid }), { color: 'yellow' });

const shouldDelete = this.config.flags.yes || (await ux.confirm(commonMsg.EXTENSION_FIX_CONFIRMATION));
if (shouldDelete) {
delete newExtensionSchema[uid];
Expand Down

0 comments on commit a674682

Please sign in to comment.