Skip to content

Commit

Permalink
Merge pull request #1378 from contentstack/hotfix/release
Browse files Browse the repository at this point in the history
Hotfix Release 19th April
  • Loading branch information
cs-raj authored Apr 19, 2024
2 parents dc6335b + f7aec8c commit ca42566
Show file tree
Hide file tree
Showing 9 changed files with 2,483 additions and 14,416 deletions.
16,857 changes: 2,457 additions & 14,400 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 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.5.3",
"version": "1.5.4",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand Down
12 changes: 11 additions & 1 deletion packages/contentstack-audit/src/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ export default class Entries {
protected missingRefs: Record<string, any> = {};
public entryMetaData: Record<string, any>[] = [];
public moduleName: keyof typeof auditConfig.moduleConfig = 'entries';
public isEntryWithoutTitleField: boolean = false;

constructor({ log, fix, config, moduleName, ctSchema, gfSchema }: ModuleConstructorParam & CtConstructorParam) {
this.log = log;
Expand Down Expand Up @@ -105,7 +106,6 @@ export default class Entries {
if (this.fix) {
this.removeMissingKeysOnEntry(ctSchema.schema as ContentTypeSchemaType[], this.entries[entryUid]);
}

this.lookForReference([{ locale: code, uid, name: title }], ctSchema, this.entries[entryUid]);
const message = $t(auditMsg.SCAN_ENTRY_SUCCESS_MSG, {
title,
Expand Down Expand Up @@ -981,10 +981,20 @@ export default class Entries {
const entries = (await fsUtility.readChunkFiles.next()) as Record<string, EntryStruct>;
for (const entryUid in entries) {
let { title } = entries[entryUid];
if (!title) {
this.isEntryWithoutTitleField = true;
this.log(
`Entry with UID '${entryUid}' of Content Type '${uid}' in Locale '${code}' does not have a 'title' field.`,
`error`,
);
}
this.entryMetaData.push({ uid: entryUid, title });
}
}
}
}
if (this.isEntryWithoutTitleField) {
throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`);
}
}
}
4 changes: 2 additions & 2 deletions packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-bulk-publish",
"description": "Contentstack CLI plugin for bulk publish actions",
"version": "1.4.4",
"version": "1.4.5",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down Expand Up @@ -99,4 +99,4 @@
"version": "oclif readme && git add README.md",
"clean": "rm -rf ./node_modules tsconfig.build.tsbuildinfo"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class CrossPublishCommand extends Command {

flagsAdapter(_flags) {
if ('content-type' in _flags) {
_flags.contentType = _flags['content-type'];
_flags.contentTypes = _flags['content-type'];
delete _flags['content-type'];
}
if ('locales' in _flags) {
Expand Down Expand Up @@ -196,7 +196,7 @@ CrossPublishCommand.flags = {
default: 'true',
}),
'api-version': flags.string({
description : "API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].",
description: 'API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].',
}),
contentType: flags.string({
char: 't',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ async function start(
bulkPublish,
_filter,
deliveryToken,
contentType,
contentTypes,
environment,
locale,
onlyAssets,
Expand Down Expand Up @@ -292,8 +292,8 @@ async function start(
};
if (f_types) filter.type = f_types;
// filter.type = (f_types) ? f_types : types // types mentioned in the config file (f_types) are given preference
if (contentType) {
filter.content_type_uid = contentType;
if (contentTypes) {
filter.content_type_uid = contentTypes;
filter.type = 'entry_published';
}
if (onlyAssets) {
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.5.3",
"@contentstack/cli-audit": "~1.5.4",
"@contentstack/cli-command": "~1.2.16",
"@contentstack/cli-utilities": "~1.6.0",
"@contentstack/management": "~1.15.3",
Expand Down
6 changes: 3 additions & 3 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.17.2",
"version": "1.17.3",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run"
Expand All @@ -22,11 +22,11 @@
"prepack": "pnpm compile && oclif manifest && oclif readme"
},
"dependencies": {
"@contentstack/cli-audit": "~1.5.3",
"@contentstack/cli-audit": "~1.5.4",
"@contentstack/cli-auth": "~1.3.17",
"@contentstack/cli-cm-bootstrap": "~1.9.0",
"@contentstack/cli-cm-branches": "~1.0.24",
"@contentstack/cli-cm-bulk-publish": "~1.4.4",
"@contentstack/cli-cm-bulk-publish": "~1.4.5",
"@contentstack/cli-cm-export": "~1.11.1",
"@contentstack/cli-cm-clone": "~1.10.3",
"@contentstack/cli-cm-export-to-csv": "~1.7.0",
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ca42566

Please sign in to comment.