From 43810801394441ff1982bdef1df3d6f1191e9a25 Mon Sep 17 00:00:00 2001 From: Antony Date: Wed, 20 Sep 2023 21:45:53 +0530 Subject: [PATCH 1/2] Feat: Global field audit functionality added --- package-lock.json | 2 - packages/contentstack-audit/README.md | 43 +++- .../src/commands/cm/stacks/audit/index.ts | 220 ++++++++++++++---- .../contentstack-audit/src/config/index.ts | 10 +- .../contentstack-audit/src/messages/index.ts | 3 +- .../src/modules/content-types.ts | 156 +++++-------- .../src/modules/global-fields.ts | 45 ++++ .../src/types/content-types.ts | 14 +- pnpm-lock.yaml | 2 - 9 files changed, 343 insertions(+), 152 deletions(-) create mode 100644 packages/contentstack-audit/src/modules/global-fields.ts diff --git a/package-lock.json b/package-lock.json index a75d027b2f..07785bc25f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22953,7 +22953,6 @@ "@contentstack/cli-migration": "~1.3.13", "@contentstack/cli-utilities": "~1.5.2", "@contentstack/management": "~1.10.0", - "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", "@oclif/plugin-not-found": "^2.4.0", "@oclif/plugin-plugins": "^3.3.2", @@ -27004,7 +27003,6 @@ "@contentstack/cli-migration": "~1.3.13", "@contentstack/cli-utilities": "~1.5.2", "@contentstack/management": "~1.10.0", - "@oclif/core": "^2.9.3", "@oclif/plugin-help": "^5", "@oclif/plugin-not-found": "^2.4.0", "@oclif/plugin-plugins": "^3.3.2", diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md index f47b02b851..3dd3db3993 100644 --- a/packages/contentstack-audit/README.md +++ b/packages/contentstack-audit/README.md @@ -54,7 +54,7 @@ USAGE FLAGS -c, --config= Path of the external config - -d, --data-dir= Current working directory. + -d, --data-dir= Path and location where data is stored DESCRIPTION Audit fix command @@ -74,11 +74,21 @@ Audit and find possible errors in the exported data ``` USAGE - $ csdx cm:stacks:audit [-c ] [-d ] + $ csdx cm:stacks:audit [-c ] [-d ] [--report-path ] [--reference-only] [--modules + content-types|global-fields] [--columns | ] [--sort ] [--filter ] [--csv | --no-truncate] FLAGS -c, --config= Path of the external config - -d, --data-dir= Current working directory. + -d, --data-dir= Path and location where data is stored + --columns= only show provided columns (comma-separated) + --csv output is csv format [alias: --output=csv] + --filter= filter property by partial string matching, ex: name=foo + --modules=