Skip to content

Commit 8ebd31a

Browse files
committed
Updated Ui
1 parent d5c6ecb commit 8ebd31a

File tree

3 files changed

+31
-13
lines changed

3 files changed

+31
-13
lines changed

packages/contentstack-audit/src/audit-base-command.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,8 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
416416
key === 'content_types' ||
417417
key === 'branches' ||
418418
key === 'missingCTSelectFieldValues' ||
419-
key === 'missingFieldUid'
419+
key === 'missingFieldUid' ||
420+
key === 'action'
420421
) {
421422
return chalk.red(typeof row[key] === 'object' ? JSON.stringify(row[key]) : row[key]);
422423
} else {

packages/contentstack-audit/src/config/index.ts

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ const config = {
22
showTerminalOutput: true,
33
skipRefs: ['sys_assets'],
44
skipFieldTypes: ['taxonomy', 'group'],
5-
modules: ['content-types', 'global-fields', 'entries', 'extensions', 'workflows', 'custom-roles', 'assets', 'field-rules'],
5+
modules: [
6+
'content-types',
7+
'global-fields',
8+
'entries',
9+
'extensions',
10+
'workflows',
11+
'custom-roles',
12+
'assets',
13+
'field-rules',
14+
],
615
'fix-fields': ['reference', 'global_field', 'json:rte', 'json:extension', 'blocks', 'group', 'content_types'],
716
moduleConfig: {
817
'content-types': {
@@ -40,16 +49,16 @@ const config = {
4049
dirName: 'custom-roles',
4150
fileName: 'custom-roles.json',
4251
},
43-
'assets': {
52+
assets: {
4453
name: 'assets',
4554
dirName: 'assets',
4655
fileName: 'assets.json',
4756
},
48-
'environments': {
57+
environments: {
4958
name: 'environments',
5059
dirName: 'environments',
5160
fileName: 'environments.json',
52-
}
61+
},
5362
},
5463
entries: {
5564
systemKeys: [
@@ -94,17 +103,25 @@ const config = {
94103
'publish_locale',
95104
'publish_environment',
96105
'asset_uid',
97-
'selectedValue'
106+
'selectedValue',
107+
'ct_uid',
108+
'action',
98109
],
99110
ReportTitleForEntries: {
100111
Entries_Select_feild: 'Entries_Select_feild',
101112
Entries_Mandatory_feild: 'Entries_Mandatory_feild',
102113
Entries_Title_feild: 'Entries_Title_feild',
103114
Entry_Missing_Locale_and_Env: 'Entry_Missing_Locale_and_Env',
104-
Entry_Missing_Locale_and_Env_in_Publish_Details: 'Entry_Missing_Locale_and_Env_in_Publish_Details'
115+
Entry_Missing_Locale_and_Env_in_Publish_Details: 'Entry_Missing_Locale_and_Env_in_Publish_Details',
105116
},
106-
feild_level_modules: ['Entries_Title_feild', 'Entries_Mandatory_feild', 'Entries_Select_feild', 'Entry_Missing_Locale_and_Env_in_Publish_Details', 'field-rules'],
107-
fixSelectField: false
117+
feild_level_modules: [
118+
'Entries_Title_feild',
119+
'Entries_Mandatory_feild',
120+
'Entries_Select_feild',
121+
'Entry_Missing_Locale_and_Env_in_Publish_Details',
122+
'field-rules',
123+
],
124+
fixSelectField: false,
108125
};
109126

110127
export default config;

packages/contentstack-audit/src/modules/field_rules.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ export default class FieldRule {
107107
if (!this.schemaMap.includes(actions.target_field)) {
108108
this.log($t(auditMsg.FIELD_RULE_TARGET_ABSENT, { target_field: actions.target_field, ctUid: schema.uid }), 'error');
109109
console.log(this.missingRefs[this.currentUid])
110-
this.missingRefs[this.currentUid].push({action: actions, ct_uid: this.currentUid, fixStatus:'fixed'});
110+
this.missingRefs[this.currentUid].push({action: actions, ctUid: this.currentUid, fixStatus:'Fixed'});
111111
return
112112
} else {
113113
this.log($t(auditMsg.FIELD_RULE_TARGE_SCAN_MESSAGE, {num: count.toString() , ctUid: schema.uid }), 'info');
@@ -120,7 +120,7 @@ export default class FieldRule {
120120
this.log($t(auditMsg.FIELD_RULE_CONDITION_ABSENT, { condition_field: actions.operand_field}), 'error');
121121
this.missingRefs[this.currentUid].push({
122122
action: actions,
123-
ct_uid: this.currentUid,
123+
ctUid: this.currentUid,
124124
fixStatus: "Fixed"
125125
});
126126
return
@@ -143,7 +143,7 @@ export default class FieldRule {
143143
fr.actions.forEach((actions: { target_field: any }) => {
144144
if (!this.schemaMap.includes(actions.target_field)) {
145145
this.log($t(auditMsg.FIELD_RULE_TARGET_ABSENT, { target_field: actions.target_field, ctUid: schema.uid }), 'error');
146-
this.missingRefs[this.currentUid].push({action: actions, ct_uid: this.currentUid});
146+
this.missingRefs[this.currentUid].push({action: actions, ctUid: this.currentUid});
147147
} else {
148148
this.log($t(auditMsg.FIELD_RULE_TARGE_SCAN_MESSAGE, {num: count.toString() , ctUid: schema.uid }), 'info');
149149
}
@@ -154,7 +154,7 @@ export default class FieldRule {
154154
this.log($t(auditMsg.FIELD_RULE_CONDITION_ABSENT, { condition_field: actions.operand_field }), 'error');
155155
this.missingRefs[this.currentUid].push({
156156
action: actions,
157-
ct_uid: this.currentUid
157+
ctUid: this.currentUid
158158
});
159159
} else {
160160
this.log($t(auditMsg.FIELD_RULE_CONDITION_SCAN_MESSAGE, {num: count.toString() , ctUid: schema.uid }), 'info');

0 commit comments

Comments
 (0)