Skip to content

Commit

Permalink
Merge pull request #1713 from contentstack/development
Browse files Browse the repository at this point in the history
DX | 09-01-2025 | Release
  • Loading branch information
cs-raj authored Dec 20, 2024
2 parents a7e5697 + 5708f91 commit e332ccf
Show file tree
Hide file tree
Showing 20 changed files with 620 additions and 396 deletions.
722 changes: 417 additions & 305 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-audit/1.7.3 darwin-arm64 node-v22.2.0
@contentstack/cli-audit/1.7.4 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
6 changes: 3 additions & 3 deletions packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-audit",
"version": "1.7.3",
"version": "1.7.4",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand Down Expand Up @@ -31,11 +31,11 @@
},
"devDependencies": {
"@contentstack/cli-dev-dependencies": "^1.2.4",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"@types/chai": "^4.3.20",
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.9",
"@types/node": "^20.17.10",
"@types/uuid": "^9.0.8",
"chai": "^4.5.0",
"eslint": "^8.57.1",
Expand Down
8 changes: 8 additions & 0 deletions packages/contentstack-audit/src/audit-base-command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,14 @@ export abstract class AuditBaseCommand extends BaseCommand<typeof AuditBaseComma
minWidth: 7,
header: 'Title',
},
ct: {
minWidth: 7,
header: "Content Type"
},
locale: {
minWidth: 7,
header: "Locale"
},
display_name: {
minWidth: 7,
header: 'Field name',
Expand Down
22 changes: 21 additions & 1 deletion packages/contentstack-audit/src/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,27 @@ export default class Entries {

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

if (this.missingRefs[this.currentUid]?.length) {
this.missingRefs[this.currentUid].forEach((entry: any) => {
entry.ct = ctSchema.uid;
entry.locale = code;
});
}

if (this.missingSelectFeild[this.currentUid]?.length) {
this.missingSelectFeild[this.currentUid].forEach((entry: any) => {
entry.ct = ctSchema.uid;
entry.locale = code;
});
}

if (this.missingMandatoryFields[this.currentUid]?.length) {
this.missingMandatoryFields[this.currentUid].forEach((entry: any) => {
entry.ct = ctSchema.uid;
entry.locale = code;
});
}

const fields = this.missingMandatoryFields[uid];
const isPublished = entry.publish_details?.length > 0;
if ((this.fix && fields.length && isPublished) || (!this.fix && fields)) {
Expand Down Expand Up @@ -167,7 +188,6 @@ export default class Entries {
// this.log('', 'info'); // Adding empty line

this.removeEmptyVal();

return {
missingEntryRefs: this.missingRefs,
missingSelectFeild: this.missingSelectFeild,
Expand Down
2 changes: 2 additions & 0 deletions packages/contentstack-audit/src/types/content-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ enum OutputColumn {
'Entry UID' ="Entry UID",
'Content Type UID'= 'Content Type UID',
"Locale"="Locale",
"Content Type" = "ct",
"locale"="locale",
}

export {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-audit/src/util/log.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default class Logger {
}

const filename = normalize(
resolve(this.config.basePath, 'logs', `${logType}.log`),
resolve(this.config.basePath, 'Audit logs', `${logType}.log`),
).replace(/^(\.\.(\/|\\|$))+/, '');
const transports: winston.transport[] = [
new winston.transports.File({
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"devDependencies": {
"@fancy-test/nock": "^0.1.1",
"@oclif/plugin-help": "^5.2.20",
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"tar": "^6.2.1 "
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
"@types/node": "^14.18.63",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"chai": "^4.5.0",
"eslint": "^8.57.1",
"eslint-config-oclif": "^4.0.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-import/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-audit": "~1.7.3",
"@contentstack/cli-audit": "~1.7.4",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.18.4",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-launch
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli-launch/1.3.0 darwin-arm64 node-v22.2.0
@contentstack/cli-launch/1.3.1 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@contentstack/cli-launch",
"version": "1.3.0",
"version": "1.3.1",
"description": "Launch related operations",
"author": "Contentstack CLI",
"bin": {
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-launch/src/graphql/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const serverlessLogsQuery: DocumentNode = gql`
query GetServerlessLogs($query: QueryLogMessagesInputType!) {
getServerlessLogs(query: $query) {
logs {
level
source
message
timestamp
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ export default class LogPolling {
environmentUid: this.config.environment,
startTime: this.startTime,
endTime: this.endTime,
deploymentUid: this.config.deployment,
},
},
pollInterval: this.config.pollingInterval,
Expand All @@ -201,6 +202,7 @@ export default class LogPolling {
environmentUid: string | undefined;
startTime: number;
endTime: number;
deploymentUid: string | undefined;
};
}
>,
Expand Down Expand Up @@ -232,6 +234,7 @@ export default class LogPolling {
environmentUid: this.config.environment,
startTime: this.startTime,
endTime: this.endTime,
deploymentUid: this.config.deployment,
},
});
});
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli/1.32.1 darwin-arm64 node-v22.8.0
@contentstack/cli/1.32.2 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
1 change: 1 addition & 0 deletions packages/contentstack/audit-report/entries.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli",
"description": "Command-line tool (CLI) to interact with Contentstack",
"version": "1.32.1",
"version": "1.32.2",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run.js"
Expand All @@ -22,7 +22,7 @@
"prepack": "pnpm compile && oclif manifest && oclif readme"
},
"dependencies": {
"@contentstack/cli-audit": "~1.7.3",
"@contentstack/cli-audit": "~1.7.4",
"@contentstack/cli-auth": "~1.3.22",
"@contentstack/cli-cm-bootstrap": "~1.13.0",
"@contentstack/cli-cm-branches": "~1.2.0",
Expand All @@ -35,14 +35,14 @@
"@contentstack/cli-cm-seed": "~1.10.0",
"@contentstack/cli-command": "~1.3.2",
"@contentstack/cli-config": "~1.9.0",
"@contentstack/cli-launch": "~1.3.0",
"@contentstack/cli-launch": "~1.3.1",
"@contentstack/cli-migration": "~1.6.4",
"@contentstack/cli-utilities": "~1.8.0",
"@contentstack/management": "~1.18.4",
"@contentstack/cli-variants": "~1.1.4",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.1",
"@oclif/core": "^3.27.0",
"@oclif/plugin-help": "^5",
"@oclif/plugin-help": "^5.2.20",
"@oclif/plugin-not-found": "^2.4.3",
"@oclif/plugin-plugins": "^5.4.22",
"chalk": "^4.1.2",
Expand All @@ -57,7 +57,7 @@
"winston": "^3.17.0"
},
"devDependencies": {
"@oclif/test": "^4.1.3",
"@oclif/test": "^4.1.4",
"@types/chai": "^4.3.20",
"@types/inquirer": "^9.0.7",
"@types/mkdirp": "^1.0.2",
Expand Down
Loading

0 comments on commit e332ccf

Please sign in to comment.