From 1b4a1c2cadc990eb6771e1799f7ce14d384135c6 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Sat, 4 Apr 2026 15:29:59 +0530 Subject: [PATCH 1/3] Added Skill Files and dependency updates --- .cursor/rules/README.md | 22 + .cursor/rules/contentstack-cli.mdc | 32 + .cursor/rules/dev-workflow.md | 43 ++ .cursor/rules/oclif-commands.mdc | 31 + .cursor/rules/testing.mdc | 32 + .cursor/rules/typescript.mdc | 31 + .cursor/skills/SKILL.md | 10 + .talismanrc | 10 +- AGENTS.md | 41 ++ package-lock.json | 559 +++++++++--------- package.json | 22 +- skills/README.md | 38 ++ skills/code-review/SKILL.md | 18 + .../references/code-review-checklist.md | 33 ++ skills/contentstack-cli/SKILL.md | 19 + .../references/contentstack-patterns.md | 32 + skills/testing/SKILL.md | 20 + skills/testing/references/testing-patterns.md | 41 ++ 18 files changed, 743 insertions(+), 291 deletions(-) create mode 100644 .cursor/rules/README.md create mode 100644 .cursor/rules/contentstack-cli.mdc create mode 100644 .cursor/rules/dev-workflow.md create mode 100644 .cursor/rules/oclif-commands.mdc create mode 100644 .cursor/rules/testing.mdc create mode 100644 .cursor/rules/typescript.mdc create mode 100644 .cursor/skills/SKILL.md create mode 100644 AGENTS.md create mode 100644 skills/README.md create mode 100644 skills/code-review/SKILL.md create mode 100644 skills/code-review/references/code-review-checklist.md create mode 100644 skills/contentstack-cli/SKILL.md create mode 100644 skills/contentstack-cli/references/contentstack-patterns.md create mode 100644 skills/testing/SKILL.md create mode 100644 skills/testing/references/testing-patterns.md diff --git a/.cursor/rules/README.md b/.cursor/rules/README.md new file mode 100644 index 0000000..65a3256 --- /dev/null +++ b/.cursor/rules/README.md @@ -0,0 +1,22 @@ +# Cursor rules + +Context-aware guidance for developing `@contentstack/cli-cm-regex-validate` (Contentstack CLI oclif plugin). + +## Rules overview + +| File | Scope | +|------|--------| +| `dev-workflow.md` | Core workflow, validation commands, links to skills (always applied) | +| `typescript.mdc` | TypeScript and ESLint conventions | +| `testing.mdc` | Jest + ts-jest tests | +| `oclif-commands.mdc` | Command classes under `src/commands/` | +| `contentstack-cli.mdc` | Utilities under `src/utils/` (SDK, safe-regex, output) | + +## How rules apply + +- `dev-workflow.md` uses `alwaysApply: true` and broad globs so it loads for most edits. +- `.mdc` rules load when you work in matching paths (see each file’s `globs`). + +## Manual references in chat + +You can mention rules by context, for example: TypeScript guidance when editing `src/**/*.ts`, testing patterns when editing `**/*.test.ts`. diff --git a/.cursor/rules/contentstack-cli.mdc b/.cursor/rules/contentstack-cli.mdc new file mode 100644 index 0000000..e075fda --- /dev/null +++ b/.cursor/rules/contentstack-cli.mdc @@ -0,0 +1,32 @@ +--- +description: "Contentstack Management SDK and regex-validation utilities" +globs: ["**/utils/*.ts"] +alwaysApply: false +--- + +# Contentstack CLI utilities (this plugin) + +## Management client + +- Create client with `contentstackSdk.client` and `ContentstackConfig` (`host` from command `cmaHost`). +- Optional `early_access` from `configHandler.get('earlyAccessHeaders')` when configured. +- Obtain stack with `api_key` and `management_token` from token details. + +## Stack processing + +- Query content types and/or global fields with `.query({}).find()` (see `process-stack.ts`). +- Use `cli.action.start` / `cli.action.stop` from `cli-ux` for timed progress messages. + +## Regex validation + +- Walk schema recursively in `safe-regex.ts`: handle `group`, `global_field`, `blocks`, and nested `schema` arrays. +- Evaluate `format` fields with the `safe-regex` package; collect invalid patterns into rows for CSV and summary table. + +## Output + +- Write CSV with `jsonexport`; render summary table with `cli-table3`; print via `cliux` / `sanitizePath` from `@contentstack/cli-utilities` for paths. +- Default results directory is resolved relative to compiled output; optional `-f` / `--filePath` overrides the directory. + +## Security + +- Never log management tokens or API keys. Errors should use messages from `messages/index.json`. diff --git a/.cursor/rules/dev-workflow.md b/.cursor/rules/dev-workflow.md new file mode 100644 index 0000000..2cffb6c --- /dev/null +++ b/.cursor/rules/dev-workflow.md @@ -0,0 +1,43 @@ +--- +description: "Core development workflow for cli-cm-regex-validate - always applied" +globs: ["**/*.ts", "**/*.js", "**/*.json"] +alwaysApply: true +--- + +# Development workflow + +## Quick reference + +Detailed patterns live in project skills: + +- `@skills/testing` — Jest tests, mocks, fixtures under `test/data/` +- `@skills/contentstack-cli` — Command flow, Management SDK, `safe-regex`, CSV output +- `@skills/code-review` — PR and release checklist + +## Validation commands + +- `npm test` — Jest (`jest.config.ts`, ts-jest). This is the canonical test runner; CI uses it in `.github/workflows/unit-tests.yml`. +- `npm run posttest` — ESLint on `.ts` files (same as running eslint after tests). + +## Local hooks + +If Husky is installed, pre-commit may run Talisman (secrets) and Snyk. Use `SKIP_HOOK=1` only when you understand the bypass. + +## TDD (recommended) + +1. **Red** — Add or change a failing test in `test/utils/` (or add a fixture in `test/data/`). +2. **Green** — Minimal change in `src/` to pass. +3. **Refactor** — Keep tests green; avoid drive-by refactors outside the task. + +## Repository layout + +- `src/commands/` — oclif commands (this plugin: `cm/stacks/validate-regex`) +- `src/utils/` — Shared logic (connect stack, process stack, safe-regex, output, prompts) +- `messages/index.json` — User-facing strings for the command +- `test/utils/` — Jest suites mirroring utils +- `test/data/` — JSON fixtures for schema and expected outputs + +## Before merging + +- Tests pass (`npm test`). +- Lint clean (`npm run posttest` or eslint as configured in `package.json`). diff --git a/.cursor/rules/oclif-commands.mdc b/.cursor/rules/oclif-commands.mdc new file mode 100644 index 0000000..95c692e --- /dev/null +++ b/.cursor/rules/oclif-commands.mdc @@ -0,0 +1,31 @@ +--- +description: "oclif command patterns for Contentstack CLI plugin commands" +globs: ["**/commands/**/*.ts"] +alwaysApply: false +--- + +# OCLIF command standards + +## Base class + +- Commands extend `Command` from `@contentstack/cli-command` (see `src/commands/cm/stacks/validate-regex.ts`). + +## Flags + +- Build flags with `flags` from `@contentstack/cli-utilities` (e.g. `flags.string`, `flags.boolean`, `flags.help`). +- Keep descriptions aligned with `messages/index.json` under `validateRegex.command` where applicable. + +## Run flow + +1. `await this.parse(CommandClass)` to get flags. +2. Prompt for missing alias or module selection via `src/utils/interactive.ts` when needed. +3. Resolve token with `this.getToken(alias)`; handle failure with `this.error(..., { ref: ... })` using message keys from `messages/index.json`. +4. Delegate stack work to `src/utils/connect-stack.ts` (and downstream utils). + +## User messages + +- Centralize copy in `messages/index.json`; avoid hard-coded user strings in the command except where unavoidable. + +## Examples + +- Maintain `static examples` with realistic `csdx cm:stacks:validate-regex` invocations. diff --git a/.cursor/rules/testing.mdc b/.cursor/rules/testing.mdc new file mode 100644 index 0000000..8e7256e --- /dev/null +++ b/.cursor/rules/testing.mdc @@ -0,0 +1,32 @@ +--- +description: "Jest and ts-jest testing patterns for cli-cm-regex-validate" +globs: ["**/*.test.ts", "**/__tests__/**/*.ts"] +alwaysApply: false +--- + +# Testing standards + +## Runner + +- **Jest** with **ts-jest** (`jest.config.ts`). Do not document Mocha/Chai/Sinon as the primary stack for this repository. + +## Conventions + +- Test files live under `test/utils/` and mirror `src/utils/` where applicable. +- Use `describe` / `test` (or `it`) with clear behavior-focused names. +- Prefer `beforeEach(() => jest.restoreAllMocks())` or `jest.clearAllMocks()` when tests share mocks. + +## Mocking + +- Mock external I/O: `@contentstack/management`, `fs`, `cli-ux`, `@contentstack/cli-utilities` as needed. +- Use `jest.spyOn` for targeted spies; `jest.mock` for module substitution. +- Do not call real Contentstack APIs in unit tests. + +## Assertions + +- Prefer `toHaveBeenCalled` / `toHaveBeenCalledWith` over deprecated Jest matchers. +- Use fixture JSON from `test/data/` via `require` for documents and expected invalid-regex output. + +## Fixtures + +- Keep schema samples and expected arrays in `test/data/*.json` to avoid huge inline objects in tests. diff --git a/.cursor/rules/typescript.mdc b/.cursor/rules/typescript.mdc new file mode 100644 index 0000000..e564ee9 --- /dev/null +++ b/.cursor/rules/typescript.mdc @@ -0,0 +1,31 @@ +--- +description: "TypeScript and ESLint conventions for cli-cm-regex-validate" +globs: ["**/*.ts", "**/*.tsx"] +alwaysApply: false +--- + +# TypeScript standards + +## Compiler + +- Project uses `strict: true` in `tsconfig.json` (root `src/` only for emit). +- Prefer explicit types on public functions and command flags over untyped `any` where practical. + +## ESLint (`.eslintrc`) + +- Extends `eslint-config-oclif` and `eslint-config-oclif-typescript`. +- Single quotes; no semicolons; `object-curly-spacing: never`. +- `require()` for JSON such as `messages/index.json` is allowed (`@typescript-eslint/no-require-imports` is off). + +## Imports + +- ES modules for TypeScript sources; `require` is acceptable for JSON message bundles and legacy interop per eslint rules. + +## Naming + +- Files: kebab-case (e.g. `connect-stack.ts`, `validate-regex.ts`). +- Classes: PascalCase. Functions and variables: camelCase. + +## Error handling + +- Surface user-facing errors via `this.error()` in commands or localized strings from `messages/index.json` in utilities. diff --git a/.cursor/skills/SKILL.md b/.cursor/skills/SKILL.md new file mode 100644 index 0000000..5cb7074 --- /dev/null +++ b/.cursor/skills/SKILL.md @@ -0,0 +1,10 @@ +# Project skills + +Authoritative skill packages for this repository live under **`skills/`** at the repo root. + +- `skills/README.md` — index and quick reference +- `skills/testing/` — Jest patterns and references +- `skills/contentstack-cli/` — command and SDK patterns for regex validation +- `skills/code-review/` — PR review checklist + +Use `@skills/` in Cursor or other agents to point at these folders. diff --git a/.talismanrc b/.talismanrc index c9fe6e6..1da916a 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,10 @@ fileignoreconfig: -- filename: package-lock.json - checksum: 98330174c261d1793f7e44c1889aea8c6bc1f6dfaa9a5cb4f58ad2c402f4db06 + - filename: package-lock.json + checksum: 3f663322d950acc49b7e8899ca353456b1e7ac6277ac36fdfcac813644fb07d7 + - filename: .cursor/rules/dev-workflow.md + checksum: 9912be426cb15077a67b81bd5801f2a65d367e30204d278c6814ebb1d74661ba + - filename: skills/code-review/references/code-review-checklist.md + checksum: 8bc8e53a9775258ddfadb40f9a6f415508d87aa9c70c95ebf748737e1ef7dbee + - filename: skills/contentstack-cli/references/contentstack-patterns.md + checksum: 3e3f445d01c67577dc91b1ba6ee27dcd1ffc1e907b2fbf33ce9b2905eaba239a version: "" \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..b1cbb36 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,41 @@ +# cli-cm-regex-validate + +`@contentstack/cli-cm-regex-validate` is a **Contentstack CLI** oclif plugin with a single command, **`csdx cm:stacks:validate-regex`**, which scans content types and/or global fields in a stack for regex `format` values that fail the `safe-regex` check, then writes results to CSV and prints a summary table. User-facing copy lives in `messages/index.json`. + +## Layout + +| Area | Path | +|------|------| +| Command | `src/commands/cm/stacks/validate-regex.ts` | +| Utils | `src/utils/` (`connect-stack`, `process-stack`, `safe-regex`, `generate-output`, `interactive`) | +| Messages | `messages/index.json` | +| Tests | `test/utils/*.test.ts` | +| Fixtures | `test/data/*.json` | + +## Workflow + +- Run **`npm test`** (Jest + ts-jest) before pushing; CI uses the same in `.github/workflows/unit-tests.yml`. +- Run ESLint after tests via **`npm run posttest`** (or your team’s eslint invocation from `package.json`). + +## Naming + +- Source files: kebab-case. +- Tests: describe behavior clearly (what should happen under which condition). + +## Universal skills (any agent) + +- `@skills/testing` — Jest mocks, fixtures, no live API calls +- `@skills/contentstack-cli` — SDK flow, schema recursion, `safe-regex`, output +- `@skills/code-review` — PR checklist (security, packaging, CI, messages) + +## Cursor rules (IDE) + +For file-scoped guidance, Cursor loads rules under `.cursor/rules/`. You can reference them in chat by intent, for example: + +- TypeScript and ESLint conventions — `typescript.mdc` +- Jest tests — `testing.mdc` +- Command class — `oclif-commands.mdc` +- Utils (SDK, safe-regex, output) — `contentstack-cli.mdc` +- Dev workflow — `dev-workflow.md` (always applied) + +See `.cursor/rules/README.md` for the full index. diff --git a/package-lock.json b/package-lock.json index a030b6d..ddaf037 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,36 +1,36 @@ { "name": "@contentstack/cli-cm-regex-validate", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@contentstack/cli-cm-regex-validate", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "dependencies": { - "@contentstack/cli-command": "^1.7.2", - "@contentstack/cli-utilities": "^1.17.4", - "@contentstack/management": "^1.28.0", + "@contentstack/cli-command": "^1.8.0", + "@contentstack/cli-utilities": "^1.18.0", + "@contentstack/management": "^1.29.1", "cli-table3": "^0.6.5", "cli-ux": "^6.0.9", "inquirer": "12.11.1", - "jest": "^30.2.0", + "jest": "^30.3.0", "jsonexport": "^3.2.0", "safe-regex": "^2.1.1", "tslib": "^2.8.1" }, "devDependencies": { - "@oclif/plugin-help": "^6.2.37", + "@oclif/plugin-help": "^6.2.41", "@oclif/test": "^3.2.15", "@types/chai": "^4.3.20", "@types/jest": "^30.0.0", "@types/jsonexport": "^3.0.5", "@types/mocha": "^10.0.10", - "@types/node": "^18.0.0", + "@types/node": "^18.19.130", "@types/safe-regex": "^1.1.6", - "@typescript-eslint/eslint-plugin": "^8.32.1", - "@typescript-eslint/parser": "^8.56.1", + "@typescript-eslint/eslint-plugin": "^8.58.0", + "@typescript-eslint/parser": "^8.58.0", "chai": "^4.5.0", "eslint": "^8.57.1", "eslint-config-oclif": "^4.0.0", @@ -41,9 +41,9 @@ "mocha": "^10.8.2", "nyc": "^15.1.0", "oclif": "^3.17.2", - "ts-jest": "^29.4.6", + "ts-jest": "^29.4.9", "ts-node": "^10.9.2", - "typescript": "^5.0.0" + "typescript": "^5.9.3" }, "engines": { "node": ">=14.0.0" @@ -267,13 +267,13 @@ } }, "node_modules/@babel/helpers": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.28.6.tgz", - "integrity": "sha512-xOBvwq86HHdB7WUDTfKfT/Vuxh7gElQ+Sfti2Cy6yIWNW05P8iUslOVcZ4/sKbE+/jQaukQAdz/gf3724kYdqw==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.2.tgz", + "integrity": "sha512-HoGuUs4sCZNezVEKdVcwqmZN8GoHirLUcLaYVNBK2J0DadGtdcqgr3BCbvH8+XUo4NGjNl3VOtSjEKNzqfFgKw==", "license": "MIT", "dependencies": { "@babel/template": "^7.28.6", - "@babel/types": "^7.28.6" + "@babel/types": "^7.29.0" }, "engines": { "node": ">=6.9.0" @@ -382,9 +382,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.29.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.0.tgz", - "integrity": "sha512-IyDgFV5GeDUVX4YdF/3CPULtVGSXXMLh1xVIgdCgxApktqnQV0r7/8Nqthg+8YLGaAtdyIlo2qIdZrbCv4+7ww==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.2.tgz", + "integrity": "sha512-4GgRzy/+fsBa72/RZVJmGKPmZu9Byn8o4MoLpmNe1m8ZfYnz5emHLQz3U4gLud6Zwl0RZIcgiLD7Uq7ySFuDLA==", "license": "MIT", "dependencies": { "@babel/types": "^7.29.0" @@ -619,9 +619,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.28.6", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.28.6.tgz", - "integrity": "sha512-05WQkdpL9COIMz4LjTxGpPNCdlpyimKppYNoJ5Di5EUObifl8t4tuLuUBBZEpoLYOmfvIWrsp9fCl0HoPRVTdA==", + "version": "7.29.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.29.2.tgz", + "integrity": "sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==", "dev": true, "license": "MIT", "engines": { @@ -690,13 +690,13 @@ } }, "node_modules/@contentstack/cli-command": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/@contentstack/cli-command/-/cli-command-1.7.2.tgz", - "integrity": "sha512-dtXc3gIcnivfLegADy5/PZb+1x/esZ65H2E1CjO/pg50UC8Vy1U+U0ozS0hJZTFoaVjeG+1VJRoxf5MrtUGnNA==", + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/@contentstack/cli-command/-/cli-command-1.8.0.tgz", + "integrity": "sha512-JsOVaz7jBUMeul04DZagSlS74tsIyz/f0NmsHPsr9WV+u3fRO90ilRUG1SKrreUGa7x31gIU0CB5riQeu+TXYg==", "license": "MIT", "dependencies": { - "@contentstack/cli-utilities": "~1.17.0", - "@oclif/core": "^4.3.0", + "@contentstack/cli-utilities": "~1.18.0", + "@oclif/core": "^4.8.3", "@oclif/plugin-help": "^6.2.28", "contentstack": "^3.25.3" }, @@ -705,14 +705,14 @@ } }, "node_modules/@contentstack/cli-utilities": { - "version": "1.17.4", - "resolved": "https://registry.npmjs.org/@contentstack/cli-utilities/-/cli-utilities-1.17.4.tgz", - "integrity": "sha512-45Ujy0lNtQiU0FhZrtfGEfte4kjy3tlOnlVz6REH+cW/y1Dgg1nMh+YVgygbOh+6b8PkvTYVlEvb15UxRarNiA==", + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/@contentstack/cli-utilities/-/cli-utilities-1.18.0.tgz", + "integrity": "sha512-JEm6ElIegkcibHUEjRF+Id9529bAXBqkf0Givs9GL5CZE7d8eiLzFCUnlb51VZynk1g5+SmjY5nSeghrmcVSPg==", "license": "MIT", "dependencies": { "@contentstack/management": "~1.27.5", "@contentstack/marketplace-sdk": "^1.5.0", - "@oclif/core": "^4.3.0", + "@oclif/core": "^4.8.3", "axios": "^1.13.5", "chalk": "^4.1.2", "cli-cursor": "^3.1.0", @@ -836,14 +836,14 @@ } }, "node_modules/@contentstack/management": { - "version": "1.28.0", - "resolved": "https://registry.npmjs.org/@contentstack/management/-/management-1.28.0.tgz", - "integrity": "sha512-uuknDsQaqCo4wh4dbm9bBt1WLH5m4+Cn6JpLgD7B+ZBkHsIY8W8/kdmKeGLnmqzoPAIXIv5mShw1oThCqMLEig==", + "version": "1.29.1", + "resolved": "https://registry.npmjs.org/@contentstack/management/-/management-1.29.1.tgz", + "integrity": "sha512-TFzimKEcqLCXxh5GH9QnNCV0Ta0PrsSWMmXtshQYGw7atbtKpQNHhoZqO4ifVoMFlSnSe21MQrsJUoVbigSOSA==", "license": "MIT", "dependencies": { - "@contentstack/utils": "^1.7.0", + "@contentstack/utils": "^1.8.0", "assert": "^2.1.0", - "axios": "^1.13.5", + "axios": "^1.13.6", "buffer": "^6.0.3", "form-data": "^4.0.5", "husky": "^9.1.7", @@ -867,9 +867,9 @@ } }, "node_modules/@contentstack/utils": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.8.0.tgz", - "integrity": "sha512-pqCFbn2dynSCW6LUD2AH74LIy32dxxe52OL+HpUxNVXV5doFyClkFjP9toqdAZ81VbCEaOc4WK+VS/RdtMpxDA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@contentstack/utils/-/utils-1.9.0.tgz", + "integrity": "sha512-4U2YN/twGP1yJj4nA1KQ/VhS67iTUFSgN8W8HNQDQ0PQEkPiqWdouS0Bv1AvggthKbBYYU0vfMqsoU8J++J7rA==", "license": "MIT" }, "node_modules/@cspotcode/source-map-support": { @@ -908,20 +908,20 @@ } }, "node_modules/@emnapi/core": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.0.tgz", - "integrity": "sha512-0DQ98G9ZQZOxfUcQn1waV2yS8aWdZ6kJMbYCJB3oUBecjWYO1fqJ+a1DRfPF3O5JEkwqwP1A9QEN/9mYm2Yd0w==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@emnapi/core/-/core-1.9.2.tgz", + "integrity": "sha512-UC+ZhH3XtczQYfOlu3lNEkdW/p4dsJ1r/bP7H8+rhao3TTTMO1ATq/4DdIi23XuGoFY+Cz0JmCbdVl0hz9jZcA==", "license": "MIT", "optional": true, "dependencies": { - "@emnapi/wasi-threads": "1.2.0", + "@emnapi/wasi-threads": "1.2.1", "tslib": "^2.4.0" } }, "node_modules/@emnapi/runtime": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.0.tgz", - "integrity": "sha512-QN75eB0IH2ywSpRpNddCRfQIhmJYBCJ1x5Lb3IscKAL8bMnVAKnRg8dCoXbHzVLLH7P38N2Z3mtulB7W0J0FKw==", + "version": "1.9.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.9.2.tgz", + "integrity": "sha512-3U4+MIWHImeyu1wnmVygh5WlgfYDtyf0k8AbLhMFxOipihf6nrWC4syIm/SwEeec0mNSafiiNnMJwbza/Is6Lw==", "license": "MIT", "optional": true, "dependencies": { @@ -929,9 +929,9 @@ } }, "node_modules/@emnapi/wasi-threads": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.0.tgz", - "integrity": "sha512-N10dEJNSsUx41Z6pZsXU8FjPjpBEplgH24sfkmITrBED1/U2Esum9F3lfLrMjKHHjmi557zQn7kR9R+XWXu5Rg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@emnapi/wasi-threads/-/wasi-threads-1.2.1.tgz", + "integrity": "sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==", "license": "MIT", "optional": true, "dependencies": { @@ -1016,9 +1016,9 @@ "license": "MIT" }, "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1097,9 +1097,9 @@ "license": "MIT" }, "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -1931,9 +1931,9 @@ "license": "MIT" }, "node_modules/@jest/reporters/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -2376,9 +2376,9 @@ "license": "MIT" }, "node_modules/@npmcli/map-workspaces/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -2498,9 +2498,9 @@ } }, "node_modules/@oclif/core": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.9.0.tgz", - "integrity": "sha512-k/ntRgDcUprTT+aaNoF+whk3cY3f9fRD2lkF6ul7JeCUg2MaMXVXZXfbRhJCfsiX51X8/5Pqo0LGdO9SLYXNHg==", + "version": "4.10.4", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.10.4.tgz", + "integrity": "sha512-4aMd2BAhmGWjiASzJVmEAaPTZStxW0+VdylON5m+LwbxlG2HD7aTHZ7gWqeHBm/rXH5mi1WLb5LlQTCL+VdELQ==", "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.2", @@ -2533,9 +2533,9 @@ "license": "ISC" }, "node_modules/@oclif/plugin-help": { - "version": "6.2.37", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.37.tgz", - "integrity": "sha512-5N/X/FzlJaYfpaHwDC0YHzOzKDWa41s9t+4FpCDu4f9OMReds4JeNBaaWk9rlIzdKjh2M6AC5Q18ORfECRkHGA==", + "version": "6.2.41", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.41.tgz", + "integrity": "sha512-oHqpm9a8NnLY9J5yIA+znchB2QCBqDUu5n7XINdZwfbhO6WOUZ2ANww6QN7crhvAKgpN5HK/ELN8Hy96kgLUuA==", "license": "MIT", "dependencies": { "@oclif/core": "^4" @@ -2850,9 +2850,9 @@ "license": "MIT" }, "node_modules/@oclif/test/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3230,9 +3230,9 @@ "license": "MIT" }, "node_modules/@sigstore/sign/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3546,9 +3546,9 @@ } }, "node_modules/@sinclair/typebox": { - "version": "0.34.48", - "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.48.tgz", - "integrity": "sha512-kKJTNuK3AQOrgjjotVxMrCn1sUJwM76wMszfq1kdU4uYVJjvEWuFQ6HgvLt4Xz3fSmZlTOxJ/Ie13KnIcWQXFA==", + "version": "0.34.49", + "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.34.49.tgz", + "integrity": "sha512-brySQQs7Jtn0joV8Xh9ZV/hZb9Ozb0pmazDIASBkYKCjXrXU3mpcFahmK/z4YDhGkQvP9mWJbVyahdtU5wQA+A==", "license": "MIT" }, "node_modules/@sindresorhus/is": { @@ -3583,9 +3583,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "15.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.1.1.tgz", - "integrity": "sha512-cO5W33JgAPbOh07tvZjUOJ7oWhtaqGHiZw+11DPbyqh2kHTBc3eF/CjJDeQ4205RLQsX6rxCuYOroFQwl7JDRw==", + "version": "15.3.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-15.3.0.tgz", + "integrity": "sha512-m2xozxSfCIxjDdvbhIWazlP2i2aha/iUmbl94alpsIbd3iLTfeXgfBVbwyWogB6l++istyGZqamgA/EcqYf+Bg==", "license": "BSD-3-Clause", "dependencies": { "@sinonjs/commons": "^3.0.1" @@ -3703,9 +3703,9 @@ "license": "MIT" }, "node_modules/@tufjs/models/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -3951,9 +3951,9 @@ "license": "MIT" }, "node_modules/@types/sinon": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-21.0.0.tgz", - "integrity": "sha512-+oHKZ0lTI+WVLxx1IbJDNmReQaIsQJjN2e7UUrJHEeByG7bFeKJYsv1E75JxTQ9QKJDp21bAa/0W2Xo4srsDnw==", + "version": "21.0.1", + "resolved": "https://registry.npmjs.org/@types/sinon/-/sinon-21.0.1.tgz", + "integrity": "sha512-5yoJSqLbjH8T9V2bksgRayuhpZy+723/z6wBOR+Soe4ZlXC0eW8Na71TeaZPUWDQvM7LYKa9UGFc6LRqxiR5fQ==", "dev": true, "license": "MIT", "dependencies": { @@ -4006,20 +4006,20 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.57.0.tgz", - "integrity": "sha512-qeu4rTHR3/IaFORbD16gmjq9+rEs9fGKdX0kF6BKSfi+gCuG3RCKLlSBYzn/bGsY9Tj7KE/DAQStbp8AHJGHEQ==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.0.tgz", + "integrity": "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/type-utils": "8.57.0", - "@typescript-eslint/utils": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/scope-manager": "8.58.0", + "@typescript-eslint/type-utils": "8.58.0", + "@typescript-eslint/utils": "8.58.0", + "@typescript-eslint/visitor-keys": "8.58.0", "ignore": "^7.0.5", "natural-compare": "^1.4.0", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4029,9 +4029,9 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.57.0", + "@typescript-eslint/parser": "^8.58.0", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/experimental-utils": { @@ -4203,16 +4203,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.57.0.tgz", - "integrity": "sha512-XZzOmihLIr8AD1b9hL9ccNMzEMWt/dE2u7NyTY9jJG6YNiNthaD5XtUHVF2uCXZ15ng+z2hT3MVuxnUYhq6k1g==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.0.tgz", + "integrity": "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/scope-manager": "8.58.0", + "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/typescript-estree": "8.58.0", + "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3" }, "engines": { @@ -4224,18 +4224,18 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.57.0.tgz", - "integrity": "sha512-pR+dK0BlxCLxtWfaKQWtYr7MhKmzqZxuii+ZjuFlZlIGRZm22HnXFqa2eY+90MUz8/i80YJmzFGDUsi8dMOV5w==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.0.tgz", + "integrity": "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.57.0", - "@typescript-eslint/types": "^8.57.0", + "@typescript-eslint/tsconfig-utils": "^8.58.0", + "@typescript-eslint/types": "^8.58.0", "debug": "^4.4.3" }, "engines": { @@ -4246,18 +4246,18 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.57.0.tgz", - "integrity": "sha512-nvExQqAHF01lUM66MskSaZulpPL5pgy5hI5RfrxviLgzZVffB5yYzw27uK/ft8QnKXI2X0LBrHJFr1TaZtAibw==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.0.tgz", + "integrity": "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0" + "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/visitor-keys": "8.58.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4268,9 +4268,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.57.0.tgz", - "integrity": "sha512-LtXRihc5ytjJIQEH+xqjB0+YgsV4/tW35XKX3GTZHpWtcC8SPkT/d4tqdf1cKtesryHm2bgp6l555NYcT2NLvA==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.0.tgz", + "integrity": "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A==", "dev": true, "license": "MIT", "engines": { @@ -4281,21 +4281,21 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.57.0.tgz", - "integrity": "sha512-yjgh7gmDcJ1+TcEg8x3uWQmn8ifvSupnPfjP21twPKrDP/pTHlEQgmKcitzF/rzPSmv7QjJ90vRpN4U+zoUjwQ==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.0.tgz", + "integrity": "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0", - "@typescript-eslint/utils": "8.57.0", + "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/typescript-estree": "8.58.0", + "@typescript-eslint/utils": "8.58.0", "debug": "^4.4.3", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4306,13 +4306,13 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/types": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.57.0.tgz", - "integrity": "sha512-dTLI8PEXhjUC7B9Kre+u0XznO696BhXcTlOn0/6kf1fHaQW8+VjJAVHJ3eTI14ZapTxdkOmc80HblPQLaEeJdg==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.0.tgz", + "integrity": "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==", "dev": true, "license": "MIT", "engines": { @@ -4324,21 +4324,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.57.0.tgz", - "integrity": "sha512-m7faHcyVg0BT3VdYTlX8GdJEM7COexXxS6KqGopxdtkQRvBanK377QDHr4W/vIPAR+ah9+B/RclSW5ldVniO1Q==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.0.tgz", + "integrity": "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.57.0", - "@typescript-eslint/tsconfig-utils": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/visitor-keys": "8.57.0", + "@typescript-eslint/project-service": "8.58.0", + "@typescript-eslint/tsconfig-utils": "8.58.0", + "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/visitor-keys": "8.58.0", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", "tinyglobby": "^0.2.15", - "ts-api-utils": "^2.4.0" + "ts-api-utils": "^2.5.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4348,20 +4348,20 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/utils": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.57.0.tgz", - "integrity": "sha512-5iIHvpD3CZe06riAsbNxxreP+MuYgVUsV0n4bwLH//VJmgtt54sQeY2GszntJ4BjYCpMzrfVh2SBnUQTtys2lQ==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.0.tgz", + "integrity": "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.57.0", - "@typescript-eslint/types": "8.57.0", - "@typescript-eslint/typescript-estree": "8.57.0" + "@typescript-eslint/scope-manager": "8.58.0", + "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/typescript-estree": "8.58.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4372,17 +4372,17 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", - "typescript": ">=4.8.4 <6.0.0" + "typescript": ">=4.8.4 <6.1.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.57.0.tgz", - "integrity": "sha512-zm6xx8UT/Xy2oSr2ZXD0pZo7Jx2XsCoID2IUh9YSTFRu7z+WdwYTRk6LhUftm1crwqbuoF6I8zAFeCMw0YjwDg==", + "version": "8.58.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.0.tgz", + "integrity": "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.57.0", + "@typescript-eslint/types": "8.58.0", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -4879,9 +4879,9 @@ } }, "node_modules/anymatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "license": "MIT", "engines": { "node": ">=8.6" @@ -5194,14 +5194,14 @@ } }, "node_modules/axios": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.13.6.tgz", - "integrity": "sha512-ChTCHMouEe2kn713WHbQGcuYrr6fXTBiu460OTwWrWob16g1bXn4vtz07Ope7ewMozJAnEquLk5lWQWtBig9DQ==", + "version": "1.14.0", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.14.0.tgz", + "integrity": "sha512-3Y8yrqLSwjuzpXuZ0oIYZ/XGgLwUIBU3uLvbcpb0pidD9ctpShJd43KSlEEkVQg6DS0G9NKyzOvBfUtDKEyHvQ==", "license": "MIT", "dependencies": { "follow-redirects": "^1.15.11", "form-data": "^4.0.5", - "proxy-from-env": "^1.1.0" + "proxy-from-env": "^2.1.0" } }, "node_modules/babel-jest": { @@ -5328,9 +5328,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.7", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.7.tgz", - "integrity": "sha512-1ghYO3HnxGec0TCGBXiDLVns4eCSx4zJpxnHrlqFQajmhfKMQBzUGDdkMK7fUW7PTHTeLf+j87aTuKuuwWzMGw==", + "version": "2.10.14", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.14.tgz", + "integrity": "sha512-fOVLPAsFTsQfuCkvahZkzq6nf8KvGWanlYoTh0SVA0A/PIUxQGU2AOZAoD95n2gFLVDW/jP6sbGLny95nmEuHA==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.cjs" @@ -5457,9 +5457,9 @@ } }, "node_modules/brace-expansion": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.4.tgz", - "integrity": "sha512-h+DEnpVvxmfVefa4jFbCf5HdH5YMDXRsmKflpf1pILZWRFlTbJpxeU55nJl4Smt5HQaGzg1o6RHFPJaOqnmBDg==", + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.5.tgz", + "integrity": "sha512-VZznLgtwhn+Mact9tfiwx64fA9erHH/MCXEUfB/0bX/6Fz6ny5EGTXYltMocqg4xFAQZtnO3DHWWXi8RiuN7cQ==", "license": "MIT", "dependencies": { "balanced-match": "^4.0.2" @@ -5497,9 +5497,9 @@ "license": "ISC" }, "node_modules/browserslist": { - "version": "4.28.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.1.tgz", - "integrity": "sha512-ZC5Bd0LgJXgwGqUknZY/vkUQ04r8NXnJZ3yYi4vDmSiZmC/pdSN0NbNRPxZpbtO4uAfDUAFffO8IZoM3Gj8IkA==", + "version": "4.28.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.2.tgz", + "integrity": "sha512-48xSriZYYg+8qXna9kwqjIVzuQxi+KYWp2+5nCYnYKPTr0LvD89Jqk2Or5ogxz0NUMfIjhh2lIUX/LyX9B4oIg==", "funding": [ { "type": "opencollective", @@ -5516,11 +5516,11 @@ ], "license": "MIT", "dependencies": { - "baseline-browser-mapping": "^2.9.0", - "caniuse-lite": "^1.0.30001759", - "electron-to-chromium": "^1.5.263", - "node-releases": "^2.0.27", - "update-browserslist-db": "^1.2.0" + "baseline-browser-mapping": "^2.10.12", + "caniuse-lite": "^1.0.30001782", + "electron-to-chromium": "^1.5.328", + "node-releases": "^2.0.36", + "update-browserslist-db": "^1.2.3" }, "bin": { "browserslist": "cli.js" @@ -5840,9 +5840,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001778", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001778.tgz", - "integrity": "sha512-PN7uxFL+ExFJO61aVmP1aIEG4i9whQd4eoSCebav62UwDyp5OHh06zN4jqKSMePVgxHifCw1QJxdRkA1Pisekg==", + "version": "1.0.30001785", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001785.tgz", + "integrity": "sha512-blhOL/WNR+Km1RI/LCVAvA73xplXA7ZbjzI4YkMK9pa6T/P3F2GxjNpEkyw5repTw9IvkyrjyHpwjnhZ5FOvYQ==", "funding": [ { "type": "opencollective", @@ -6654,9 +6654,9 @@ } }, "node_modules/contentstack": { - "version": "3.26.4", - "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.26.4.tgz", - "integrity": "sha512-NUe1Yz+NwmNJHTbSMr0tJ4YrerhHSaHPgptXFGxhTQkHG1d/2JDmjGeKocpA5ffO/x9JhgJmzrki+V4BsyQN4A==", + "version": "3.27.0", + "resolved": "https://registry.npmjs.org/contentstack/-/contentstack-3.27.0.tgz", + "integrity": "sha512-2ZzVk1dO4AhgaiuPjLIzeDnQky/ElI02E4+tntX7xXQXgPEDWgogghoRMT0y0dFBcZthrZe1QChwYA9aCRSGpA==", "license": "MIT", "dependencies": { "@contentstack/utils": "^1.4.1", @@ -7188,9 +7188,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.313", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.313.tgz", - "integrity": "sha512-QBMrTWEf00GXZmJyx2lbYD45jpI3TUFnNIzJ5BBc8piGUDwMPa1GV6HJWTZVvY/eiN3fSopl7NRbgGp9sZ9LTA==", + "version": "1.5.331", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.331.tgz", + "integrity": "sha512-IbxXrsTlD3hRodkLnbxAPP4OuJYdWCeM3IOdT+CpcMoIwIoDfCmRpEtSPfwBXxVkg9xmBeY7Lz2Eo2TDn/HC3Q==", "license": "ISC" }, "node_modules/emittery": { @@ -7826,9 +7826,9 @@ "peer": true }, "node_modules/eslint-config-oclif-typescript/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "peer": true, @@ -8279,9 +8279,9 @@ "license": "MIT" }, "node_modules/eslint-plugin-node/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -8492,9 +8492,9 @@ "license": "MIT" }, "node_modules/eslint/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -8931,9 +8931,9 @@ "license": "MIT" }, "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -9124,9 +9124,9 @@ } }, "node_modules/flatted": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.1.tgz", - "integrity": "sha512-IxfVbRFVlV8V/yRaGzk0UVIcsKKHMSfYw66T/u4nTwlWteQePsxe//LjudR1AMX4tZW3WFCh3Zqa/sjlqpbURQ==", + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.4.2.tgz", + "integrity": "sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==", "dev": true, "license": "ISC" }, @@ -9534,9 +9534,9 @@ "license": "MIT" }, "node_modules/glob/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -9698,9 +9698,9 @@ } }, "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", + "version": "4.7.9", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.9.tgz", + "integrity": "sha512-4E71E0rpOaQuJR2A3xDZ+GM1HyWYv1clR58tC8emQNeQe3RH7MAzSbat+V0wG78LQBo6m6bzSG/L4pBuCsgnUQ==", "dev": true, "license": "MIT", "dependencies": { @@ -10081,9 +10081,9 @@ "license": "MIT" }, "node_modules/ignore-walk/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -11677,9 +11677,9 @@ "license": "MIT" }, "node_modules/jest-config/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -12039,9 +12039,9 @@ "license": "MIT" }, "node_modules/jest-runtime/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0" @@ -12554,9 +12554,9 @@ } }, "node_modules/lodash": { - "version": "4.17.23", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz", - "integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.18.1.tgz", + "integrity": "sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==", "license": "MIT" }, "node_modules/lodash._reinterpolate": { @@ -12588,9 +12588,9 @@ "license": "MIT" }, "node_modules/lodash.template": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.5.0.tgz", - "integrity": "sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==", + "version": "4.18.1", + "resolved": "https://registry.npmjs.org/lodash.template/-/lodash.template-4.18.1.tgz", + "integrity": "sha512-5urZrLnV/VD6zHK5KsVtZgt7H19v51mIzoS0aBNH8yp3I8tbswrEjOABOPY8m8uB7NuibubLrMX+Y0PXsU9X+w==", "deprecated": "This package is deprecated. Use https://socket.dev/npm/package/eta instead.", "dev": true, "license": "MIT", @@ -12830,9 +12830,9 @@ "license": "MIT" }, "node_modules/mem-fs-editor/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -12935,9 +12935,9 @@ } }, "node_modules/micromatch/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "license": "MIT", "engines": { "node": ">=8.6" @@ -12997,12 +12997,12 @@ } }, "node_modules/minimatch": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.4.tgz", - "integrity": "sha512-oRjTw/97aTBN0RHbYCdtF1MQfvusSIBQM0IZEgzl6426+8jSC0nF1a/GmnVLpfB9yyr6g6FTqWqiZVbxrtaCIg==", + "version": "10.2.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-10.2.5.tgz", + "integrity": "sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==", "license": "BlueOak-1.0.0", "dependencies": { - "brace-expansion": "^5.0.2" + "brace-expansion": "^5.0.5" }, "engines": { "node": "18 || 20 || >=22" @@ -13066,11 +13066,11 @@ } }, "node_modules/minipass-flush": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.5.tgz", - "integrity": "sha512-JmQSYYpPUqX5Jyn1mXaRwOda1uQ8HP5KAT/oDSLCzt1BYRhQU0/hDtsB1ufZfEEzMZ9aAVmsBw8+FWsIXlClWw==", + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/minipass-flush/-/minipass-flush-1.0.7.tgz", + "integrity": "sha512-TbqTz9cUwWyHS2Dy89P3ocAGUGxKjjLuR9z8w4WUTGAVgEj17/4nhgo2Du56i0Fm3Pm30g4iA8Lcqctc76jCzA==", "dev": true, - "license": "ISC", + "license": "BlueOak-1.0.0", "dependencies": { "minipass": "^3.0.0" }, @@ -13223,9 +13223,9 @@ "license": "MIT" }, "node_modules/mocha/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -13352,9 +13352,9 @@ "license": "MIT" }, "node_modules/multimatch/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -13596,9 +13596,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.36", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.36.tgz", - "integrity": "sha512-TdC8FSgHz8Mwtw9g5L4gR/Sh9XhSP/0DEkQxfEFXOpiul5IiHgHan2VhYYb6agDSfp4KuvltmGApc8HMgUrIkA==", + "version": "2.0.37", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.37.tgz", + "integrity": "sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==", "license": "MIT" }, "node_modules/nopt": { @@ -13797,9 +13797,9 @@ "license": "MIT" }, "node_modules/npm-registry-fetch/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -14982,9 +14982,9 @@ "license": "ISC" }, "node_modules/picomatch": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", - "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.4.tgz", + "integrity": "sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==", "license": "MIT", "engines": { "node": ">=12" @@ -15343,10 +15343,13 @@ } }, "node_modules/proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", - "license": "MIT" + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-2.1.0.tgz", + "integrity": "sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==", + "license": "MIT", + "engines": { + "node": ">=10" + } }, "node_modules/pump": { "version": "3.0.4", @@ -15512,9 +15515,9 @@ "license": "MIT" }, "node_modules/read-package-json/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -15827,9 +15830,9 @@ } }, "node_modules/readdirp/node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz", + "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==", "dev": true, "license": "MIT", "engines": { @@ -16626,9 +16629,9 @@ "license": "MIT" }, "node_modules/sigstore/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -17773,9 +17776,9 @@ "license": "MIT" }, "node_modules/test-exclude/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "license": "MIT", "dependencies": { "balanced-match": "^1.0.0", @@ -17931,9 +17934,9 @@ } }, "node_modules/ts-api-utils": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.4.0.tgz", - "integrity": "sha512-3TaVTaAv2gTiMB35i3FiGJaRfwb3Pyn/j3m/bfAvGe8FB7CF6u+LMYqYlDh7reQf7UNvoTvdfAqHGmPGOSsPmA==", + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.5.0.tgz", + "integrity": "sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==", "dev": true, "license": "MIT", "engines": { @@ -17944,19 +17947,19 @@ } }, "node_modules/ts-jest": { - "version": "29.4.6", - "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.6.tgz", - "integrity": "sha512-fSpWtOO/1AjSNQguk43hb/JCo16oJDnMJf3CdEGNkqsEX3t0KX96xvyX1D7PfLCpVoKu4MfVrqUkFyblYoY4lA==", + "version": "29.4.9", + "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.4.9.tgz", + "integrity": "sha512-LTb9496gYPMCqjeDLdPrKuXtncudeV1yRZnF4Wo5l3SFi0RYEnYRNgMrFIdg+FHvfzjCyQk1cLncWVqiSX+EvQ==", "dev": true, "license": "MIT", "dependencies": { "bs-logger": "^0.2.6", "fast-json-stable-stringify": "^2.1.0", - "handlebars": "^4.7.8", + "handlebars": "^4.7.9", "json5": "^2.2.3", "lodash.memoize": "^4.1.2", "make-error": "^1.3.6", - "semver": "^7.7.3", + "semver": "^7.7.4", "type-fest": "^4.41.0", "yargs-parser": "^21.1.1" }, @@ -17973,7 +17976,7 @@ "babel-jest": "^29.0.0 || ^30.0.0", "jest": "^29.0.0 || ^30.0.0", "jest-util": "^29.0.0 || ^30.0.0", - "typescript": ">=4.3 <6" + "typescript": ">=4.3 <7" }, "peerDependenciesMeta": { "@babel/core": { @@ -18169,9 +18172,9 @@ "license": "MIT" }, "node_modules/tuf-js/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { @@ -19450,9 +19453,9 @@ "license": "MIT" }, "node_modules/yeoman-environment/node_modules/brace-expansion": { - "version": "1.1.12", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", - "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz", + "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==", "dev": true, "license": "MIT", "dependencies": { @@ -19786,9 +19789,9 @@ "license": "MIT" }, "node_modules/yeoman-generator/node_modules/brace-expansion": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", - "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz", + "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==", "dev": true, "license": "MIT", "dependencies": { diff --git a/package.json b/package.json index 6290666..00fa9ea 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,20 @@ { "name": "@contentstack/cli-cm-regex-validate", "description": "Validate Fields with Regex Property of Content Type and Global Field in a Stack", - "version": "1.3.0", + "version": "1.3.1", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli-cm-regex-validate/issues", "devDependencies": { - "@oclif/plugin-help": "^6.2.37", + "@oclif/plugin-help": "^6.2.41", "@oclif/test": "^3.2.15", "@types/chai": "^4.3.20", "@types/jest": "^30.0.0", "@types/jsonexport": "^3.0.5", "@types/mocha": "^10.0.10", - "@types/node": "^18.0.0", + "@types/node": "^18.19.130", "@types/safe-regex": "^1.1.6", - "@typescript-eslint/eslint-plugin": "^8.32.1", - "@typescript-eslint/parser": "^8.56.1", + "@typescript-eslint/eslint-plugin": "^8.58.0", + "@typescript-eslint/parser": "^8.58.0", "chai": "^4.5.0", "eslint": "^8.57.1", "eslint-config-oclif": "^4.0.0", @@ -25,9 +25,9 @@ "mocha": "^10.8.2", "nyc": "^15.1.0", "oclif": "^3.17.2", - "ts-jest": "^29.4.6", + "ts-jest": "^29.4.9", "ts-node": "^10.9.2", - "typescript": "^5.0.0" + "typescript": "^5.9.3" }, "engines": { "node": ">=14.0.0" @@ -65,13 +65,13 @@ "prepare": "npx husky && chmod +x .husky/pre-commit" }, "dependencies": { - "@contentstack/cli-command": "^1.7.2", - "@contentstack/cli-utilities": "^1.17.4", - "@contentstack/management": "^1.28.0", + "@contentstack/cli-command": "^1.8.0", + "@contentstack/cli-utilities": "^1.18.0", + "@contentstack/management": "^1.29.1", "cli-table3": "^0.6.5", "cli-ux": "^6.0.9", "inquirer": "12.11.1", - "jest": "^30.2.0", + "jest": "^30.3.0", "jsonexport": "^3.2.0", "safe-regex": "^2.1.1", "tslib": "^2.8.1" diff --git a/skills/README.md b/skills/README.md new file mode 100644 index 0000000..208148b --- /dev/null +++ b/skills/README.md @@ -0,0 +1,38 @@ +# Skills + +Portable AI guidance for **cli-cm-regex-validate** (`@contentstack/cli-cm-regex-validate`): the Contentstack CLI plugin that runs `csdx cm:stacks:validate-regex` and checks regex `format` fields on content types and global fields. + +## Quick reference + +In Cursor or any agent chat, reference a folder: `@skills/testing`, `@skills/contentstack-cli`, or `@skills/code-review`: + +| Skill | Purpose | +|-------|---------| +| **testing** | Jest + ts-jest, mocks, fixtures under `test/data/` | +| **contentstack-cli** | Command flow, Management SDK, schema walk, `safe-regex`, CSV/table output | +| **code-review** | PR checklist: security, packaging, CI, messages | + +## Technology stack + +- **Language:** TypeScript (`strict`), CommonJS emit +- **CLI:** oclif v3, `@contentstack/cli-command` +- **Tests:** Jest + ts-jest (run with `npm test`) +- **Lint:** ESLint (oclif-typescript config) +- **CI:** Node.js 22.x (see `.github/workflows/unit-tests.yml`, `node-version: '22.x'`) + +## Architecture + +- **Commands:** `src/commands/` (this repo: single command under `cm/stacks/`) +- **Utils:** `src/utils/` (connect stack, process stack, safe-regex, output, interactive prompts) +- **Messages:** `messages/index.json` +- **Tests:** `test/utils/`; **fixtures:** `test/data/` + +## Usage examples + +``` +Follow @skills/contentstack-cli when changing connect-stack or safe-regex. + +Write tests using @skills/testing. + +Review this PR with @skills/code-review. +``` diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md new file mode 100644 index 0000000..03cba85 --- /dev/null +++ b/skills/code-review/SKILL.md @@ -0,0 +1,18 @@ +--- +name: code-review +description: PR and release checklist for cli-cm-regex-validate (security, packaging, CI, messages) +--- + +# Code review skill + +## Quick reference + +- Full detail: [references/code-review-checklist.md](references/code-review-checklist.md) + +## Summary + +- Confirm tests and lint pass; no secrets in commits; plugin `files` and `prepack` remain consistent; workflows aligned with Node version used in CI. + +## Usage + +Reference: `@skills/code-review` when reviewing PRs or before release. diff --git a/skills/code-review/references/code-review-checklist.md b/skills/code-review/references/code-review-checklist.md new file mode 100644 index 0000000..229fc34 --- /dev/null +++ b/skills/code-review/references/code-review-checklist.md @@ -0,0 +1,33 @@ +# Code review checklist + +## Correctness and safety + +- [ ] Changes match the intended behavior for `cm:stacks:validate-regex` (flags, prompts, stack connection, CT/GF selection). +- [ ] No API keys, management tokens, or secrets in code or tests; Talisman/Snyk hooks still make sense for local workflow. +- [ ] New user-visible strings added to `messages/index.json` under `validateRegex` (avoid hard-coded copy in production paths). + +## Tests + +- [ ] `npm test` passes locally. +- [ ] New behavior covered by `test/utils/` tests and/or `test/data/` fixtures where appropriate. +- [ ] Mocks used for Management SDK and filesystem; no accidental live stack calls in unit tests. + +## Lint and types + +- [ ] ESLint passes (`posttest` or project eslint script). +- [ ] TypeScript changes respect `strict` and project conventions (see `.cursor/rules/typescript.mdc`). + +## Packaging and release + +- [ ] `package.json` `files` includes what ships (`lib`, `bin`, `oclif.manifest.json`, `messages`, etc.). +- [ ] `prepack` still runs `tsc`, `oclif manifest`, and `oclif readme` as needed for the plugin. +- [ ] Version bumps follow team process; release workflow (e.g. push to `main`) matches `.github/workflows/release.yml` expectations. + +## CI / security workflows + +- [ ] Unit test workflow exercises `npm test` on a supported Node version (see `.github/workflows/unit-tests.yml`). +- [ ] SCA / policy workflows unchanged or intentionally updated; no silent downgrade of security checks. + +## Documentation + +- [ ] README or command examples updated if flags or behavior changed. diff --git a/skills/contentstack-cli/SKILL.md b/skills/contentstack-cli/SKILL.md new file mode 100644 index 0000000..05852ec --- /dev/null +++ b/skills/contentstack-cli/SKILL.md @@ -0,0 +1,19 @@ +--- +name: contentstack-cli +description: Contentstack CLI plugin patterns for cm:stacks:validate-regex (SDK, schema, safe-regex, output) +--- + +# Contentstack CLI skill + +## Quick reference + +- Full detail: [references/contentstack-patterns.md](references/contentstack-patterns.md) + +## Summary + +- **Command:** `csdx cm:stacks:validate-regex` — validates regex `format` fields on content types and/or global fields using `safe-regex`. +- **Flow:** alias / flags → token → Management client → stack → fetch CT/GF → walk schema → CSV + table output. + +## Usage + +Reference: `@skills/contentstack-cli` when changing commands, utils, or `messages/index.json`. diff --git a/skills/contentstack-cli/references/contentstack-patterns.md b/skills/contentstack-cli/references/contentstack-patterns.md new file mode 100644 index 0000000..d76262d --- /dev/null +++ b/skills/contentstack-cli/references/contentstack-patterns.md @@ -0,0 +1,32 @@ +# Contentstack patterns (regex validation plugin) + +## Plugin identity + +- Package: `@contentstack/cli-cm-regex-validate` +- Command id: `cm:stacks:validate-regex` (short name `RGXVLD` in `package.json` `csdxConfig` when present) +- Entry: `src/commands/cm/stacks/validate-regex.ts` + +## End-to-end flow + +1. **Parse** — `this.parse(ValidateRegex)`; flags: `alias`, `contentType`, `globalField`, `filePath`, `help`. +2. **Prompts** — If alias or module flags are missing, `inquireAlias` / `inquireModule` (`src/utils/interactive.ts`, Inquirer). +3. **Token** — `this.getToken(alias)` from Contentstack CLI; errors use `messages.validateRegex.errors.tokenNotFound` and `ref` to docs. +4. **Connect** — `connect-stack.ts`: `contentstackSdk.client({ host })`, optional `early_access` headers, `client.stack({ api_key, management_token })`. +5. **Process** — `process-stack.ts`: for each selected module, `stack.contentType()` / `stack.globalField()` → `.query({}).find()`, then `safe-regex.ts` on each item. +6. **Output** — `generate-output.ts`: `results.csv` via `jsonexport`, table via `cli-table3`, paths via `sanitizePath`; user copy from `messages/index.json`. + +## Schema traversal + +- Recurse into `schema` for `group` and `global_field`. +- For `blocks`, iterate `blocks` and each block’s `schema`. +- For each field with `format`, call `safe-regex`; collect module, title, UID, field metadata, and pattern for invalid rows. + +## User-facing strings + +- All strings live under `messages/index.json` → `validateRegex` (command, interactive, cliAction, errors, output). +- Docs link in output points to Contentstack guidance on catastrophic backtracking / validation regex. + +## Related packages + +- `@contentstack/cli-command`, `@contentstack/cli-utilities`, `@contentstack/management` +- `cli-ux` (spinner), `inquirer` (prompts), `safe-regex`, `jsonexport`, `cli-table3` diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md new file mode 100644 index 0000000..82d589e --- /dev/null +++ b/skills/testing/SKILL.md @@ -0,0 +1,20 @@ +--- +name: testing +description: Jest testing patterns for cli-cm-regex-validate (mocks, fixtures, no live API calls) +--- + +# Testing skill + +## Quick reference + +- Full detail: [references/testing-patterns.md](references/testing-patterns.md) + +## Summary + +- **Runner:** Jest + ts-jest (`jest.config.ts`). Use `npm test` as the single source of truth. +- **Layout:** Tests in `test/utils/`; fixtures in `test/data/*.json`. +- **Mocks:** `@contentstack/management`, `fs`, `cli-ux`, `@contentstack/cli-utilities` as appropriate; never hit a real stack in unit tests. + +## Usage + +In Cursor or any agent chat, reference: `@skills/testing` when writing or refactoring tests. diff --git a/skills/testing/references/testing-patterns.md b/skills/testing/references/testing-patterns.md new file mode 100644 index 0000000..6647e67 --- /dev/null +++ b/skills/testing/references/testing-patterns.md @@ -0,0 +1,41 @@ +# Testing patterns (Jest) + +This project uses **Jest** and **ts-jest**. **`npm test`** (Jest) is the canonical test command; CI runs `npm test` from `.github/workflows/unit-tests.yml`. The `mocha` script in `package.json` is **not** what CI runs—do not use `npm run mocha` as the project test entry point. + +## File layout + +| Area | Path | +|------|------| +| Tests | `test/utils/*.test.ts` | +| Fixtures | `test/data/*.json` | + +Mirror utility names where it helps (`connect-stack.test.ts` vs `connect-stack.ts`). + +## Commands + +- `npm test` — runs Jest with `jest.config.ts` (roots, `testMatch`, ts-jest transform, coverage). + +## Mocking + +- **Management SDK:** `jest.mock('@contentstack/management')` and stub `client`, `stack`, and query chains as in `connect-stack.test.ts`. +- **Filesystem:** `jest.mock('fs')` when testing CSV path creation and `writeFileSync` / `mkdirSync`. +- **cli-ux:** mock `cli.action.start` / `stop` when asserting spinner behavior; avoid reassigning imported bindings with `@ts-ignore`—prefer `jest.mock('cli-ux', () => ({ ... }))` when needed. +- **cli-utilities:** mock `cliux.print` and `sanitizePath` in output tests when asserting printed messages and paths. + +## Fixtures + +- Load JSON with `require('../data/...')` for content type / global field documents and expected invalid-regex rows. +- Keeps tests readable and matches real API shape (schema, `data_type`, `format`, nested `group` / `blocks`). + +## Assertions + +- Use `toHaveBeenCalled`, `toHaveBeenCalledWith`, `toStrictEqual` for objects and arrays. +- Avoid deprecated matchers removed in newer Jest (e.g. prefer `toHaveBeenCalled` over legacy aliases). + +## Async tests + +- Use `async`/`await` for utilities that return promises; await `inquireAlias` / `inquireModule` when testing interactive flows with mocked `inquirer`. + +## Note on `package.json` + +- This repo lists **`jest`** under **`dependencies`** in `package.json`. Run tests via **`npm test`** and describe the framework as Jest in documentation and for agents. From 7e6610189213815bb051cec9ec8cf6824f280654 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 8 Apr 2026 11:30:03 +0530 Subject: [PATCH 2/3] updated the cursor rules structure --- .cursor/rules/README.md | 23 +-- .cursor/rules/contentstack-cli.mdc | 32 ---- .cursor/rules/dev-workflow.md | 43 ----- .cursor/rules/oclif-commands.mdc | 31 ---- .cursor/rules/testing.mdc | 32 ---- .cursor/rules/typescript.mdc | 31 ---- .cursor/skills/SKILL.md | 10 -- .talismanrc | 12 +- AGENTS.md | 61 ++++--- package-lock.json | 170 +++++++++--------- skills/README.md | 44 ++--- skills/code-review/SKILL.md | 18 +- .../references/code-review-checklist.md | 6 +- skills/contentstack-cli/SKILL.md | 18 +- skills/dev-workflow/SKILL.md | 57 ++++++ skills/testing/SKILL.md | 17 +- 16 files changed, 231 insertions(+), 374 deletions(-) delete mode 100644 .cursor/rules/contentstack-cli.mdc delete mode 100644 .cursor/rules/dev-workflow.md delete mode 100644 .cursor/rules/oclif-commands.mdc delete mode 100644 .cursor/rules/testing.mdc delete mode 100644 .cursor/rules/typescript.mdc delete mode 100644 .cursor/skills/SKILL.md create mode 100644 skills/dev-workflow/SKILL.md diff --git a/.cursor/rules/README.md b/.cursor/rules/README.md index 65a3256..445e605 100644 --- a/.cursor/rules/README.md +++ b/.cursor/rules/README.md @@ -1,22 +1,7 @@ -# Cursor rules +# Cursor (optional) -Context-aware guidance for developing `@contentstack/cli-cm-regex-validate` (Contentstack CLI oclif plugin). +**Cursor** users: start at **[`AGENTS.md`](../../AGENTS.md)**. All conventions live in **`skills/*/SKILL.md`**. -## Rules overview +This folder only points contributors to **`AGENTS.md`** so editor-specific config does not duplicate the canonical docs. -| File | Scope | -|------|--------| -| `dev-workflow.md` | Core workflow, validation commands, links to skills (always applied) | -| `typescript.mdc` | TypeScript and ESLint conventions | -| `testing.mdc` | Jest + ts-jest tests | -| `oclif-commands.mdc` | Command classes under `src/commands/` | -| `contentstack-cli.mdc` | Utilities under `src/utils/` (SDK, safe-regex, output) | - -## How rules apply - -- `dev-workflow.md` uses `alwaysApply: true` and broad globs so it loads for most edits. -- `.mdc` rules load when you work in matching paths (see each file’s `globs`). - -## Manual references in chat - -You can mention rules by context, for example: TypeScript guidance when editing `src/**/*.ts`, testing patterns when editing `**/*.test.ts`. +Path from this file to the repo root agent guide: **`../../AGENTS.md`** (two levels up from `.cursor/rules/`). diff --git a/.cursor/rules/contentstack-cli.mdc b/.cursor/rules/contentstack-cli.mdc deleted file mode 100644 index e075fda..0000000 --- a/.cursor/rules/contentstack-cli.mdc +++ /dev/null @@ -1,32 +0,0 @@ ---- -description: "Contentstack Management SDK and regex-validation utilities" -globs: ["**/utils/*.ts"] -alwaysApply: false ---- - -# Contentstack CLI utilities (this plugin) - -## Management client - -- Create client with `contentstackSdk.client` and `ContentstackConfig` (`host` from command `cmaHost`). -- Optional `early_access` from `configHandler.get('earlyAccessHeaders')` when configured. -- Obtain stack with `api_key` and `management_token` from token details. - -## Stack processing - -- Query content types and/or global fields with `.query({}).find()` (see `process-stack.ts`). -- Use `cli.action.start` / `cli.action.stop` from `cli-ux` for timed progress messages. - -## Regex validation - -- Walk schema recursively in `safe-regex.ts`: handle `group`, `global_field`, `blocks`, and nested `schema` arrays. -- Evaluate `format` fields with the `safe-regex` package; collect invalid patterns into rows for CSV and summary table. - -## Output - -- Write CSV with `jsonexport`; render summary table with `cli-table3`; print via `cliux` / `sanitizePath` from `@contentstack/cli-utilities` for paths. -- Default results directory is resolved relative to compiled output; optional `-f` / `--filePath` overrides the directory. - -## Security - -- Never log management tokens or API keys. Errors should use messages from `messages/index.json`. diff --git a/.cursor/rules/dev-workflow.md b/.cursor/rules/dev-workflow.md deleted file mode 100644 index 2cffb6c..0000000 --- a/.cursor/rules/dev-workflow.md +++ /dev/null @@ -1,43 +0,0 @@ ---- -description: "Core development workflow for cli-cm-regex-validate - always applied" -globs: ["**/*.ts", "**/*.js", "**/*.json"] -alwaysApply: true ---- - -# Development workflow - -## Quick reference - -Detailed patterns live in project skills: - -- `@skills/testing` — Jest tests, mocks, fixtures under `test/data/` -- `@skills/contentstack-cli` — Command flow, Management SDK, `safe-regex`, CSV output -- `@skills/code-review` — PR and release checklist - -## Validation commands - -- `npm test` — Jest (`jest.config.ts`, ts-jest). This is the canonical test runner; CI uses it in `.github/workflows/unit-tests.yml`. -- `npm run posttest` — ESLint on `.ts` files (same as running eslint after tests). - -## Local hooks - -If Husky is installed, pre-commit may run Talisman (secrets) and Snyk. Use `SKIP_HOOK=1` only when you understand the bypass. - -## TDD (recommended) - -1. **Red** — Add or change a failing test in `test/utils/` (or add a fixture in `test/data/`). -2. **Green** — Minimal change in `src/` to pass. -3. **Refactor** — Keep tests green; avoid drive-by refactors outside the task. - -## Repository layout - -- `src/commands/` — oclif commands (this plugin: `cm/stacks/validate-regex`) -- `src/utils/` — Shared logic (connect stack, process stack, safe-regex, output, prompts) -- `messages/index.json` — User-facing strings for the command -- `test/utils/` — Jest suites mirroring utils -- `test/data/` — JSON fixtures for schema and expected outputs - -## Before merging - -- Tests pass (`npm test`). -- Lint clean (`npm run posttest` or eslint as configured in `package.json`). diff --git a/.cursor/rules/oclif-commands.mdc b/.cursor/rules/oclif-commands.mdc deleted file mode 100644 index 95c692e..0000000 --- a/.cursor/rules/oclif-commands.mdc +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: "oclif command patterns for Contentstack CLI plugin commands" -globs: ["**/commands/**/*.ts"] -alwaysApply: false ---- - -# OCLIF command standards - -## Base class - -- Commands extend `Command` from `@contentstack/cli-command` (see `src/commands/cm/stacks/validate-regex.ts`). - -## Flags - -- Build flags with `flags` from `@contentstack/cli-utilities` (e.g. `flags.string`, `flags.boolean`, `flags.help`). -- Keep descriptions aligned with `messages/index.json` under `validateRegex.command` where applicable. - -## Run flow - -1. `await this.parse(CommandClass)` to get flags. -2. Prompt for missing alias or module selection via `src/utils/interactive.ts` when needed. -3. Resolve token with `this.getToken(alias)`; handle failure with `this.error(..., { ref: ... })` using message keys from `messages/index.json`. -4. Delegate stack work to `src/utils/connect-stack.ts` (and downstream utils). - -## User messages - -- Centralize copy in `messages/index.json`; avoid hard-coded user strings in the command except where unavoidable. - -## Examples - -- Maintain `static examples` with realistic `csdx cm:stacks:validate-regex` invocations. diff --git a/.cursor/rules/testing.mdc b/.cursor/rules/testing.mdc deleted file mode 100644 index 8e7256e..0000000 --- a/.cursor/rules/testing.mdc +++ /dev/null @@ -1,32 +0,0 @@ ---- -description: "Jest and ts-jest testing patterns for cli-cm-regex-validate" -globs: ["**/*.test.ts", "**/__tests__/**/*.ts"] -alwaysApply: false ---- - -# Testing standards - -## Runner - -- **Jest** with **ts-jest** (`jest.config.ts`). Do not document Mocha/Chai/Sinon as the primary stack for this repository. - -## Conventions - -- Test files live under `test/utils/` and mirror `src/utils/` where applicable. -- Use `describe` / `test` (or `it`) with clear behavior-focused names. -- Prefer `beforeEach(() => jest.restoreAllMocks())` or `jest.clearAllMocks()` when tests share mocks. - -## Mocking - -- Mock external I/O: `@contentstack/management`, `fs`, `cli-ux`, `@contentstack/cli-utilities` as needed. -- Use `jest.spyOn` for targeted spies; `jest.mock` for module substitution. -- Do not call real Contentstack APIs in unit tests. - -## Assertions - -- Prefer `toHaveBeenCalled` / `toHaveBeenCalledWith` over deprecated Jest matchers. -- Use fixture JSON from `test/data/` via `require` for documents and expected invalid-regex output. - -## Fixtures - -- Keep schema samples and expected arrays in `test/data/*.json` to avoid huge inline objects in tests. diff --git a/.cursor/rules/typescript.mdc b/.cursor/rules/typescript.mdc deleted file mode 100644 index e564ee9..0000000 --- a/.cursor/rules/typescript.mdc +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: "TypeScript and ESLint conventions for cli-cm-regex-validate" -globs: ["**/*.ts", "**/*.tsx"] -alwaysApply: false ---- - -# TypeScript standards - -## Compiler - -- Project uses `strict: true` in `tsconfig.json` (root `src/` only for emit). -- Prefer explicit types on public functions and command flags over untyped `any` where practical. - -## ESLint (`.eslintrc`) - -- Extends `eslint-config-oclif` and `eslint-config-oclif-typescript`. -- Single quotes; no semicolons; `object-curly-spacing: never`. -- `require()` for JSON such as `messages/index.json` is allowed (`@typescript-eslint/no-require-imports` is off). - -## Imports - -- ES modules for TypeScript sources; `require` is acceptable for JSON message bundles and legacy interop per eslint rules. - -## Naming - -- Files: kebab-case (e.g. `connect-stack.ts`, `validate-regex.ts`). -- Classes: PascalCase. Functions and variables: camelCase. - -## Error handling - -- Surface user-facing errors via `this.error()` in commands or localized strings from `messages/index.json` in utilities. diff --git a/.cursor/skills/SKILL.md b/.cursor/skills/SKILL.md deleted file mode 100644 index 5cb7074..0000000 --- a/.cursor/skills/SKILL.md +++ /dev/null @@ -1,10 +0,0 @@ -# Project skills - -Authoritative skill packages for this repository live under **`skills/`** at the repo root. - -- `skills/README.md` — index and quick reference -- `skills/testing/` — Jest patterns and references -- `skills/contentstack-cli/` — command and SDK patterns for regex validation -- `skills/code-review/` — PR review checklist - -Use `@skills/` in Cursor or other agents to point at these folders. diff --git a/.talismanrc b/.talismanrc index 1da916a..d1ec9d2 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,10 +1,8 @@ fileignoreconfig: - - filename: package-lock.json - checksum: 3f663322d950acc49b7e8899ca353456b1e7ac6277ac36fdfcac813644fb07d7 - - filename: .cursor/rules/dev-workflow.md - checksum: 9912be426cb15077a67b81bd5801f2a65d367e30204d278c6814ebb1d74661ba + - filename: skills/dev-workflow/SKILL.md + checksum: bbe23955b8865b7b44e8adaf414dce2b0127921ed1e35488adf470fdd833270f - filename: skills/code-review/references/code-review-checklist.md - checksum: 8bc8e53a9775258ddfadb40f9a6f415508d87aa9c70c95ebf748737e1ef7dbee - - filename: skills/contentstack-cli/references/contentstack-patterns.md - checksum: 3e3f445d01c67577dc91b1ba6ee27dcd1ffc1e907b2fbf33ce9b2905eaba239a + checksum: 7b5132bc27e2328f32ecf38941bb117a77be0d83502f15c3a5d1933f3220b6fc + - filename: package-lock.json + checksum: 31cf2fecced45ffd2db8b1f7c5258d1c98c2d0be7dd443460cfc070558a85c82 version: "" \ No newline at end of file diff --git a/AGENTS.md b/AGENTS.md index b1cbb36..f9de80e 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -1,41 +1,46 @@ -# cli-cm-regex-validate +# cli-cm-regex-validate – Agent guide -`@contentstack/cli-cm-regex-validate` is a **Contentstack CLI** oclif plugin with a single command, **`csdx cm:stacks:validate-regex`**, which scans content types and/or global fields in a stack for regex `format` values that fail the `safe-regex` check, then writes results to CSV and prints a summary table. User-facing copy lives in `messages/index.json`. +**Universal entry point** for contributors and AI agents. Detailed conventions live in **`skills/*/SKILL.md`**. -## Layout +## What this repo is -| Area | Path | -|------|------| -| Command | `src/commands/cm/stacks/validate-regex.ts` | -| Utils | `src/utils/` (`connect-stack`, `process-stack`, `safe-regex`, `generate-output`, `interactive`) | -| Messages | `messages/index.json` | -| Tests | `test/utils/*.test.ts` | -| Fixtures | `test/data/*.json` | +| Field | Detail | +|-------|--------| +| **Name:** | [contentstack/cli-cm-regex-validate](https://github.com/contentstack/cli-cm-regex-validate) (`@contentstack/cli-cm-regex-validate` on npm) | +| **Purpose:** | Contentstack CLI oclif plugin with a single command, **`csdx cm:stacks:validate-regex`**, which scans content types and/or global fields in a stack for regex `format` values that fail the `safe-regex` check, then writes results to CSV and prints a summary table. User-facing copy lives in `messages/index.json`. | +| **Out of scope (if any):** | Not a general-purpose Contentstack SDK — only this plugin’s command, utils, and tests. | -## Workflow +## Tech stack (at a glance) -- Run **`npm test`** (Jest + ts-jest) before pushing; CI uses the same in `.github/workflows/unit-tests.yml`. -- Run ESLint after tests via **`npm run posttest`** (or your team’s eslint invocation from `package.json`). +| Area | Details | +|------|---------| +| Language | TypeScript (`strict`), Node `>=14.0.0` per `package.json` engines | +| Build | npm; `prepack` runs `tsc -b`, oclif manifest, oclif readme — see `package.json` | +| Tests | Jest + ts-jest (`jest.config.ts`), `npm test`; suites under `test/utils/`, fixtures `test/data/*.json` | +| Lint / coverage | ESLint (`.eslintrc`), `npm run posttest` | +| Other | oclif v3, `@contentstack/cli-command`; CI: Node 22.x — [`.github/workflows/unit-tests.yml`](.github/workflows/unit-tests.yml). **CI runs Jest only** (`npm run test`); **ESLint is not run in CI** — run `npm run posttest` locally before merge. | -## Naming +## Commands (quick reference) -- Source files: kebab-case. -- Tests: describe behavior clearly (what should happen under which condition). +| Command type | Command | +|--------------|---------| +| Build (release prep) | `npm run prepack` — cleans `lib`, compiles, generates oclif manifest and readme | +| Test | `npm test` | +| Lint | `npm run posttest` | -## Universal skills (any agent) +CI runs `npm i` and `npm run test` on pull requests — see [`.github/workflows/unit-tests.yml`](.github/workflows/unit-tests.yml). It does **not** run `npm run posttest` (ESLint); run lint locally before merging. -- `@skills/testing` — Jest mocks, fixtures, no live API calls -- `@skills/contentstack-cli` — SDK flow, schema recursion, `safe-regex`, output -- `@skills/code-review` — PR checklist (security, packaging, CI, messages) +## Where the documentation lives: skills -## Cursor rules (IDE) +| Skill | Path | What it covers | +|-------|------|----------------| +| Development workflow | [`skills/dev-workflow/SKILL.md`](skills/dev-workflow/SKILL.md) | Commands, repo layout, naming, hooks, TDD, before merge | +| Testing | [`skills/testing/SKILL.md`](skills/testing/SKILL.md) | Jest, mocks, fixtures, no live API calls | +| Contentstack CLI | [`skills/contentstack-cli/SKILL.md`](skills/contentstack-cli/SKILL.md) | Command flow, SDK, schema walk, `safe-regex`, CSV/table output | +| Code review | [`skills/code-review/SKILL.md`](skills/code-review/SKILL.md) | PR and release checklist | -For file-scoped guidance, Cursor loads rules under `.cursor/rules/`. You can reference them in chat by intent, for example: +An index with “when to use” hints is in [`skills/README.md`](skills/README.md). -- TypeScript and ESLint conventions — `typescript.mdc` -- Jest tests — `testing.mdc` -- Command class — `oclif-commands.mdc` -- Utils (SDK, safe-regex, output) — `contentstack-cli.mdc` -- Dev workflow — `dev-workflow.md` (always applied) +## Using Cursor (optional) -See `.cursor/rules/README.md` for the full index. +If you use **Cursor**, [`.cursor/rules/README.md`](.cursor/rules/README.md) only points to **[`AGENTS.md`](AGENTS.md)** — same docs as everyone else. diff --git a/package-lock.json b/package-lock.json index ddaf037..ae266d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -705,9 +705,9 @@ } }, "node_modules/@contentstack/cli-utilities": { - "version": "1.18.0", - "resolved": "https://registry.npmjs.org/@contentstack/cli-utilities/-/cli-utilities-1.18.0.tgz", - "integrity": "sha512-JEm6ElIegkcibHUEjRF+Id9529bAXBqkf0Givs9GL5CZE7d8eiLzFCUnlb51VZynk1g5+SmjY5nSeghrmcVSPg==", + "version": "1.18.1", + "resolved": "https://registry.npmjs.org/@contentstack/cli-utilities/-/cli-utilities-1.18.1.tgz", + "integrity": "sha512-1ymPu5HbOXFdDJHJFiwtT1yVNpmDOgMH8qqCeP3kjS7ED1+rz7Q3cWPnJC9FlUfvFeOAyJaJPPQCiYd0lgujtw==", "license": "MIT", "dependencies": { "@contentstack/management": "~1.27.5", @@ -726,7 +726,7 @@ "inquirer-search-list": "^1.2.6", "js-yaml": "^4.1.1", "klona": "^2.0.6", - "lodash": "^4.17.23", + "lodash": "^4.18.1", "mkdirp": "^1.0.4", "open": "^8.4.2", "ora": "^5.4.1", @@ -836,9 +836,9 @@ } }, "node_modules/@contentstack/management": { - "version": "1.29.1", - "resolved": "https://registry.npmjs.org/@contentstack/management/-/management-1.29.1.tgz", - "integrity": "sha512-TFzimKEcqLCXxh5GH9QnNCV0Ta0PrsSWMmXtshQYGw7atbtKpQNHhoZqO4ifVoMFlSnSe21MQrsJUoVbigSOSA==", + "version": "1.29.2", + "resolved": "https://registry.npmjs.org/@contentstack/management/-/management-1.29.2.tgz", + "integrity": "sha512-ZTlxhUTlMIX0t3orbh4bJ73KOyC0553CC/1I12GavnOcVEbtJ26YLj7IG20lO4vDo3KjgSs604X+e2yX/0g1aA==", "license": "MIT", "dependencies": { "@contentstack/utils": "^1.8.0", @@ -847,7 +847,7 @@ "buffer": "^6.0.3", "form-data": "^4.0.5", "husky": "^9.1.7", - "lodash": "^4.17.23", + "lodash": "^4.18.1", "otplib": "^12.0.1", "qs": "^6.15.0", "stream-browserify": "^3.0.0" @@ -2498,9 +2498,9 @@ } }, "node_modules/@oclif/core": { - "version": "4.10.4", - "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.10.4.tgz", - "integrity": "sha512-4aMd2BAhmGWjiASzJVmEAaPTZStxW0+VdylON5m+LwbxlG2HD7aTHZ7gWqeHBm/rXH5mi1WLb5LlQTCL+VdELQ==", + "version": "4.10.5", + "resolved": "https://registry.npmjs.org/@oclif/core/-/core-4.10.5.tgz", + "integrity": "sha512-qcdCF7NrdWPfme6Kr34wwljRCXbCVpL1WVxiNy0Ep6vbWKjxAjFQwuhqkoyL0yjI+KdwtLcOCGn5z2yzdijc8w==", "license": "MIT", "dependencies": { "ansi-escapes": "^4.3.2", @@ -2513,7 +2513,7 @@ "indent-string": "^4.0.0", "is-wsl": "^2.2.0", "lilconfig": "^3.1.3", - "minimatch": "^10.2.4", + "minimatch": "^10.2.5", "semver": "^7.7.3", "string-width": "^4.2.3", "supports-color": "^8", @@ -2533,9 +2533,9 @@ "license": "ISC" }, "node_modules/@oclif/plugin-help": { - "version": "6.2.41", - "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.41.tgz", - "integrity": "sha512-oHqpm9a8NnLY9J5yIA+znchB2QCBqDUu5n7XINdZwfbhO6WOUZ2ANww6QN7crhvAKgpN5HK/ELN8Hy96kgLUuA==", + "version": "6.2.43", + "resolved": "https://registry.npmjs.org/@oclif/plugin-help/-/plugin-help-6.2.43.tgz", + "integrity": "sha512-aef92VxQECLFDjI4CpgCL+jDuAsc3jzq5gBTLwNzj60mmrh8eDd7B0ABIgWXphb6gdARSRil+/FPtcdiSSupRA==", "license": "MIT", "dependencies": { "@oclif/core": "^4" @@ -4006,17 +4006,17 @@ "license": "MIT" }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.0.tgz", - "integrity": "sha512-RLkVSiNuUP1C2ROIWfqX+YcUfLaSnxGE/8M+Y57lopVwg9VTYYfhuz15Yf1IzCKgZj6/rIbYTmJCUSqr76r0Wg==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.58.1.tgz", + "integrity": "sha512-eSkwoemjo76bdXl2MYqtxg51HNwUSkWfODUOQ3PaTLZGh9uIWWFZIjyjaJnex7wXDu+TRx+ATsnSxdN9YWfRTQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.12.2", - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/type-utils": "8.58.0", - "@typescript-eslint/utils": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", + "@typescript-eslint/scope-manager": "8.58.1", + "@typescript-eslint/type-utils": "8.58.1", + "@typescript-eslint/utils": "8.58.1", + "@typescript-eslint/visitor-keys": "8.58.1", "ignore": "^7.0.5", "natural-compare": "^1.4.0", "ts-api-utils": "^2.5.0" @@ -4029,7 +4029,7 @@ "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^8.58.0", + "@typescript-eslint/parser": "^8.58.1", "eslint": "^8.57.0 || ^9.0.0 || ^10.0.0", "typescript": ">=4.8.4 <6.1.0" } @@ -4203,16 +4203,16 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.0.tgz", - "integrity": "sha512-rLoGZIf9afaRBYsPUMtvkDWykwXwUPL60HebR4JgTI8mxfFe2cQTu3AGitANp4b9B2QlVru6WzjgB2IzJKiCSA==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.58.1.tgz", + "integrity": "sha512-gGkiNMPqerb2cJSVcruigx9eHBlLG14fSdPdqMoOcBfh+vvn4iCq2C8MzUB89PrxOXk0y3GZ1yIWb9aOzL93bw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", + "@typescript-eslint/scope-manager": "8.58.1", + "@typescript-eslint/types": "8.58.1", + "@typescript-eslint/typescript-estree": "8.58.1", + "@typescript-eslint/visitor-keys": "8.58.1", "debug": "^4.4.3" }, "engines": { @@ -4228,14 +4228,14 @@ } }, "node_modules/@typescript-eslint/project-service": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.0.tgz", - "integrity": "sha512-8Q/wBPWLQP1j16NxoPNIKpDZFMaxl7yWIoqXWYeWO+Bbd2mjgvoF0dxP2jKZg5+x49rgKdf7Ck473M8PC3V9lg==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.58.1.tgz", + "integrity": "sha512-gfQ8fk6cxhtptek+/8ZIqw8YrRW5048Gug8Ts5IYcMLCw18iUgrZAEY/D7s4hkI0FxEfGakKuPK/XUMPzPxi5g==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/tsconfig-utils": "^8.58.0", - "@typescript-eslint/types": "^8.58.0", + "@typescript-eslint/tsconfig-utils": "^8.58.1", + "@typescript-eslint/types": "^8.58.1", "debug": "^4.4.3" }, "engines": { @@ -4250,14 +4250,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.0.tgz", - "integrity": "sha512-W1Lur1oF50FxSnNdGp3Vs6P+yBRSmZiw4IIjEeYxd8UQJwhUF0gDgDD/W/Tgmh73mxgEU3qX0Bzdl/NGuSPEpQ==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.58.1.tgz", + "integrity": "sha512-TPYUEqJK6avLcEjumWsIuTpuYODTTDAtoMdt8ZZa93uWMTX13Nb8L5leSje1NluammvU+oI3QRr5lLXPgihX3w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0" + "@typescript-eslint/types": "8.58.1", + "@typescript-eslint/visitor-keys": "8.58.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4268,9 +4268,9 @@ } }, "node_modules/@typescript-eslint/tsconfig-utils": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.0.tgz", - "integrity": "sha512-doNSZEVJsWEu4htiVC+PR6NpM+pa+a4ClH9INRWOWCUzMst/VA9c4gXq92F8GUD1rwhNvRLkgjfYtFXegXQF7A==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.58.1.tgz", + "integrity": "sha512-JAr2hOIct2Q+qk3G+8YFfqkqi7sC86uNryT+2i5HzMa2MPjw4qNFvtjnw1IiA1rP7QhNKVe21mSSLaSjwA1Olw==", "dev": true, "license": "MIT", "engines": { @@ -4285,15 +4285,15 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.0.tgz", - "integrity": "sha512-aGsCQImkDIqMyx1u4PrVlbi/krmDsQUs4zAcCV6M7yPcPev+RqVlndsJy9kJ8TLihW9TZ0kbDAzctpLn5o+lOg==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.58.1.tgz", + "integrity": "sha512-HUFxvTJVroT+0rXVJC7eD5zol6ID+Sn5npVPWoFuHGg9Ncq5Q4EYstqR+UOqaNRFXi5TYkpXXkLhoCHe3G0+7w==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0", - "@typescript-eslint/utils": "8.58.0", + "@typescript-eslint/types": "8.58.1", + "@typescript-eslint/typescript-estree": "8.58.1", + "@typescript-eslint/utils": "8.58.1", "debug": "^4.4.3", "ts-api-utils": "^2.5.0" }, @@ -4310,9 +4310,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.0.tgz", - "integrity": "sha512-O9CjxypDT89fbHxRfETNoAnHj/i6IpRK0CvbVN3qibxlLdo5p5hcLmUuCCrHMpxiWSwKyI8mCP7qRNYuOJ0Uww==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.58.1.tgz", + "integrity": "sha512-io/dV5Aw5ezwzfPBBWLoT+5QfVtP8O7q4Kftjn5azJ88bYyp/ZMCsyW1lpKK46EXJcaYMZ1JtYj+s/7TdzmQMw==", "dev": true, "license": "MIT", "engines": { @@ -4324,16 +4324,16 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.0.tgz", - "integrity": "sha512-7vv5UWbHqew/dvs+D3e1RvLv1v2eeZ9txRHPnEEBUgSNLx5ghdzjHa0sgLWYVKssH+lYmV0JaWdoubo0ncGYLA==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.58.1.tgz", + "integrity": "sha512-w4w7WR7GHOjqqPnvAYbazq+Y5oS68b9CzasGtnd6jIeOIeKUzYzupGTB2T4LTPSv4d+WPeccbxuneTFHYgAAWg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/project-service": "8.58.0", - "@typescript-eslint/tsconfig-utils": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/visitor-keys": "8.58.0", + "@typescript-eslint/project-service": "8.58.1", + "@typescript-eslint/tsconfig-utils": "8.58.1", + "@typescript-eslint/types": "8.58.1", + "@typescript-eslint/visitor-keys": "8.58.1", "debug": "^4.4.3", "minimatch": "^10.2.2", "semver": "^7.7.3", @@ -4352,16 +4352,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.0.tgz", - "integrity": "sha512-RfeSqcFeHMHlAWzt4TBjWOAtoW9lnsAGiP3GbaX9uVgTYYrMbVnGONEfUCiSss+xMHFl+eHZiipmA8WkQ7FuNA==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.58.1.tgz", + "integrity": "sha512-Ln8R0tmWC7pTtLOzgJzYTXSCjJ9rDNHAqTaVONF4FEi2qwce8mD9iSOxOpLFFvWp/wBFlew0mjM1L1ihYWfBdQ==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.9.1", - "@typescript-eslint/scope-manager": "8.58.0", - "@typescript-eslint/types": "8.58.0", - "@typescript-eslint/typescript-estree": "8.58.0" + "@typescript-eslint/scope-manager": "8.58.1", + "@typescript-eslint/types": "8.58.1", + "@typescript-eslint/typescript-estree": "8.58.1" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -4376,13 +4376,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.58.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.0.tgz", - "integrity": "sha512-XJ9UD9+bbDo4a4epraTwG3TsNPeiB9aShrUneAVXy8q4LuwowN+qu89/6ByLMINqvIMeI9H9hOHQtg/ijrYXzQ==", + "version": "8.58.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.58.1.tgz", + "integrity": "sha512-y+vH7QE8ycjoa0bWciFg7OpFcipUuem1ujhrdLtq1gByKwfbC7bPeKsiny9e0urg93DqwGcHey+bGRKCnF1nZQ==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.58.0", + "@typescript-eslint/types": "8.58.1", "eslint-visitor-keys": "^5.0.0" }, "engines": { @@ -5328,9 +5328,9 @@ "license": "MIT" }, "node_modules/baseline-browser-mapping": { - "version": "2.10.14", - "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.14.tgz", - "integrity": "sha512-fOVLPAsFTsQfuCkvahZkzq6nf8KvGWanlYoTh0SVA0A/PIUxQGU2AOZAoD95n2gFLVDW/jP6sbGLny95nmEuHA==", + "version": "2.10.16", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.16.tgz", + "integrity": "sha512-Lyf3aK28zpsD1yQMiiHD4RvVb6UdMoo8xzG2XzFIfR9luPzOpcBlAsT/qfB1XWS1bxWT+UtE4WmQgsp297FYOA==", "license": "Apache-2.0", "bin": { "baseline-browser-mapping": "dist/cli.cjs" @@ -5840,9 +5840,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001785", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001785.tgz", - "integrity": "sha512-blhOL/WNR+Km1RI/LCVAvA73xplXA7ZbjzI4YkMK9pa6T/P3F2GxjNpEkyw5repTw9IvkyrjyHpwjnhZ5FOvYQ==", + "version": "1.0.30001787", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001787.tgz", + "integrity": "sha512-mNcrMN9KeI68u7muanUpEejSLghOKlVhRqS/Za2IeyGllJ9I9otGpR9g3nsw7n4W378TE/LyIteA0+/FOZm4Kg==", "funding": [ { "type": "opencollective", @@ -7188,9 +7188,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.5.331", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.331.tgz", - "integrity": "sha512-IbxXrsTlD3hRodkLnbxAPP4OuJYdWCeM3IOdT+CpcMoIwIoDfCmRpEtSPfwBXxVkg9xmBeY7Lz2Eo2TDn/HC3Q==", + "version": "1.5.332", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.332.tgz", + "integrity": "sha512-7OOtytmh/rINMLwaFTbcMVvYXO3AUm029X0LcyfYk0B557RlPkdpTpnH9+htMlfu5dKwOmT0+Zs2Aw+lnn6TeQ==", "license": "ISC" }, "node_modules/emittery": { @@ -7299,9 +7299,9 @@ } }, "node_modules/es-abstract": { - "version": "1.24.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.1.tgz", - "integrity": "sha512-zHXBLhP+QehSSbsS9Pt23Gg964240DPd6QCf8WpkqEXxQ7fhdZzYsocOr5u7apWonsS5EjZDmTF+/slGMyasvw==", + "version": "1.24.2", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.24.2.tgz", + "integrity": "sha512-2FpH9Q5i2RRwyEP1AylXe6nYLR5OhaJTZwmlcP0dL/+JCbgg7yyEo/sEK6HeGZRf3dFpWwThaRHVApXSkW3xeg==", "license": "MIT", "dependencies": { "array-buffer-byte-length": "^1.0.2", @@ -17838,13 +17838,13 @@ "license": "MIT" }, "node_modules/tinyglobby": { - "version": "0.2.15", - "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.15.tgz", - "integrity": "sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==", + "version": "0.2.16", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.16.tgz", + "integrity": "sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==", "license": "MIT", "dependencies": { "fdir": "^6.5.0", - "picomatch": "^4.0.3" + "picomatch": "^4.0.4" }, "engines": { "node": ">=12.0.0" diff --git a/skills/README.md b/skills/README.md index 208148b..46e5e95 100644 --- a/skills/README.md +++ b/skills/README.md @@ -1,38 +1,14 @@ -# Skills +# Skills – cli-cm-regex-validate -Portable AI guidance for **cli-cm-regex-validate** (`@contentstack/cli-cm-regex-validate`): the Contentstack CLI plugin that runs `csdx cm:stacks:validate-regex` and checks regex `format` fields on content types and global fields. +Source of truth for detailed guidance. Read [`AGENTS.md`](../AGENTS.md) first, then open the skill that matches your task. -## Quick reference +## When to use which skill -In Cursor or any agent chat, reference a folder: `@skills/testing`, `@skills/contentstack-cli`, or `@skills/code-review`: +| Skill folder | Use when | +|--------------|----------| +| `dev-workflow` | Build/test/lint commands, repo layout, naming, hooks, TDD, merge checklist | +| `testing` | Writing or refactoring Jest tests, mocks, fixtures under `test/data/` | +| `contentstack-cli` | Changing commands, utils, `messages/index.json`, SDK flow, `safe-regex`, or output | +| `code-review` | Reviewing PRs or preparing a release | -| Skill | Purpose | -|-------|---------| -| **testing** | Jest + ts-jest, mocks, fixtures under `test/data/` | -| **contentstack-cli** | Command flow, Management SDK, schema walk, `safe-regex`, CSV/table output | -| **code-review** | PR checklist: security, packaging, CI, messages | - -## Technology stack - -- **Language:** TypeScript (`strict`), CommonJS emit -- **CLI:** oclif v3, `@contentstack/cli-command` -- **Tests:** Jest + ts-jest (run with `npm test`) -- **Lint:** ESLint (oclif-typescript config) -- **CI:** Node.js 22.x (see `.github/workflows/unit-tests.yml`, `node-version: '22.x'`) - -## Architecture - -- **Commands:** `src/commands/` (this repo: single command under `cm/stacks/`) -- **Utils:** `src/utils/` (connect stack, process stack, safe-regex, output, interactive prompts) -- **Messages:** `messages/index.json` -- **Tests:** `test/utils/`; **fixtures:** `test/data/` - -## Usage examples - -``` -Follow @skills/contentstack-cli when changing connect-stack or safe-regex. - -Write tests using @skills/testing. - -Review this PR with @skills/code-review. -``` +Each folder contains `SKILL.md` with YAML frontmatter (`name`, `description`). diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index 03cba85..01c600c 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -3,16 +3,20 @@ name: code-review description: PR and release checklist for cli-cm-regex-validate (security, packaging, CI, messages) --- -# Code review skill +# Code review – cli-cm-regex-validate -## Quick reference +## When to use -- Full detail: [references/code-review-checklist.md](references/code-review-checklist.md) +- Reviewing a pull request for this repo +- Preparing a release or verifying packaging and CI alignment -## Summary +## Instructions -- Confirm tests and lint pass; no secrets in commits; plugin `files` and `prepack` remain consistent; workflows aligned with Node version used in CI. +- Confirm tests and lint pass locally (CI runs `npm test` only; see [`AGENTS.md`](../../AGENTS.md)); no secrets in commits; plugin `files` and `prepack` remain consistent; workflows aligned with Node version used in CI. -## Usage +Open [`skills/code-review/`](.) when reviewing PRs or before release (or point your agent at this folder if supported). -Reference: `@skills/code-review` when reviewing PRs or before release. +## References + +- [references/code-review-checklist.md](references/code-review-checklist.md) +- [Development workflow](../dev-workflow/SKILL.md) diff --git a/skills/code-review/references/code-review-checklist.md b/skills/code-review/references/code-review-checklist.md index 229fc34..f4a0fc2 100644 --- a/skills/code-review/references/code-review-checklist.md +++ b/skills/code-review/references/code-review-checklist.md @@ -14,8 +14,8 @@ ## Lint and types -- [ ] ESLint passes (`posttest` or project eslint script). -- [ ] TypeScript changes respect `strict` and project conventions (see `.cursor/rules/typescript.mdc`). +- [ ] ESLint passes (`posttest` or project eslint script). **Note:** CI does not run ESLint — only `npm test` in [`.github/workflows/unit-tests.yml`](../../../.github/workflows/unit-tests.yml); lint must pass locally before merge. +- [ ] TypeScript changes respect `strict` and project conventions (see `tsconfig.json`, `.eslintrc`, and [`AGENTS.md`](../../../AGENTS.md)). ## Packaging and release @@ -25,7 +25,7 @@ ## CI / security workflows -- [ ] Unit test workflow exercises `npm test` on a supported Node version (see `.github/workflows/unit-tests.yml`). +- [ ] Unit test workflow exercises `npm test` on a supported Node version (see `.github/workflows/unit-tests.yml`). Expect Jest only there — not `posttest`/ESLint unless you add a separate workflow. - [ ] SCA / policy workflows unchanged or intentionally updated; no silent downgrade of security checks. ## Documentation diff --git a/skills/contentstack-cli/SKILL.md b/skills/contentstack-cli/SKILL.md index 05852ec..754549a 100644 --- a/skills/contentstack-cli/SKILL.md +++ b/skills/contentstack-cli/SKILL.md @@ -3,17 +3,23 @@ name: contentstack-cli description: Contentstack CLI plugin patterns for cm:stacks:validate-regex (SDK, schema, safe-regex, output) --- -# Contentstack CLI skill +# Contentstack CLI – cli-cm-regex-validate -## Quick reference +## When to use -- Full detail: [references/contentstack-patterns.md](references/contentstack-patterns.md) +- Changing the `csdx cm:stacks:validate-regex` command or flags +- Editing utils under `src/utils/` or user-facing strings in `messages/index.json` +- Adjusting Management SDK usage, schema walking, `safe-regex`, or CSV/table output -## Summary +## Instructions - **Command:** `csdx cm:stacks:validate-regex` — validates regex `format` fields on content types and/or global fields using `safe-regex`. - **Flow:** alias / flags → token → Management client → stack → fetch CT/GF → walk schema → CSV + table output. -## Usage +Open [`skills/contentstack-cli/`](.) when changing commands, utils, or `messages/index.json` (or point your agent at this folder if supported). -Reference: `@skills/contentstack-cli` when changing commands, utils, or `messages/index.json`. +## References + +- [references/contentstack-patterns.md](references/contentstack-patterns.md) +- [Development workflow](../dev-workflow/SKILL.md) +- [Testing](../testing/SKILL.md) diff --git a/skills/dev-workflow/SKILL.md b/skills/dev-workflow/SKILL.md new file mode 100644 index 0000000..f486900 --- /dev/null +++ b/skills/dev-workflow/SKILL.md @@ -0,0 +1,57 @@ +--- +name: dev-workflow +description: Local and CI workflow for cli-cm-regex-validate — commands, layout, naming, hooks, and merge expectations +--- + +# Development workflow – cli-cm-regex-validate + +## When to use + +- Setting up or explaining how to build, test, and lint this repo +- Finding where commands, utils, tests, and messages live +- Before opening or merging a PR (validation checklist, TDD) + +## Instructions + +### Validation commands + +- `npm test` — Jest (`jest.config.ts`, ts-jest). Canonical test runner; CI runs only this in `.github/workflows/unit-tests.yml` (no ESLint in CI). +- `npm run posttest` — ESLint on `.ts` files. Run locally before merge; not executed by the unit-test workflow. + +### Local hooks + +If Husky is installed, pre-commit may run Talisman (secrets) and Snyk. Use `SKIP_HOOK=1` only when you understand the bypass. + +### TDD (recommended) + +1. **Red** — Add or change a failing test in `test/utils/` (or add a fixture in `test/data/`). +2. **Green** — Minimal change in `src/` to pass. +3. **Refactor** — Keep tests green; avoid drive-by refactors outside the task. + +### Repository layout + +| Area | Path | Role | +|------|------|------| +| Command | `src/commands/cm/stacks/validate-regex.ts` | oclif command `cm/stacks/validate-regex` | +| Utils | `src/utils/` | `connect-stack`, `process-stack`, `safe-regex`, `generate-output`, `interactive` | +| Messages | `messages/index.json` | User-facing strings for the command | +| Tests | `test/utils/*.test.ts` | Jest suites mirroring utils | +| Fixtures | `test/data/*.json` | JSON fixtures for schema and expected outputs | + +### Naming + +- Source files: kebab-case. +- Tests: describe behavior clearly (what should happen under which condition). + +### Before merging + +- Tests pass (`npm test`). +- Lint clean (`npm run posttest` or ESLint as configured in `package.json`). CI does not run ESLint; this is a local gate. + +## References + +- [Testing](../testing/SKILL.md) — Jest mocks, fixtures, no live API calls +- [Contentstack CLI](../contentstack-cli/SKILL.md) — Command flow, Management SDK, `safe-regex`, output +- [Code review](../code-review/SKILL.md) — PR and release checklist + +For workflow and layout questions, open the [`skills/dev-workflow/`](.) folder (or your agent tool’s equivalent to this path). diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md index 82d589e..42bb60d 100644 --- a/skills/testing/SKILL.md +++ b/skills/testing/SKILL.md @@ -3,18 +3,23 @@ name: testing description: Jest testing patterns for cli-cm-regex-validate (mocks, fixtures, no live API calls) --- -# Testing skill +# Testing – cli-cm-regex-validate -## Quick reference +## When to use -- Full detail: [references/testing-patterns.md](references/testing-patterns.md) +- Writing or refactoring unit tests for this plugin +- Adding or changing fixtures under `test/data/` +- Choosing mocks for Management SDK, `fs`, `cli-ux`, or `@contentstack/cli-utilities` -## Summary +## Instructions - **Runner:** Jest + ts-jest (`jest.config.ts`). Use `npm test` as the single source of truth. - **Layout:** Tests in `test/utils/`; fixtures in `test/data/*.json`. - **Mocks:** `@contentstack/management`, `fs`, `cli-ux`, `@contentstack/cli-utilities` as appropriate; never hit a real stack in unit tests. -## Usage +When using an agent or IDE that supports folder context, open [`skills/testing/`](.) for test-focused guidance. -In Cursor or any agent chat, reference: `@skills/testing` when writing or refactoring tests. +## References + +- [references/testing-patterns.md](references/testing-patterns.md) +- [Development workflow](../dev-workflow/SKILL.md) From 4fc5f2f21b1ad6d751f9a1a71c11e906ba59dee4 Mon Sep 17 00:00:00 2001 From: raj pandey Date: Wed, 8 Apr 2026 12:01:05 +0530 Subject: [PATCH 3/3] Removed the references file --- .talismanrc | 7 ++- skills/code-review/SKILL.md | 35 ++++++++++++++- .../references/code-review-checklist.md | 33 -------------- skills/contentstack-cli/SKILL.md | 34 ++++++++++++++- .../references/contentstack-patterns.md | 32 -------------- skills/testing/SKILL.md | 43 ++++++++++++++++++- skills/testing/references/testing-patterns.md | 41 ------------------ 7 files changed, 114 insertions(+), 111 deletions(-) delete mode 100644 skills/code-review/references/code-review-checklist.md delete mode 100644 skills/contentstack-cli/references/contentstack-patterns.md delete mode 100644 skills/testing/references/testing-patterns.md diff --git a/.talismanrc b/.talismanrc index d1ec9d2..fd52da9 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,8 +1,11 @@ fileignoreconfig: - filename: skills/dev-workflow/SKILL.md checksum: bbe23955b8865b7b44e8adaf414dce2b0127921ed1e35488adf470fdd833270f - - filename: skills/code-review/references/code-review-checklist.md - checksum: 7b5132bc27e2328f32ecf38941bb117a77be0d83502f15c3a5d1933f3220b6fc - filename: package-lock.json checksum: 31cf2fecced45ffd2db8b1f7c5258d1c98c2d0be7dd443460cfc070558a85c82 + - filename: skills/contentstack-cli/SKILL.md + checksum: cd7046bfdace6bb82ff6168663f05b0a641e615d61167412d0a4c724c3d18209 + - filename: skills/code-review/SKILL.md + checksum: f4fb9f63b97acf35845f31577840050af6c4f960dc6522477e31decc0b866313 + version: "" \ No newline at end of file diff --git a/skills/code-review/SKILL.md b/skills/code-review/SKILL.md index 01c600c..1b22235 100644 --- a/skills/code-review/SKILL.md +++ b/skills/code-review/SKILL.md @@ -16,7 +16,40 @@ description: PR and release checklist for cli-cm-regex-validate (security, packa Open [`skills/code-review/`](.) when reviewing PRs or before release (or point your agent at this folder if supported). +## Checklist + +### Correctness and safety + +- [ ] Changes match the intended behavior for `cm:stacks:validate-regex` (flags, prompts, stack connection, CT/GF selection). +- [ ] No API keys, management tokens, or secrets in code or tests; Talisman/Snyk hooks still make sense for local workflow. +- [ ] New user-visible strings added to `messages/index.json` under `validateRegex` (avoid hard-coded copy in production paths). + +### Tests + +- [ ] `npm test` passes locally. +- [ ] New behavior covered by `test/utils/` tests and/or `test/data/` fixtures where appropriate. +- [ ] Mocks used for Management SDK and filesystem; no accidental live stack calls in unit tests. + +### Lint and types + +- [ ] ESLint passes (`posttest` or project eslint script). **Note:** CI does not run ESLint — only `npm test` in [`.github/workflows/unit-tests.yml`](../../.github/workflows/unit-tests.yml); lint must pass locally before merge. +- [ ] TypeScript changes respect `strict` and project conventions (see `tsconfig.json`, `.eslintrc`, and [`AGENTS.md`](../../AGENTS.md)). + +### Packaging and release + +- [ ] `package.json` `files` includes what ships (`lib`, `bin`, `oclif.manifest.json`, `messages`, etc.). +- [ ] `prepack` still runs `tsc`, `oclif manifest`, and `oclif readme` as needed for the plugin. +- [ ] Version bumps follow team process; release workflow (e.g. push to `main`) matches `.github/workflows/release.yml` expectations. + +### CI / security workflows + +- [ ] Unit test workflow exercises `npm test` on a supported Node version (see `.github/workflows/unit-tests.yml`). Expect Jest only there — not `posttest`/ESLint unless you add a separate workflow. +- [ ] SCA / policy workflows unchanged or intentionally updated; no silent downgrade of security checks. + +### Documentation + +- [ ] README or command examples updated if flags or behavior changed. + ## References -- [references/code-review-checklist.md](references/code-review-checklist.md) - [Development workflow](../dev-workflow/SKILL.md) diff --git a/skills/code-review/references/code-review-checklist.md b/skills/code-review/references/code-review-checklist.md deleted file mode 100644 index f4a0fc2..0000000 --- a/skills/code-review/references/code-review-checklist.md +++ /dev/null @@ -1,33 +0,0 @@ -# Code review checklist - -## Correctness and safety - -- [ ] Changes match the intended behavior for `cm:stacks:validate-regex` (flags, prompts, stack connection, CT/GF selection). -- [ ] No API keys, management tokens, or secrets in code or tests; Talisman/Snyk hooks still make sense for local workflow. -- [ ] New user-visible strings added to `messages/index.json` under `validateRegex` (avoid hard-coded copy in production paths). - -## Tests - -- [ ] `npm test` passes locally. -- [ ] New behavior covered by `test/utils/` tests and/or `test/data/` fixtures where appropriate. -- [ ] Mocks used for Management SDK and filesystem; no accidental live stack calls in unit tests. - -## Lint and types - -- [ ] ESLint passes (`posttest` or project eslint script). **Note:** CI does not run ESLint — only `npm test` in [`.github/workflows/unit-tests.yml`](../../../.github/workflows/unit-tests.yml); lint must pass locally before merge. -- [ ] TypeScript changes respect `strict` and project conventions (see `tsconfig.json`, `.eslintrc`, and [`AGENTS.md`](../../../AGENTS.md)). - -## Packaging and release - -- [ ] `package.json` `files` includes what ships (`lib`, `bin`, `oclif.manifest.json`, `messages`, etc.). -- [ ] `prepack` still runs `tsc`, `oclif manifest`, and `oclif readme` as needed for the plugin. -- [ ] Version bumps follow team process; release workflow (e.g. push to `main`) matches `.github/workflows/release.yml` expectations. - -## CI / security workflows - -- [ ] Unit test workflow exercises `npm test` on a supported Node version (see `.github/workflows/unit-tests.yml`). Expect Jest only there — not `posttest`/ESLint unless you add a separate workflow. -- [ ] SCA / policy workflows unchanged or intentionally updated; no silent downgrade of security checks. - -## Documentation - -- [ ] README or command examples updated if flags or behavior changed. diff --git a/skills/contentstack-cli/SKILL.md b/skills/contentstack-cli/SKILL.md index 754549a..b5ef94e 100644 --- a/skills/contentstack-cli/SKILL.md +++ b/skills/contentstack-cli/SKILL.md @@ -18,8 +18,40 @@ description: Contentstack CLI plugin patterns for cm:stacks:validate-regex (SDK, Open [`skills/contentstack-cli/`](.) when changing commands, utils, or `messages/index.json` (or point your agent at this folder if supported). +## Patterns (regex validation plugin) + +### Plugin identity + +- Package: `@contentstack/cli-cm-regex-validate` +- Command id: `cm:stacks:validate-regex` (short name `RGXVLD` in `package.json` `csdxConfig` when present) +- Entry: `src/commands/cm/stacks/validate-regex.ts` + +### End-to-end flow + +1. **Parse** — `this.parse(ValidateRegex)`; flags: `alias`, `contentType`, `globalField`, `filePath`, `help`. +2. **Prompts** — If alias or module flags are missing, `inquireAlias` / `inquireModule` (`src/utils/interactive.ts`, Inquirer). +3. **Token** — `this.getToken(alias)` from Contentstack CLI; errors use `messages.validateRegex.errors.tokenNotFound` and `ref` to docs. +4. **Connect** — `connect-stack.ts`: `contentstackSdk.client({ host })`, optional `early_access` headers, `client.stack({ api_key, management_token })`. +5. **Process** — `process-stack.ts`: for each selected module, `stack.contentType()` / `stack.globalField()` → `.query({}).find()`, then `safe-regex.ts` on each item. +6. **Output** — `generate-output.ts`: `results.csv` via `jsonexport`, table via `cli-table3`, paths via `sanitizePath`; user copy from `messages/index.json`. + +### Schema traversal + +- Recurse into `schema` for `group` and `global_field`. +- For `blocks`, iterate `blocks` and each block’s `schema`. +- For each field with `format`, call `safe-regex`; collect module, title, UID, field metadata, and pattern for invalid rows. + +### User-facing strings + +- All strings live under `messages/index.json` → `validateRegex` (command, interactive, cliAction, errors, output). +- Docs link in output points to Contentstack guidance on catastrophic backtracking / validation regex. + +### Related packages + +- `@contentstack/cli-command`, `@contentstack/cli-utilities`, `@contentstack/management` +- `cli-ux` (spinner), `inquirer` (prompts), `safe-regex`, `jsonexport`, `cli-table3` + ## References -- [references/contentstack-patterns.md](references/contentstack-patterns.md) - [Development workflow](../dev-workflow/SKILL.md) - [Testing](../testing/SKILL.md) diff --git a/skills/contentstack-cli/references/contentstack-patterns.md b/skills/contentstack-cli/references/contentstack-patterns.md deleted file mode 100644 index d76262d..0000000 --- a/skills/contentstack-cli/references/contentstack-patterns.md +++ /dev/null @@ -1,32 +0,0 @@ -# Contentstack patterns (regex validation plugin) - -## Plugin identity - -- Package: `@contentstack/cli-cm-regex-validate` -- Command id: `cm:stacks:validate-regex` (short name `RGXVLD` in `package.json` `csdxConfig` when present) -- Entry: `src/commands/cm/stacks/validate-regex.ts` - -## End-to-end flow - -1. **Parse** — `this.parse(ValidateRegex)`; flags: `alias`, `contentType`, `globalField`, `filePath`, `help`. -2. **Prompts** — If alias or module flags are missing, `inquireAlias` / `inquireModule` (`src/utils/interactive.ts`, Inquirer). -3. **Token** — `this.getToken(alias)` from Contentstack CLI; errors use `messages.validateRegex.errors.tokenNotFound` and `ref` to docs. -4. **Connect** — `connect-stack.ts`: `contentstackSdk.client({ host })`, optional `early_access` headers, `client.stack({ api_key, management_token })`. -5. **Process** — `process-stack.ts`: for each selected module, `stack.contentType()` / `stack.globalField()` → `.query({}).find()`, then `safe-regex.ts` on each item. -6. **Output** — `generate-output.ts`: `results.csv` via `jsonexport`, table via `cli-table3`, paths via `sanitizePath`; user copy from `messages/index.json`. - -## Schema traversal - -- Recurse into `schema` for `group` and `global_field`. -- For `blocks`, iterate `blocks` and each block’s `schema`. -- For each field with `format`, call `safe-regex`; collect module, title, UID, field metadata, and pattern for invalid rows. - -## User-facing strings - -- All strings live under `messages/index.json` → `validateRegex` (command, interactive, cliAction, errors, output). -- Docs link in output points to Contentstack guidance on catastrophic backtracking / validation regex. - -## Related packages - -- `@contentstack/cli-command`, `@contentstack/cli-utilities`, `@contentstack/management` -- `cli-ux` (spinner), `inquirer` (prompts), `safe-regex`, `jsonexport`, `cli-table3` diff --git a/skills/testing/SKILL.md b/skills/testing/SKILL.md index 42bb60d..aa31658 100644 --- a/skills/testing/SKILL.md +++ b/skills/testing/SKILL.md @@ -19,7 +19,48 @@ description: Jest testing patterns for cli-cm-regex-validate (mocks, fixtures, n When using an agent or IDE that supports folder context, open [`skills/testing/`](.) for test-focused guidance. +## Patterns (Jest) + +This project uses **Jest** and **ts-jest**. **`npm test`** (Jest) is the canonical test command; CI runs `npm test` from `.github/workflows/unit-tests.yml`. The `mocha` script in `package.json` is **not** what CI runs—do not use `npm run mocha` as the project test entry point. + +### File layout + +| Area | Path | +|------|------| +| Tests | `test/utils/*.test.ts` | +| Fixtures | `test/data/*.json` | + +Mirror utility names where it helps (`connect-stack.test.ts` vs `connect-stack.ts`). + +### Commands + +- `npm test` — runs Jest with `jest.config.ts` (roots, `testMatch`, ts-jest transform, coverage). + +### Mocking + +- **Management SDK:** `jest.mock('@contentstack/management')` and stub `client`, `stack`, and query chains as in `connect-stack.test.ts`. +- **Filesystem:** `jest.mock('fs')` when testing CSV path creation and `writeFileSync` / `mkdirSync`. +- **cli-ux:** mock `cli.action.start` / `stop` when asserting spinner behavior; avoid reassigning imported bindings with `@ts-ignore`—prefer `jest.mock('cli-ux', () => ({ ... }))` when needed. +- **cli-utilities:** mock `cliux.print` and `sanitizePath` in output tests when asserting printed messages and paths. + +### Fixtures + +- Load JSON with `require('../data/...')` for content type / global field documents and expected invalid-regex rows. +- Keeps tests readable and matches real API shape (schema, `data_type`, `format`, nested `group` / `blocks`). + +### Assertions + +- Use `toHaveBeenCalled`, `toHaveBeenCalledWith`, `toStrictEqual` for objects and arrays. +- Avoid deprecated matchers removed in newer Jest (e.g. prefer `toHaveBeenCalled` over legacy aliases). + +### Async tests + +- Use `async`/`await` for utilities that return promises; await `inquireAlias` / `inquireModule` when testing interactive flows with mocked `inquirer`. + +### Note on `package.json` + +- This repo lists **`jest`** under **`dependencies`** in `package.json`. Run tests via **`npm test`** and describe the framework as Jest in documentation and for agents. + ## References -- [references/testing-patterns.md](references/testing-patterns.md) - [Development workflow](../dev-workflow/SKILL.md) diff --git a/skills/testing/references/testing-patterns.md b/skills/testing/references/testing-patterns.md deleted file mode 100644 index 6647e67..0000000 --- a/skills/testing/references/testing-patterns.md +++ /dev/null @@ -1,41 +0,0 @@ -# Testing patterns (Jest) - -This project uses **Jest** and **ts-jest**. **`npm test`** (Jest) is the canonical test command; CI runs `npm test` from `.github/workflows/unit-tests.yml`. The `mocha` script in `package.json` is **not** what CI runs—do not use `npm run mocha` as the project test entry point. - -## File layout - -| Area | Path | -|------|------| -| Tests | `test/utils/*.test.ts` | -| Fixtures | `test/data/*.json` | - -Mirror utility names where it helps (`connect-stack.test.ts` vs `connect-stack.ts`). - -## Commands - -- `npm test` — runs Jest with `jest.config.ts` (roots, `testMatch`, ts-jest transform, coverage). - -## Mocking - -- **Management SDK:** `jest.mock('@contentstack/management')` and stub `client`, `stack`, and query chains as in `connect-stack.test.ts`. -- **Filesystem:** `jest.mock('fs')` when testing CSV path creation and `writeFileSync` / `mkdirSync`. -- **cli-ux:** mock `cli.action.start` / `stop` when asserting spinner behavior; avoid reassigning imported bindings with `@ts-ignore`—prefer `jest.mock('cli-ux', () => ({ ... }))` when needed. -- **cli-utilities:** mock `cliux.print` and `sanitizePath` in output tests when asserting printed messages and paths. - -## Fixtures - -- Load JSON with `require('../data/...')` for content type / global field documents and expected invalid-regex rows. -- Keeps tests readable and matches real API shape (schema, `data_type`, `format`, nested `group` / `blocks`). - -## Assertions - -- Use `toHaveBeenCalled`, `toHaveBeenCalledWith`, `toStrictEqual` for objects and arrays. -- Avoid deprecated matchers removed in newer Jest (e.g. prefer `toHaveBeenCalled` over legacy aliases). - -## Async tests - -- Use `async`/`await` for utilities that return promises; await `inquireAlias` / `inquireModule` when testing interactive flows with mocked `inquirer`. - -## Note on `package.json` - -- This repo lists **`jest`** under **`dependencies`** in `package.json`. Run tests via **`npm test`** and describe the framework as Jest in documentation and for agents.