From 1c80b23ee2a10c66e3b6f803934f87e9c80f46b9 Mon Sep 17 00:00:00 2001 From: Antony Date: Wed, 15 Nov 2023 17:25:25 +0530 Subject: [PATCH] Feat: Add missing global fields schema in to content type if global field exists --- .gitignore | 4 +- package-lock.json | 6 +- packages/contentstack-audit/README.md | 94 +++++++++----- packages/contentstack-audit/package.json | 2 +- .../src/audit-base-command.ts | 17 ++- .../contentstack-audit/src/base-command.ts | 2 + .../src/commands/cm/stacks/audit/fix.ts | 11 +- .../src/commands/cm/stacks/audit/index.ts | 5 +- .../contentstack-audit/src/config/index.ts | 1 + .../contentstack-audit/src/messages/index.ts | 18 ++- .../src/modules/content-types.ts | 71 +++++++++-- .../contentstack-audit/src/modules/entries.ts | 14 ++- .../contentstack-audit/src/types/common.ts | 8 ++ .../src/types/content-types.ts | 1 + .../contentstack-audit/src/types/index.ts | 5 +- packages/contentstack-audit/src/util/flags.ts | 31 +++++ packages/contentstack-audit/src/util/index.ts | 3 +- .../test/unit/audit-base-command.test.ts | 2 +- .../test/unit/modules/content-types.test.ts | 117 ++++++++++++++---- .../test/unit/util/flags.test.ts | 30 +++++ .../package.json | 2 +- packages/contentstack/README.md | 94 +++++++++----- pnpm-lock.yaml | 4 +- 23 files changed, 411 insertions(+), 131 deletions(-) create mode 100644 packages/contentstack-audit/src/types/common.ts create mode 100644 packages/contentstack-audit/src/util/flags.ts create mode 100644 packages/contentstack-audit/test/unit/util/flags.test.ts diff --git a/.gitignore b/.gitignore index 329aeebd38..e378ee25cd 100644 --- a/.gitignore +++ b/.gitignore @@ -16,4 +16,6 @@ contentstack-cli-logs packages/**/package-lock.json .dccache yarn.lock -contents-* \ No newline at end of file +contents-* +*.http +*.todo \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 0666005900..c8a0833eee 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22999,7 +22999,7 @@ "eslint-config-oclif-typescript": "^1.0.3", "mocha": "^10.2.0", "nyc": "^15.1.0", - "oclif": "^3.10.0", + "oclif": "^3", "shx": "^0.3.4", "sinon": "^17.0.0", "ts-jest": "^29.1.1", @@ -24048,7 +24048,6 @@ "winston": "^3.7.2" }, "devDependencies": { - "@contentstack/cli-dev-dependencies": "^1.2.3", "@oclif/test": "^2.2.10", "@types/chai": "^4.2.18", "@types/inquirer": "^9.0.3", @@ -27315,7 +27314,7 @@ "lodash": "^4.17.21", "mocha": "^10.2.0", "nyc": "^15.1.0", - "oclif": "^3.10.0", + "oclif": "^3", "shx": "^0.3.4", "sinon": "^17.0.0", "ts-jest": "^29.1.1", @@ -28689,7 +28688,6 @@ "version": "file:packages/contentstack-config", "requires": { "@contentstack/cli-command": "~1.2.15", - "@contentstack/cli-dev-dependencies": "^1.2.3", "@contentstack/cli-utilities": "~1.5.5", "@oclif/test": "^2.2.10", "@types/chai": "^4.2.18", diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md index 0d0960ba8a..584a5c87e3 100644 --- a/packages/contentstack-audit/README.md +++ b/packages/contentstack-audit/README.md @@ -56,16 +56,20 @@ USAGE --no-truncate] FLAGS + --modules=