Skip to content

Commit e332ccf

Browse files
authored
Merge pull request #1713 from contentstack/development
DX | 09-01-2025 | Release
2 parents a7e5697 + 5708f91 commit e332ccf

File tree

20 files changed

+620
-396
lines changed

20 files changed

+620
-396
lines changed

package-lock.json

Lines changed: 417 additions & 305 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-audit/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
1919
$ csdx COMMAND
2020
running command...
2121
$ csdx (--version|-v)
22-
@contentstack/cli-audit/1.7.3 darwin-arm64 node-v22.2.0
22+
@contentstack/cli-audit/1.7.4 darwin-arm64 node-v22.8.0
2323
$ csdx --help [COMMAND]
2424
USAGE
2525
$ csdx COMMAND

packages/contentstack-audit/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@contentstack/cli-audit",
3-
"version": "1.7.3",
3+
"version": "1.7.4",
44
"description": "Contentstack audit plugin",
55
"author": "Contentstack CLI",
66
"homepage": "https://github.com/contentstack/cli",
@@ -31,11 +31,11 @@
3131
},
3232
"devDependencies": {
3333
"@contentstack/cli-dev-dependencies": "^1.2.4",
34-
"@oclif/test": "^4.1.3",
34+
"@oclif/test": "^4.1.4",
3535
"@types/chai": "^4.3.20",
3636
"@types/fs-extra": "^11.0.4",
3737
"@types/mocha": "^10.0.10",
38-
"@types/node": "^20.17.9",
38+
"@types/node": "^20.17.10",
3939
"@types/uuid": "^9.0.8",
4040
"chai": "^4.5.0",
4141
"eslint": "^8.57.1",

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -315,6 +315,14 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
315315
minWidth: 7,
316316
header: 'Title',
317317
},
318+
ct: {
319+
minWidth: 7,
320+
header: "Content Type"
321+
},
322+
locale: {
323+
minWidth: 7,
324+
header: "Locale"
325+
},
318326
display_name: {
319327
minWidth: 7,
320328
header: 'Field name',

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

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,27 @@ export default class Entries {
130130

131131
this.lookForReference([{ locale: code, uid, name: title }], ctSchema, this.entries[entryUid]);
132132

133+
if (this.missingRefs[this.currentUid]?.length) {
134+
this.missingRefs[this.currentUid].forEach((entry: any) => {
135+
entry.ct = ctSchema.uid;
136+
entry.locale = code;
137+
});
138+
}
139+
140+
if (this.missingSelectFeild[this.currentUid]?.length) {
141+
this.missingSelectFeild[this.currentUid].forEach((entry: any) => {
142+
entry.ct = ctSchema.uid;
143+
entry.locale = code;
144+
});
145+
}
146+
147+
if (this.missingMandatoryFields[this.currentUid]?.length) {
148+
this.missingMandatoryFields[this.currentUid].forEach((entry: any) => {
149+
entry.ct = ctSchema.uid;
150+
entry.locale = code;
151+
});
152+
}
153+
133154
const fields = this.missingMandatoryFields[uid];
134155
const isPublished = entry.publish_details?.length > 0;
135156
if ((this.fix && fields.length && isPublished) || (!this.fix && fields)) {
@@ -167,7 +188,6 @@ export default class Entries {
167188
// this.log('', 'info'); // Adding empty line
168189

169190
this.removeEmptyVal();
170-
171191
return {
172192
missingEntryRefs: this.missingRefs,
173193
missingSelectFeild: this.missingSelectFeild,

packages/contentstack-audit/src/types/content-types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ enum OutputColumn {
146146
'Entry UID' ="Entry UID",
147147
'Content Type UID'= 'Content Type UID',
148148
"Locale"="Locale",
149+
"Content Type" = "ct",
150+
"locale"="locale",
149151
}
150152

151153
export {

packages/contentstack-audit/src/util/log.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export default class Logger {
6565
}
6666

6767
const filename = normalize(
68-
resolve(this.config.basePath, 'logs', `${logType}.log`),
68+
resolve(this.config.basePath, 'Audit logs', `${logType}.log`),
6969
).replace(/^(\.\.(\/|\\|$))+/, '');
7070
const transports: winston.transport[] = [
7171
new winston.transports.File({

packages/contentstack-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"devDependencies": {
3333
"@fancy-test/nock": "^0.1.1",
3434
"@oclif/plugin-help": "^5.2.20",
35-
"@oclif/test": "^4.1.3",
35+
"@oclif/test": "^4.1.4",
3636
"@types/chai": "^4.3.20",
3737
"@types/inquirer": "^9.0.7",
3838
"@types/mkdirp": "^1.0.2",

packages/contentstack-bootstrap/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"tar": "^6.2.1 "
2626
},
2727
"devDependencies": {
28-
"@oclif/test": "^4.1.3",
28+
"@oclif/test": "^4.1.4",
2929
"@types/inquirer": "^9.0.7",
3030
"@types/mkdirp": "^1.0.2",
3131
"@types/node": "^14.18.63",

packages/contentstack-bulk-publish/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"winston": "^3.17.0"
1818
},
1919
"devDependencies": {
20-
"@oclif/test": "^4.1.3",
20+
"@oclif/test": "^4.1.4",
2121
"chai": "^4.5.0",
2222
"eslint": "^8.57.1",
2323
"eslint-config-oclif": "^4.0.0",

0 commit comments

Comments
 (0)