From a642d6c9f7d489a443879e2638ffac33ec19809b Mon Sep 17 00:00:00 2001 From: Guilherme Cota <1190640@isep.ipp.pt> Date: Thu, 5 Nov 2026 17:54:54 +0000 Subject: [PATCH 1/5] feat(codereview): add gated RepoFlow release workflow --- .gitattributes | 1 + .github/workflows/CI-Build.yml | 9 + .github/workflows/Release-CodeReview.yml | 198 ++ .gitignore | 1 + cmf-codereview/.gitignore | 1 - cmf-codereview/README.md | 4 + cmf-codereview/docs/Releases.md | 52 + cmf-codereview/package-lock.json | 3277 +++++++++++++++++++++ cmf-codereview/scripts/publish-release.sh | 52 + cmf-codereview/scripts/release.mjs | 177 ++ cmf-codereview/scripts/release.test.mjs | 79 + cmf-codereview/scripts/smoke-package.sh | 36 + 12 files changed, 3886 insertions(+), 1 deletion(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/Release-CodeReview.yml create mode 100644 cmf-codereview/docs/Releases.md create mode 100644 cmf-codereview/package-lock.json create mode 100644 cmf-codereview/scripts/publish-release.sh create mode 100644 cmf-codereview/scripts/release.mjs create mode 100644 cmf-codereview/scripts/release.test.mjs create mode 100644 cmf-codereview/scripts/smoke-package.sh diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..dfdb8b7 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/.github/workflows/CI-Build.yml b/.github/workflows/CI-Build.yml index 86cad30..821494d 100644 --- a/.github/workflows/CI-Build.yml +++ b/.github/workflows/CI-Build.yml @@ -26,6 +26,15 @@ jobs: with: dotnet-version: '8.0.x' + - name: Set up Node.js for release workflow tests + uses: actions/setup-node@v6 + with: + node-version: '24' + package-manager-cache: false + + - name: Test release workflow guards + run: node --test scripts/release.test.mjs + - name: Restore dependencies of cmf-codereviewer run: dotnet restore cmf-codereview.sln diff --git a/.github/workflows/Release-CodeReview.yml b/.github/workflows/Release-CodeReview.yml new file mode 100644 index 0000000..1fbe15f --- /dev/null +++ b/.github/workflows/Release-CodeReview.yml @@ -0,0 +1,198 @@ +name: Release-CodeReview +run-name: "codereview ${{ inputs.version || 'validation' }} → ${{ inputs.channel || 'next (no publish)' }}" + +on: + pull_request: + branches: [main] + paths: + - .github/workflows/Release-CodeReview.yml + - cmf-codereview/scripts/** + workflow_dispatch: + inputs: + channel: + description: "next builds a candidate; latest promotes the tested candidate" + required: true + type: choice + options: [next, latest] + default: next + version: + description: "Exact version, e.g. 1.0.1; publish it as next first" + required: true + type: string + micron_build_url: + description: "For latest: successful Micron PR-Changes build testing this exact version" + required: false + type: string + +permissions: + contents: read + actions: read + +concurrency: + group: codereview-repoflow-release + cancel-in-progress: false + +env: + RELEASE_CHANNEL: ${{ inputs.channel || 'next' }} + RELEASE_VERSION: ${{ inputs.version || format('0.0.0-ci.{0}.{1}', github.run_id, github.run_attempt) }} + MICRON_BUILD_URL: ${{ inputs.micron_build_url }} + RELEASE_REGISTRY: ${{ vars.REPOFLOW_NPM_REGISTRY || 'https://cm-collaborationhub.io/api/npm/2305290000030000002/dev/' }} + # This switch remains off until the archive upload limit has been resolved. + CODE_REVIEW_PUBLISH_ENABLED: ${{ github.event_name == 'workflow_dispatch' && vars.CODE_REVIEW_PUBLISH_ENABLED == 'true' && 'true' || 'false' }} + +defaults: + run: + shell: bash + working-directory: cmf-codereview + +jobs: + plan: + runs-on: ubuntu-24.04 + timeout-minutes: 5 + outputs: + version: ${{ steps.plan.outputs.version }} + publish: ${{ steps.plan.outputs.publish }} + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + package-manager-cache: false + - name: Validate inputs and publishing switch + id: plan + run: node scripts/release.mjs plan + - name: Require configured reviewers before requesting latest approval + if: inputs.channel == 'latest' + env: + GITHUB_TOKEN: ${{ github.token }} + run: node scripts/release.mjs check-approval + + package: + if: inputs.channel != 'latest' + needs: plan + runs-on: ubuntu-24.04 + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-dotnet@v6 + with: + dotnet-version: '8.0.x' + - uses: actions/setup-node@v6 + with: + node-version: '24' + cache: npm + cache-dependency-path: cmf-codereview/package-lock.json + - name: Test release guards + run: node --test scripts/release.test.mjs + - name: Stamp the npm package and executable with the requested version + run: node scripts/release.mjs prepare "$RELEASE_VERSION" + - name: Restore, build and test + run: | + set -Eeuo pipefail + dotnet restore cmf-codereview.sln + dotnet build cmf-codereview.sln -c Release --no-restore + dotnet test cmf-codereview.sln -c Release --no-build + - name: Build all three self-contained platform bundles + run: | + set -Eeuo pipefail + npm ci --ignore-scripts --no-audit --no-fund + npm run build:bundle + - name: Pack and verify the archive + run: | + set -Eeuo pipefail + mkdir -p release + npm pack ./npm --pack-destination ./release --json > release/pack.json + node scripts/release.mjs manifest + - uses: actions/upload-artifact@v7 + with: + name: codereview-${{ needs.plan.outputs.version }} + path: | + cmf-codereview/release/*.tgz + cmf-codereview/release/manifest.json + cmf-codereview/release/pack.json + compression-level: 0 + if-no-files-found: error + retention-days: 30 + + smoke: + needs: [plan, package] + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, windows-2025, macos-15-intel] + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + package-manager-cache: false + - uses: actions/download-artifact@v8 + with: + name: codereview-${{ needs.plan.outputs.version }} + path: cmf-codereview/release + - name: Install the actual tgz and run a scan + run: bash scripts/smoke-package.sh "$GITHUB_WORKSPACE/cmf-codereview/release" "$RELEASE_VERSION" + + publish-next: + if: github.event_name == 'workflow_dispatch' && inputs.channel == 'next' && needs.plan.outputs.publish == 'true' + needs: [plan, package, smoke] + runs-on: ${{ fromJSON(vars.CODE_REVIEW_PUBLISH_RUNNER_JSON || '"ubuntu-24.04"') }} + timeout-minutes: 15 + environment: repoflow-next + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + registry-url: ${{ env.RELEASE_REGISTRY }} + scope: '@criticalmanufacturing' + package-manager-cache: false + - uses: actions/download-artifact@v8 + with: + name: codereview-${{ needs.plan.outputs.version }} + path: cmf-codereview/release + - name: Publish the tested archive with next only + env: + NODE_AUTH_TOKEN: ${{ secrets.REPOFLOW_NPM_TOKEN }} + run: bash scripts/publish-release.sh + - name: Record next candidate + run: | + printf 'Published @criticalmanufacturing/codereview@%s as next.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" + printf 'Test this exact version in the Micron integration branch before requesting latest.\n' >> "$GITHUB_STEP_SUMMARY" + + promote-latest: + if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest' && needs.plan.outputs.publish == 'true' + needs: plan + runs-on: ${{ fromJSON(vars.CODE_REVIEW_PUBLISH_RUNNER_JSON || '"ubuntu-24.04"') }} + timeout-minutes: 10 + environment: + name: repoflow-latest + url: ${{ inputs.micron_build_url }} + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + registry-url: ${{ env.RELEASE_REGISTRY }} + scope: '@criticalmanufacturing' + package-manager-cache: false + - name: Promote the approved existing next version without rebuilding + env: + NODE_AUTH_TOKEN: ${{ secrets.REPOFLOW_NPM_TOKEN }} + run: bash scripts/publish-release.sh + - name: Record approval evidence + run: | + printf 'Promoted @criticalmanufacturing/codereview@%s to latest.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" + printf 'Reviewer-approved Micron integration build: %s\n' "$MICRON_BUILD_URL" >> "$GITHUB_STEP_SUMMARY" diff --git a/.gitignore b/.gitignore index 4e62817..e8e7f44 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ *.snupkg npm-debug.log* .npmrc +**/release/ diff --git a/cmf-codereview/.gitignore b/cmf-codereview/.gitignore index fce0ac9..15ffe60 100644 --- a/cmf-codereview/.gitignore +++ b/cmf-codereview/.gitignore @@ -6,5 +6,4 @@ node_modules/ dist/ npm/dist/ npm/packs/ -package-lock.json npm/package-lock.json diff --git a/cmf-codereview/README.md b/cmf-codereview/README.md index e80b7f6..764e68d 100644 --- a/cmf-codereview/README.md +++ b/cmf-codereview/README.md @@ -94,3 +94,7 @@ baseline (`scan --update-baseline`) so CI gates only fail on new findings. See ```bash dotnet test ``` + +## Releases + +See [the release guide](docs/Releases.md) for the GitHub Actions `next` candidate and approved `latest` promotion flow, required repository settings, and the Micron integration branch. Publication remains disabled until the RepoFlow upload limit is resolved. diff --git a/cmf-codereview/docs/Releases.md b/cmf-codereview/docs/Releases.md new file mode 100644 index 0000000..9622c4b --- /dev/null +++ b/cmf-codereview/docs/Releases.md @@ -0,0 +1,52 @@ +# Releasing cmf-codereview + +The `Release-CodeReview` GitHub Actions workflow builds Windows, Linux and macOS x64 bundles into one npm archive. Select `next` to build a candidate, then select `latest` to promote the same published version after testing it in Micron. A channel is an npm distribution tag, separate from the package version: for example, publish `1.0.1` under `next`, test `1.0.1`, then move `latest` to `1.0.1` without rebuilding. + +## Current state: publication is blocked + +Leave repository variable `CODE_REVIEW_PUBLISH_ENABLED` unset or `false`. The public RepoFlow endpoint previously rejected the approximately 129 MB all-platform archive with HTTP 413. Both publishing jobs are blocked until the upload route is resolved; `latest` requests fail before approval. A `next` request still builds, tests and saves the tgz as a GitHub artifact. Pull requests changing release automation also exercise this build without registry credentials. + +Do not assume the raw `/api/upload/...` endpoint supports `npm publish` or npm tags. This workflow requires an npm-compatible registry endpoint that accepts the complete publish request. The registry must also be reachable from the publishing runner. Authentication and sufficient upload capacity must both be verified before enabling publication. No upload has been attempted by this implementation. + +## Repository setup + +An administrator must configure the following after reviewing and merging the workflow into `main`: + +| Setting | Purpose | +| --- | --- | +| Environment `repoflow-next` | Holds the publishing credential for candidates. Restrict deployment branches to `main`. | +| Environment `repoflow-latest` | Configure **required reviewers**, prevent self-review if supported, and restrict deployment branches to `main`. Holds the promotion credential. | +| Environment secret `REPOFLOW_NPM_TOKEN` | An npm authentication token accepted by RepoFlow, with package publish/tag permissions. Set in each environment; never commit it. | +| Repository variable `REPOFLOW_NPM_REGISTRY` | Optional working npm registry URL. Defaults to `https://cm-collaborationhub.io/api/npm/2305290000030000002/dev/`. | +| Repository variable `CODE_REVIEW_PUBLISH_RUNNER_JSON` | Optional JSON runner label/string, e.g. `["self-hosted","linux","repoflow"]` for a network-restricted endpoint. Defaults to `"ubuntu-24.04"`. Only the publish/promotion jobs use this runner. | +| Repository variable `CODE_REVIEW_PUBLISH_ENABLED` | Set to literal `true` **only after** the upload problem and authentication are resolved. Keep disabled for now. | + +The workflow checks that `repoflow-latest` has required reviewers before entering that environment. Missing protection or inability to inspect it fails the request. `latest` runs must use `main`. Environments and secrets are repository configuration; adding their names to YAML does not configure reviewers. GitHub must allow the referenced Actions versions and artifact storage. + +## Candidate and integration test + +1. Open **Actions → Release-CodeReview → Run workflow**, select `main`, channel `next`, and an unused exact version, such as `1.0.1`. No automatic version bump or source commit is made: the workflow stamps the npm manifest and .NET project in its build workspace. It rejects ranges, `v` prefixes and build metadata. +2. The workflow runs .NET tests, builds all three platform bundles, produces a tgz and SHA-512 manifest, and installs/scans with that tgz on Windows, Linux and Intel macOS. With publishing disabled, download the `codereview-` artifact to inspect it. Once enabled, only a successful run publishes it with `--tag next`; an existing package version is never overwritten. +3. Use the Micron branch `test/codereview-release-integration`, based on `development`. Its `Builds/.vars/custom.yml` starts with `CmfCodeReviewVersion: 'next'`. Before the approval build, replace that value with the **exact version** from the successful candidate release. This avoids another candidate moving `next` during your test. +4. Open a Micron PR from the test branch and run its PR-Changes policy. Include a representative C# or process-rule change so the scan and inline-comment path are exercised. Check restored dependency resolution, expected findings, comment placement and the full pipeline result. Do not merge the branch's candidate version setting into `development`. +5. In the Micron build, inspect the logged resolved version and SHA-512 integrity, also saved as the `codereview-candidate` build artifact. Compare them with the GitHub artifact's `manifest.json`. Record the successful PR-Changes build URL. A tag resolving successfully alone is not an integration test. + +The Micron branch reuses the existing agent's npm authentication from `cmf-login`; the registry must allow its metadata and package requests. It resolves a tag once and passes the resulting exact version to `npx`. The normal `development` branch's `latest` setting remains unchanged. Until a candidate is actually published and registry access works, the full integration run cannot be completed. + +## Promote after testing + +1. Run `Release-CodeReview` from `main`, channel `latest`, with the tested exact version and the successful Micron build URL (`https://dev.azure.com/criticalmanufacturing/Micron/_build/results?buildId=...`). +2. The `repoflow-latest` reviewers inspect that build, confirm it succeeded and tested that exact version/integrity, and approve the deployment. The URL is checked for the expected Azure organization/project/build-ID shape; **the workflow does not query Azure or automatically verify build success**. This is a manual approval gate. +3. The approved job requires that version to still be RepoFlow's current `next` candidate, then runs `npm dist-tag add @criticalmanufacturing/codereview@ latest` and verifies the resulting tag. It downloads no replacement binaries and performs no rebuild or republish. Normal Micron pipelines using `latest` receive the promoted version on subsequent installs. + +Avoid advancing `next` while a candidate is undergoing integration testing. If it moves, the promotion fails; retest the current candidate instead of bypassing the check. Workflow runs are serialized, but approval is still responsible for choosing the intended version. If publishing succeeded but a later registry verification failed, inspect the registry before retrying: do not reuse the version for different bytes. + +## Validation and assumptions + +Release helper tests cover disabled publishing, version validation, approval configuration, candidate matching, archive completeness and integrity. The release workflow performs native install/scan smoke tests against the actual tgz on all three operating systems. Native GitHub jobs must complete before a publishing job can run. + +The Micron change is a narrow template update using its existing Linux container/agent pool, Node setup, authentication and full-history checkout. **Azure validation status: Manual fallback.** Checks cover YAML structure, task major versions, template placement, Bash syntax, quoted arguments, variable handling and absence of embedded credentials. The Azure validator skill/script is unavailable; Azure template expansion, private feed access and full PR integration still require a real Micron run. + +References used: the repository's Azure pipeline schema, best practices, tasks and templates guides; Bash defensive patterns; [GitHub environments and approvals](https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments), [environment API](https://docs.github.com/en/rest/deployments/environments#get-an-environment), [runner images](https://github.com/actions/runner-images), [artifact upload](https://github.com/actions/upload-artifact), [artifact download](https://github.com/actions/download-artifact), and [npm distribution tags](https://docs.npmjs.com/cli/v11/commands/npm-dist-tag/). + +References skipped or missing: automated Azure build verification (manual approval was selected), unrelated deployment examples, and the unavailable Azure validator. Impact: no Azure PAT is needed in GitHub; reviewers must verify the supplied build evidence, and a real Azure run remains necessary before promotion. diff --git a/cmf-codereview/package-lock.json b/cmf-codereview/package-lock.json new file mode 100644 index 0000000..3d35c50 --- /dev/null +++ b/cmf-codereview/package-lock.json @@ -0,0 +1,3277 @@ +{ + "name": "cmf-codereview-builder", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "cmf-codereview-builder", + "version": "1.0.0", + "license": "BSD-3-Clause", + "dependencies": { + "dotnet-bump": "^2.0.0", + "rimraf": "^6.1.3" + }, + "devDependencies": { + "commit-and-tag-version": "^12.7.3", + "mkdirp": "^3.0.1" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@hutson/parse-repository-url": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@hutson/parse-repository-url/-/parse-repository-url-3.0.2.tgz", + "integrity": "sha512-H9XAx3hc0BQHY6l+IFSWHDySypcXsvsuLhgYLUGywmJ5pswRVQJUHpOsobnLYp2ZUaUlKiKDrgWWhosOwAEM8Q==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@isaacs/nonrecursive-glob-match": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@isaacs/nonrecursive-glob-match/-/nonrecursive-glob-match-1.0.3.tgz", + "integrity": "sha512-SI7kyKHq4XXDRozw+r9GlRZkia1ZkFrpLW98r2IC2Bpr8YkFGE3fvjzmxCG0x78A++69HmDNrDvSMYBZmHGpKA==", + "license": "BlueOak-1.0.0" + }, + "node_modules/@nodable/entities": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@nodable/entities/-/entities-3.1.0.tgz", + "integrity": "sha512-LsS/DjHr+uDM647Gru/cA8+J3a3HfhttwCKLyuoyN7yXTFCxKBtSgMQBvrW9yNPa2/zDRUNuGPaH5QUFoa4arQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/nodable" + } + ], + "license": "MIT" + }, + "node_modules/@redis/bloom": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-6.3.1.tgz", + "integrity": "sha512-dpF9j2yJDoPzSCaZn0MSB3xzmnXQVJeTSAWJcQVcgbmluwhpFeemmII0cF1t+WYfoVS+shEFq79+MmUItgzJLg==", + "license": "MIT", + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "@redis/client": "^6.3.1" + } + }, + "node_modules/@redis/client": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@redis/client/-/client-6.3.1.tgz", + "integrity": "sha512-masbfVKULdoAofwddepZxRhWa4w6zvBHn6TRn90TRPrRkVIlGCur3pFqwWaCbMxtYI9twepkz63e/T/tEH8GjA==", + "license": "MIT", + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "@node-rs/xxhash": "^1.1.0", + "@opentelemetry/api": ">=1 <2" + }, + "peerDependenciesMeta": { + "@node-rs/xxhash": { + "optional": true + }, + "@opentelemetry/api": { + "optional": true + } + } + }, + "node_modules/@redis/json": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@redis/json/-/json-6.3.1.tgz", + "integrity": "sha512-fMz4kUwJzEftcU9EMaqsjZcUwzpTQLOYRqhQsAD6uKvZWeamblK13ZhgO5SzVSZVk31jmwLeTRpU5GAl5egfUw==", + "license": "MIT", + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "@redis/client": "^6.3.1" + } + }, + "node_modules/@redis/search": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@redis/search/-/search-6.3.1.tgz", + "integrity": "sha512-T67pvPUpW82VrZLvihO8O2DFMC7eY2oMAzMzapCbiPZn7mdWqHMEIlohYim12gIawT5kn6qT/Cvmm4WulKB+kQ==", + "license": "MIT", + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "@redis/client": "^6.3.1" + } + }, + "node_modules/@redis/time-series": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-6.3.1.tgz", + "integrity": "sha512-MNDgrm+i63M/1a+XA+HcDsScwt4uBh/fGGJ84swTQZTFK5K5wMmxdlTRa4ZgmNJzjxMaszW/ipPScMUGV3aAMg==", + "license": "MIT", + "engines": { + "node": ">= 20.0.0" + }, + "peerDependencies": { + "@redis/client": "^6.3.1" + } + }, + "node_modules/@types/minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true, + "license": "MIT" + }, + "node_modules/abort-controller": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", + "integrity": "sha512-h8lQ8tacZYnR3vNQTgibj+tODHI5/+l06Au2Pcriv/Gmet0eaj4TwWH41sO9wnHDiQsEj19q0drzdWdeAHtweg==", + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/add-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/add-stream/-/add-stream-1.0.0.tgz", + "integrity": "sha512-qQLMr+8o0WC4FZGQTcJiKBVC59JylcPSrTtk6usvmIDFUOCKegapy1VHQwRbFMOFyb/inzUVqHs+eMYKDM1YeQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/after": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/after/-/after-0.8.2.tgz", + "integrity": "sha512-QbJ0NTQ/I9DI3uSJA4cbexiwQeRAfjPScqIbSjUDd9TOrcg6pTkdgziesOqxBMBzit8vFCTwrP27t13vFOORRA==", + "license": "MIT" + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/anynum": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/anynum/-/anynum-1.0.1.tgz", + "integrity": "sha512-N6//FLET/tXYNM/F6ABca1oH6fWB+KlTt909Le28WMDBk8oaT4vY17DCrwg2MvmuqUKt3Ni4N5dGJ/EoBgcO6A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, + "node_modules/array-ify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-ify/-/array-ify-1.0.0.tgz", + "integrity": "sha512-c5AMf34bKdvPhQ7tBGhqkgKNUzMr4WUs+WDtC2ZUGOUncbxKMTvqxYctiseW3+L4bA8ec+GcZ6/A/FW4m8ukng==", + "dev": true, + "license": "MIT" + }, + "node_modules/arrify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", + "integrity": "sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/assembly-source": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assembly-source/-/assembly-source-1.0.0.tgz", + "integrity": "sha512-G54OWV9A4xBC1iuUjOGAtNHr2R+IDS6MV+EuNyZLKb4NmRkOVTLhbAHfg0dDKTNWsco81aSMDMKHLnjytr62mw==", + "license": "MIT", + "dependencies": { + "esprima": "^4.0.0", + "is-options": "^1.0.1", + "pascal-case": "^3.1.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/b4a": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/b4a/-/b4a-1.9.0.tgz", + "integrity": "sha512-dpfcF9fDNR6++cthXR67iyhgqWy9CBouAvIWhIntzBG6cvK/cnIPiZQjBwi/ZqjjBEDGfoNDtmB0kTjroOJ3pQ==", + "license": "Apache-2.0", + "peerDependencies": { + "react-native-b4a": "*" + }, + "peerDependenciesMeta": { + "react-native-b4a": { + "optional": true + } + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "license": "MIT" + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/brace-expansion": { + "version": "1.1.21", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.21.tgz", + "integrity": "sha512-9zeA+KLZNNzglF2TPKRQEDyx6Yby7daAkuy8MiPzpXPsYDWi/DRM8jmwUDxokQjYqBpv5DgPiwD4h4ZZSy1Ujw==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/buffer": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz", + "integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.2.1" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase-keys": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-6.2.2.tgz", + "integrity": "sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "camelcase": "^5.3.1", + "map-obj": "^4.0.0", + "quick-lru": "^4.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/classifier": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/classifier/-/classifier-0.1.0.tgz", + "integrity": "sha512-lHoacZqTxberxbsaT/bDkvUicTl6nVTqnM5X6PhCTCg6Y3uhd/lWqbtMvHwe0W0vGkPWCVw5NTUTi3SOlccaSA==", + "deprecated": "Package no longer supported. Contact support@npmjs.com for more info.", + "dependencies": { + "redis": ">=0.7.0", + "underscore": ">=1.1.0" + }, + "engines": { + "node": "*" + } + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true, + "license": "MIT" + }, + "node_modules/commit-and-tag-version": { + "version": "12.7.3", + "resolved": "https://registry.npmjs.org/commit-and-tag-version/-/commit-and-tag-version-12.7.3.tgz", + "integrity": "sha512-rbauuCDU98yEHMy/LrNNu8HLTuGv7C2kN/3GXC59L18aJGii0eiryCESb1SEHXNFem2/2ngWG/Pq6qaCqw3aCw==", + "dev": true, + "license": "ISC", + "dependencies": { + "chalk": "^2.4.2", + "conventional-changelog": "4.0.0", + "conventional-changelog-config-spec": "2.1.0", + "conventional-changelog-conventionalcommits": "6.1.0", + "conventional-recommended-bump": "7.0.1", + "detect-indent": "^6.1.0", + "detect-newline": "^3.1.0", + "dotgitignore": "^2.1.0", + "fast-xml-parser": "^5.5.6", + "figures": "^3.2.0", + "find-up": "^5.0.0", + "git-semver-tags": "^5.0.1", + "semver": "^7.7.2", + "yaml": "^2.6.0", + "yargs": "^17.7.2" + }, + "bin": { + "commit-and-tag-version": "bin/cli.js" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/common-roots": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/common-roots/-/common-roots-0.0.2.tgz", + "integrity": "sha512-ZnqiSLPHOR+KheKcg1K4y31iVx8N3lmflfEtLUztmMR4bLE+0dSH9Notp31vZBpnCVdnmW8FycfKKW8NKFo1tg==", + "license": "MIT", + "dependencies": { + "find-file-up": "~1.0.2", + "path-is-inside": "~1.0.2" + }, + "engines": { + "node": ">=4.0.0", + "npm": ">=2.0.0" + } + }, + "node_modules/compare-func": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-2.0.0.tgz", + "integrity": "sha512-zHig5N+tPWARooBnb0Zx1MFcdfpyJrfTJ3Y5L+IFvUm8rM74hHz66z0gw0x4tijh5CorKkKUCnW82R2vmpeCRA==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-ify": "^1.0.0", + "dot-prop": "^5.1.0" + } + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true, + "license": "MIT" + }, + "node_modules/concat-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz", + "integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==", + "dev": true, + "engines": [ + "node >= 6.0" + ], + "license": "MIT", + "dependencies": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.0.2", + "typedarray": "^0.0.6" + } + }, + "node_modules/conventional-changelog": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog/-/conventional-changelog-4.0.0.tgz", + "integrity": "sha512-JbZjwE1PzxQCvm+HUTIr+pbSekS8qdOZzMakdFyPtdkEWwFvwEJYONzjgMm0txCb2yBcIcfKDmg8xtCKTdecNQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "conventional-changelog-angular": "^6.0.0", + "conventional-changelog-atom": "^3.0.0", + "conventional-changelog-codemirror": "^3.0.0", + "conventional-changelog-conventionalcommits": "^6.0.0", + "conventional-changelog-core": "^5.0.0", + "conventional-changelog-ember": "^3.0.0", + "conventional-changelog-eslint": "^4.0.0", + "conventional-changelog-express": "^3.0.0", + "conventional-changelog-jquery": "^4.0.0", + "conventional-changelog-jshint": "^3.0.0", + "conventional-changelog-preset-loader": "^3.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-angular": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-angular/-/conventional-changelog-angular-6.0.0.tgz", + "integrity": "sha512-6qLgrBF4gueoC7AFVHu51nHL9pF9FRjXrH+ceVf7WmAfH3gs+gEYOkvxhjMPjZu57I4AGUGoNTY8V7Hrgf1uqg==", + "dev": true, + "license": "ISC", + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-atom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-atom/-/conventional-changelog-atom-3.0.0.tgz", + "integrity": "sha512-pnN5bWpH+iTUWU3FaYdw5lJmfWeqSyrUkG+wyHBI9tC1dLNnHkbAOg1SzTQ7zBqiFrfo55h40VsGXWMdopwc5g==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-codemirror": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-codemirror/-/conventional-changelog-codemirror-3.0.0.tgz", + "integrity": "sha512-wzchZt9HEaAZrenZAUUHMCFcuYzGoZ1wG/kTRMICxsnW5AXohYMRxnyecP9ob42Gvn5TilhC0q66AtTPRSNMfw==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-config-spec": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-config-spec/-/conventional-changelog-config-spec-2.1.0.tgz", + "integrity": "sha512-IpVePh16EbbB02V+UA+HQnnPIohgXvJRxHcS5+Uwk4AT5LjzCZJm5sp/yqs5C6KZJ1jMsV4paEV13BN1pvDuxQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/conventional-changelog-conventionalcommits": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-conventionalcommits/-/conventional-changelog-conventionalcommits-6.1.0.tgz", + "integrity": "sha512-3cS3GEtR78zTfMzk0AizXKKIdN4OvSh7ibNz6/DPbhWWQu7LqE/8+/GqSodV+sywUR2gpJAdP/1JFf4XtN7Zpw==", + "dev": true, + "license": "ISC", + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-core": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/conventional-changelog-core/-/conventional-changelog-core-5.0.2.tgz", + "integrity": "sha512-RhQOcDweXNWvlRwUDCpaqXzbZemKPKncCWZG50Alth72WITVd6nhVk9MJ6w1k9PFNBcZ3YwkdkChE+8+ZwtUug==", + "deprecated": "Deprecated and no longer maintained. Please use conventional-changelog instead.", + "dev": true, + "license": "MIT", + "dependencies": { + "add-stream": "^1.0.0", + "conventional-changelog-writer": "^6.0.0", + "conventional-commits-parser": "^4.0.0", + "dateformat": "^3.0.3", + "get-pkg-repo": "^4.2.1", + "git-raw-commits": "^3.0.0", + "git-remote-origin-url": "^2.0.0", + "git-semver-tags": "^5.0.0", + "normalize-package-data": "^3.0.3", + "read-pkg": "^3.0.0", + "read-pkg-up": "^3.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-ember": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-ember/-/conventional-changelog-ember-3.0.0.tgz", + "integrity": "sha512-7PYthCoSxIS98vWhVcSphMYM322OxptpKAuHYdVspryI0ooLDehRXWeRWgN+zWSBXKl/pwdgAg8IpLNSM1/61A==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-eslint": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-eslint/-/conventional-changelog-eslint-4.0.0.tgz", + "integrity": "sha512-nEZ9byP89hIU0dMx37JXQkE1IpMmqKtsaR24X7aM3L6Yy/uAtbb+ogqthuNYJkeO1HyvK7JsX84z8649hvp43Q==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-express": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-express/-/conventional-changelog-express-3.0.0.tgz", + "integrity": "sha512-HqxihpUMfIuxvlPvC6HltA4ZktQEUan/v3XQ77+/zbu8No/fqK3rxSZaYeHYant7zRxQNIIli7S+qLS9tX9zQA==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-jquery": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jquery/-/conventional-changelog-jquery-4.0.0.tgz", + "integrity": "sha512-TTIN5CyzRMf8PUwyy4IOLmLV2DFmPtasKN+x7EQKzwSX8086XYwo+NeaeA3VUT8bvKaIy5z/JoWUvi7huUOgaw==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-jshint": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-jshint/-/conventional-changelog-jshint-3.0.0.tgz", + "integrity": "sha512-bQof4byF4q+n+dwFRkJ/jGf9dCNUv4/kCDcjeCizBvfF81TeimPZBB6fT4HYbXgxxfxWXNl/i+J6T0nI4by6DA==", + "deprecated": "This preset is deprecated. Please use conventional-changelog-conventionalcommits or conventional-changelog-angular instead.", + "dev": true, + "license": "ISC", + "dependencies": { + "compare-func": "^2.0.0" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-preset-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-changelog-preset-loader/-/conventional-changelog-preset-loader-3.0.0.tgz", + "integrity": "sha512-qy9XbdSLmVnwnvzEisjxdDiLA4OmV3o8db+Zdg4WiFw14fP3B6XNz98X0swPPpkTd/pc1K7+adKgEDM1JCUMiA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-changelog-writer": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-6.0.1.tgz", + "integrity": "sha512-359t9aHorPw+U+nHzUXHS5ZnPBOizRxfQsWT5ZDHBfvfxQOAik+yfuhKXG66CN5LEWPpMNnIMHUTCKeYNprvHQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "conventional-commits-filter": "^3.0.0", + "dateformat": "^3.0.3", + "handlebars": "^4.7.7", + "json-stringify-safe": "^5.0.1", + "meow": "^8.1.2", + "semver": "^7.0.0", + "split": "^1.0.1" + }, + "bin": { + "conventional-changelog-writer": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-commits-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-filter/-/conventional-commits-filter-3.0.0.tgz", + "integrity": "sha512-1ymej8b5LouPx9Ox0Dw/qAO2dVdfpRFq28e5Y0jJEU8ZrLdy0vOSkkIInwmxErFGhg6SALro60ZrwYFVTUDo4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "lodash.ismatch": "^4.4.0", + "modify-values": "^1.0.1" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-commits-parser": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-4.0.0.tgz", + "integrity": "sha512-WRv5j1FsVM5FISJkoYMR6tPk07fkKT0UodruX4je86V4owk451yjXAKzKAPOs9l7y59E2viHUS9eQ+dfUA9NSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-text-path": "^1.0.1", + "JSONStream": "^1.3.5", + "meow": "^8.1.2", + "split2": "^3.2.2" + }, + "bin": { + "conventional-commits-parser": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/conventional-recommended-bump": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/conventional-recommended-bump/-/conventional-recommended-bump-7.0.1.tgz", + "integrity": "sha512-Ft79FF4SlOFvX4PkwFDRnaNiIVX7YbmqGU0RwccUaiGvgp3S0a8ipR2/Qxk31vclDNM+GSdJOVs2KrsUCjblVA==", + "dev": true, + "license": "MIT", + "dependencies": { + "concat-stream": "^2.0.0", + "conventional-changelog-preset-loader": "^3.0.0", + "conventional-commits-filter": "^3.0.0", + "conventional-commits-parser": "^4.0.0", + "git-raw-commits": "^3.0.0", + "git-semver-tags": "^5.0.0", + "meow": "^8.1.2" + }, + "bin": { + "conventional-recommended-bump": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/core-util-is": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", + "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/dargs": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/dargs/-/dargs-7.0.0.tgz", + "integrity": "sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/dateformat": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", + "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": "*" + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/decamelize-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/decamelize-keys/-/decamelize-keys-1.1.1.tgz", + "integrity": "sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==", + "dev": true, + "license": "MIT", + "dependencies": { + "decamelize": "^1.1.0", + "map-obj": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/decamelize-keys/node_modules/map-obj": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", + "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/detect-indent": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", + "integrity": "sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/detect-newline": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", + "integrity": "sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/dot-prop": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", + "integrity": "sha512-QM8q3zDe58hqUqjraQOmzZ1LIH9SWQJTlEKCH4kJ2oQvLZk7RbQXvtDM2XEq3fwkV9CCvvH4LA0AV+ogFsBM2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-obj": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/dotgitignore": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/dotgitignore/-/dotgitignore-2.1.0.tgz", + "integrity": "sha512-sCm11ak2oY6DglEPpCB8TixLjWAxd3kJTs6UIcSasNYxXdFPV+YKlye92c8H4kKFqV5qYMIh7d+cYecEg0dIkA==", + "dev": true, + "license": "ISC", + "dependencies": { + "find-up": "^3.0.0", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dotgitignore/node_modules/find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dotgitignore/node_modules/locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dotgitignore/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/dotgitignore/node_modules/p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/dotgitignore/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/dotnet-bump": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/dotnet-bump/-/dotnet-bump-2.0.0.tgz", + "integrity": "sha512-r1UBAwj9dxS/vyiC7NfI8YDyBpI6X4l1QTBGaxoe+yzhkytV5y/3NxcjzqpT1BLq4h0NA9oESnIcdVFU3Ckqzg==", + "license": "MIT", + "dependencies": { + "after": "0.8.2", + "assembly-source": "^1.0.0", + "common-roots": "0.0.2", + "glob": "^8.0.3", + "is-glob": "^4.0.1", + "json5": "^2.1.3", + "language-detect": "^1.1.0", + "minimist": "^1.2.0", + "once": "^1.4.0", + "parse-git-status": "^0.1.0", + "readable-stream": "^4.1.0", + "run-series": "^1.1.4", + "saxophonist": "^2.0.0", + "semver": "^7.3.2", + "vssln-parser": "0.1.4" + }, + "bin": { + "dotnet-bump": "cli.js" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/dotnet-bump/node_modules/readable-stream": { + "version": "4.8.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.8.0.tgz", + "integrity": "sha512-2jhTTU3Eilp/2DMT71gbcoqC35eQHasMJH0RHkYxwlxIv3+FR6Y5xAFZIwEGLxKkjZYEFlsiMNIdwUqjK2lLHQ==", + "license": "MIT", + "dependencies": { + "abort-controller": "^3.0.0", + "buffer": "^6.0.3", + "events": "^3.3.0", + "process": "^0.11.10", + "string_decoder": "^1.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==", + "license": "MIT" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/error-ex": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.4.tgz", + "integrity": "sha512-sqQamAnR14VgCr1A618A3sGrygcpK+HEbenA/HiEAkkUwcZIIB/tgWqHFxWgOyDh4nB4JCRimh79dR5Ywc9MDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, + "node_modules/es-errors": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz", + "integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/event-stream": { + "version": "3.3.5", + "resolved": "https://registry.npmjs.org/event-stream/-/event-stream-3.3.5.tgz", + "integrity": "sha512-vyibDcu5JL20Me1fP734QBH/kenBGLZap2n0+XXM7mvuUPzJ20Ydqj1aKcIeMdri1p+PU+4yAKugjN8KCVst+g==", + "license": "MIT", + "dependencies": { + "duplexer": "^0.1.1", + "from": "^0.1.7", + "map-stream": "0.0.7", + "pause-stream": "^0.0.11", + "split": "^1.0.1", + "stream-combiner": "^0.2.2", + "through": "^2.3.8" + } + }, + "node_modules/event-target-shim": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz", + "integrity": "sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ==", + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "license": "MIT", + "engines": { + "node": ">=0.8.x" + } + }, + "node_modules/expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", + "license": "MIT", + "dependencies": { + "homedir-polyfill": "^1.0.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "license": "MIT" + }, + "node_modules/fast-xml-builder": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/fast-xml-builder/-/fast-xml-builder-1.3.1.tgz", + "integrity": "sha512-pIM/1n3ntFXKYrUZwW7QCK0gAW7XY+wzj1YMIV3tLDvPj/V+zTGJK5e3/4WJfwj0qWw2ElNXiTixda/R+3YSug==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "path-expression-matcher": "^1.6.2", + "xml-naming": "^0.3.0" + } + }, + "node_modules/fast-xml-parser": { + "version": "5.12.0", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.12.0.tgz", + "integrity": "sha512-/pXxRBtwxY9w8z7YbgsvIPPcPvFDsTbIkWwTQJhzNJPokj+TbN6ftmcv4j/pEQDvOCNnKGDzuk5Bo2oogIOiFg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "@nodable/entities": "^3.1.0", + "fast-xml-builder": "^1.3.1", + "is-unsafe": "^2.0.3", + "path-expression-matcher": "^1.6.2", + "strnum": "^2.5.1", + "xml-naming": "^0.3.0" + }, + "bin": { + "fxparser": "src/cli/cli.js" + } + }, + "node_modules/figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-file-up": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/find-file-up/-/find-file-up-1.0.2.tgz", + "integrity": "sha512-spzIszRVDalArjm9/ZVRK1q9YW6WdX92RUIni/VqmhUqSvTkq6H+TgCarqvaJHOVt5fLpeIKJgb0L0pbCK2/9g==", + "license": "MIT", + "dependencies": { + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/from": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/from/-/from-0.1.7.tgz", + "integrity": "sha512-twe20eF1OxVxp/ML/kq2p1uc6KvFK/+vs8WjEbeKmV2He22MKm7YF2ANIt+EOqhJ5L3K/SuuPhk0hWQDjOM23g==", + "license": "MIT" + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "license": "ISC" + }, + "node_modules/function-bind": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", + "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-pkg-repo": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/get-pkg-repo/-/get-pkg-repo-4.2.1.tgz", + "integrity": "sha512-2+QbHjFRfGB74v/pYWjd5OhU3TDIC2Gv/YKUTk/tCvAz0pkn/Mz6P3uByuBimLOcPvN2jYdScl3xGFSrx0jEcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@hutson/parse-repository-url": "^3.0.0", + "hosted-git-info": "^4.0.0", + "through2": "^2.0.0", + "yargs": "^16.2.0" + }, + "bin": { + "get-pkg-repo": "src/cli.js" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-pkg-repo/node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/get-pkg-repo/node_modules/yargs": { + "version": "16.2.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.2.tgz", + "integrity": "sha512-Nt9ZJjXTv5R8MHbqby/wXQ6Gi0Bb3TcYZkR1bzuL4yB2OxWPkXknz513gEF0GoA6tn00UpbPvERW8rzCuWCA6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/git-raw-commits": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/git-raw-commits/-/git-raw-commits-3.0.0.tgz", + "integrity": "sha512-b5OHmZ3vAgGrDn/X0kS+9qCfNKWe4K/jFnhwzVWWg0/k5eLa3060tZShrRg8Dja5kPc+YjS0Gc6y7cRr44Lpjw==", + "deprecated": "Deprecated and no longer maintained. Use @conventional-changelog/git-client instead.", + "dev": true, + "license": "MIT", + "dependencies": { + "dargs": "^7.0.0", + "meow": "^8.1.2", + "split2": "^3.2.2" + }, + "bin": { + "git-raw-commits": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/git-remote-origin-url": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/git-remote-origin-url/-/git-remote-origin-url-2.0.0.tgz", + "integrity": "sha512-eU+GGrZgccNJcsDH5LkXR3PB9M958hxc7sbA8DFJjrv9j4L2P/eZfKhM+QD6wyzpiv+b1BpK0XrYCxkovtjSLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "gitconfiglocal": "^1.0.0", + "pify": "^2.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/git-semver-tags": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/git-semver-tags/-/git-semver-tags-5.0.1.tgz", + "integrity": "sha512-hIvOeZwRbQ+7YEUmCkHqo8FOLQZCEn18yevLHADlFPZY02KJGsu5FZt9YW/lybfK2uhWFI7Qg/07LekJiTv7iA==", + "deprecated": "Deprecated and no longer maintained. Use @conventional-changelog/git-client instead.", + "dev": true, + "license": "MIT", + "dependencies": { + "meow": "^8.1.2", + "semver": "^7.0.0" + }, + "bin": { + "git-semver-tags": "cli.js" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/gitconfiglocal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gitconfiglocal/-/gitconfiglocal-1.0.0.tgz", + "integrity": "sha512-spLUXeTAVHxDtKsJc8FkFVgFtMdEN9qPGpL23VfSHx4fP4+Ds097IXLvymbnDH8FnmxX5Nr9bPw3A+AQ6mWEaQ==", + "dev": true, + "license": "BSD", + "dependencies": { + "ini": "^1.3.2" + } + }, + "node_modules/glob": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-8.1.0.tgz", + "integrity": "sha512-r8hpEjiQEYlF2QU0df3dS+nxxSIreXQS1qRhMJM0Q5NDdR386C7jb7Hwwod8Fgiuex+k0GFjgft18yvxm5XoCQ==", + "deprecated": "Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me", + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^5.0.1", + "once": "^1.3.0" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob/node_modules/brace-expansion": { + "version": "2.1.7", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.1.7.tgz", + "integrity": "sha512-uZbew1NqdmPDTMJ8ah1y+b+9QEJrfkXFk3RcTQw3X0jW/xRUvFKsg1CfQdSYGdTbXZWExtU3J3ccxtnfw1Fi0g==", + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/glob/node_modules/minimatch": { + "version": "5.1.9", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.9.tgz", + "integrity": "sha512-7o1wEA2RyMP7Iu7GNba9vc0RWWGACJOCZBJX2GJWip0ikV+wcOsgVuY9uE8CPiyQhkGFSlhuSkZPavN7u1c2Fw==", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "license": "MIT", + "dependencies": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/handlebars": { + "version": "4.7.10", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.10.tgz", + "integrity": "sha512-P5VJMVM7qgBn6vjXMw8WG9uVI+ncf2pi72j4de4yz5ZULLj2RGqLYaKOYGsgyrViQ0tePOVlN1tDCCXXtFqXKg==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.8", + "neo-async": "^2.6.2", + "source-map": "^0.6.1", + "wordwrap": "^1.0.0" + }, + "bin": { + "handlebars": "bin/handlebars" + }, + "engines": { + "node": ">=0.4.7" + }, + "optionalDependencies": { + "uglify-js": "^3.1.4" + } + }, + "node_modules/hard-rejection": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", + "integrity": "sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/hasown": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.4.tgz", + "integrity": "sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "license": "MIT", + "dependencies": { + "parse-passwd": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/hosted-git-info": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", + "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", + "dev": true, + "license": "ISC", + "dependencies": { + "lru-cache": "^6.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "license": "ISC" + }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true, + "license": "MIT" + }, + "node_modules/is-core-module": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.18.0.tgz", + "integrity": "sha512-qyax9fgaKOEC4qK8WZn7Q4IcoZC9RC1O1fFxRcRTq/oMMkWT/uXpqpXa12kzWR409zAt1drYN9N9BO26UmBCmw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "license": "MIT", + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-obj/-/is-obj-2.0.0.tgz", + "integrity": "sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/is-options": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-options/-/is-options-1.0.2.tgz", + "integrity": "sha512-u+Ai74c8Q74aS8BuHwPdI1jptGOT1FQXgCq8/zv0xRuE+wRgSMEJLj8lVO8Zp9BeGb29BXY6AsNPinfqjkr7Fg==", + "license": "MIT", + "dependencies": { + "b4a": "^1.1.1" + } + }, + "node_modules/is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-text-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", + "integrity": "sha512-xFuJpne9oFz5qDaodwmmG08e3CawH/2ZV8Qqza1Ko7Sk8POWbkRdwIoAWVhqvq0XeUzANEhKo2n0IXUGBm7A/w==", + "dev": true, + "license": "MIT", + "dependencies": { + "text-extensions": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-unsafe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-unsafe/-/is-unsafe-2.0.3.tgz", + "integrity": "sha512-ZBllczCCO267vgdFb6Tq3pv+LhHaCiGMdr+ZsuL+OopruAg7S+3ZDs1vD0RPC0uSrkjzbraxaGjtX1YBxjPeFQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT" + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "license": "ISC" + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true, + "license": "MIT" + }, + "node_modules/json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", + "dev": true, + "license": "ISC" + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha512-POQXvpdL69+CluYsillJ7SUhKvytYjW9vG/GKpnf+xP8UWgYEM/RaMzHHofbALDiKbbP1W8UEYmgGl39WkPZsg==", + "dev": true, + "engines": [ + "node >= 0.2.0" + ], + "license": "MIT" + }, + "node_modules/JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + }, + "bin": { + "JSONStream": "bin.js" + }, + "engines": { + "node": "*" + } + }, + "node_modules/kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/language-classifier": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/language-classifier/-/language-classifier-0.0.1.tgz", + "integrity": "sha512-myU10NLx/dfATa7b0NJiycU4jlU15fMLcnfXYEO6NPMhH1vHYKMp9eoRZaQMDTu3bz25bD31Q9klsf26oOW1BQ==", + "dependencies": { + "classifier": "~0.1.0" + } + }, + "node_modules/language-detect": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/language-detect/-/language-detect-1.1.0.tgz", + "integrity": "sha512-2kXHOATTovlwlh1LJE21DLyGiuvX6bK8CYw9kEyui2FeNBV3EYD2OE9h1ChuWNGXe/TGcm7PqpK/32S614R1Kg==", + "license": "MIT", + "dependencies": { + "language-classifier": "0.0.1" + } + }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true, + "license": "MIT" + }, + "node_modules/load-json-file": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", + "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.1.2", + "parse-json": "^4.0.0", + "pify": "^3.0.0", + "strip-bom": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/load-json-file/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.ismatch": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz", + "integrity": "sha512-fPMfXjGQEV9Xsq/8MTSgUf255gawYRbjwMyDbcvDhXgV7enSZA0hynz6vMPnpAb5iONEzBHBPsT+0zes5Z301g==", + "dev": true, + "license": "MIT" + }, + "node_modules/lower-case": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", + "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", + "license": "MIT", + "dependencies": { + "tslib": "^2.0.3" + } + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/map-obj": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-4.3.0.tgz", + "integrity": "sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/map-stream": { + "version": "0.0.7", + "resolved": "https://registry.npmjs.org/map-stream/-/map-stream-0.0.7.tgz", + "integrity": "sha512-C0X0KQmGm3N2ftbTGBhSyuydQ+vV1LC3f3zPvT3RXHXNZrvfPZcoXp/N5DOa8vedX/rTMm2CjTtivFg2STJMRQ==", + "license": "MIT" + }, + "node_modules/meow": { + "version": "8.1.2", + "resolved": "https://registry.npmjs.org/meow/-/meow-8.1.2.tgz", + "integrity": "sha512-r85E3NdZ+mpYk1C6RjPFEMSE+s1iZMuHtsHAqY0DT3jZczl0diWUZ8g6oU7h0M9cD2EL+PzaYghhCLzR0ZNn5Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/minimist": "^1.2.0", + "camelcase-keys": "^6.2.2", + "decamelize-keys": "^1.1.0", + "hard-rejection": "^2.1.0", + "minimist-options": "4.1.0", + "normalize-package-data": "^3.0.0", + "read-pkg-up": "^7.0.1", + "redent": "^3.0.0", + "trim-newlines": "^3.0.0", + "type-fest": "^0.18.0", + "yargs-parser": "^20.2.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/meow/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/meow/node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/meow/node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=8" + } + }, + "node_modules/meow/node_modules/semver": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.3.tgz", + "integrity": "sha512-kM18BPOqTi0+TB68703/GJRpAML5Me+IDQsR1J26YB3EFKKNEyHIVZuWDX7+WKQB3tHwDwgk24BfhdpWUbytvQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/minimatch": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.5.tgz", + "integrity": "sha512-VgjWUsnnT6n+NUk6eZq77zeFdpW2LWDzP6zFGrCbHXiYNul5Dzqk2HHQ5uFH2DNW5Xbp8+jVzaeNt94ssEEl4w==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/minimist-options": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/minimist-options/-/minimist-options-4.1.0.tgz", + "integrity": "sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==", + "dev": true, + "license": "MIT", + "dependencies": { + "arrify": "^1.0.1", + "is-plain-obj": "^1.1.0", + "kind-of": "^6.0.3" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/minipass": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-7.1.3.tgz", + "integrity": "sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=16 || 14 >=14.17" + } + }, + "node_modules/mkdirp": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-3.0.1.tgz", + "integrity": "sha512-+NsyUUAZDmo6YVHzL/stxSu3t9YS1iljliy3BSDrXJ/dkn1KYdmtZODGGjLcc9XLgVVpH4KshHB8XmZgMhaBXg==", + "dev": true, + "license": "MIT", + "bin": { + "mkdirp": "dist/cjs/src/bin.js" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/modify-values": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", + "integrity": "sha512-xV2bxeN6F7oYjZWTe/YPAy6MN2M+sL4u/Rlm2AHCIVGfo2p1yGmBHQ6vHehl4bRTZBdHu3TSkWdYgkwpYzAGSw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true, + "license": "MIT" + }, + "node_modules/no-case": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", + "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", + "license": "MIT", + "dependencies": { + "lower-case": "^2.0.2", + "tslib": "^2.0.3" + } + }, + "node_modules/normalize-package-data": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-3.0.3.tgz", + "integrity": "sha512-p2W1sgqij3zMMyRC067Dg16bfzVH+w7hyegmpIvZ4JNjqtGOVAIvLmjBx3yP7YTe9vKJgkoNOPjwQGogDoMXFA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^4.0.1", + "is-core-module": "^2.5.0", + "semver": "^7.3.4", + "validate-npm-package-license": "^3.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/package-json-from-dist": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.1.tgz", + "integrity": "sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==", + "license": "BlueOak-1.0.0" + }, + "node_modules/parse-git-status": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/parse-git-status/-/parse-git-status-0.1.0.tgz", + "integrity": "sha512-ngjxaxWtYrNIDYUWrCDcSAgtai3sELojyTauZVMyawYf+J9Cd6BvGQ/clGXrpmmFXkXj81E5zbOkGt8afsb+dw==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/parse-json": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", + "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "error-ex": "^1.3.1", + "json-parse-better-errors": "^1.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/pascal-case": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", + "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", + "license": "MIT", + "dependencies": { + "no-case": "^3.0.4", + "tslib": "^2.0.3" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/path-expression-matcher": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/path-expression-matcher/-/path-expression-matcher-1.6.2.tgz", + "integrity": "sha512-enSlaiat05iasnzmgNxRj8reFdj3puY2QpNgP1aPIaVfT6nn9ICuPoFlKHk8EN22HcwewshO+mN2DGbkCEOtqQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/path-is-inside": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-is-inside/-/path-is-inside-1.0.2.tgz", + "integrity": "sha512-DUWJr3+ULp4zXmol/SZkFf3JGsS9/SIv+Y3Rt93/UjPpDpklB5f1er4O3POIbUuUJ3FXgqte2Q7SrU6zAqwk8w==", + "license": "(WTFPL OR MIT)" + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true, + "license": "MIT" + }, + "node_modules/path-scurry": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-3.0.0.tgz", + "integrity": "sha512-1pTbQqH1wIwMi/eleQ5leFTTCkzFsPcgXNjwOA8YGGW/W4/kHT3dssE7Z6NH+zuqNLOzOB0uaD61yl7cAcVhgg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "lru-cache": "^11.0.0", + "minipass": "^7.1.2" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/path-scurry/node_modules/lru-cache": { + "version": "11.5.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-11.5.3.tgz", + "integrity": "sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==", + "license": "BlueOak-1.0.0", + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/path-type": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz", + "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==", + "dev": true, + "license": "MIT", + "dependencies": { + "pify": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/path-type/node_modules/pify": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", + "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/pause-stream": { + "version": "0.0.11", + "resolved": "https://registry.npmjs.org/pause-stream/-/pause-stream-0.0.11.tgz", + "integrity": "sha512-e3FBlXLmN/D1S+zHzanP4E/4Z60oFAa3O051qt1pxa7DEJWKAyil6upYVXCWadEnuoqa4Pkc9oUx9zsxYeRv8A==", + "license": [ + "MIT", + "Apache2" + ], + "dependencies": { + "through": "~2.3" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==", + "license": "MIT", + "engines": { + "node": ">= 0.6.0" + } + }, + "node_modules/process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true, + "license": "MIT" + }, + "node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", + "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "load-json-file": "^4.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-3.0.0.tgz", + "integrity": "sha512-YFzFrVvpC6frF1sz8psoHDBGF7fLPc+llq/8NB43oagqWkx8ar5zYtsTORtOjw9W2RHLpWP+zTWwBvf1bCmcSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "find-up": "^2.0.0", + "read-pkg": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "locate-path": "^2.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-try": "^1.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", + "dev": true, + "license": "MIT", + "dependencies": { + "p-limit": "^1.1.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg-up/node_modules/path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/read-pkg/node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true, + "license": "ISC" + }, + "node_modules/read-pkg/node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "license": "BSD-2-Clause", + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/read-pkg/node_modules/semver": { + "version": "5.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.3.tgz", + "integrity": "sha512-kM18BPOqTi0+TB68703/GJRpAML5Me+IDQsR1J26YB3EFKKNEyHIVZuWDX7+WKQB3tHwDwgk24BfhdpWUbytvQ==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/redent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redent/-/redent-3.0.0.tgz", + "integrity": "sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==", + "dev": true, + "license": "MIT", + "dependencies": { + "indent-string": "^4.0.0", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/redis": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/redis/-/redis-6.3.1.tgz", + "integrity": "sha512-mV96ZKxQ4CGn3SyEGaY0Lb9YA443mdVey3c+mdr0NAUaBxiOZGoYCWX8PoM55kictSOmxlJRtZJxIsmZm3jL+w==", + "license": "MIT", + "dependencies": { + "@redis/bloom": "6.3.1", + "@redis/client": "6.3.1", + "@redis/json": "6.3.1", + "@redis/search": "6.3.1", + "@redis/time-series": "6.3.1" + }, + "engines": { + "node": ">= 20.0.0" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/resolve": { + "version": "1.22.14", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.14.tgz", + "integrity": "sha512-1ZjYvR9sbkiwC5+9QHetqW5HmA2pHRMaoupD01t2HlYnV/vydC2zPwLixhsMieSWVZt0JJRg5LVIk0Ow1D/TrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "is-core-module": "^2.18.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", + "license": "MIT", + "dependencies": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "6.1.4", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-6.1.4.tgz", + "integrity": "sha512-Fk3reQDVPZUMbEm7Zwxz03BWQMW3V5buSk9aU8OckTrO8A1nQtbqvYsAantGNermwsIsXcuOBqcoJ3HuMELctw==", + "license": "BlueOak-1.0.0", + "dependencies": { + "glob": "^14.0.3", + "package-json-from-dist": "^1.0.1" + }, + "bin": { + "rimraf": "dist/esm/bin.mjs" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/balanced-match": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-4.0.4.tgz", + "integrity": "sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==", + "license": "MIT", + "engines": { + "node": "18 || 20 || >=22" + } + }, + "node_modules/rimraf/node_modules/brace-expansion": { + "version": "5.0.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.12.tgz", + "integrity": "sha512-YovQ3rzhaLMIrDjNDMkNS01tea93qhEhG5xy8f6+R0l+dw3Ki+5sCoIoI942iuLZTHWogWktgwVDhU09iNEimQ==", + "license": "MIT", + "dependencies": { + "balanced-match": "^4.0.2" + }, + "engines": { + "node": "20 || >=22" + } + }, + "node_modules/rimraf/node_modules/glob": { + "version": "14.0.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-14.0.3.tgz", + "integrity": "sha512-A1vjIwC3qpdCso45Iw127gnp7sPhqgY8lUQhDrArIs+GbmfaaVPFuoyy7WyLT9EPZCRZ7j7aLdwUhQmHWesEow==", + "license": "BlueOak-1.0.0", + "dependencies": { + "minimatch": "^11.0.2", + "minipass": "^7.1.3", + "path-scurry": "^3.0.0" + }, + "engines": { + "node": "18 || 20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/rimraf/node_modules/minimatch": { + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-11.0.4.tgz", + "integrity": "sha512-/UJ1dEoVQTjPNDh6SGlUo+ueLMmoHTas4q+8yaAR/5t6nLAIiBDJtoYUh20IYleix7ehiQkgczb84PE3uzHkxg==", + "license": "BlueOak-1.0.0", + "dependencies": { + "@isaacs/nonrecursive-glob-match": "^1.0.3", + "brace-expansion": "^5.0.12" + }, + "engines": { + "node": "20 || >=22" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-series": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-series/-/run-series-1.1.9.tgz", + "integrity": "sha512-Arc4hUN896vjkqCYrUXquBFtRZdv1PfLbTYP71efP6butxyQ0kWpiNJyAgsxscmQg1cqvHY32/UCBzXedTpU2g==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/sax": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz", + "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } + }, + "node_modules/saxophonist": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/saxophonist/-/saxophonist-2.0.0.tgz", + "integrity": "sha512-giWxUqGm3VdFxO4LaD+BTgec8dEEmm8Ysh6hRHn4r3VOw4yoz7hfOZWPteFu7vSXdK2BY5qAXdcwtAeziRH5OQ==", + "license": "MIT", + "dependencies": { + "inherits": "^2.0.1", + "readable-stream": "^3.5.0", + "sax": "^1.1.4" + } + }, + "node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true, + "license": "CC-BY-3.0" + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.24", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.24.tgz", + "integrity": "sha512-cLS9TtWkIQFyLkJ3/5aFQAOHOSKTlOs/7WDut/XPSdjom1fJhUdkepeJAKXa9Y05+FabHd0sti+Et559vDtkpQ==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/split": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/split/-/split-1.0.1.tgz", + "integrity": "sha512-mTyOoPbrivtXnwnIxZRFYRrPNtEFKlpB2fvjSnCQUiAA6qAZzqwna5envK4uk6OIeP17CsdF3rSBGYVBsU0Tkg==", + "license": "MIT", + "dependencies": { + "through": "2" + }, + "engines": { + "node": "*" + } + }, + "node_modules/split2": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz", + "integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==", + "dev": true, + "license": "ISC", + "dependencies": { + "readable-stream": "^3.0.0" + } + }, + "node_modules/stream-combiner": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/stream-combiner/-/stream-combiner-0.2.2.tgz", + "integrity": "sha512-6yHMqgLYDzQDcAkL+tjJDC5nSNuNIx0vZtRZeiPh7Saef7VHX9H5Ijn9l2VIol2zaNYlYEX6KyuT/237A58qEQ==", + "license": "MIT", + "dependencies": { + "duplexer": "~0.1.1", + "through": "~2.3.4" + } + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strnum": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.5.1.tgz", + "integrity": "sha512-UM4nTLWzQiDBseVxUGxN0wJzIk0UU89Qi7pKXz9qISo+lhviJikTuikBsK/oFRlpvYHvSdz0TVoLyQ+sEpYwxA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "dependencies": { + "anynum": "^1.0.1" + } + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/text-extensions": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", + "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10" + } + }, + "node_modules/through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==", + "license": "MIT" + }, + "node_modules/through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + }, + "node_modules/through2/node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "license": "MIT", + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "node_modules/through2/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true, + "license": "MIT" + }, + "node_modules/through2/node_modules/string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.1.0" + } + }, + "node_modules/trim-newlines": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-3.0.1.tgz", + "integrity": "sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "license": "0BSD" + }, + "node_modules/type-fest": { + "version": "0.18.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.18.1.tgz", + "integrity": "sha512-OIAYXk8+ISY+qTOwkHtKqzAuxchoMiD9Udx+FSGQDuiRR+PJKJHc2NJAXlbhkGwTt/4/nKZxELY1w3ReWOL8mw==", + "dev": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/uglify-js": { + "version": "3.19.3", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.19.3.tgz", + "integrity": "sha512-v3Xu+yuwBXisp6QYTcH4UbH+xYJXqnq2m/LtQVWKWzYc1iehYnLixoQDN9FH6/j9/oybfd6W9Ghwkl8+UMKTKQ==", + "dev": true, + "license": "BSD-2-Clause", + "optional": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/underscore": { + "version": "1.13.8", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.8.tgz", + "integrity": "sha512-DXtD3ZtEQzc7M8m4cXotyHR+FAS18C64asBYY5vqZexfYryNNnDc02W4hKg3rdQuqOYas1jkseX0+nZXjTXnvQ==", + "license": "MIT" + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "license": "MIT" + }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "node_modules/vssln-parser": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/vssln-parser/-/vssln-parser-0.1.4.tgz", + "integrity": "sha512-5t0IDc03/pKFY1iC5LTv0DLQgvo5Oa9e9FoqvuyisJwqxH4FepzcSen+/xmaBMsZNjKWzKnIpMeFzKQiL7TpWA==", + "deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.", + "license": "MIT", + "dependencies": { + "camelcase": "^3.0.0", + "event-stream": "^3.3.4", + "extend": "^3.0.0" + } + }, + "node_modules/vssln-parser/node_modules/camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha512-4nhGqUkc4BqbBBB4Q6zLuD7lzzrHYrjKGeYaEji/3tFR5VdJu9v+LilhGIVe8wxEJPPOeWo7eg8dwY13TZ1BNg==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "license": "ISC", + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "which": "bin/which" + } + }, + "node_modules/wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "license": "ISC" + }, + "node_modules/xml-naming": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/xml-naming/-/xml-naming-0.3.0.tgz", + "integrity": "sha512-ghig2TBE/H11aOVgmahA3MhimvkBr6JIYknH/Dhdk10nXwdbIqBJsbfMxpvFPG8bAw77gN29aQWvKpmVoPlvPQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/NaturalIntelligence" + } + ], + "license": "MIT", + "engines": { + "node": ">=16.0.0" + } + }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true, + "license": "ISC" + }, + "node_modules/yaml": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.1.tgz", + "integrity": "sha512-3NxN8+78OdzbT7C/WjGsyfPAtJaN3FNDsWxv7Y7mcDsT/oOmgW8BpyQQFFBnvZE3j9Y2Sdz1ULFLezL7Eb2yFw==", + "dev": true, + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, + "node_modules/yargs": { + "version": "17.7.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.3.tgz", + "integrity": "sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs/node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/cmf-codereview/scripts/publish-release.sh b/cmf-codereview/scripts/publish-release.sh new file mode 100644 index 0000000..7a8a0f9 --- /dev/null +++ b/cmf-codereview/scripts/publish-release.sh @@ -0,0 +1,52 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +if [[ "${CODE_REVIEW_PUBLISH_ENABLED:-false}" != true ]]; then + echo "Publishing is blocked until the RepoFlow upload limit is resolved." >&2 + exit 1 +fi +if [[ -z "${NODE_AUTH_TOKEN:-}" ]]; then + echo "REPOFLOW_NPM_TOKEN must be configured on the release environment." >&2 + exit 1 +fi + +spec="@criticalmanufacturing/codereview@$RELEASE_VERSION" +metadata_file="$(mktemp)" +tags_file="$(mktemp)" +cleanup() { + local status=$? + trap - EXIT + rm -f -- "$metadata_file" "$tags_file" + exit "$status" +} +trap cleanup EXIT + +case "$RELEASE_CHANNEL" in + next) + archive="$(node scripts/release.mjs archive release "$RELEASE_VERSION" "$GITHUB_SHA")" + lookup_status=0 + npm view "$spec" version --json --registry="$RELEASE_REGISTRY" > "$metadata_file" || lookup_status=$? + if (( lookup_status == 0 )); then + echo "This version already exists. Choose a new version; published packages are not overwritten." >&2 + exit 1 + fi + node scripts/release.mjs unpublished "$metadata_file" + npm publish "release/$archive" --tag next --registry="$RELEASE_REGISTRY" + npm view "$spec" version dist.integrity --json --registry="$RELEASE_REGISTRY" > "$metadata_file" + expected_integrity="$(node -p 'JSON.parse(require("fs").readFileSync("release/manifest.json", "utf8")).integrity')" + node scripts/release.mjs registry "$metadata_file" "$RELEASE_VERSION" "$expected_integrity" + ;; + latest) + npm view "$spec" version dist.integrity --json --registry="$RELEASE_REGISTRY" > "$metadata_file" + npm view @criticalmanufacturing/codereview dist-tags --json --registry="$RELEASE_REGISTRY" > "$tags_file" + node scripts/release.mjs promotion "$metadata_file" "$tags_file" "$RELEASE_VERSION" + npm dist-tag add "$spec" latest --registry="$RELEASE_REGISTRY" + npm view @criticalmanufacturing/codereview dist-tags --json --registry="$RELEASE_REGISTRY" > "$tags_file" + node -e 'const fs=require("fs"); const tags=JSON.parse(fs.readFileSync(process.argv[1],"utf8")); if(tags.latest!==process.argv[2]) throw new Error("latest tag verification failed");' "$tags_file" "$RELEASE_VERSION" + ;; + *) + echo "Release channel must be next or latest." >&2 + exit 1 + ;; +esac +printf 'Released %s with tag %s\n' "$spec" "$RELEASE_CHANNEL" diff --git a/cmf-codereview/scripts/release.mjs b/cmf-codereview/scripts/release.mjs new file mode 100644 index 0000000..aa2ca48 --- /dev/null +++ b/cmf-codereview/scripts/release.mjs @@ -0,0 +1,177 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { appendFileSync, readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { pathToFileURL } from "node:url"; + +export const packageName = "@criticalmanufacturing/codereview"; +export const runtimes = ["win-x64", "linux-x64", "osx-x64"]; + +export function validateVersion(version) { + assert.equal(typeof version, "string", "An exact package version is required"); + const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(version); + assert.ok(match && version.length <= 100, "Use an exact SemVer without a v prefix or build metadata"); + for (const identifier of (match[4] || "").split(".")) { + assert.ok(!/^\d+$/.test(identifier) || identifier === "0" || !identifier.startsWith("0"), + "Numeric prerelease identifiers cannot have leading zeroes"); + } + return version; +} + +export function validateBuildUrl(value) { + const url = new URL(value); + assert.equal(url.origin, "https://dev.azure.com", "Use the Micron Azure DevOps build URL"); + assert.match(url.pathname, /^\/criticalmanufacturing\/(?:Micron|158158e7-e373-4c78-8228-02969c06e7b0)\/_build\/results\/?$/i); + assert.match(url.searchParams.get("buildId") || "", /^[1-9]\d*$/, "A Micron build ID is required"); + assert.ok(!url.username && !url.password && !url.hash, "Invalid build URL"); + return url.toString(); +} + +export function planRelease({ channel, version, enabled, buildUrl, ref }) { + assert.ok(["next", "latest"].includes(channel), "Channel must be next or latest"); + validateVersion(version); + if (channel === "latest") { + assert.equal(enabled, "true", "Publishing is blocked until the RepoFlow upload limit is resolved"); + assert.equal(ref, "refs/heads/main", "Promote latest only from the main workflow"); + validateBuildUrl(buildUrl); + } + return { channel, version, publish: enabled === "true" }; +} + +export function requireReviewers(environment) { + assert.ok(environment.protection_rules?.some(rule => + rule.type === "required_reviewers" && rule.reviewers?.length > 0), + "Configure required reviewers on the repoflow-latest environment before enabling promotion"); +} + +function json(file) { return JSON.parse(readFileSync(file, "utf8").replace(/^\uFEFF/, "")); } +function integrity(file) { return "sha512-" + createHash("sha512").update(readFileSync(file)).digest("base64"); } + +export function preparePackage(directory, version) { + validateVersion(version); + const manifestPath = path.join(directory, "npm/package.json"); + const manifest = json(manifestPath); + assert.equal(manifest.name, packageName); + const projectPath = path.join(directory, "src/cmf-codereview.csproj"); + const project = readFileSync(projectPath, "utf8"); + assert.equal((project.match(/[^<]*<\/Version>/g) || []).length, 1, "Expected one project Version"); + manifest.version = version; + writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n"); + writeFileSync(projectPath, project.replace(/[^<]*<\/Version>/, "" + version + "")); +} + +export function createManifest(directory, commit) { + assert.match(commit, /^[0-9a-f]{40}$/, "A source commit is required"); + const pack = json(path.join(directory, "release/pack.json")); + assert.equal(pack.length, 1, "Expected one npm archive"); + const entry = pack[0]; + const manifest = json(path.join(directory, "npm/package.json")); + assert.equal(entry.name, packageName); + assert.equal(entry.version, manifest.version); + validateVersion(entry.version); + assert.equal(path.basename(entry.filename), entry.filename, "Invalid archive filename"); + assert.ok(entry.filename.endsWith(".tgz")); + for (const rid of runtimes) { + const executable = "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : ""); + assert.ok(entry.files?.some(file => file.path === executable), "Archive is missing " + executable); + } + const archive = path.join(directory, "release", entry.filename); + assert.equal(entry.integrity, integrity(archive), "Archive integrity mismatch"); + const result = { + schemaVersion: 1, name: packageName, version: entry.version, commit, + file: entry.filename, integrity: entry.integrity, size: entry.size, runtimes + }; + writeFileSync(path.join(directory, "release/manifest.json"), JSON.stringify(result, null, 2) + "\n"); + return result; +} + +export function verifyArchive(directory, version, commit) { + const manifest = json(path.join(directory, "manifest.json")); + assert.equal(manifest.schemaVersion, 1); + assert.equal(manifest.name, packageName); + assert.equal(manifest.version, validateVersion(version)); + if (commit) assert.equal(manifest.commit, commit); + assert.equal(path.basename(manifest.file), manifest.file); + assert.ok(manifest.file.endsWith(".tgz")); + assert.equal(integrity(path.join(directory, manifest.file)), manifest.integrity, "Archive was changed"); + assert.deepEqual(manifest.runtimes, runtimes); + return manifest; +} + +export function verifyRegistry(metadata, version, expectedIntegrity) { + assert.equal(metadata.version, validateVersion(version), "Registry version mismatch"); + const actual = metadata.dist?.integrity || metadata["dist.integrity"]; + assert.match(actual || "", /^sha512-[A-Za-z0-9+/]+={0,2}$/, "Registry SHA-512 integrity is missing"); + if (expectedIntegrity) assert.equal(actual, expectedIntegrity, "Published package differs from tested archive"); + return actual; +} + +export function verifyPromotion(metadata, tags, version) { + verifyRegistry(metadata, version); + assert.equal(tags.next, version, "Only the currently published next candidate can be promoted"); +} + +function output(name, value) { + if (process.env.GITHUB_OUTPUT) appendFileSync(process.env.GITHUB_OUTPUT, name + "=" + value + "\n"); +} +function summary(text) { + if (process.env.GITHUB_STEP_SUMMARY) appendFileSync(process.env.GITHUB_STEP_SUMMARY, text + "\n"); + console.log(text); +} + +async function main(command, ...args) { + const env = process.env; + switch (command) { + case "plan": { + const plan = planRelease({ channel: env.RELEASE_CHANNEL, version: env.RELEASE_VERSION, + enabled: env.CODE_REVIEW_PUBLISH_ENABLED, buildUrl: env.MICRON_BUILD_URL, ref: env.GITHUB_REF }); + output("version", plan.version); + output("publish", String(plan.publish)); + summary("Version: " + plan.version + "; channel: " + plan.channel + + (plan.publish ? "" : "\nPublishing is DISABLED. This run only builds and tests the archive.")); + if (plan.channel === "latest") summary("Micron integration run to review before approval: " + validateBuildUrl(env.MICRON_BUILD_URL)); + break; + } + case "check-approval": { + const response = await fetch("https://api.github.com/repos/criticalmanufacturing/cli-plugins/environments/repoflow-latest", { + headers: { authorization: "Bearer " + env.GITHUB_TOKEN, accept: "application/vnd.github+json", + "X-GitHub-Api-Version": "2022-11-28" }, signal: AbortSignal.timeout(20000) + }); + assert.ok(response.ok, "Cannot inspect repoflow-latest required reviewers: HTTP " + response.status); + requireReviewers(await response.json()); + break; + } + case "prepare": preparePackage(process.cwd(), args[0]); break; + case "manifest": { + const manifest = createManifest(process.cwd(), env.GITHUB_SHA); + summary("Built " + manifest.file + " (" + manifest.size + " bytes), including Windows, Linux and macOS x64.\nIntegrity: " + manifest.integrity); + break; + } + case "archive": { + const manifest = verifyArchive(args[0], args[1], args[2]); + output("archive", manifest.file); + console.log(manifest.file); + break; + } + case "unpublished": + assert.equal(json(args[0]).error?.code, "E404", "Registry lookup failed; only a confirmed E404 allows publication"); + break; + case "registry": verifyRegistry(json(args[0]), args[1], args[2]); break; + case "promotion": + verifyPromotion(json(args[0]), json(args[1]), args[2]); + break; + case "smoke": { + const findings = json(args[0]); + assert.ok(Array.isArray(findings) && findings.some(finding => finding.Rule === "LoadInsideLoop"), + "The installed package did not scan the fixture correctly"); + const version = readFileSync(args[1], "utf8").trim(); + assert.ok(version.split(/\s+/).includes(args[2]), "Installed executable reports an unexpected version: " + version); + break; + } + default: throw new Error("Unknown release command: " + command); + } +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + main(...process.argv.slice(2)).catch(error => { console.error(error.message); process.exitCode = 1; }); +} diff --git a/cmf-codereview/scripts/release.test.mjs b/cmf-codereview/scripts/release.test.mjs new file mode 100644 index 0000000..022cd2d --- /dev/null +++ b/cmf-codereview/scripts/release.test.mjs @@ -0,0 +1,79 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import os from "node:os"; +import path from "node:path"; +import { createManifest, packageName, planRelease, preparePackage, requireReviewers, runtimes, + validateBuildUrl, validateVersion, verifyArchive, verifyPromotion, verifyRegistry } from "./release.mjs"; + +const buildUrl = "https://dev.azure.com/criticalmanufacturing/Micron/_build/results?buildId=12345"; +const commit = "a".repeat(40); +const sha = "sha512-" + createHash("sha512").update("archive").digest("base64"); + +test("versions reject ranges, shell input and ambiguous normalization", () => { + for (const value of ["1.0.1", "2.0.0-rc.1"]) assert.equal(validateVersion(value), value); + for (const value of ["latest", "^1.0.0", "v1.0.0", "01.0.0", "1.0.0-01", "1.0.0+build", "1.0.0; echo bad", "1.0.0\n"]) + assert.throws(() => validateVersion(value), value); +}); +test("disabled publishing permits a next archive build", () => { + assert.equal(planRelease({ channel: "next", version: "1.0.1", enabled: "", ref: "refs/heads/feature" }).publish, false); +}); +test("disabled publishing always blocks latest", () => { + assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "false", ref: "refs/heads/main", buildUrl }), /blocked/); +}); +test("latest needs main and a Micron build URL", () => { + assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/feature", buildUrl }), /main/); + assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl: "" })); + assert.equal(planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl }).publish, true); +}); +test("test evidence links target the expected Azure project", () => { + assert.equal(validateBuildUrl(buildUrl), buildUrl); + for (const value of ["https://example.com/?buildId=123", buildUrl.replace("Micron", "Other"), buildUrl.replace("12345", "bad")]) + assert.throws(() => validateBuildUrl(value)); +}); +test("promotion requires configured manual reviewers", () => { + assert.throws(() => requireReviewers({}), /required reviewers/); + assert.throws(() => requireReviewers({ protection_rules: [{ type: "required_reviewers", reviewers: [] }] })); + requireReviewers({ protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User" }] }] }); +}); +test("promotion matches the existing next candidate and registry integrity", () => { + verifyPromotion({ version: "1.0.1", "dist.integrity": sha }, { next: "1.0.1", latest: "1.0.0" }, "1.0.1"); + assert.throws(() => verifyPromotion({ version: "1.0.1", "dist.integrity": sha }, { next: "1.0.2" }, "1.0.1")); + assert.throws(() => verifyPromotion({ version: "1.0.1" }, { next: "1.0.1" }, "1.0.1")); +}); +test("published bytes and version match the tested package", () => { + verifyRegistry({ version: "1.0.1", dist: { integrity: sha } }, "1.0.1", sha); + assert.throws(() => verifyRegistry({ version: "1.0.2", "dist.integrity": sha }, "1.0.1", sha)); + assert.throws(() => verifyRegistry({ version: "1.0.1", "dist.integrity": sha }, "1.0.1", "different")); +}); +test("stamping aligns npm and dotnet versions without changing dependencies", t => { + const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-release-")); + t.after(() => rmSync(dir, { recursive: true, force: true })); + mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "src")); + writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.0.0-alpha", dependencies: { debug: "^4.4.3" } })); + writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), "1.0.0-alpha"); + preparePackage(dir, "1.0.1"); + const pkg = JSON.parse(readFileSync(path.join(dir, "npm/package.json"), "utf8")); + assert.equal(pkg.version, "1.0.1"); + assert.deepEqual(pkg.dependencies, { debug: "^4.4.3" }); + assert.match(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8"), /1.0.1<\/Version>/); +}); +test("archives require all platforms and reject corruption", t => { + const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-archive-")); + t.after(() => rmSync(dir, { recursive: true, force: true })); + mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "release")); + writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.0.1" })); + const pack = [{ name: packageName, version: "1.0.1", filename: "candidate.tgz", integrity: sha, size: 7, + files: runtimes.map(rid => ({ path: "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : "") })) }]; + writeFileSync(path.join(dir, "release/candidate.tgz"), "archive"); + const packFile = path.join(dir, "release/pack.json"); + writeFileSync(packFile, JSON.stringify(pack)); + createManifest(dir, commit); + verifyArchive(path.join(dir, "release"), "1.0.1", commit); + assert.throws(() => verifyArchive(path.join(dir, "release"), "1.0.1", "b".repeat(40))); + pack[0].files.pop(); writeFileSync(packFile, JSON.stringify(pack)); + assert.throws(() => createManifest(dir, commit), /missing dist\/osx-x64/); + writeFileSync(path.join(dir, "release/candidate.tgz"), "corrupt"); + assert.throws(() => verifyArchive(path.join(dir, "release"), "1.0.1", commit), /changed/); +}); diff --git a/cmf-codereview/scripts/smoke-package.sh b/cmf-codereview/scripts/smoke-package.sh new file mode 100644 index 0000000..ee57d7c --- /dev/null +++ b/cmf-codereview/scripts/smoke-package.sh @@ -0,0 +1,36 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +release_dir="$1" +version="$2" +helper="$(pwd)/scripts/release.mjs" +archive="$(node "$helper" archive "$release_dir" "$version")" +install_dir="$(mktemp -d)" +cleanup() { + local status=$? + trap - EXIT + rm -rf -- "$install_dir" + exit "$status" +} +trap cleanup EXIT + +npm install --prefix "$install_dir" "$release_dir/$archive" --registry=https://registry.npmjs.org/ --no-audit --no-fund +cd "$install_dir" +mkdir -p fixture/src +printf '%s\n' '{"packageType":"Data","contentToPack":[{"source":"src/*","target":"DeeRules","contentType":"DEE"}]}' > fixture/cmfpackage.json +cat > fixture/src/Example.cs <<'CS' +class Example +{ + void Run(System.Collections.Generic.IEnumerable items) + { + foreach (var item in items) + { + item.Load(); + } + } +} +CS +node node_modules/@criticalmanufacturing/codereview/run.js --version > installed-version.txt +node node_modules/@criticalmanufacturing/codereview/run.js scan \ + --repository-root "$install_dir/fixture" --roots src --output "$install_dir/findings.json" +node "$helper" smoke "$install_dir/findings.json" "$install_dir/installed-version.txt" "$version" From 5925f114c9f8516daf9c66ba5e603628ab0fa2b5 Mon Sep 17 00:00:00 2001 From: Guilherme Cota <1190640@isep.ipp.pt> Date: Fri, 6 Nov 2026 16:57:35 +0000 Subject: [PATCH 2/5] refactor(codereview): use generic project names in shared code and docs --- cmf-codereview/docs/commands.md | 6 +++--- cmf-codereview/docs/rules.md | 7 ++++--- cmf-codereview/src/CodeReviewPaths.cs | 2 +- cmf-codereview/src/Rules/ProcessRuleValidationRule.cs | 2 +- cmf-codereview/tests/CmCallGraphBuilderTests.cs | 2 +- cmf-codereview/tests/CodeReviewPathsTests.cs | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/cmf-codereview/docs/commands.md b/cmf-codereview/docs/commands.md index 85882ea..4321cb7 100644 --- a/cmf-codereview/docs/commands.md +++ b/cmf-codereview/docs/commands.md @@ -40,7 +40,7 @@ metadata the CM Framework build/pack tooling reads: sibling subfolders as Orchestration roots. - Every manifest with `"packageType": "Data"` contributes a DEE root for each `contentToPack` entry whose `"contentType": "DEE"`, resolved from that entry's own `source` glob (e.g. `"DEEs/*"` under - the manifest's directory) — so both the nested Micron-style `Cmf..Data.Packages/DEEs` shape + the manifest's directory) — so both the nested `Cmf..Data.Packages/DEEs` shape and a flat `Cmf..Data/DEEs` shape resolve correctly, and a repository with more than one Data package (e.g. a Tests package bundling its own DEE fixtures) gets every one of them. @@ -222,10 +222,10 @@ a separately configured consumer; no pipeline generation or scaffolding is perfo ## Reviewing Process Rules Process Rule diagnostics run automatically as part of the DEEs/Both scope. No guideline file -or additional validation flag is required. To focus on the Micron deployment rules: +or additional validation flag is required. To focus on a customization project's deployment rules: ```powershell -cmf-codereview scan --repository-root C:\workspaces\Micron --roots Cmf.Custom.Data/Cmf.Custom.Data.Packages/DEEs/ProcessRules --fail-on High --output findings.json +cmf-codereview scan --repository-root C:\workspaces\Project --roots Cmf.Custom.Data/Cmf.Custom.Data.Packages/DEEs/ProcessRules --fail-on High --output findings.json cmf-codereview report --findings-path findings.json --report-mode Detailed --report-format Html --report-path process-rules.html ``` diff --git a/cmf-codereview/docs/rules.md b/cmf-codereview/docs/rules.md index dee86ba..e90815e 100644 --- a/cmf-codereview/docs/rules.md +++ b/cmf-codereview/docs/rules.md @@ -101,9 +101,10 @@ Guards recognize `HasProperty`, `TryGetEntityTypeProperty`, `ObjectExists`, `Try negation/comparisons, applicable branches, and early returns. Checks on another property or target do not protect an operation. Reachable local functions are analyzed, including guards at their call sites; dormant local functions and callbacks are excluded. Raw metadata changes recognize -`GenerateSchema` and `GenerateEntityTypeDBSchema` after the update. The normal -`IMicronEntityTypeService.UpdateEntityTypeProperties` route does not require a duplicate schema -call. A guarded removal followed by recreation supports deliberate attribute-definition repairs; +`GenerateSchema` and `GenerateEntityTypeDBSchema` after the update. The supported +`UpdateEntityTypeProperties` helper pattern is treated as schema-aware and does not require a +duplicate schema call; verify that the project's helper performs regeneration. A guarded removal +followed by recreation supports deliberate attribute-definition repairs; the removal still needs value cleanup. Schema context is read once per scan from the same Data package's versioned MasterData. It tracks diff --git a/cmf-codereview/src/CodeReviewPaths.cs b/cmf-codereview/src/CodeReviewPaths.cs index a3a7a05..a173194 100644 --- a/cmf-codereview/src/CodeReviewPaths.cs +++ b/cmf-codereview/src/CodeReviewPaths.cs @@ -35,7 +35,7 @@ private record PackageManifest(string Directory, string? PackageType, List<(stri // File-classification regexes are structural (any "Cmf..Business/Cmf..Orchestration/" // shaped segment matches), not tied to the literal "Custom" project name -- so a customization // project using any other name (e.g. "Cmf.Semi.*") is classified correctly. Both the nested - // Micron-style DEEs path (Cmf..Data/Cmf..Data.Packages/DEEs) and the flatter convention + // nested DEEs path (Cmf..Data/Cmf..Data.Packages/DEEs) and the flatter convention // (Cmf..Data/DEEs) are matched. Kept independent of manifest-based root discovery -- these // classify individual files by shape, not by resolving package metadata. private static readonly Regex OrchestrationSegmentRegex = diff --git a/cmf-codereview/src/Rules/ProcessRuleValidationRule.cs b/cmf-codereview/src/Rules/ProcessRuleValidationRule.cs index 25db153..808d91a 100644 --- a/cmf-codereview/src/Rules/ProcessRuleValidationRule.cs +++ b/cmf-codereview/src/Rules/ProcessRuleValidationRule.cs @@ -177,7 +177,7 @@ private static RuleMatch MutationMatch(ProcessRuleSyntax syntax, InvocationExpre private static RuleMatch SchemaMatch(SyntaxNode node, string target) => Match("ProcessRuleSchemaRegeneration", node, Severity.High, $"Raw entity-type property update for '{target}' has no recognized subsequent schema regeneration on the same execution path.", - "Call GenerateEntityTypeDBSchema for the same entity type or its GenerateSchema method after the update. IMicronEntityTypeService.UpdateEntityTypeProperties already handles regeneration."); + "Call GenerateEntityTypeDBSchema for the same entity type or its GenerateSchema method after the update. For UpdateEntityTypeProperties, verify that the project's helper handles schema regeneration."); private static bool IsSchemaCall(InvocationExpressionSyntax call, string target) => Name(call) == "GenerateSchema" && Tokens(Receiver(call)) == target || diff --git a/cmf-codereview/tests/CmCallGraphBuilderTests.cs b/cmf-codereview/tests/CmCallGraphBuilderTests.cs index 769fe3f..7dc4981 100644 --- a/cmf-codereview/tests/CmCallGraphBuilderTests.cs +++ b/cmf-codereview/tests/CmCallGraphBuilderTests.cs @@ -165,7 +165,7 @@ public void Run() [Fact] public void BuildCallGraph_MemberAccessCallMatchingOnlyALocalFunctionName_GetsNoCallerEdge() { - // Regression for the real Micron-1 case: a platform call + // Regression for a platform call that was mistaken for a local helper: // _exceptionOrchestration.OpenProtocolInstance(...) was misbound to a same-named DEE-LOCAL // function, fabricating a caller-loop chain. A receiver.Method() call can never target a // local function (local functions are called by bare name), so the name must not be a target. diff --git a/cmf-codereview/tests/CodeReviewPathsTests.cs b/cmf-codereview/tests/CodeReviewPathsTests.cs index 38016fd..d6f2778 100644 --- a/cmf-codereview/tests/CodeReviewPathsTests.cs +++ b/cmf-codereview/tests/CodeReviewPathsTests.cs @@ -139,7 +139,7 @@ public void ResolveRoots_NonCustomProjectPrefix_DiscoversRootsFromPackageManifes [Fact] public void ResolveRoots_NonCustomProjectPrefix_NestedDataPackagesShape_IsAlsoDiscovered() { - // The Micron-style nested shape (Cmf..Data/Cmf..Data.Packages/DEEs) under a + // The nested shape (Cmf..Data/Cmf..Data.Packages/DEEs) under a // non-"Custom" project name -- the DEE root comes from the manifest's own contentToPack source, // so both DEEs conventions resolve without any special-casing. var packagesDir = Path.Combine(_tempRoot, "Cmf.Foo.Data", "Cmf.Foo.Data.Packages"); From 3ff7ebee78819a6df202c2c8f0311e9421d792e8 Mon Sep 17 00:00:00 2001 From: Guilherme Cota <1190640@isep.ipp.pt> Date: Fri, 6 Nov 2026 17:00:47 +0000 Subject: [PATCH 3/5] refactor(codereview): generalize release integration configuration --- .github/workflows/Release-CodeReview.yml | 12 ++++++------ cmf-codereview/README.md | 2 +- cmf-codereview/docs/Releases.md | 18 +++++++++--------- cmf-codereview/scripts/release.mjs | 10 +++++----- cmf-codereview/scripts/release.test.mjs | 12 ++++++++---- 5 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.github/workflows/Release-CodeReview.yml b/.github/workflows/Release-CodeReview.yml index 1fbe15f..58822e1 100644 --- a/.github/workflows/Release-CodeReview.yml +++ b/.github/workflows/Release-CodeReview.yml @@ -19,8 +19,8 @@ on: description: "Exact version, e.g. 1.0.1; publish it as next first" required: true type: string - micron_build_url: - description: "For latest: successful Micron PR-Changes build testing this exact version" + integration_build_url: + description: "For latest: successful integration build testing this exact version" required: false type: string @@ -35,7 +35,7 @@ concurrency: env: RELEASE_CHANNEL: ${{ inputs.channel || 'next' }} RELEASE_VERSION: ${{ inputs.version || format('0.0.0-ci.{0}.{1}', github.run_id, github.run_attempt) }} - MICRON_BUILD_URL: ${{ inputs.micron_build_url }} + INTEGRATION_BUILD_URL: ${{ inputs.integration_build_url }} RELEASE_REGISTRY: ${{ vars.REPOFLOW_NPM_REGISTRY || 'https://cm-collaborationhub.io/api/npm/2305290000030000002/dev/' }} # This switch remains off until the archive upload limit has been resolved. CODE_REVIEW_PUBLISH_ENABLED: ${{ github.event_name == 'workflow_dispatch' && vars.CODE_REVIEW_PUBLISH_ENABLED == 'true' && 'true' || 'false' }} @@ -168,7 +168,7 @@ jobs: - name: Record next candidate run: | printf 'Published @criticalmanufacturing/codereview@%s as next.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" - printf 'Test this exact version in the Micron integration branch before requesting latest.\n' >> "$GITHUB_STEP_SUMMARY" + printf 'Test this exact version in a consuming project integration branch before requesting latest.\n' >> "$GITHUB_STEP_SUMMARY" promote-latest: if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest' && needs.plan.outputs.publish == 'true' @@ -177,7 +177,7 @@ jobs: timeout-minutes: 10 environment: name: repoflow-latest - url: ${{ inputs.micron_build_url }} + url: ${{ inputs.integration_build_url }} steps: - uses: actions/checkout@v6 with: @@ -195,4 +195,4 @@ jobs: - name: Record approval evidence run: | printf 'Promoted @criticalmanufacturing/codereview@%s to latest.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" - printf 'Reviewer-approved Micron integration build: %s\n' "$MICRON_BUILD_URL" >> "$GITHUB_STEP_SUMMARY" + printf 'Reviewer-approved integration build: %s\n' "$INTEGRATION_BUILD_URL" >> "$GITHUB_STEP_SUMMARY" diff --git a/cmf-codereview/README.md b/cmf-codereview/README.md index 764e68d..c51002d 100644 --- a/cmf-codereview/README.md +++ b/cmf-codereview/README.md @@ -97,4 +97,4 @@ dotnet test ## Releases -See [the release guide](docs/Releases.md) for the GitHub Actions `next` candidate and approved `latest` promotion flow, required repository settings, and the Micron integration branch. Publication remains disabled until the RepoFlow upload limit is resolved. +See [the release guide](docs/Releases.md) for the GitHub Actions `next` candidate and approved `latest` promotion flow, required repository settings, and consuming-project integration testing. Publication remains disabled until the RepoFlow upload limit is resolved. diff --git a/cmf-codereview/docs/Releases.md b/cmf-codereview/docs/Releases.md index 9622c4b..0c11ed3 100644 --- a/cmf-codereview/docs/Releases.md +++ b/cmf-codereview/docs/Releases.md @@ -1,6 +1,6 @@ # Releasing cmf-codereview -The `Release-CodeReview` GitHub Actions workflow builds Windows, Linux and macOS x64 bundles into one npm archive. Select `next` to build a candidate, then select `latest` to promote the same published version after testing it in Micron. A channel is an npm distribution tag, separate from the package version: for example, publish `1.0.1` under `next`, test `1.0.1`, then move `latest` to `1.0.1` without rebuilding. +The `Release-CodeReview` GitHub Actions workflow builds Windows, Linux and macOS x64 bundles into one npm archive. Select `next` to build a candidate, then select `latest` to promote the same published version after testing it in a consuming customization project. A channel is an npm distribution tag, separate from the package version: for example, publish `1.0.1` under `next`, test `1.0.1`, then move `latest` to `1.0.1` without rebuilding. ## Current state: publication is blocked @@ -27,17 +27,17 @@ The workflow checks that `repoflow-latest` has required reviewers before enterin 1. Open **Actions → Release-CodeReview → Run workflow**, select `main`, channel `next`, and an unused exact version, such as `1.0.1`. No automatic version bump or source commit is made: the workflow stamps the npm manifest and .NET project in its build workspace. It rejects ranges, `v` prefixes and build metadata. 2. The workflow runs .NET tests, builds all three platform bundles, produces a tgz and SHA-512 manifest, and installs/scans with that tgz on Windows, Linux and Intel macOS. With publishing disabled, download the `codereview-` artifact to inspect it. Once enabled, only a successful run publishes it with `--tag next`; an existing package version is never overwritten. -3. Use the Micron branch `test/codereview-release-integration`, based on `development`. Its `Builds/.vars/custom.yml` starts with `CmfCodeReviewVersion: 'next'`. Before the approval build, replace that value with the **exact version** from the successful candidate release. This avoids another candidate moving `next` during your test. -4. Open a Micron PR from the test branch and run its PR-Changes policy. Include a representative C# or process-rule change so the scan and inline-comment path are exercised. Check restored dependency resolution, expected findings, comment placement and the full pipeline result. Do not merge the branch's candidate version setting into `development`. -5. In the Micron build, inspect the logged resolved version and SHA-512 integrity, also saved as the `codereview-candidate` build artifact. Compare them with the GitHub artifact's `manifest.json`. Record the successful PR-Changes build URL. A tag resolving successfully alone is not an integration test. +3. Create a separate integration branch in a consuming customization repository, for example `test/codereview-integration`. Configure its PR validation pipeline to install the **exact version** from the successful candidate release. This avoids another candidate moving `next` during your test. +4. Open a PR from the test branch and run the consuming project's validation pipeline. Include a representative C# or process-rule change so the scan and inline-comment path are exercised. Check restored dependency resolution, expected findings, comment placement and the full pipeline result. Keep the candidate-version override scoped to the integration branch. +5. Record the installed version and registry SHA-512 integrity in the integration build's logs or artifacts. Compare them with the GitHub candidate artifact's `manifest.json`. Save the successful integration build URL. A tag resolving successfully alone is not an integration test. -The Micron branch reuses the existing agent's npm authentication from `cmf-login`; the registry must allow its metadata and package requests. It resolves a tag once and passes the resulting exact version to `npx`. The normal `development` branch's `latest` setting remains unchanged. Until a candidate is actually published and registry access works, the full integration run cannot be completed. +The consuming pipeline needs npm authentication for the registry's metadata and package requests, plus restored project dependencies before scanning. Resolve any tag once and pass the resulting exact version to `npx`. Keep the normal release configuration on `latest`. Until a candidate is actually published and registry access works, the full integration run cannot be completed. ## Promote after testing -1. Run `Release-CodeReview` from `main`, channel `latest`, with the tested exact version and the successful Micron build URL (`https://dev.azure.com/criticalmanufacturing/Micron/_build/results?buildId=...`). -2. The `repoflow-latest` reviewers inspect that build, confirm it succeeded and tested that exact version/integrity, and approve the deployment. The URL is checked for the expected Azure organization/project/build-ID shape; **the workflow does not query Azure or automatically verify build success**. This is a manual approval gate. -3. The approved job requires that version to still be RepoFlow's current `next` candidate, then runs `npm dist-tag add @criticalmanufacturing/codereview@ latest` and verifies the resulting tag. It downloads no replacement binaries and performs no rebuild or republish. Normal Micron pipelines using `latest` receive the promoted version on subsequent installs. +1. Run `Release-CodeReview` from `main`, channel `latest`, with the tested exact version and `integration_build_url`, the successful Azure DevOps integration build URL (`https://dev.azure.com/example-org/Project/_build/results?buildId=12345`). +2. The `repoflow-latest` reviewers inspect that build, confirm it belongs to the intended consuming project, succeeded and tested that exact version/integrity, and approve the deployment. The URL must be an HTTPS Azure DevOps organization/project build-results link with a numeric build ID; it is not restricted to a particular organization or project. **The workflow does not query Azure or automatically verify build success**. This is a manual approval gate. +3. The approved job requires that version to still be RepoFlow's current `next` candidate, then runs `npm dist-tag add @criticalmanufacturing/codereview@ latest` and verifies the resulting tag. It downloads no replacement binaries and performs no rebuild or republish. Consuming pipelines using `latest` receive the promoted version on subsequent installs. Avoid advancing `next` while a candidate is undergoing integration testing. If it moves, the promotion fails; retest the current candidate instead of bypassing the check. Workflow runs are serialized, but approval is still responsible for choosing the intended version. If publishing succeeded but a later registry verification failed, inspect the registry before retrying: do not reuse the version for different bytes. @@ -45,7 +45,7 @@ Avoid advancing `next` while a candidate is undergoing integration testing. If i Release helper tests cover disabled publishing, version validation, approval configuration, candidate matching, archive completeness and integrity. The release workflow performs native install/scan smoke tests against the actual tgz on all three operating systems. Native GitHub jobs must complete before a publishing job can run. -The Micron change is a narrow template update using its existing Linux container/agent pool, Node setup, authentication and full-history checkout. **Azure validation status: Manual fallback.** Checks cover YAML structure, task major versions, template placement, Bash syntax, quoted arguments, variable handling and absence of embedded credentials. The Azure validator skill/script is unavailable; Azure template expansion, private feed access and full PR integration still require a real Micron run. +The integration pipeline belongs to the consuming repository and is configured separately from this release workflow. It needs a compatible .NET/Node setup, package authentication and sufficient Git history for PR diff analysis. Private feed access, restored dependency resolution and the full PR integration flow must be verified in a real consuming-project build. References used: the repository's Azure pipeline schema, best practices, tasks and templates guides; Bash defensive patterns; [GitHub environments and approvals](https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments), [environment API](https://docs.github.com/en/rest/deployments/environments#get-an-environment), [runner images](https://github.com/actions/runner-images), [artifact upload](https://github.com/actions/upload-artifact), [artifact download](https://github.com/actions/download-artifact), and [npm distribution tags](https://docs.npmjs.com/cli/v11/commands/npm-dist-tag/). diff --git a/cmf-codereview/scripts/release.mjs b/cmf-codereview/scripts/release.mjs index aa2ca48..c994660 100644 --- a/cmf-codereview/scripts/release.mjs +++ b/cmf-codereview/scripts/release.mjs @@ -20,9 +20,9 @@ export function validateVersion(version) { export function validateBuildUrl(value) { const url = new URL(value); - assert.equal(url.origin, "https://dev.azure.com", "Use the Micron Azure DevOps build URL"); - assert.match(url.pathname, /^\/criticalmanufacturing\/(?:Micron|158158e7-e373-4c78-8228-02969c06e7b0)\/_build\/results\/?$/i); - assert.match(url.searchParams.get("buildId") || "", /^[1-9]\d*$/, "A Micron build ID is required"); + assert.equal(url.origin, "https://dev.azure.com", "Use an Azure DevOps integration build URL"); + assert.match(url.pathname, /^\/[^/]+\/[^/]+\/_build\/results\/?$/i, "Use an organization/project build results URL"); + assert.match(url.searchParams.get("buildId") || "", /^[1-9]\d*$/, "An integration build ID is required"); assert.ok(!url.username && !url.password && !url.hash, "Invalid build URL"); return url.toString(); } @@ -124,12 +124,12 @@ async function main(command, ...args) { switch (command) { case "plan": { const plan = planRelease({ channel: env.RELEASE_CHANNEL, version: env.RELEASE_VERSION, - enabled: env.CODE_REVIEW_PUBLISH_ENABLED, buildUrl: env.MICRON_BUILD_URL, ref: env.GITHUB_REF }); + enabled: env.CODE_REVIEW_PUBLISH_ENABLED, buildUrl: env.INTEGRATION_BUILD_URL, ref: env.GITHUB_REF }); output("version", plan.version); output("publish", String(plan.publish)); summary("Version: " + plan.version + "; channel: " + plan.channel + (plan.publish ? "" : "\nPublishing is DISABLED. This run only builds and tests the archive.")); - if (plan.channel === "latest") summary("Micron integration run to review before approval: " + validateBuildUrl(env.MICRON_BUILD_URL)); + if (plan.channel === "latest") summary("Integration run to review before approval: " + validateBuildUrl(env.INTEGRATION_BUILD_URL)); break; } case "check-approval": { diff --git a/cmf-codereview/scripts/release.test.mjs b/cmf-codereview/scripts/release.test.mjs index 022cd2d..ab28281 100644 --- a/cmf-codereview/scripts/release.test.mjs +++ b/cmf-codereview/scripts/release.test.mjs @@ -7,7 +7,7 @@ import path from "node:path"; import { createManifest, packageName, planRelease, preparePackage, requireReviewers, runtimes, validateBuildUrl, validateVersion, verifyArchive, verifyPromotion, verifyRegistry } from "./release.mjs"; -const buildUrl = "https://dev.azure.com/criticalmanufacturing/Micron/_build/results?buildId=12345"; +const buildUrl = "https://dev.azure.com/example-org/Project/_build/results?buildId=12345"; const commit = "a".repeat(40); const sha = "sha512-" + createHash("sha512").update("archive").digest("base64"); @@ -22,14 +22,18 @@ test("disabled publishing permits a next archive build", () => { test("disabled publishing always blocks latest", () => { assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "false", ref: "refs/heads/main", buildUrl }), /blocked/); }); -test("latest needs main and a Micron build URL", () => { +test("latest needs main and an integration build URL", () => { assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/feature", buildUrl }), /main/); assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl: "" })); assert.equal(planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl }).publish, true); }); -test("test evidence links target the expected Azure project", () => { +test("test evidence links support different Azure organizations and projects", () => { assert.equal(validateBuildUrl(buildUrl), buildUrl); - for (const value of ["https://example.com/?buildId=123", buildUrl.replace("Micron", "Other"), buildUrl.replace("12345", "bad")]) + const otherProject = "https://dev.azure.com/other-org/Another%20Project/_build/results?buildId=67890"; + assert.equal(validateBuildUrl(otherProject), otherProject); + for (const value of ["https://example.com/?buildId=123", buildUrl.replace('/_build/results', '/_git/repository'), + buildUrl.replace('/Project', ''), buildUrl.replace("12345", "bad"), buildUrl.replace('https://', 'http://'), + buildUrl.replace('https://', 'https://user:password@'), buildUrl + '#fragment']) assert.throws(() => validateBuildUrl(value)); }); test("promotion requires configured manual reviewers", () => { From d6cc6df16d6b04e9b72e4dcfab4467c009c0048c Mon Sep 17 00:00:00 2001 From: Guilherme Cota <1190640@isep.ipp.pt> Date: Fri, 13 Nov 2026 13:59:34 +0000 Subject: [PATCH 4/5] feat(codereview): automatically validate packages for manual testing --- .github/workflows/CI-Build.yml | 6 +- .github/workflows/Package-CodeReview.yml | 132 +++++++++++++++ .github/workflows/Release-CodeReview.yml | 198 ---------------------- cmf-codereview/README.md | 4 +- cmf-codereview/docs/Releases.md | 67 ++++---- cmf-codereview/npm/package.json | 2 +- cmf-codereview/scripts/package.mjs | 111 ++++++++++++ cmf-codereview/scripts/package.test.mjs | 99 +++++++++++ cmf-codereview/scripts/publish-release.sh | 52 ------ cmf-codereview/scripts/release.mjs | 177 ------------------- cmf-codereview/scripts/release.test.mjs | 83 --------- cmf-codereview/scripts/smoke-package.sh | 4 +- cmf-codereview/src/cmf-codereview.csproj | 2 +- 13 files changed, 381 insertions(+), 556 deletions(-) create mode 100644 .github/workflows/Package-CodeReview.yml delete mode 100644 .github/workflows/Release-CodeReview.yml create mode 100644 cmf-codereview/scripts/package.mjs create mode 100644 cmf-codereview/scripts/package.test.mjs delete mode 100644 cmf-codereview/scripts/publish-release.sh delete mode 100644 cmf-codereview/scripts/release.mjs delete mode 100644 cmf-codereview/scripts/release.test.mjs diff --git a/.github/workflows/CI-Build.yml b/.github/workflows/CI-Build.yml index 821494d..a8b97c0 100644 --- a/.github/workflows/CI-Build.yml +++ b/.github/workflows/CI-Build.yml @@ -26,14 +26,14 @@ jobs: with: dotnet-version: '8.0.x' - - name: Set up Node.js for release workflow tests + - name: Set up Node.js for package validation tests uses: actions/setup-node@v6 with: node-version: '24' package-manager-cache: false - - name: Test release workflow guards - run: node --test scripts/release.test.mjs + - name: Test package validation + run: node --test scripts/package.test.mjs - name: Restore dependencies of cmf-codereviewer run: dotnet restore cmf-codereview.sln diff --git a/.github/workflows/Package-CodeReview.yml b/.github/workflows/Package-CodeReview.yml new file mode 100644 index 0000000..3d42d54 --- /dev/null +++ b/.github/workflows/Package-CodeReview.yml @@ -0,0 +1,132 @@ +name: Package-CodeReview + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: + +permissions: + contents: read + +defaults: + run: + shell: bash + working-directory: cmf-codereview + +jobs: + package: + runs-on: ubuntu-24.04 + timeout-minutes: 30 + outputs: + version: ${{ steps.prepare.outputs.version }} + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-dotnet@v6 + with: + dotnet-version: '8.0.x' + - uses: actions/setup-node@v6 + with: + node-version: '24' + cache: npm + cache-dependency-path: cmf-codereview/package-lock.json + - name: Test package validation + run: node --test scripts/package.test.mjs + - name: Read npm version and stamp the executable + id: prepare + run: node scripts/package.mjs prepare + - name: Restore, build and test + run: | + set -Eeuo pipefail + dotnet restore cmf-codereview.sln + dotnet build cmf-codereview.sln -c Release --no-restore + dotnet test cmf-codereview.sln -c Release --no-build + - name: Build Windows, Linux and Intel macOS bundles + run: | + set -Eeuo pipefail + npm ci --ignore-scripts --no-audit --no-fund + npm run build:bundle + - name: Pack and verify the archive + run: | + set -Eeuo pipefail + mkdir -p release + npm pack ./npm --pack-destination ./release --json > release/pack.json + node scripts/package.mjs manifest + # Only used to transfer the archive between jobs; not a ready-to-test package. + - uses: actions/upload-artifact@v7 + with: + name: unvalidated-codereview-${{ steps.prepare.outputs.version }} + path: | + cmf-codereview/release/*.tgz + cmf-codereview/release/manifest.json + cmf-codereview/release/pack.json + compression-level: 0 + if-no-files-found: error + retention-days: 1 + + smoke: + needs: package + runs-on: ${{ matrix.os }} + timeout-minutes: 15 + strategy: + fail-fast: false + matrix: + os: [ubuntu-24.04, windows-2025, macos-15-intel] + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + package-manager-cache: false + - uses: actions/download-artifact@v8 + with: + name: unvalidated-codereview-${{ needs.package.outputs.version }} + path: cmf-codereview/release + - name: Install the tgz, check the version and scan a known fixture + run: bash scripts/smoke-package.sh "$GITHUB_WORKSPACE/cmf-codereview/release" "${{ needs.package.outputs.version }}" "$GITHUB_SHA" + + ready: + name: Package ready for manual testing + needs: [package, smoke] + runs-on: ubuntu-24.04 + timeout-minutes: 5 + steps: + - uses: actions/checkout@v6 + with: + persist-credentials: false + - uses: actions/setup-node@v6 + with: + node-version: '24' + package-manager-cache: false + - uses: actions/download-artifact@v8 + with: + name: unvalidated-codereview-${{ needs.package.outputs.version }} + path: cmf-codereview/release + - name: Verify the validated archive before making it available + env: + PACKAGE_VERSION: ${{ needs.package.outputs.version }} + run: node scripts/package.mjs archive release "$PACKAGE_VERSION" "$GITHUB_SHA" + - name: Upload package for manual testing + uses: actions/upload-artifact@v7 + with: + name: codereview-${{ needs.package.outputs.version }} + path: | + cmf-codereview/release/*.tgz + cmf-codereview/release/manifest.json + cmf-codereview/release/pack.json + compression-level: 0 + if-no-files-found: error + retention-days: 30 + - name: Record package readiness + env: + PACKAGE_VERSION: ${{ needs.package.outputs.version }} + run: | + printf 'Package codereview-%s is ready for manual testing.\n' "$PACKAGE_VERSION" >> "$GITHUB_STEP_SUMMARY" + printf 'Build, unit tests and Windows/Linux/Intel macOS install-and-scan checks passed.\n' >> "$GITHUB_STEP_SUMMARY" + printf 'Source commit: %s\n' "$GITHUB_SHA" >> "$GITHUB_STEP_SUMMARY" + printf 'Download the codereview artifact from this successful run. Testing in a consuming pipeline and publication are manual.\n' >> "$GITHUB_STEP_SUMMARY" diff --git a/.github/workflows/Release-CodeReview.yml b/.github/workflows/Release-CodeReview.yml deleted file mode 100644 index 58822e1..0000000 --- a/.github/workflows/Release-CodeReview.yml +++ /dev/null @@ -1,198 +0,0 @@ -name: Release-CodeReview -run-name: "codereview ${{ inputs.version || 'validation' }} → ${{ inputs.channel || 'next (no publish)' }}" - -on: - pull_request: - branches: [main] - paths: - - .github/workflows/Release-CodeReview.yml - - cmf-codereview/scripts/** - workflow_dispatch: - inputs: - channel: - description: "next builds a candidate; latest promotes the tested candidate" - required: true - type: choice - options: [next, latest] - default: next - version: - description: "Exact version, e.g. 1.0.1; publish it as next first" - required: true - type: string - integration_build_url: - description: "For latest: successful integration build testing this exact version" - required: false - type: string - -permissions: - contents: read - actions: read - -concurrency: - group: codereview-repoflow-release - cancel-in-progress: false - -env: - RELEASE_CHANNEL: ${{ inputs.channel || 'next' }} - RELEASE_VERSION: ${{ inputs.version || format('0.0.0-ci.{0}.{1}', github.run_id, github.run_attempt) }} - INTEGRATION_BUILD_URL: ${{ inputs.integration_build_url }} - RELEASE_REGISTRY: ${{ vars.REPOFLOW_NPM_REGISTRY || 'https://cm-collaborationhub.io/api/npm/2305290000030000002/dev/' }} - # This switch remains off until the archive upload limit has been resolved. - CODE_REVIEW_PUBLISH_ENABLED: ${{ github.event_name == 'workflow_dispatch' && vars.CODE_REVIEW_PUBLISH_ENABLED == 'true' && 'true' || 'false' }} - -defaults: - run: - shell: bash - working-directory: cmf-codereview - -jobs: - plan: - runs-on: ubuntu-24.04 - timeout-minutes: 5 - outputs: - version: ${{ steps.plan.outputs.version }} - publish: ${{ steps.plan.outputs.publish }} - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-node@v6 - with: - node-version: '24' - package-manager-cache: false - - name: Validate inputs and publishing switch - id: plan - run: node scripts/release.mjs plan - - name: Require configured reviewers before requesting latest approval - if: inputs.channel == 'latest' - env: - GITHUB_TOKEN: ${{ github.token }} - run: node scripts/release.mjs check-approval - - package: - if: inputs.channel != 'latest' - needs: plan - runs-on: ubuntu-24.04 - timeout-minutes: 30 - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-dotnet@v6 - with: - dotnet-version: '8.0.x' - - uses: actions/setup-node@v6 - with: - node-version: '24' - cache: npm - cache-dependency-path: cmf-codereview/package-lock.json - - name: Test release guards - run: node --test scripts/release.test.mjs - - name: Stamp the npm package and executable with the requested version - run: node scripts/release.mjs prepare "$RELEASE_VERSION" - - name: Restore, build and test - run: | - set -Eeuo pipefail - dotnet restore cmf-codereview.sln - dotnet build cmf-codereview.sln -c Release --no-restore - dotnet test cmf-codereview.sln -c Release --no-build - - name: Build all three self-contained platform bundles - run: | - set -Eeuo pipefail - npm ci --ignore-scripts --no-audit --no-fund - npm run build:bundle - - name: Pack and verify the archive - run: | - set -Eeuo pipefail - mkdir -p release - npm pack ./npm --pack-destination ./release --json > release/pack.json - node scripts/release.mjs manifest - - uses: actions/upload-artifact@v7 - with: - name: codereview-${{ needs.plan.outputs.version }} - path: | - cmf-codereview/release/*.tgz - cmf-codereview/release/manifest.json - cmf-codereview/release/pack.json - compression-level: 0 - if-no-files-found: error - retention-days: 30 - - smoke: - needs: [plan, package] - runs-on: ${{ matrix.os }} - timeout-minutes: 15 - strategy: - fail-fast: false - matrix: - os: [ubuntu-24.04, windows-2025, macos-15-intel] - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-node@v6 - with: - node-version: '24' - package-manager-cache: false - - uses: actions/download-artifact@v8 - with: - name: codereview-${{ needs.plan.outputs.version }} - path: cmf-codereview/release - - name: Install the actual tgz and run a scan - run: bash scripts/smoke-package.sh "$GITHUB_WORKSPACE/cmf-codereview/release" "$RELEASE_VERSION" - - publish-next: - if: github.event_name == 'workflow_dispatch' && inputs.channel == 'next' && needs.plan.outputs.publish == 'true' - needs: [plan, package, smoke] - runs-on: ${{ fromJSON(vars.CODE_REVIEW_PUBLISH_RUNNER_JSON || '"ubuntu-24.04"') }} - timeout-minutes: 15 - environment: repoflow-next - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-node@v6 - with: - node-version: '24' - registry-url: ${{ env.RELEASE_REGISTRY }} - scope: '@criticalmanufacturing' - package-manager-cache: false - - uses: actions/download-artifact@v8 - with: - name: codereview-${{ needs.plan.outputs.version }} - path: cmf-codereview/release - - name: Publish the tested archive with next only - env: - NODE_AUTH_TOKEN: ${{ secrets.REPOFLOW_NPM_TOKEN }} - run: bash scripts/publish-release.sh - - name: Record next candidate - run: | - printf 'Published @criticalmanufacturing/codereview@%s as next.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" - printf 'Test this exact version in a consuming project integration branch before requesting latest.\n' >> "$GITHUB_STEP_SUMMARY" - - promote-latest: - if: github.event_name == 'workflow_dispatch' && inputs.channel == 'latest' && needs.plan.outputs.publish == 'true' - needs: plan - runs-on: ${{ fromJSON(vars.CODE_REVIEW_PUBLISH_RUNNER_JSON || '"ubuntu-24.04"') }} - timeout-minutes: 10 - environment: - name: repoflow-latest - url: ${{ inputs.integration_build_url }} - steps: - - uses: actions/checkout@v6 - with: - persist-credentials: false - - uses: actions/setup-node@v6 - with: - node-version: '24' - registry-url: ${{ env.RELEASE_REGISTRY }} - scope: '@criticalmanufacturing' - package-manager-cache: false - - name: Promote the approved existing next version without rebuilding - env: - NODE_AUTH_TOKEN: ${{ secrets.REPOFLOW_NPM_TOKEN }} - run: bash scripts/publish-release.sh - - name: Record approval evidence - run: | - printf 'Promoted @criticalmanufacturing/codereview@%s to latest.\n' "$RELEASE_VERSION" >> "$GITHUB_STEP_SUMMARY" - printf 'Reviewer-approved integration build: %s\n' "$INTEGRATION_BUILD_URL" >> "$GITHUB_STEP_SUMMARY" diff --git a/cmf-codereview/README.md b/cmf-codereview/README.md index c51002d..cb67919 100644 --- a/cmf-codereview/README.md +++ b/cmf-codereview/README.md @@ -95,6 +95,6 @@ baseline (`scan --update-baseline`) so CI gates only fail on new findings. See dotnet test ``` -## Releases +## Packages for manual testing -See [the release guide](docs/Releases.md) for the GitHub Actions `next` candidate and approved `latest` promotion flow, required repository settings, and consuming-project integration testing. Publication remains disabled until the RepoFlow upload limit is resolved. +The `Package-CodeReview` GitHub Actions workflow automatically builds and tests an all-platform package on pull requests and pushes to `main`. After the .NET tests and Windows/Linux/Intel macOS package checks pass, download the `codereview-` artifact for manual testing. Set the next version in `npm/package.json` (currently `1.1.0`). See [the package guide](docs/Releases.md) for the workflow and download instructions. Integration testing and publication are manual. diff --git a/cmf-codereview/docs/Releases.md b/cmf-codereview/docs/Releases.md index 0c11ed3..536f5c9 100644 --- a/cmf-codereview/docs/Releases.md +++ b/cmf-codereview/docs/Releases.md @@ -1,52 +1,45 @@ -# Releasing cmf-codereview +# Build a package for manual testing -The `Release-CodeReview` GitHub Actions workflow builds Windows, Linux and macOS x64 bundles into one npm archive. Select `next` to build a candidate, then select `latest` to promote the same published version after testing it in a consuming customization project. A channel is an npm distribution tag, separate from the package version: for example, publish `1.0.1` under `next`, test `1.0.1`, then move `latest` to `1.0.1` without rebuilding. +The `Package-CodeReview` GitHub Actions workflow automatically builds and validates an npm package on every pull request targeting `main` and every push to `main`. It can also be rerun with **Actions > Package-CodeReview > Run workflow**, without any inputs. -## Current state: publication is blocked +## Choose the next version -Leave repository variable `CODE_REVIEW_PUBLISH_ENABLED` unset or `false`. The public RepoFlow endpoint previously rejected the approximately 129 MB all-platform archive with HTTP 413. Both publishing jobs are blocked until the upload route is resolved; `latest` requests fail before approval. A `next` request still builds, tests and saves the tgz as a GitHub artifact. Pull requests changing release automation also exercise this build without registry credentials. +Edit `version` in **`cmf-codereview/npm/package.json`**. The current target is **`1.1.0`**. Use an exact npm version without a `v` prefix: -Do not assume the raw `/api/upload/...` endpoint supports `npm publish` or npm tags. This workflow requires an npm-compatible registry endpoint that accepts the complete publish request. The registry must also be reachable from the publishing runner. Authentication and sufficient upload capacity must both be verified before enabling publication. No upload has been attempted by this implementation. +```json +"version": "1.1.0" +``` -## Repository setup +This manifest is the workflow's source for the package version. The workflow reads it and sets the same version in `src/cmf-codereview.csproj` before building, so the executable and npm package agree. There is no workflow version input, automatic version bump, source commit, Git tag or GitHub release. The root `cmf-codereview/package.json` belongs to the build tooling and does not set the distributed plugin's version. -An administrator must configure the following after reviewing and merging the workflow into `main`: +Multiple runs can build the same version while it is being tested. Each artifact belongs to its own workflow run; `manifest.json` records the exact source commit and SHA-512 integrity. Use those values to distinguish builds of the same version. For a PR run, the commit is the GitHub checkout commit, normally the PR test merge commit. -| Setting | Purpose | -| --- | --- | -| Environment `repoflow-next` | Holds the publishing credential for candidates. Restrict deployment branches to `main`. | -| Environment `repoflow-latest` | Configure **required reviewers**, prevent self-review if supported, and restrict deployment branches to `main`. Holds the promotion credential. | -| Environment secret `REPOFLOW_NPM_TOKEN` | An npm authentication token accepted by RepoFlow, with package publish/tag permissions. Set in each environment; never commit it. | -| Repository variable `REPOFLOW_NPM_REGISTRY` | Optional working npm registry URL. Defaults to `https://cm-collaborationhub.io/api/npm/2305290000030000002/dev/`. | -| Repository variable `CODE_REVIEW_PUBLISH_RUNNER_JSON` | Optional JSON runner label/string, e.g. `["self-hosted","linux","repoflow"]` for a network-restricted endpoint. Defaults to `"ubuntu-24.04"`. Only the publish/promotion jobs use this runner. | -| Repository variable `CODE_REVIEW_PUBLISH_ENABLED` | Set to literal `true` **only after** the upload problem and authentication are resolved. Keep disabled for now. | +## What must pass -The workflow checks that `repoflow-latest` has required reviewers before entering that environment. Missing protection or inability to inspect it fails the request. `latest` runs must use `main`. Environments and secrets are repository configuration; adding their names to YAML does not configure reviewers. GitHub must allow the referenced Actions versions and artifact storage. +1. Package helper tests validate version handling, executable stamping, archive contents and integrity checks. +2. The .NET solution is restored, built in Release configuration and tested. +3. Self-contained Windows x64, Linux x64 and Intel macOS x64 executables are bundled into one npm `.tgz`. +4. The archive is checked for all three executables, and its version, source commit and SHA-512 integrity are saved in `manifest.json`. +5. Separate native jobs on Windows, Linux and Intel macOS install that exact archive, check the executable version and scan a small fixture containing an expected `LoadInsideLoop` finding. +6. Only after all those jobs pass does **Package ready for manual testing** verify the archive again and upload the final **`codereview-`** artifact. -## Candidate and integration test +No approval, publishing environment, registry credential or release switch is needed. Normal NuGet restore and public npm dependency access must be available to the runners. The workflow does not publish to RepoFlow, change `next`/`latest`, or run a consuming project's integration pipeline. -1. Open **Actions → Release-CodeReview → Run workflow**, select `main`, channel `next`, and an unused exact version, such as `1.0.1`. No automatic version bump or source commit is made: the workflow stamps the npm manifest and .NET project in its build workspace. It rejects ranges, `v` prefixes and build metadata. -2. The workflow runs .NET tests, builds all three platform bundles, produces a tgz and SHA-512 manifest, and installs/scans with that tgz on Windows, Linux and Intel macOS. With publishing disabled, download the `codereview-` artifact to inspect it. Once enabled, only a successful run publishes it with `--tag next`; an existing package version is never overwritten. -3. Create a separate integration branch in a consuming customization repository, for example `test/codereview-integration`. Configure its PR validation pipeline to install the **exact version** from the successful candidate release. This avoids another candidate moving `next` during your test. -4. Open a PR from the test branch and run the consuming project's validation pipeline. Include a representative C# or process-rule change so the scan and inline-comment path are exercised. Check restored dependency resolution, expected findings, comment placement and the full pipeline result. Keep the candidate-version override scoped to the integration branch. -5. Record the installed version and registry SHA-512 integrity in the integration build's logs or artifacts. Compare them with the GitHub candidate artifact's `manifest.json`. Save the successful integration build URL. A tag resolving successfully alone is not an integration test. +## Download and test -The consuming pipeline needs npm authentication for the registry's metadata and package requests, plus restored project dependencies before scanning. Resolve any tag once and pass the resulting exact version to `npx`. Keep the normal release configuration on `latest`. Until a candidate is actually published and registry access works, the full integration run cannot be completed. +1. Open the PR's **Package-CodeReview** check or select the run under **Actions > Package-CodeReview**. +2. Confirm the workflow completed successfully, including **Package ready for manual testing**. The separate `CI-Build` check should also pass before merging the PR. +3. Download **`codereview-1.1.0`** from the run's **Artifacts** section. Extract the downloaded ZIP to obtain the `.tgz`, `manifest.json` and `pack.json`. +4. Install the extracted `.tgz` in your manual test environment. For example, from a temporary npm project: -## Promote after testing + ```bash + npm install /path/to/criticalmanufacturing-codereview-1.1.0.tgz + npx --no-install cmf-codereview --version + npx --no-install cmf-codereview scan --repository-root /path/to/customization --output findings.json + ``` -1. Run `Release-CodeReview` from `main`, channel `latest`, with the tested exact version and `integration_build_url`, the successful Azure DevOps integration build URL (`https://dev.azure.com/example-org/Project/_build/results?buildId=12345`). -2. The `repoflow-latest` reviewers inspect that build, confirm it belongs to the intended consuming project, succeeded and tested that exact version/integrity, and approve the deployment. The URL must be an HTTPS Azure DevOps organization/project build-results link with a numeric build ID; it is not restricted to a particular organization or project. **The workflow does not query Azure or automatically verify build success**. This is a manual approval gate. -3. The approved job requires that version to still be RepoFlow's current `next` candidate, then runs `npm dist-tag add @criticalmanufacturing/codereview@ latest` and verifies the resulting tag. It downloads no replacement binaries and performs no rebuild or republish. Consuming pipelines using `latest` receive the promoted version on subsequent installs. +5. Test the package in a consuming project's PR validation pipeline, including dependency restoration and inline PR comments. Use the same archive and keep the source commit/integrity with your test results. -Avoid advancing `next` while a candidate is undergoing integration testing. If it moves, the promotion fails; retest the current candidate instead of bypassing the check. Workflow runs are serialized, but approval is still responsible for choosing the intended version. If publishing succeeded but a later registry verification failed, inspect the registry before retrying: do not reuse the version for different bytes. +The final artifact is kept for 30 days. An **`unvalidated-codereview-`** artifact is used to transfer the archive between jobs and is kept for one day. It can exist even if a platform test fails; it is not ready for manual testing. If the workflow fails, fix the failure and use the final artifact from a successful run. -## Validation and assumptions - -Release helper tests cover disabled publishing, version validation, approval configuration, candidate matching, archive completeness and integrity. The release workflow performs native install/scan smoke tests against the actual tgz on all three operating systems. Native GitHub jobs must complete before a publishing job can run. - -The integration pipeline belongs to the consuming repository and is configured separately from this release workflow. It needs a compatible .NET/Node setup, package authentication and sufficient Git history for PR diff analysis. Private feed access, restored dependency resolution and the full PR integration flow must be verified in a real consuming-project build. - -References used: the repository's Azure pipeline schema, best practices, tasks and templates guides; Bash defensive patterns; [GitHub environments and approvals](https://docs.github.com/en/actions/how-tos/deploy/configure-and-manage-deployments/manage-environments), [environment API](https://docs.github.com/en/rest/deployments/environments#get-an-environment), [runner images](https://github.com/actions/runner-images), [artifact upload](https://github.com/actions/upload-artifact), [artifact download](https://github.com/actions/download-artifact), and [npm distribution tags](https://docs.npmjs.com/cli/v11/commands/npm-dist-tag/). - -References skipped or missing: automated Azure build verification (manual approval was selected), unrelated deployment examples, and the unavailable Azure validator. Impact: no Azure PAT is needed in GitHub; reviewers must verify the supplied build evidence, and a real Azure run remains necessary before promotion. +All integration testing, publication and npm tag changes are manual for now. The previously encountered RepoFlow upload limit must be handled as part of any manual publication; this workflow does not exercise or resolve it. Publish the exact tested archive and use a new version after a version has already been published. diff --git a/cmf-codereview/npm/package.json b/cmf-codereview/npm/package.json index 7f42f13..ef4822e 100644 --- a/cmf-codereview/npm/package.json +++ b/cmf-codereview/npm/package.json @@ -1,6 +1,6 @@ { "name": "@criticalmanufacturing/codereview", - "version": "1.0.0-alpha", + "version": "1.1.0", "description": "Critical Manufacturing CLI plugin: static analysis for CM Framework DEE/Orchestration code", "bin": { "cmf-codereview": "./run.js" diff --git a/cmf-codereview/scripts/package.mjs b/cmf-codereview/scripts/package.mjs new file mode 100644 index 0000000..91ea8fc --- /dev/null +++ b/cmf-codereview/scripts/package.mjs @@ -0,0 +1,111 @@ +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { appendFileSync, readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { pathToFileURL } from "node:url"; + +export const packageName = "@criticalmanufacturing/codereview"; +export const runtimes = ["win-x64", "linux-x64", "osx-x64"]; + +export function validateVersion(version) { + assert.equal(typeof version, "string", "An exact package version is required"); + const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(version); + assert.ok(match && version.length <= 100, "Use an exact SemVer without a v prefix or build metadata"); + for (const identifier of (match[4] || "").split(".")) { + assert.ok(!/^\d+$/.test(identifier) || identifier === "0" || !identifier.startsWith("0"), + "Numeric prerelease identifiers cannot have leading zeroes"); + } + return version; +} + +function json(file) { return JSON.parse(readFileSync(file, "utf8").replace(/^\uFEFF/, "")); } +function integrity(file) { return "sha512-" + createHash("sha512").update(readFileSync(file)).digest("base64"); } + +export function preparePackage(directory) { + const manifest = json(path.join(directory, "npm/package.json")); + assert.equal(manifest.name, packageName); + const version = validateVersion(manifest.version); + const projectPath = path.join(directory, "src/cmf-codereview.csproj"); + const project = readFileSync(projectPath, "utf8"); + assert.equal((project.match(/[^<]*<\/Version>/g) || []).length, 1, "Expected one project Version"); + writeFileSync(projectPath, project.replace(/[^<]*<\/Version>/, "" + version + "")); + return version; +} + +export function createManifest(directory, commit) { + assert.match(commit, /^[0-9a-f]{40}$/, "A source commit is required"); + const pack = json(path.join(directory, "release/pack.json")); + assert.equal(pack.length, 1, "Expected one npm archive"); + const entry = pack[0]; + const manifest = json(path.join(directory, "npm/package.json")); + assert.equal(entry.name, packageName); + assert.equal(entry.version, manifest.version); + validateVersion(entry.version); + assert.equal(path.basename(entry.filename), entry.filename, "Invalid archive filename"); + assert.ok(entry.filename.endsWith(".tgz")); + for (const rid of runtimes) { + const executable = "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : ""); + assert.ok(entry.files?.some(file => file.path === executable), "Archive is missing " + executable); + } + const archive = path.join(directory, "release", entry.filename); + assert.equal(entry.integrity, integrity(archive), "Archive integrity mismatch"); + const result = { + schemaVersion: 1, name: packageName, version: entry.version, commit, + file: entry.filename, integrity: entry.integrity, size: entry.size, runtimes + }; + writeFileSync(path.join(directory, "release/manifest.json"), JSON.stringify(result, null, 2) + "\n"); + return result; +} + +export function verifyArchive(directory, version, commit) { + const manifest = json(path.join(directory, "manifest.json")); + assert.equal(manifest.schemaVersion, 1); + assert.equal(manifest.name, packageName); + assert.equal(manifest.version, validateVersion(version)); + if (commit) assert.equal(manifest.commit, commit); + assert.equal(path.basename(manifest.file), manifest.file); + assert.ok(manifest.file.endsWith(".tgz")); + assert.equal(integrity(path.join(directory, manifest.file)), manifest.integrity, "Archive was changed"); + assert.deepEqual(manifest.runtimes, runtimes); + return manifest; +} + +export function verifySmoke(findings, executableVersion, expectedVersion) { + assert.ok(Array.isArray(findings) && findings.some(finding => finding.Rule === "LoadInsideLoop"), + "The installed package did not scan the fixture correctly"); + validateVersion(expectedVersion); + assert.ok(executableVersion.trim().split(/\s+/).includes(expectedVersion), + "Installed executable reports an unexpected version: " + executableVersion.trim()); +} + +function output(name, value) { + if (process.env.GITHUB_OUTPUT) appendFileSync(process.env.GITHUB_OUTPUT, name + "=" + value + "\n"); +} +function summary(text) { + if (process.env.GITHUB_STEP_SUMMARY) appendFileSync(process.env.GITHUB_STEP_SUMMARY, text + "\n"); + console.log(text); +} + +function main(command, ...args) { + switch (command) { + case "prepare": { + const version = preparePackage(process.cwd()); + output("version", version); + summary("Package version from npm/package.json: " + version); + break; + } + case "manifest": { + const manifest = createManifest(process.cwd(), process.env.GITHUB_SHA); + summary("Built " + manifest.file + " (" + manifest.size + " bytes), including Windows, Linux and Intel macOS x64.\nIntegrity: " + manifest.integrity); + break; + } + case "archive": console.log(verifyArchive(args[0], args[1], args[2]).file); break; + case "smoke": verifySmoke(json(args[0]), readFileSync(args[1], "utf8"), args[2]); break; + default: throw new Error("Unknown package command: " + command); + } +} + +if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { + try { main(...process.argv.slice(2)); } + catch (error) { console.error(error.message); process.exitCode = 1; } +} diff --git a/cmf-codereview/scripts/package.test.mjs b/cmf-codereview/scripts/package.test.mjs new file mode 100644 index 0000000..95bd933 --- /dev/null +++ b/cmf-codereview/scripts/package.test.mjs @@ -0,0 +1,99 @@ +import test from "node:test"; +import assert from "node:assert/strict"; +import { createHash } from "node:crypto"; +import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { spawnSync } from "node:child_process"; +import os from "node:os"; +import path from "node:path"; +import { fileURLToPath } from "node:url"; +import { createManifest, packageName, preparePackage, runtimes, validateVersion, verifyArchive, verifySmoke } from "./package.mjs"; + +const commit = "a".repeat(40); +const sha = "sha512-" + createHash("sha512").update("archive").digest("base64"); + +function fixture(t) { + const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-package-")); + t.after(() => rmSync(dir, { recursive: true, force: true })); + mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "src")); mkdirSync(path.join(dir, "release")); + writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.1.0", dependencies: { debug: "^4.4.3" } })); + writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), "1.0.0-alpha"); + const pack = [{ name: packageName, version: "1.1.0", filename: "candidate.tgz", integrity: sha, size: 7, + files: runtimes.map(rid => ({ path: "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : "") })) }]; + writeFileSync(path.join(dir, "release/candidate.tgz"), "archive"); + writeFileSync(path.join(dir, "release/pack.json"), JSON.stringify(pack)); + return { dir, pack }; +} + +test("versions reject ranges, shell input and ambiguous normalization", () => { + for (const value of ["1.1.0", "2.0.0-rc.1"]) assert.equal(validateVersion(value), value); + for (const value of ["latest", "^1.0.0", "v1.1.0", "01.0.0", "1.0.0-01", "1.0.0+build", "1.0.0; echo bad", "1.0.0\n"]) + assert.throws(() => validateVersion(value), value); +}); + +test("npm manifest is the version source and stamping is repeatable without modifying it", t => { + const { dir } = fixture(t); + const pkgPath = path.join(dir, "npm/package.json"); + const original = readFileSync(pkgPath, "utf8"); + assert.equal(preparePackage(dir), "1.1.0"); + assert.equal(preparePackage(dir), "1.1.0"); + assert.equal(readFileSync(pkgPath, "utf8"), original); + assert.match(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8"), /1.1.0<\/Version>/); +}); + +test("invalid package identity, version or project layout stops preparation", t => { + const { dir } = fixture(t); + const pkgPath = path.join(dir, "npm/package.json"); + writeFileSync(pkgPath, JSON.stringify({ name: "wrong", version: "1.1.0" })); + assert.throws(() => preparePackage(dir)); + writeFileSync(pkgPath, JSON.stringify({ name: packageName, version: "latest" })); + assert.throws(() => preparePackage(dir)); + writeFileSync(pkgPath, JSON.stringify({ name: packageName, version: "1.1.0" })); + writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), ""); + assert.throws(() => preparePackage(dir), /Expected one project Version/); +}); + +test("archives retain their source commit and reject mismatched version, commit or corruption", t => { + const { dir } = fixture(t); + createManifest(dir, commit); + const out = path.join(dir, "release"); + assert.equal(verifyArchive(out, "1.1.0", commit).integrity, sha); + assert.throws(() => verifyArchive(out, "1.2.0", commit)); + assert.throws(() => verifyArchive(out, "1.1.0", "b".repeat(40))); + writeFileSync(path.join(out, "candidate.tgz"), "corrupt"); + assert.throws(() => verifyArchive(out, "1.1.0", commit), /changed/); +}); + +test("missing platform bundles prevent creation of a validated manifest", t => { + for (const rid of runtimes) { + const { dir, pack } = fixture(t); + pack[0].files = pack[0].files.filter(file => !file.path.startsWith("dist/" + rid + "/")); + writeFileSync(path.join(dir, "release/pack.json"), JSON.stringify(pack)); + assert.throws(() => createManifest(dir, commit), /missing dist/); + } +}); + +test("manifest rejects mismatched package metadata and integrity", t => { + const { dir, pack } = fixture(t); + const packPath = path.join(dir, "release/pack.json"); + pack[0].version = "1.2.0"; + writeFileSync(packPath, JSON.stringify(pack)); + assert.throws(() => createManifest(dir, commit)); + pack[0].version = "1.1.0"; + pack[0].integrity = "sha512-invalid"; + writeFileSync(packPath, JSON.stringify(pack)); + assert.throws(() => createManifest(dir, commit), /integrity mismatch/); +}); + +test("smoke validation requires both the expected finding and executable version", () => { + verifySmoke([{ Rule: "LoadInsideLoop" }], "cmf-codereview 1.1.0\n", "1.1.0"); + assert.throws(() => verifySmoke([], "1.1.0", "1.1.0"), /did not scan/); + assert.throws(() => verifySmoke([{ Rule: "LoadInsideLoop" }], "1.0.0", "1.1.0"), /unexpected version/); +}); + +test("command failures propagate a nonzero process exit status", t => { + const { dir } = fixture(t); + const helper = fileURLToPath(new URL("./package.mjs", import.meta.url)); + const result = spawnSync(process.execPath, [helper, "archive", path.join(dir, "release"), "1.1.0", commit], { encoding: "utf8" }); + assert.equal(result.status, 1); + assert.notEqual(result.stderr.trim(), ""); +}); diff --git a/cmf-codereview/scripts/publish-release.sh b/cmf-codereview/scripts/publish-release.sh deleted file mode 100644 index 7a8a0f9..0000000 --- a/cmf-codereview/scripts/publish-release.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/usr/bin/env bash -set -Eeuo pipefail - -if [[ "${CODE_REVIEW_PUBLISH_ENABLED:-false}" != true ]]; then - echo "Publishing is blocked until the RepoFlow upload limit is resolved." >&2 - exit 1 -fi -if [[ -z "${NODE_AUTH_TOKEN:-}" ]]; then - echo "REPOFLOW_NPM_TOKEN must be configured on the release environment." >&2 - exit 1 -fi - -spec="@criticalmanufacturing/codereview@$RELEASE_VERSION" -metadata_file="$(mktemp)" -tags_file="$(mktemp)" -cleanup() { - local status=$? - trap - EXIT - rm -f -- "$metadata_file" "$tags_file" - exit "$status" -} -trap cleanup EXIT - -case "$RELEASE_CHANNEL" in - next) - archive="$(node scripts/release.mjs archive release "$RELEASE_VERSION" "$GITHUB_SHA")" - lookup_status=0 - npm view "$spec" version --json --registry="$RELEASE_REGISTRY" > "$metadata_file" || lookup_status=$? - if (( lookup_status == 0 )); then - echo "This version already exists. Choose a new version; published packages are not overwritten." >&2 - exit 1 - fi - node scripts/release.mjs unpublished "$metadata_file" - npm publish "release/$archive" --tag next --registry="$RELEASE_REGISTRY" - npm view "$spec" version dist.integrity --json --registry="$RELEASE_REGISTRY" > "$metadata_file" - expected_integrity="$(node -p 'JSON.parse(require("fs").readFileSync("release/manifest.json", "utf8")).integrity')" - node scripts/release.mjs registry "$metadata_file" "$RELEASE_VERSION" "$expected_integrity" - ;; - latest) - npm view "$spec" version dist.integrity --json --registry="$RELEASE_REGISTRY" > "$metadata_file" - npm view @criticalmanufacturing/codereview dist-tags --json --registry="$RELEASE_REGISTRY" > "$tags_file" - node scripts/release.mjs promotion "$metadata_file" "$tags_file" "$RELEASE_VERSION" - npm dist-tag add "$spec" latest --registry="$RELEASE_REGISTRY" - npm view @criticalmanufacturing/codereview dist-tags --json --registry="$RELEASE_REGISTRY" > "$tags_file" - node -e 'const fs=require("fs"); const tags=JSON.parse(fs.readFileSync(process.argv[1],"utf8")); if(tags.latest!==process.argv[2]) throw new Error("latest tag verification failed");' "$tags_file" "$RELEASE_VERSION" - ;; - *) - echo "Release channel must be next or latest." >&2 - exit 1 - ;; -esac -printf 'Released %s with tag %s\n' "$spec" "$RELEASE_CHANNEL" diff --git a/cmf-codereview/scripts/release.mjs b/cmf-codereview/scripts/release.mjs deleted file mode 100644 index c994660..0000000 --- a/cmf-codereview/scripts/release.mjs +++ /dev/null @@ -1,177 +0,0 @@ -import assert from "node:assert/strict"; -import { createHash } from "node:crypto"; -import { appendFileSync, readFileSync, writeFileSync } from "node:fs"; -import path from "node:path"; -import { pathToFileURL } from "node:url"; - -export const packageName = "@criticalmanufacturing/codereview"; -export const runtimes = ["win-x64", "linux-x64", "osx-x64"]; - -export function validateVersion(version) { - assert.equal(typeof version, "string", "An exact package version is required"); - const match = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-([0-9A-Za-z-]+(?:\.[0-9A-Za-z-]+)*))?$/.exec(version); - assert.ok(match && version.length <= 100, "Use an exact SemVer without a v prefix or build metadata"); - for (const identifier of (match[4] || "").split(".")) { - assert.ok(!/^\d+$/.test(identifier) || identifier === "0" || !identifier.startsWith("0"), - "Numeric prerelease identifiers cannot have leading zeroes"); - } - return version; -} - -export function validateBuildUrl(value) { - const url = new URL(value); - assert.equal(url.origin, "https://dev.azure.com", "Use an Azure DevOps integration build URL"); - assert.match(url.pathname, /^\/[^/]+\/[^/]+\/_build\/results\/?$/i, "Use an organization/project build results URL"); - assert.match(url.searchParams.get("buildId") || "", /^[1-9]\d*$/, "An integration build ID is required"); - assert.ok(!url.username && !url.password && !url.hash, "Invalid build URL"); - return url.toString(); -} - -export function planRelease({ channel, version, enabled, buildUrl, ref }) { - assert.ok(["next", "latest"].includes(channel), "Channel must be next or latest"); - validateVersion(version); - if (channel === "latest") { - assert.equal(enabled, "true", "Publishing is blocked until the RepoFlow upload limit is resolved"); - assert.equal(ref, "refs/heads/main", "Promote latest only from the main workflow"); - validateBuildUrl(buildUrl); - } - return { channel, version, publish: enabled === "true" }; -} - -export function requireReviewers(environment) { - assert.ok(environment.protection_rules?.some(rule => - rule.type === "required_reviewers" && rule.reviewers?.length > 0), - "Configure required reviewers on the repoflow-latest environment before enabling promotion"); -} - -function json(file) { return JSON.parse(readFileSync(file, "utf8").replace(/^\uFEFF/, "")); } -function integrity(file) { return "sha512-" + createHash("sha512").update(readFileSync(file)).digest("base64"); } - -export function preparePackage(directory, version) { - validateVersion(version); - const manifestPath = path.join(directory, "npm/package.json"); - const manifest = json(manifestPath); - assert.equal(manifest.name, packageName); - const projectPath = path.join(directory, "src/cmf-codereview.csproj"); - const project = readFileSync(projectPath, "utf8"); - assert.equal((project.match(/[^<]*<\/Version>/g) || []).length, 1, "Expected one project Version"); - manifest.version = version; - writeFileSync(manifestPath, JSON.stringify(manifest, null, 2) + "\n"); - writeFileSync(projectPath, project.replace(/[^<]*<\/Version>/, "" + version + "")); -} - -export function createManifest(directory, commit) { - assert.match(commit, /^[0-9a-f]{40}$/, "A source commit is required"); - const pack = json(path.join(directory, "release/pack.json")); - assert.equal(pack.length, 1, "Expected one npm archive"); - const entry = pack[0]; - const manifest = json(path.join(directory, "npm/package.json")); - assert.equal(entry.name, packageName); - assert.equal(entry.version, manifest.version); - validateVersion(entry.version); - assert.equal(path.basename(entry.filename), entry.filename, "Invalid archive filename"); - assert.ok(entry.filename.endsWith(".tgz")); - for (const rid of runtimes) { - const executable = "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : ""); - assert.ok(entry.files?.some(file => file.path === executable), "Archive is missing " + executable); - } - const archive = path.join(directory, "release", entry.filename); - assert.equal(entry.integrity, integrity(archive), "Archive integrity mismatch"); - const result = { - schemaVersion: 1, name: packageName, version: entry.version, commit, - file: entry.filename, integrity: entry.integrity, size: entry.size, runtimes - }; - writeFileSync(path.join(directory, "release/manifest.json"), JSON.stringify(result, null, 2) + "\n"); - return result; -} - -export function verifyArchive(directory, version, commit) { - const manifest = json(path.join(directory, "manifest.json")); - assert.equal(manifest.schemaVersion, 1); - assert.equal(manifest.name, packageName); - assert.equal(manifest.version, validateVersion(version)); - if (commit) assert.equal(manifest.commit, commit); - assert.equal(path.basename(manifest.file), manifest.file); - assert.ok(manifest.file.endsWith(".tgz")); - assert.equal(integrity(path.join(directory, manifest.file)), manifest.integrity, "Archive was changed"); - assert.deepEqual(manifest.runtimes, runtimes); - return manifest; -} - -export function verifyRegistry(metadata, version, expectedIntegrity) { - assert.equal(metadata.version, validateVersion(version), "Registry version mismatch"); - const actual = metadata.dist?.integrity || metadata["dist.integrity"]; - assert.match(actual || "", /^sha512-[A-Za-z0-9+/]+={0,2}$/, "Registry SHA-512 integrity is missing"); - if (expectedIntegrity) assert.equal(actual, expectedIntegrity, "Published package differs from tested archive"); - return actual; -} - -export function verifyPromotion(metadata, tags, version) { - verifyRegistry(metadata, version); - assert.equal(tags.next, version, "Only the currently published next candidate can be promoted"); -} - -function output(name, value) { - if (process.env.GITHUB_OUTPUT) appendFileSync(process.env.GITHUB_OUTPUT, name + "=" + value + "\n"); -} -function summary(text) { - if (process.env.GITHUB_STEP_SUMMARY) appendFileSync(process.env.GITHUB_STEP_SUMMARY, text + "\n"); - console.log(text); -} - -async function main(command, ...args) { - const env = process.env; - switch (command) { - case "plan": { - const plan = planRelease({ channel: env.RELEASE_CHANNEL, version: env.RELEASE_VERSION, - enabled: env.CODE_REVIEW_PUBLISH_ENABLED, buildUrl: env.INTEGRATION_BUILD_URL, ref: env.GITHUB_REF }); - output("version", plan.version); - output("publish", String(plan.publish)); - summary("Version: " + plan.version + "; channel: " + plan.channel + - (plan.publish ? "" : "\nPublishing is DISABLED. This run only builds and tests the archive.")); - if (plan.channel === "latest") summary("Integration run to review before approval: " + validateBuildUrl(env.INTEGRATION_BUILD_URL)); - break; - } - case "check-approval": { - const response = await fetch("https://api.github.com/repos/criticalmanufacturing/cli-plugins/environments/repoflow-latest", { - headers: { authorization: "Bearer " + env.GITHUB_TOKEN, accept: "application/vnd.github+json", - "X-GitHub-Api-Version": "2022-11-28" }, signal: AbortSignal.timeout(20000) - }); - assert.ok(response.ok, "Cannot inspect repoflow-latest required reviewers: HTTP " + response.status); - requireReviewers(await response.json()); - break; - } - case "prepare": preparePackage(process.cwd(), args[0]); break; - case "manifest": { - const manifest = createManifest(process.cwd(), env.GITHUB_SHA); - summary("Built " + manifest.file + " (" + manifest.size + " bytes), including Windows, Linux and macOS x64.\nIntegrity: " + manifest.integrity); - break; - } - case "archive": { - const manifest = verifyArchive(args[0], args[1], args[2]); - output("archive", manifest.file); - console.log(manifest.file); - break; - } - case "unpublished": - assert.equal(json(args[0]).error?.code, "E404", "Registry lookup failed; only a confirmed E404 allows publication"); - break; - case "registry": verifyRegistry(json(args[0]), args[1], args[2]); break; - case "promotion": - verifyPromotion(json(args[0]), json(args[1]), args[2]); - break; - case "smoke": { - const findings = json(args[0]); - assert.ok(Array.isArray(findings) && findings.some(finding => finding.Rule === "LoadInsideLoop"), - "The installed package did not scan the fixture correctly"); - const version = readFileSync(args[1], "utf8").trim(); - assert.ok(version.split(/\s+/).includes(args[2]), "Installed executable reports an unexpected version: " + version); - break; - } - default: throw new Error("Unknown release command: " + command); - } -} - -if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) { - main(...process.argv.slice(2)).catch(error => { console.error(error.message); process.exitCode = 1; }); -} diff --git a/cmf-codereview/scripts/release.test.mjs b/cmf-codereview/scripts/release.test.mjs deleted file mode 100644 index ab28281..0000000 --- a/cmf-codereview/scripts/release.test.mjs +++ /dev/null @@ -1,83 +0,0 @@ -import test from "node:test"; -import assert from "node:assert/strict"; -import { createHash } from "node:crypto"; -import { mkdtempSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs"; -import os from "node:os"; -import path from "node:path"; -import { createManifest, packageName, planRelease, preparePackage, requireReviewers, runtimes, - validateBuildUrl, validateVersion, verifyArchive, verifyPromotion, verifyRegistry } from "./release.mjs"; - -const buildUrl = "https://dev.azure.com/example-org/Project/_build/results?buildId=12345"; -const commit = "a".repeat(40); -const sha = "sha512-" + createHash("sha512").update("archive").digest("base64"); - -test("versions reject ranges, shell input and ambiguous normalization", () => { - for (const value of ["1.0.1", "2.0.0-rc.1"]) assert.equal(validateVersion(value), value); - for (const value of ["latest", "^1.0.0", "v1.0.0", "01.0.0", "1.0.0-01", "1.0.0+build", "1.0.0; echo bad", "1.0.0\n"]) - assert.throws(() => validateVersion(value), value); -}); -test("disabled publishing permits a next archive build", () => { - assert.equal(planRelease({ channel: "next", version: "1.0.1", enabled: "", ref: "refs/heads/feature" }).publish, false); -}); -test("disabled publishing always blocks latest", () => { - assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "false", ref: "refs/heads/main", buildUrl }), /blocked/); -}); -test("latest needs main and an integration build URL", () => { - assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/feature", buildUrl }), /main/); - assert.throws(() => planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl: "" })); - assert.equal(planRelease({ channel: "latest", version: "1.0.1", enabled: "true", ref: "refs/heads/main", buildUrl }).publish, true); -}); -test("test evidence links support different Azure organizations and projects", () => { - assert.equal(validateBuildUrl(buildUrl), buildUrl); - const otherProject = "https://dev.azure.com/other-org/Another%20Project/_build/results?buildId=67890"; - assert.equal(validateBuildUrl(otherProject), otherProject); - for (const value of ["https://example.com/?buildId=123", buildUrl.replace('/_build/results', '/_git/repository'), - buildUrl.replace('/Project', ''), buildUrl.replace("12345", "bad"), buildUrl.replace('https://', 'http://'), - buildUrl.replace('https://', 'https://user:password@'), buildUrl + '#fragment']) - assert.throws(() => validateBuildUrl(value)); -}); -test("promotion requires configured manual reviewers", () => { - assert.throws(() => requireReviewers({}), /required reviewers/); - assert.throws(() => requireReviewers({ protection_rules: [{ type: "required_reviewers", reviewers: [] }] })); - requireReviewers({ protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User" }] }] }); -}); -test("promotion matches the existing next candidate and registry integrity", () => { - verifyPromotion({ version: "1.0.1", "dist.integrity": sha }, { next: "1.0.1", latest: "1.0.0" }, "1.0.1"); - assert.throws(() => verifyPromotion({ version: "1.0.1", "dist.integrity": sha }, { next: "1.0.2" }, "1.0.1")); - assert.throws(() => verifyPromotion({ version: "1.0.1" }, { next: "1.0.1" }, "1.0.1")); -}); -test("published bytes and version match the tested package", () => { - verifyRegistry({ version: "1.0.1", dist: { integrity: sha } }, "1.0.1", sha); - assert.throws(() => verifyRegistry({ version: "1.0.2", "dist.integrity": sha }, "1.0.1", sha)); - assert.throws(() => verifyRegistry({ version: "1.0.1", "dist.integrity": sha }, "1.0.1", "different")); -}); -test("stamping aligns npm and dotnet versions without changing dependencies", t => { - const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-release-")); - t.after(() => rmSync(dir, { recursive: true, force: true })); - mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "src")); - writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.0.0-alpha", dependencies: { debug: "^4.4.3" } })); - writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), "1.0.0-alpha"); - preparePackage(dir, "1.0.1"); - const pkg = JSON.parse(readFileSync(path.join(dir, "npm/package.json"), "utf8")); - assert.equal(pkg.version, "1.0.1"); - assert.deepEqual(pkg.dependencies, { debug: "^4.4.3" }); - assert.match(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8"), /1.0.1<\/Version>/); -}); -test("archives require all platforms and reject corruption", t => { - const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-archive-")); - t.after(() => rmSync(dir, { recursive: true, force: true })); - mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "release")); - writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.0.1" })); - const pack = [{ name: packageName, version: "1.0.1", filename: "candidate.tgz", integrity: sha, size: 7, - files: runtimes.map(rid => ({ path: "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : "") })) }]; - writeFileSync(path.join(dir, "release/candidate.tgz"), "archive"); - const packFile = path.join(dir, "release/pack.json"); - writeFileSync(packFile, JSON.stringify(pack)); - createManifest(dir, commit); - verifyArchive(path.join(dir, "release"), "1.0.1", commit); - assert.throws(() => verifyArchive(path.join(dir, "release"), "1.0.1", "b".repeat(40))); - pack[0].files.pop(); writeFileSync(packFile, JSON.stringify(pack)); - assert.throws(() => createManifest(dir, commit), /missing dist\/osx-x64/); - writeFileSync(path.join(dir, "release/candidate.tgz"), "corrupt"); - assert.throws(() => verifyArchive(path.join(dir, "release"), "1.0.1", commit), /changed/); -}); diff --git a/cmf-codereview/scripts/smoke-package.sh b/cmf-codereview/scripts/smoke-package.sh index ee57d7c..04ddc7b 100644 --- a/cmf-codereview/scripts/smoke-package.sh +++ b/cmf-codereview/scripts/smoke-package.sh @@ -3,8 +3,8 @@ set -Eeuo pipefail release_dir="$1" version="$2" -helper="$(pwd)/scripts/release.mjs" -archive="$(node "$helper" archive "$release_dir" "$version")" +helper="$(pwd)/scripts/package.mjs" +archive="$(node "$helper" archive "$release_dir" "$version" "${3:-}")" install_dir="$(mktemp -d)" cleanup() { local status=$? diff --git a/cmf-codereview/src/cmf-codereview.csproj b/cmf-codereview/src/cmf-codereview.csproj index e0b6486..4460d10 100644 --- a/cmf-codereview/src/cmf-codereview.csproj +++ b/cmf-codereview/src/cmf-codereview.csproj @@ -9,7 +9,7 @@ cmf-codereview cmf-codereview true - 1.0.0-alpha + 1.1.0 From 1805285ea0b76f39bf3af2742dda090858f7da38 Mon Sep 17 00:00:00 2001 From: Guilherme Cota <1190640@isep.ipp.pt> Date: Fri, 13 Nov 2026 14:18:43 +0000 Subject: [PATCH 5/5] fix(codereview): keep package validation independent of release version --- cmf-codereview/README.md | 2 +- cmf-codereview/docs/Releases.md | 12 +++--- cmf-codereview/npm/package.json | 2 +- cmf-codereview/scripts/package.test.mjs | 49 +++++++++++++++--------- cmf-codereview/src/cmf-codereview.csproj | 2 +- 5 files changed, 39 insertions(+), 28 deletions(-) diff --git a/cmf-codereview/README.md b/cmf-codereview/README.md index cb67919..e9da5e8 100644 --- a/cmf-codereview/README.md +++ b/cmf-codereview/README.md @@ -97,4 +97,4 @@ dotnet test ## Packages for manual testing -The `Package-CodeReview` GitHub Actions workflow automatically builds and tests an all-platform package on pull requests and pushes to `main`. After the .NET tests and Windows/Linux/Intel macOS package checks pass, download the `codereview-` artifact for manual testing. Set the next version in `npm/package.json` (currently `1.1.0`). See [the package guide](docs/Releases.md) for the workflow and download instructions. Integration testing and publication are manual. +The `Package-CodeReview` GitHub Actions workflow automatically builds and tests an all-platform package on pull requests and pushes to `main`. After the .NET tests and Windows/Linux/Intel macOS package checks pass, download the `codereview-` artifact for manual testing. Set the next version in `npm/package.json`; the workflow reads it automatically for each run. See [the package guide](docs/Releases.md) for the workflow and download instructions. Integration testing and publication are manual. diff --git a/cmf-codereview/docs/Releases.md b/cmf-codereview/docs/Releases.md index 536f5c9..c8938dc 100644 --- a/cmf-codereview/docs/Releases.md +++ b/cmf-codereview/docs/Releases.md @@ -4,11 +4,7 @@ The `Package-CodeReview` GitHub Actions workflow automatically builds and valida ## Choose the next version -Edit `version` in **`cmf-codereview/npm/package.json`**. The current target is **`1.1.0`**. Use an exact npm version without a `v` prefix: - -```json -"version": "1.1.0" -``` +Edit `version` in **`cmf-codereview/npm/package.json`** when preparing a release. Use an exact npm version without a `v` prefix, such as `2.4.7` or `7.0.0-rc.2`. The workflow supports stable and prerelease versions and has no fixed target version. The automation change itself does not bump the distributed package version; prepare the next release version separately after merging it. This manifest is the workflow's source for the package version. The workflow reads it and sets the same version in `src/cmf-codereview.csproj` before building, so the executable and npm package agree. There is no workflow version input, automatic version bump, source commit, Git tag or GitHub release. The root `cmf-codereview/package.json` belongs to the build tooling and does not set the distributed plugin's version. @@ -29,15 +25,17 @@ No approval, publishing environment, registry credential or release switch is ne 1. Open the PR's **Package-CodeReview** check or select the run under **Actions > Package-CodeReview**. 2. Confirm the workflow completed successfully, including **Package ready for manual testing**. The separate `CI-Build` check should also pass before merging the PR. -3. Download **`codereview-1.1.0`** from the run's **Artifacts** section. Extract the downloaded ZIP to obtain the `.tgz`, `manifest.json` and `pack.json`. +3. Download **`codereview-`** from the run's **Artifacts** section, where `` is the value in `npm/package.json` for that run. Extract the downloaded ZIP to obtain the `.tgz`, `manifest.json` and `pack.json`. 4. Install the extracted `.tgz` in your manual test environment. For example, from a temporary npm project: ```bash - npm install /path/to/criticalmanufacturing-codereview-1.1.0.tgz + npm install /path/to/criticalmanufacturing-codereview-.tgz npx --no-install cmf-codereview --version npx --no-install cmf-codereview scan --repository-root /path/to/customization --output findings.json ``` + Replace `` with the version in the downloaded archive's filename before running these commands. + 5. Test the package in a consuming project's PR validation pipeline, including dependency restoration and inline PR comments. Use the same archive and keep the source commit/integrity with your test results. The final artifact is kept for 30 days. An **`unvalidated-codereview-`** artifact is used to transfer the archive between jobs and is kept for one day. It can exist even if a platform test fails; it is not ready for manual testing. If the workflow fails, fix the failure and use the final artifact from a successful run. diff --git a/cmf-codereview/npm/package.json b/cmf-codereview/npm/package.json index ef4822e..7f42f13 100644 --- a/cmf-codereview/npm/package.json +++ b/cmf-codereview/npm/package.json @@ -1,6 +1,6 @@ { "name": "@criticalmanufacturing/codereview", - "version": "1.1.0", + "version": "1.0.0-alpha", "description": "Critical Manufacturing CLI plugin: static analysis for CM Framework DEE/Orchestration code", "bin": { "cmf-codereview": "./run.js" diff --git a/cmf-codereview/scripts/package.test.mjs b/cmf-codereview/scripts/package.test.mjs index 95bd933..b9989e8 100644 --- a/cmf-codereview/scripts/package.test.mjs +++ b/cmf-codereview/scripts/package.test.mjs @@ -10,14 +10,15 @@ import { createManifest, packageName, preparePackage, runtimes, validateVersion, const commit = "a".repeat(40); const sha = "sha512-" + createHash("sha512").update("archive").digest("base64"); +const fixtureVersion = "3.7.2"; -function fixture(t) { +function fixture(t, version = fixtureVersion) { const dir = mkdtempSync(path.join(os.tmpdir(), "codereview-package-")); t.after(() => rmSync(dir, { recursive: true, force: true })); mkdirSync(path.join(dir, "npm")); mkdirSync(path.join(dir, "src")); mkdirSync(path.join(dir, "release")); - writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version: "1.1.0", dependencies: { debug: "^4.4.3" } })); + writeFileSync(path.join(dir, "npm/package.json"), JSON.stringify({ name: packageName, version, dependencies: { debug: "^4.4.3" } })); writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), "1.0.0-alpha"); - const pack = [{ name: packageName, version: "1.1.0", filename: "candidate.tgz", integrity: sha, size: 7, + const pack = [{ name: packageName, version, filename: "candidate.tgz", integrity: sha, size: 7, files: runtimes.map(rid => ({ path: "dist/" + rid + "/cmf-codereview" + (rid.startsWith("win") ? ".exe" : "") })) }]; writeFileSync(path.join(dir, "release/candidate.tgz"), "archive"); writeFileSync(path.join(dir, "release/pack.json"), JSON.stringify(pack)); @@ -25,8 +26,8 @@ function fixture(t) { } test("versions reject ranges, shell input and ambiguous normalization", () => { - for (const value of ["1.1.0", "2.0.0-rc.1"]) assert.equal(validateVersion(value), value); - for (const value of ["latest", "^1.0.0", "v1.1.0", "01.0.0", "1.0.0-01", "1.0.0+build", "1.0.0; echo bad", "1.0.0\n"]) + for (const value of [fixtureVersion, "2.0.0-rc.1"]) assert.equal(validateVersion(value), value); + for (const value of ["latest", "^1.0.0", "v2.4.7", "01.0.0", "1.0.0-01", "1.0.0+build", "1.0.0; echo bad", "1.0.0\n"]) assert.throws(() => validateVersion(value), value); }); @@ -34,20 +35,20 @@ test("npm manifest is the version source and stamping is repeatable without modi const { dir } = fixture(t); const pkgPath = path.join(dir, "npm/package.json"); const original = readFileSync(pkgPath, "utf8"); - assert.equal(preparePackage(dir), "1.1.0"); - assert.equal(preparePackage(dir), "1.1.0"); + assert.equal(preparePackage(dir), fixtureVersion); + assert.equal(preparePackage(dir), fixtureVersion); assert.equal(readFileSync(pkgPath, "utf8"), original); - assert.match(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8"), /1.1.0<\/Version>/); + assert.ok(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8").includes("" + fixtureVersion + "")); }); test("invalid package identity, version or project layout stops preparation", t => { const { dir } = fixture(t); const pkgPath = path.join(dir, "npm/package.json"); - writeFileSync(pkgPath, JSON.stringify({ name: "wrong", version: "1.1.0" })); + writeFileSync(pkgPath, JSON.stringify({ name: "wrong", version: fixtureVersion })); assert.throws(() => preparePackage(dir)); writeFileSync(pkgPath, JSON.stringify({ name: packageName, version: "latest" })); assert.throws(() => preparePackage(dir)); - writeFileSync(pkgPath, JSON.stringify({ name: packageName, version: "1.1.0" })); + writeFileSync(pkgPath, JSON.stringify({ name: packageName, version: fixtureVersion })); writeFileSync(path.join(dir, "src/cmf-codereview.csproj"), ""); assert.throws(() => preparePackage(dir), /Expected one project Version/); }); @@ -56,11 +57,11 @@ test("archives retain their source commit and reject mismatched version, commit const { dir } = fixture(t); createManifest(dir, commit); const out = path.join(dir, "release"); - assert.equal(verifyArchive(out, "1.1.0", commit).integrity, sha); + assert.equal(verifyArchive(out, fixtureVersion, commit).integrity, sha); assert.throws(() => verifyArchive(out, "1.2.0", commit)); - assert.throws(() => verifyArchive(out, "1.1.0", "b".repeat(40))); + assert.throws(() => verifyArchive(out, fixtureVersion, "b".repeat(40))); writeFileSync(path.join(out, "candidate.tgz"), "corrupt"); - assert.throws(() => verifyArchive(out, "1.1.0", commit), /changed/); + assert.throws(() => verifyArchive(out, fixtureVersion, commit), /changed/); }); test("missing platform bundles prevent creation of a validated manifest", t => { @@ -78,22 +79,34 @@ test("manifest rejects mismatched package metadata and integrity", t => { pack[0].version = "1.2.0"; writeFileSync(packPath, JSON.stringify(pack)); assert.throws(() => createManifest(dir, commit)); - pack[0].version = "1.1.0"; + pack[0].version = fixtureVersion; pack[0].integrity = "sha512-invalid"; writeFileSync(packPath, JSON.stringify(pack)); assert.throws(() => createManifest(dir, commit), /integrity mismatch/); }); test("smoke validation requires both the expected finding and executable version", () => { - verifySmoke([{ Rule: "LoadInsideLoop" }], "cmf-codereview 1.1.0\n", "1.1.0"); - assert.throws(() => verifySmoke([], "1.1.0", "1.1.0"), /did not scan/); - assert.throws(() => verifySmoke([{ Rule: "LoadInsideLoop" }], "1.0.0", "1.1.0"), /unexpected version/); + verifySmoke([{ Rule: "LoadInsideLoop" }], "cmf-codereview " + fixtureVersion + "\n", fixtureVersion); + assert.throws(() => verifySmoke([], fixtureVersion, fixtureVersion), /did not scan/); + assert.throws(() => verifySmoke([{ Rule: "LoadInsideLoop" }], "1.0.0", fixtureVersion), /unexpected version/); }); test("command failures propagate a nonzero process exit status", t => { const { dir } = fixture(t); const helper = fileURLToPath(new URL("./package.mjs", import.meta.url)); - const result = spawnSync(process.execPath, [helper, "archive", path.join(dir, "release"), "1.1.0", commit], { encoding: "utf8" }); + const result = spawnSync(process.execPath, [helper, "archive", path.join(dir, "release"), fixtureVersion, commit], { encoding: "utf8" }); assert.equal(result.status, 1); assert.notEqual(result.stderr.trim(), ""); }); + +for (const version of ["0.0.0", "1.0.0-alpha", "2.4.7", "7.0.0-rc.2", "12.3.4-beta.1"]) { + test("stamping, archive validation and smoke checks use the manifest version: " + version, t => { + const { dir } = fixture(t, version); + assert.equal(preparePackage(dir), version); + assert.ok(readFileSync(path.join(dir, "src/cmf-codereview.csproj"), "utf8").includes("" + version + "")); + const manifest = createManifest(dir, commit); + assert.equal(manifest.version, version); + assert.equal(verifyArchive(path.join(dir, "release"), version, commit).version, version); + verifySmoke([{ Rule: "LoadInsideLoop" }], "cmf-codereview " + version + "\n", version); + }); +} diff --git a/cmf-codereview/src/cmf-codereview.csproj b/cmf-codereview/src/cmf-codereview.csproj index 4460d10..e0b6486 100644 --- a/cmf-codereview/src/cmf-codereview.csproj +++ b/cmf-codereview/src/cmf-codereview.csproj @@ -9,7 +9,7 @@ cmf-codereview cmf-codereview true - 1.1.0 + 1.0.0-alpha