From 6e771e3c65266c7d0b3bcc776d7dc456af530f50 Mon Sep 17 00:00:00 2001 From: Antony Date: Thu, 8 Feb 2024 12:32:15 +0530 Subject: [PATCH 1/3] Feat: Audit and check if extensions/marketplace apps are missing used in the content types and entries --- package-lock.json | 14 +- packages/contentstack-audit/README.md | 10 +- packages/contentstack-audit/package.json | 2 +- .../contentstack-audit/src/config/index.ts | 20 ++- .../src/modules/content-types.ts | 142 +++++++++++++-- .../contentstack-audit/src/modules/entries.ts | 170 +++++++++++++++++- .../contentstack-audit/src/types/common.ts | 6 +- .../src/types/content-types.ts | 29 +-- .../contentstack-audit/src/types/entries.ts | 18 +- .../contentstack-audit/src/types/extension.ts | 48 +++++ packages/contentstack-clone/package.json | 2 +- packages/contentstack-import/README.md | 2 +- packages/contentstack-import/package.json | 4 +- packages/contentstack-seed/package.json | 2 +- packages/contentstack/package.json | 4 +- pnpm-lock.yaml | 10 +- 16 files changed, 421 insertions(+), 62 deletions(-) create mode 100644 packages/contentstack-audit/src/types/extension.ts diff --git a/package-lock.json b/package-lock.json index eba3009fcb..bab8732ef2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23543,7 +23543,7 @@ "version": "1.14.0", "license": "MIT", "dependencies": { - "@contentstack/cli-audit": "~1.3.5", + "@contentstack/cli-audit": "~1.4.0", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.8.0", "@contentstack/cli-cm-branches": "~1.0.22", @@ -23551,7 +23551,7 @@ "@contentstack/cli-cm-clone": "~1.10.0", "@contentstack/cli-cm-export": "~1.10.5", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.3", + "@contentstack/cli-cm-import": "~1.13.4", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -23608,7 +23608,7 @@ }, "packages/contentstack-audit": { "name": "@contentstack/cli-audit", - "version": "1.3.5", + "version": "1.4.0", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -24093,7 +24093,7 @@ "dependencies": { "@colors/colors": "^1.5.0", "@contentstack/cli-cm-export": "~1.10.4", - "@contentstack/cli-cm-import": "~1.13.3", + "@contentstack/cli-cm-import": "~1.13.4", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "async": "^3.2.4", @@ -24993,10 +24993,10 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.13.3", + "version": "1.13.4", "license": "MIT", "dependencies": { - "@contentstack/cli-audit": "^1.3.5", + "@contentstack/cli-audit": "~1.4.0", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "@contentstack/management": "~1.13.0", @@ -25472,7 +25472,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.3", + "@contentstack/cli-cm-import": "~1.13.4", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.11", "inquirer": "8.2.4", diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md index 5af1961475..53417e0f57 100644 --- a/packages/contentstack-audit/README.md +++ b/packages/contentstack-audit/README.md @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/cli-audit/1.3.5 darwin-arm64 node-v20.8.0 +@contentstack/cli-audit/1.4.0 darwin-arm64 node-v20.10.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND @@ -99,14 +99,14 @@ Perform audits and fix possible errors in the exported Contentstack data. USAGE $ csdx audit:fix [-c ] [-d ] [--report-path ] [--modules content-types|global-fields|entries] [--copy-path --copy-dir] [--fix-only - reference|global_field|json:rte|json:custom-field|blocks|group] [--columns | ] [--sort ] [--filter + reference|global_field|json:rte|json:extension|blocks|group] [--columns | ] [--sort ] [--filter ] [--csv | --no-truncate] FLAGS --copy-dir Create backup from the original data. --copy-path= Provide the path to backup the copied data --fix-only=