Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 55 additions & 122 deletions package-lock.json

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

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.2 darwin-arm64 node-v22.2.0
@contentstack/cli-audit/1.7.3 darwin-arm64 node-v22.8.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 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.2",
"version": "1.7.3",
"description": "Contentstack audit plugin",
"author": "Contentstack CLI",
"homepage": "https://github.com/contentstack/cli",
Expand All @@ -27,7 +27,7 @@
"fs-extra": "^11.2.0",
"lodash": "^4.17.21",
"uuid": "^9.0.1",
"winston": "^3.16.0"
"winston": "^3.17.0"
},
"devDependencies": {
"@contentstack/cli-dev-dependencies": "^1.2.4",
Expand Down
21 changes: 12 additions & 9 deletions packages/contentstack-audit/src/modules/entries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -890,24 +890,27 @@ export default class Entries {
}

/**
*
* this is called in case the select field has multiple optins to chose from
* @param field It contains the value to be searched
* @param selectOptions It contains the options that were added in CT
* @returns An Array of entry containing only the values that were present in CT, An array of not present entries
*/
findNotPresentSelectField(field: any, selectOptions: any) {
if(!field){
field = []
}
let present = [];
let notPresent = [];
const choicesMap = new Map(selectOptions.choices.map((choice: { value: any }) => [choice.value, choice]));
for (const value of field) {
const choice: any = choicesMap.get(value);

if (choice) {
present.push(choice.value);
} else {
notPresent.push(value);
for (const value of field) {
const choice: any = choicesMap.get(value);

if (choice) {
present.push(choice.value);
} else {
notPresent.push(value);
}
}
}
return { filteredFeild: present, notPresent };
}

Expand Down
Loading
Loading