From 2bcacebe801040279696c20f6aaf1732a0ed3820 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 22 Nov 2026 13:27:26 +0000 Subject: [PATCH 1/5] github-ci: split Worker version upload and promotion --- .../workflows/github-ci-worker-promote.yml | 62 ++++++++++++++++ .github/workflows/github-ci-worker-tests.yml | 3 + .github/workflows/github-ci-worker-upload.yml | 72 +++++++++++++++++++ pkgs/github-ci/worker/README.md | 27 +++++++ .../worker/test/deploy_workflows_test.py | 34 +++++++++ 5 files changed, 198 insertions(+) create mode 100644 .github/workflows/github-ci-worker-promote.yml create mode 100644 .github/workflows/github-ci-worker-upload.yml create mode 100644 pkgs/github-ci/worker/test/deploy_workflows_test.py diff --git a/.github/workflows/github-ci-worker-promote.yml b/.github/workflows/github-ci-worker-promote.yml new file mode 100644 index 0000000000..9ccb330989 --- /dev/null +++ b/.github/workflows/github-ci-worker-promote.yml @@ -0,0 +1,62 @@ +name: github-ci Worker version promotion + +# Promotion is a separate, explicit action. Configure the +# github-ci-production environment with required reviewers and limit its +# deployment branches to main. The production API token belongs only in +# that protected environment. +on: + workflow_dispatch: + inputs: + version_id: + description: Workers Version ID from a successful version-upload run + required: true + type: string + +permissions: + contents: read + +concurrency: + group: github-ci-worker-production + cancel-in-progress: false + +jobs: + promote: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + timeout-minutes: 10 + environment: github-ci-production + defaults: + run: + working-directory: pkgs/github-ci/worker + env: + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + VERSION_ID: ${{ inputs.version_id }} + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + cache-dependency-path: pkgs/github-ci/worker/package-lock.json + + - name: Validate inputs and credentials + run: | + test -n "$CLOUDFLARE_ACCOUNT_ID" || { echo "CLOUDFLARE_ACCOUNT_ID repository variable is required" >&2; exit 1; } + test -n "$CLOUDFLARE_API_TOKEN" || { echo "CLOUDFLARE_API_TOKEN production environment secret is required" >&2; exit 1; } + [[ "$VERSION_ID" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] || { + echo "version_id must be a Cloudflare Workers Version UUID" >&2 + exit 1 + } + + - name: Install locked dependencies + run: npm ci + + - name: Promote selected version to 100% traffic + run: >- + npx wrangler versions deploy "${VERSION_ID}@100%" + --config wrangler.toml + --name github-ci + --message "promote github-ci version ${VERSION_ID} via GitHub Actions" + --yes diff --git a/.github/workflows/github-ci-worker-tests.yml b/.github/workflows/github-ci-worker-tests.yml index b92139eb87..2b4e9e6f21 100644 --- a/.github/workflows/github-ci-worker-tests.yml +++ b/.github/workflows/github-ci-worker-tests.yml @@ -55,3 +55,6 @@ jobs: done npm ci npm test + + - name: Check version workflow safety boundaries + run: python3 pkgs/github-ci/worker/test/deploy_workflows_test.py diff --git a/.github/workflows/github-ci-worker-upload.yml b/.github/workflows/github-ci-worker-upload.yml new file mode 100644 index 0000000000..06542f1bde --- /dev/null +++ b/.github/workflows/github-ci-worker-upload.yml @@ -0,0 +1,72 @@ +name: github-ci Worker version upload + +# Upload creates an immutable Workers Version only. Traffic changes are +# handled by the separate, manually dispatched promotion workflow. +# Wrangler versions upload inherits existing secret bindings; this job +# never reads or materializes the Worker's runtime secret values. +on: + push: + branches: [main] + paths: + - "pkgs/github-ci/worker/**" + - ".github/workflows/github-ci-worker-upload.yml" + - ".github/workflows/github-ci-worker-promote.yml" + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: github-ci-worker-upload + cancel-in-progress: false + +jobs: + upload: + if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + timeout-minutes: 15 + environment: github-ci-cloudflare-upload + defaults: + run: + working-directory: pkgs/github-ci/worker + env: + CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} + steps: + - uses: actions/checkout@v7 + + - uses: actions/setup-node@v7 + with: + node-version: 24 + cache: npm + cache-dependency-path: pkgs/github-ci/worker/package-lock.json + + - name: Require Cloudflare credentials + run: | + test -n "$CLOUDFLARE_ACCOUNT_ID" || { echo "CLOUDFLARE_ACCOUNT_ID repository variable is required" >&2; exit 1; } + test -n "$CLOUDFLARE_API_TOKEN" || { echo "CLOUDFLARE_API_TOKEN Actions secret is required" >&2; exit 1; } + + - name: Install locked dependencies + run: npm ci + + - name: Upload immutable Workers Version + env: + WRANGLER_OUTPUT_FILE_PATH: ${{ runner.temp }}/wrangler-output.jsonl + run: | + npx wrangler versions upload \ + --config wrangler.toml \ + --tag "git-${GITHUB_SHA:0:12}" \ + --message "github-ci candidate ${GITHUB_SHA}" + node --input-type=commonjs <<'NODE' + const fs = require("node:fs"); + const output = process.env.WRANGLER_OUTPUT_FILE_PATH; + const rows = fs.readFileSync(output, "utf8").trim().split(/\r?\n/).filter(Boolean).map(JSON.parse); + const uploaded = rows.find((row) => row.type === "version-upload"); + if (!uploaded || uploaded.worker_name !== "github-ci" || !uploaded.version_id) { + throw new Error("Wrangler did not report a github-ci Workers Version ID"); + } + fs.appendFileSync(process.env.GITHUB_OUTPUT, `version_id=${uploaded.version_id}\n`); + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, + `Uploaded github-ci Workers Version \`${uploaded.version_id}\` for commit \`${process.env.GITHUB_SHA}\`.\n\n` + + "No traffic was promoted. To change production traffic, run the separate **github-ci Worker version promotion** workflow on `main` and provide this version ID.\n"); + NODE diff --git a/pkgs/github-ci/worker/README.md b/pkgs/github-ci/worker/README.md index 0323af90a6..ded4a4543c 100644 --- a/pkgs/github-ci/worker/README.md +++ b/pkgs/github-ci/worker/README.md @@ -71,6 +71,33 @@ npm test # vitest + @cloudflare/vitest-pool-workers npm run deploy # wrangler deploy (fleet Cloudflare account) ``` +## GitHub Actions version flow + +`.github/workflows/github-ci-worker-upload.yml` uploads an immutable +Workers Version from `main` with `wrangler versions upload`; it does not +create a deployment or change production traffic. Its run summary gives +the version UUID. `.github/workflows/github-ci-worker-promote.yml` is a +separate `workflow_dispatch` workflow that accepts that UUID and deploys +only the selected version to 100% of traffic. It runs only when +dispatched from `main` and uses the `github-ci-production` environment +as the production approval gate. + +Set the GitHub repository variable `CLOUDFLARE_ACCOUNT_ID` and add the +Actions secret `CLOUDFLARE_API_TOKEN` to both the +`github-ci-cloudflare-upload` and `github-ci-production` environments. +Use a token scoped to Workers Scripts Edit for the account. Configure +`github-ci-production` with required reviewers and restrict its +deployment branches to `main`. The upload environment also needs the +token, but it does not need production reviewers. + +The upload workflow leaves runtime secrets out of GitHub Actions. +Wrangler's Versions upload inherits the Worker's existing secret +bindings, while non-secret bindings and production endpoint vars come +from `wrangler.toml`. Keep the existing `GITHUB_WEBHOOK_SECRET`, Turso, +and queue-broker secrets provisioned on the Worker before promoting a +candidate. This is the GitHub CI webhook Worker, not +`infra/github-backup`'s GitHub App backup receiver. + The cutover from the earlier Postgres receiver is complete (#5693, closeout below). diff --git a/pkgs/github-ci/worker/test/deploy_workflows_test.py b/pkgs/github-ci/worker/test/deploy_workflows_test.py new file mode 100644 index 0000000000..95f78364dd --- /dev/null +++ b/pkgs/github-ci/worker/test/deploy_workflows_test.py @@ -0,0 +1,34 @@ +#!/usr/bin/env python3 +"""Offline guard tests for the github-ci Worker version workflows.""" + +from pathlib import Path +import unittest + + +REPO_ROOT = Path(__file__).resolve().parents[4] +UPLOAD = (REPO_ROOT / ".github/workflows/github-ci-worker-upload.yml").read_text() +PROMOTE = (REPO_ROOT / ".github/workflows/github-ci-worker-promote.yml").read_text() + + +class DeploymentWorkflowTests(unittest.TestCase): + def test_upload_only_creates_a_version_and_keeps_runtime_secrets_out(self): + self.assertIn("wrangler versions upload", UPLOAD) + self.assertNotIn("wrangler versions deploy", UPLOAD) + self.assertNotIn("wrangler deploy", UPLOAD) + self.assertNotIn("--secrets-file", UPLOAD) + self.assertIn("CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}", UPLOAD) + self.assertIn("environment: github-ci-cloudflare-upload", UPLOAD) + self.assertIn("if: github.ref == 'refs/heads/main'", UPLOAD) + + def test_promotion_is_manual_protected_and_uses_the_supplied_version(self): + self.assertIn("workflow_dispatch:", PROMOTE) + self.assertIn("version_id:", PROMOTE) + self.assertIn("environment: github-ci-production", PROMOTE) + self.assertIn("if: github.ref == 'refs/heads/main'", PROMOTE) + self.assertIn('"${VERSION_ID}@100%"', PROMOTE) + self.assertIn("--name github-ci", PROMOTE) + self.assertNotIn("wrangler deploy", PROMOTE) + + +if __name__ == "__main__": + unittest.main() From db63e22e58170d97f06e2eb5a58c57956d233240 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 22 Nov 2026 13:29:40 +0000 Subject: [PATCH 2/5] github-ci: verify Worker promotion traffic --- .github/workflows/github-ci-worker-promote.yml | 16 ++++++++++++++++ pkgs/github-ci/worker/README.md | 5 +++-- .../worker/test/deploy_workflows_test.py | 4 +++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/workflows/github-ci-worker-promote.yml b/.github/workflows/github-ci-worker-promote.yml index 9ccb330989..ce886fafb0 100644 --- a/.github/workflows/github-ci-worker-promote.yml +++ b/.github/workflows/github-ci-worker-promote.yml @@ -60,3 +60,19 @@ jobs: --name github-ci --message "promote github-ci version ${VERSION_ID} via GitHub Actions" --yes + + - name: Verify selected version serves 100% of production traffic + env: + DEPLOYMENT_STATUS_PATH: ${{ runner.temp }}/github-ci-deployment.json + run: | + npx wrangler deployments status --config wrangler.toml --name github-ci --json > "$DEPLOYMENT_STATUS_PATH" + node --input-type=commonjs <<'NODE' + const fs = require("node:fs"); + const status = JSON.parse(fs.readFileSync(process.env.DEPLOYMENT_STATUS_PATH, "utf8")); + const versions = status.versions ?? []; + if (versions.length !== 1 || versions[0].version_id !== process.env.VERSION_ID || versions[0].percentage !== 100) { + throw new Error("Production deployment does not serve the requested version at exactly 100% traffic"); + } + fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, + `Verified github-ci version \`${process.env.VERSION_ID}\` serves 100% of production traffic.\n`); + NODE diff --git a/pkgs/github-ci/worker/README.md b/pkgs/github-ci/worker/README.md index ded4a4543c..d34c19f8d2 100644 --- a/pkgs/github-ci/worker/README.md +++ b/pkgs/github-ci/worker/README.md @@ -79,8 +79,9 @@ create a deployment or change production traffic. Its run summary gives the version UUID. `.github/workflows/github-ci-worker-promote.yml` is a separate `workflow_dispatch` workflow that accepts that UUID and deploys only the selected version to 100% of traffic. It runs only when -dispatched from `main` and uses the `github-ci-production` environment -as the production approval gate. +dispatched from `main`, uses the `github-ci-production` environment as +the production approval gate, and verifies Cloudflare reports that +version serving 100% of traffic. Set the GitHub repository variable `CLOUDFLARE_ACCOUNT_ID` and add the Actions secret `CLOUDFLARE_API_TOKEN` to both the diff --git a/pkgs/github-ci/worker/test/deploy_workflows_test.py b/pkgs/github-ci/worker/test/deploy_workflows_test.py index 95f78364dd..15ebe3e187 100644 --- a/pkgs/github-ci/worker/test/deploy_workflows_test.py +++ b/pkgs/github-ci/worker/test/deploy_workflows_test.py @@ -27,7 +27,9 @@ def test_promotion_is_manual_protected_and_uses_the_supplied_version(self): self.assertIn("if: github.ref == 'refs/heads/main'", PROMOTE) self.assertIn('"${VERSION_ID}@100%"', PROMOTE) self.assertIn("--name github-ci", PROMOTE) - self.assertNotIn("wrangler deploy", PROMOTE) + self.assertIn("wrangler deployments status", PROMOTE) + self.assertIn("versions[0].percentage !== 100", PROMOTE) + self.assertNotRegex(PROMOTE, r"wrangler deploy(?:\s|$)") if __name__ == "__main__": From 36a80d7e8a3711d8ca985655eb8e566522889f03 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Sun, 22 Nov 2026 14:05:01 +0000 Subject: [PATCH 3/5] Use cf Workers Versions for github-ci deployments --- .../workflows/github-ci-worker-promote.yml | 133 +- .github/workflows/github-ci-worker-tests.yml | 16 +- .github/workflows/github-ci-worker-upload.yml | 129 +- pkgs/github-ci/worker/.gitignore | 1 + pkgs/github-ci/worker/README.md | 56 +- pkgs/github-ci/worker/cloudflare.config.ts | 22 + pkgs/github-ci/worker/package-lock.json | 1588 +++++++++++------ pkgs/github-ci/worker/package.json | 12 +- .../worker/scripts/deployment-guard.mjs | 207 +++ .../worker/test/deploy_workflows_test.py | 45 +- .../worker/test/deployment-config.test.mjs | 64 + .../worker/test/deployment-guard.test.mjs | 138 ++ pkgs/github-ci/worker/tsconfig.json | 3 +- pkgs/github-ci/worker/vitest.config.ts | 3 + 14 files changed, 1778 insertions(+), 639 deletions(-) create mode 100644 pkgs/github-ci/worker/cloudflare.config.ts create mode 100644 pkgs/github-ci/worker/scripts/deployment-guard.mjs create mode 100644 pkgs/github-ci/worker/test/deployment-config.test.mjs create mode 100644 pkgs/github-ci/worker/test/deployment-guard.test.mjs diff --git a/.github/workflows/github-ci-worker-promote.yml b/.github/workflows/github-ci-worker-promote.yml index ce886fafb0..cd077a25fd 100644 --- a/.github/workflows/github-ci-worker-promote.yml +++ b/.github/workflows/github-ci-worker-promote.yml @@ -1,14 +1,12 @@ name: github-ci Worker version promotion -# Promotion is a separate, explicit action. Configure the -# github-ci-production environment with required reviewers and limit its -# deployment branches to main. The production API token belongs only in -# that protected environment. +# Explicit promotion is separate from version upload. Configure this +# environment with required reviewers and allow deployment only from main. on: workflow_dispatch: inputs: version_id: - description: Workers Version ID from a successful version-upload run + description: Workers Version UUID from an upload workflow run required: true type: string @@ -21,58 +19,105 @@ concurrency: jobs: promote: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - timeout-minutes: 10 + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + timeout-minutes: 15 environment: github-ci-production defaults: run: working-directory: pkgs/github-ci/worker - env: - CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} - VERSION_ID: ${{ inputs.version_id }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + fetch-depth: 0 + persist-credentials: false - - uses: actions/setup-node@v7 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 24 + node-version: 24.22.0 cache: npm cache-dependency-path: pkgs/github-ci/worker/package-lock.json - - name: Validate inputs and credentials + - name: Install pinned cf and locked tooling + run: npm ci --ignore-scripts --no-audit --no-fund + + - name: Validate Cloudflare credentials and version UUID + id: validate + env: + CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID_INPUT: ${{ inputs.version_id }} run: | - test -n "$CLOUDFLARE_ACCOUNT_ID" || { echo "CLOUDFLARE_ACCOUNT_ID repository variable is required" >&2; exit 1; } - test -n "$CLOUDFLARE_API_TOKEN" || { echo "CLOUDFLARE_API_TOKEN production environment secret is required" >&2; exit 1; } - [[ "$VERSION_ID" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] || { - echo "version_id must be a Cloudflare Workers Version UUID" >&2 - exit 1 - } + set -euo pipefail + [[ "$CF_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] + [[ -n "$CF_API_TOKEN" ]] + [[ "$VERSION_ID_INPUT" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] + echo "version_id=${VERSION_ID_INPUT,,}" >> "$GITHUB_OUTPUT" + + - name: Require the existing Worker + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null - - name: Install locked dependencies - run: npm ci + - name: Read exact version and check secret bindings and provenance + id: candidate + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.validate.outputs.version_id }} + run: | + set -euo pipefail + ./node_modules/.bin/cf -q workers versions get "$VERSION_ID" --worker github-ci \ + > "$RUNNER_TEMP/github-ci-version.json" + node scripts/deployment-guard.mjs verify-version \ + "$RUNNER_TEMP/github-ci-version.json" "$VERSION_ID" - - name: Promote selected version to 100% traffic - run: >- - npx wrangler versions deploy "${VERSION_ID}@100%" - --config wrangler.toml - --name github-ci - --message "promote github-ci version ${VERSION_ID} via GitHub Actions" - --yes + - name: Require the source commit to be on main history + env: + SOURCE_SHA: ${{ steps.candidate.outputs.source_sha }} + run: | + set -euo pipefail + git cat-file -e "${SOURCE_SHA}^{commit}" + git merge-base --is-ancestor "$SOURCE_SHA" "$GITHUB_SHA" + + - name: Require the selected version to be deployable + env: + CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.validate.outputs.version_id }} + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Authorization: Bearer $CF_API_TOKEN" \ + "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ + > "$RUNNER_TEMP/github-ci-deployable.json" + node scripts/deployment-guard.mjs verify-deployable \ + "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" + + - name: Create 100 percent deployment for the selected version + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.validate.outputs.version_id }} + run: | + set -euo pipefail + printf '[{"version_id":"%s","percentage":100}]\n' "$VERSION_ID" \ + > "$RUNNER_TEMP/github-ci-deployment-versions.json" + ./node_modules/.bin/cf -q workers deployments create \ + --worker github-ci --strategy percentage \ + --versions "@$RUNNER_TEMP/github-ci-deployment-versions.json" - - name: Verify selected version serves 100% of production traffic + - name: Read back latest deployment and verify provenance env: - DEPLOYMENT_STATUS_PATH: ${{ runner.temp }}/github-ci-deployment.json + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.validate.outputs.version_id }} + SOURCE_SHA: ${{ steps.candidate.outputs.source_sha }} run: | - npx wrangler deployments status --config wrangler.toml --name github-ci --json > "$DEPLOYMENT_STATUS_PATH" - node --input-type=commonjs <<'NODE' - const fs = require("node:fs"); - const status = JSON.parse(fs.readFileSync(process.env.DEPLOYMENT_STATUS_PATH, "utf8")); - const versions = status.versions ?? []; - if (versions.length !== 1 || versions[0].version_id !== process.env.VERSION_ID || versions[0].percentage !== 100) { - throw new Error("Production deployment does not serve the requested version at exactly 100% traffic"); - } - fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, - `Verified github-ci version \`${process.env.VERSION_ID}\` serves 100% of production traffic.\n`); - NODE + set -euo pipefail + ./node_modules/.bin/cf -q workers deployments list --worker github-ci \ + > "$RUNNER_TEMP/github-ci-deployments.json" + node scripts/deployment-guard.mjs verify-deployment \ + "$RUNNER_TEMP/github-ci-deployments.json" "$VERSION_ID" "$SOURCE_SHA" diff --git a/.github/workflows/github-ci-worker-tests.yml b/.github/workflows/github-ci-worker-tests.yml index 2b4e9e6f21..8d03ff26f9 100644 --- a/.github/workflows/github-ci-worker-tests.yml +++ b/.github/workflows/github-ci-worker-tests.yml @@ -43,9 +43,12 @@ jobs: - name: Set up Node uses: actions/setup-node@v7 with: - node-version: 24 + node-version: 24.22.0 - name: Run the github-ci worker vitest suite working-directory: pkgs/github-ci/worker + env: + XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config + WRANGLER_SEND_METRICS: "false" run: | for f in package.json package-lock.json test/policy.test.ts test/turso.test.ts test/sink.test.ts test/worker.test.ts; do if [ ! -f "$f" ]; then @@ -55,6 +58,17 @@ jobs: done npm ci npm test + npm run typecheck + + - name: Build and verify deployment metadata offline + working-directory: pkgs/github-ci/worker + env: + XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config + WRANGLER_SEND_METRICS: "false" + run: | + npm run build + node scripts/deployment-guard.mjs build .cloudflare/output/v1 + npm run test:deployment - name: Check version workflow safety boundaries run: python3 pkgs/github-ci/worker/test/deploy_workflows_test.py diff --git a/.github/workflows/github-ci-worker-upload.yml b/.github/workflows/github-ci-worker-upload.yml index 06542f1bde..f6d5d8a61f 100644 --- a/.github/workflows/github-ci-worker-upload.yml +++ b/.github/workflows/github-ci-worker-upload.yml @@ -1,9 +1,8 @@ name: github-ci Worker version upload -# Upload creates an immutable Workers Version only. Traffic changes are -# handled by the separate, manually dispatched promotion workflow. -# Wrangler versions upload inherits existing secret bindings; this job -# never reads or materializes the Worker's runtime secret values. +# Upload creates an immutable Workers Version only. It never changes +# production traffic. Every Cloudflare API operation uses cf; cf build +# delegates the offline artifact production to the pinned Wrangler. on: push: branches: [main] @@ -22,51 +21,107 @@ concurrency: jobs: upload: - if: github.ref == 'refs/heads/main' - runs-on: ubuntu-latest - timeout-minutes: 15 + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' + runs-on: ubuntu-24.04 + timeout-minutes: 20 environment: github-ci-cloudflare-upload defaults: run: working-directory: pkgs/github-ci/worker - env: - CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} steps: - - uses: actions/checkout@v7 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false - - uses: actions/setup-node@v7 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: - node-version: 24 + node-version: 24.22.0 cache: npm cache-dependency-path: pkgs/github-ci/worker/package-lock.json - - name: Require Cloudflare credentials + - name: Install pinned cf and locked tooling + run: npm ci --ignore-scripts --no-audit --no-fund + + - name: Typecheck the Worker and cf config + run: npm run typecheck + + - name: Build Build Output v1 offline + env: + XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config + WRANGLER_SEND_METRICS: "false" + run: npm run build + + - name: Verify Build Output, secret declarations, and pinned producer run: | - test -n "$CLOUDFLARE_ACCOUNT_ID" || { echo "CLOUDFLARE_ACCOUNT_ID repository variable is required" >&2; exit 1; } - test -n "$CLOUDFLARE_API_TOKEN" || { echo "CLOUDFLARE_API_TOKEN Actions secret is required" >&2; exit 1; } + node scripts/deployment-guard.mjs build .cloudflare/output/v1 + npm run test:deployment - - name: Install locked dependencies - run: npm ci + - name: Dry-run the exact prebuilt Version API request + env: + XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config + WRANGLER_SEND_METRICS: "false" + run: >- + ./node_modules/.bin/cf -q workers versions create + --worker github-ci --tag offline-check --message offline-check + --prebuilt --dry-run + + - name: Validate Cloudflare credentials + env: + CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: | + set -euo pipefail + [[ "$CF_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] + [[ -n "$CF_API_TOKEN" ]] + + - name: Require the existing Worker + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null + + - name: Upload immutable Workers Version only + id: upload + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: | + set -euo pipefail + tag="git-${GITHUB_SHA:0:12}" + ./node_modules/.bin/cf -q workers versions create \ + --worker github-ci \ + --tag "$tag" \ + --message "github-ci candidate ${GITHUB_SHA}" \ + --prebuilt + ./node_modules/.bin/cf -q workers versions list --worker github-ci \ + > "$RUNNER_TEMP/github-ci-versions.json" + node scripts/deployment-guard.mjs select-upload \ + "$RUNNER_TEMP/github-ci-versions.json" "$GITHUB_SHA" + + - name: Read back exact candidate and verify retained secret bindings + id: candidate + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.upload.outputs.version_id }} + run: | + set -euo pipefail + ./node_modules/.bin/cf -q workers versions get "$VERSION_ID" --worker github-ci \ + > "$RUNNER_TEMP/github-ci-version.json" + node scripts/deployment-guard.mjs verify-version \ + "$RUNNER_TEMP/github-ci-version.json" "$VERSION_ID" "$GITHUB_SHA" - - name: Upload immutable Workers Version + - name: Require the uploaded version to be deployable env: - WRANGLER_OUTPUT_FILE_PATH: ${{ runner.temp }}/wrangler-output.jsonl + CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + VERSION_ID: ${{ steps.upload.outputs.version_id }} run: | - npx wrangler versions upload \ - --config wrangler.toml \ - --tag "git-${GITHUB_SHA:0:12}" \ - --message "github-ci candidate ${GITHUB_SHA}" - node --input-type=commonjs <<'NODE' - const fs = require("node:fs"); - const output = process.env.WRANGLER_OUTPUT_FILE_PATH; - const rows = fs.readFileSync(output, "utf8").trim().split(/\r?\n/).filter(Boolean).map(JSON.parse); - const uploaded = rows.find((row) => row.type === "version-upload"); - if (!uploaded || uploaded.worker_name !== "github-ci" || !uploaded.version_id) { - throw new Error("Wrangler did not report a github-ci Workers Version ID"); - } - fs.appendFileSync(process.env.GITHUB_OUTPUT, `version_id=${uploaded.version_id}\n`); - fs.appendFileSync(process.env.GITHUB_STEP_SUMMARY, - `Uploaded github-ci Workers Version \`${uploaded.version_id}\` for commit \`${process.env.GITHUB_SHA}\`.\n\n` + - "No traffic was promoted. To change production traffic, run the separate **github-ci Worker version promotion** workflow on `main` and provide this version ID.\n"); - NODE + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Authorization: Bearer $CF_API_TOKEN" \ + "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ + > "$RUNNER_TEMP/github-ci-deployable.json" + node scripts/deployment-guard.mjs verify-deployable \ + "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" diff --git a/pkgs/github-ci/worker/.gitignore b/pkgs/github-ci/worker/.gitignore index 2a11f39f20..943d2a2807 100644 --- a/pkgs/github-ci/worker/.gitignore +++ b/pkgs/github-ci/worker/.gitignore @@ -1 +1,2 @@ .backfill.build.mjs +.cloudflare/ diff --git a/pkgs/github-ci/worker/README.md b/pkgs/github-ci/worker/README.md index d34c19f8d2..289437b1bd 100644 --- a/pkgs/github-ci/worker/README.md +++ b/pkgs/github-ci/worker/README.md @@ -68,36 +68,40 @@ broker's own agent token — the value in ```sh npm install npm test # vitest + @cloudflare/vitest-pool-workers -npm run deploy # wrangler deploy (fleet Cloudflare account) +npm run build # offline Build Output v1, delegated to Wrangler 4.166.0 +npm run test:deployment ``` ## GitHub Actions version flow -`.github/workflows/github-ci-worker-upload.yml` uploads an immutable -Workers Version from `main` with `wrangler versions upload`; it does not -create a deployment or change production traffic. Its run summary gives -the version UUID. `.github/workflows/github-ci-worker-promote.yml` is a -separate `workflow_dispatch` workflow that accepts that UUID and deploys -only the selected version to 100% of traffic. It runs only when -dispatched from `main`, uses the `github-ci-production` environment as -the production approval gate, and verifies Cloudflare reports that -version serving 100% of traffic. - -Set the GitHub repository variable `CLOUDFLARE_ACCOUNT_ID` and add the -Actions secret `CLOUDFLARE_API_TOKEN` to both the -`github-ci-cloudflare-upload` and `github-ci-production` environments. -Use a token scoped to Workers Scripts Edit for the account. Configure -`github-ci-production` with required reviewers and restrict its -deployment branches to `main`. The upload environment also needs the -token, but it does not need production reviewers. - -The upload workflow leaves runtime secrets out of GitHub Actions. -Wrangler's Versions upload inherits the Worker's existing secret -bindings, while non-secret bindings and production endpoint vars come -from `wrangler.toml`. Keep the existing `GITHUB_WEBHOOK_SECRET`, Turso, -and queue-broker secrets provisioned on the Worker before promoting a -candidate. This is the GitHub CI webhook Worker, not -`infra/github-backup`'s GitHub App backup receiver. +`.github/workflows/github-ci-worker-upload.yml` builds Build Output v1 +and uploads an immutable Workers Version with `cf workers versions +create --prebuilt`; it does not create a deployment or change production +traffic. Its run summary gives the version UUID. The separate +`.github/workflows/github-ci-worker-promote.yml` accepts that UUID and +promotes only that version with `cf workers deployments create`. It runs +only from `main`, uses the protected `github-ci-production` environment, +and verifies the newest Cloudflare deployment serves that version at +100% traffic. + +Add environment secrets `CF_ACCOUNT_ID` and `CF_API_TOKEN` to +`github-ci-cloudflare-upload` and `github-ci-production`. Use separate +account-owned Cloudflare API tokens scoped to the `github-ci` Worker. +Configure `github-ci-production` with required reviewers and restrict +its deployment branches to `main`; the upload environment does not need +production reviewers. The upload workflow checks the Worker exists and +never bootstraps or creates resources. + +Runtime secret values never enter GitHub Actions. The `cf` config +declares their names, and `cf workers versions create` uses strict +binding inheritance from the existing Worker version. Before any +promotion, the workflow reads the candidate version and fails unless +all six secret bindings remain present. It also checks that the version +tag and message identify a full Git commit that is an ancestor of +`main`, and that Cloudflare lists the exact version as deployable. This +is the GitHub CI webhook Worker, not `infra/github-backup`'s GitHub App +backup receiver. Use the GitHub Actions flow for deployments; direct +`npm run deploy` is disabled. The cutover from the earlier Postgres receiver is complete (#5693, closeout below). diff --git a/pkgs/github-ci/worker/cloudflare.config.ts b/pkgs/github-ci/worker/cloudflare.config.ts new file mode 100644 index 0000000000..e22ff9188e --- /dev/null +++ b/pkgs/github-ci/worker/cloudflare.config.ts @@ -0,0 +1,22 @@ +import { bindings, defineConfig } from "cf/config"; +import * as entrypoint from "./src/index.ts" with { type: "cf-worker" }; + +export default defineConfig({ + worker: { + name: "github-ci", + compatibilityDate: "2025-09-15", + workersDev: true, + entrypoint, + env: { + TURSO_PLATFORM_URL: bindings.text("https://fleet-platform-dezren39.aws-us-east-1.turso.io"), + TURSO_QUEUE_URL: bindings.text("https://fleet-queue-dezren39.aws-us-east-1.turso.io"), + EVENTS_BROKER_URL: bindings.text("https://queue-broker.security.cab"), + GITHUB_WEBHOOK_SECRET: bindings.secret(), + TURSO_PLATFORM_TOKEN: bindings.secret(), + TURSO_QUEUE_TOKEN: bindings.secret(), + EVENTS_BROKER_TOKEN: bindings.secret(), + EVENTS_BROKER_ACCESS_CLIENT_ID: bindings.secret(), + EVENTS_BROKER_ACCESS_CLIENT_SECRET: bindings.secret(), + }, + }, +}); diff --git a/pkgs/github-ci/worker/package-lock.json b/pkgs/github-ci/worker/package-lock.json index e325e93953..1e6a66770a 100644 --- a/pkgs/github-ci/worker/package-lock.json +++ b/pkgs/github-ci/worker/package-lock.json @@ -9,34 +9,76 @@ "version": "0.1.0", "devDependencies": { "@cloudflare/vitest-pool-workers": "0.23.0", - "@cloudflare/workers-types": "^4.20251011.0", + "@cloudflare/workers-types": "^5.20261119.1", + "cf": "1.0.0-rc.1", "typescript": "^5.6.0", "vitest": "^4.1.0", - "wrangler": "4.59.1" + "wrangler": "4.166.0" + }, + "engines": { + "node": ">=24.22.0" + } + }, + "node_modules/@cloudflare/build-output-utils": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@cloudflare/build-output-utils/-/build-output-utils-1.0.0-rc.1.tgz", + "integrity": "sha512-IrzZL1UEdVMZPRarrKu2VpnL3MIeNVhCItTebB88SwQ1YJ4mLAe1kQtXmIH7MpdgDYnxAsTZXMtuw9q5jRWCcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cloudflare/config": "1.0.0-rc.1" + } + }, + "node_modules/@cloudflare/config": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@cloudflare/config/-/config-1.0.0-rc.1.tgz", + "integrity": "sha512-NQgB+fQbk8IU0iJ6/G9LCSQjJ7JuyRn5CALrPKnQ8vxqayOJlX+av9adhLCMYBeC80ocncW1Gy7quv00uLV3LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "zod": "4.6.6" + } + }, + "node_modules/@cloudflare/config/node_modules/zod": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz", + "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" } }, "node_modules/@cloudflare/kv-asset-handler": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.1.tgz", - "integrity": "sha512-Nu8ahitGFFJztxUml9oD/DLb7Z28C8cd8F46IVQ7y5Btz575pvMY8AqZsXkX7Gds29eCKdMgIHjIvzskHgPSFg==", + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.1.tgz", + "integrity": "sha512-48OysfSW3MkQY1XjkhkpPkgrEkOvgfoyHzA2eyX5wpzFpijC02uWigv3hkNdJdT3C7ybW/U17yYHXeR68pLeww==", "dev": true, "license": "MIT OR Apache-2.0", - "dependencies": { - "mime": "^3.0.0" - }, "engines": { - "node": ">=18.0.0" + "node": ">=22.0.0" + } + }, + "node_modules/@cloudflare/runtime-types": { + "version": "0.1.30", + "resolved": "https://registry.npmjs.org/@cloudflare/runtime-types/-/runtime-types-0.1.30.tgz", + "integrity": "sha512-p68T70lDZT7Vyv5c2SDzB0uqVRVCtj/3WMgXVQESnWVyTybcCwXRM9Ekmh2rQ+aPGhtIWiACvd8pX2yGA9Z5mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "miniflare": "5.20261117.0-beta", + "workerd": "1.20261117.1" } }, "node_modules/@cloudflare/unenv-preset": { - "version": "2.9.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.9.0.tgz", - "integrity": "sha512-99nEvuOTCGGGRNaIat8UVVXJ27aZK+U09SYDp0kVjQLwC9wyxcrQ28IqLwrQq2DjWLmBI1+UalGJzdPqYgPlRw==", + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz", + "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==", "dev": true, "license": "MIT OR Apache-2.0", "peerDependencies": { "unenv": "2.0.0-rc.24", - "workerd": "^1.20251202.0" + "workerd": ">1.20260305.0 <2.0.0-0" }, "peerDependenciesMeta": { "workerd": { @@ -263,9 +305,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -283,9 +322,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -303,9 +339,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -323,9 +356,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -343,9 +373,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -363,9 +390,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -383,9 +407,6 @@ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -409,9 +430,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -435,9 +453,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -461,9 +476,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -487,9 +499,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -513,9 +522,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -691,32 +697,10 @@ } } }, - "node_modules/@cloudflare/vitest-pool-workers/node_modules/ws": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", - "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=10.0.0" - }, - "peerDependencies": { - "bufferutil": "^4.0.1", - "utf-8-validate": ">=5.0.2" - }, - "peerDependenciesMeta": { - "bufferutil": { - "optional": true - }, - "utf-8-validate": { - "optional": true - } - } - }, "node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260111.0.tgz", - "integrity": "sha512-UGAjrGLev2/CMLZy7b+v1NIXA4Hupc/QJBFlJwMqldywMcJ/iEqvuUYYuVI2wZXuXeWkgmgFP87oFDQsg78YTQ==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261117.1.tgz", + "integrity": "sha512-qfAYw6iPoey0BmPsp4z5ARWOa+XSBD3gQzmcBI2ql9pKTSA5eEC8F1oI6BIk/FVguhomfSn5gS4RzbWhTd/EpQ==", "cpu": [ "x64" ], @@ -731,9 +715,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260111.0.tgz", - "integrity": "sha512-YFAZwidLCQVa6rKCCaiWrhA+eh87a7MUhyd9lat3KSbLBAGpYM+ORpyTXpi2Gjm3j6Mp1e/wtzcFTSeMIy2UqA==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261117.1.tgz", + "integrity": "sha512-cInx5Cr9O27oW+ujyI49lTRQZra/lMgWUFiKmGY3jxDncATSxzfQ6udXHkVvK4//1/PfxQTDyMjdQUIN8m6Aqg==", "cpu": [ "arm64" ], @@ -748,9 +732,9 @@ } }, "node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260111.0.tgz", - "integrity": "sha512-zx1GW6FwfOBjCV7QUCRzGRkViUtn3Is/zaaVPmm57xyy9sjtInx6/SdeBr2Y45tx9AnOP1CnaOFFdmH1P7VIEg==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261117.1.tgz", + "integrity": "sha512-gZLA8X11m/luZwn+YA3+mDu61vdxNJzpksP/QZqjydKTQ+VUCulsK5gtn9Bqst1p3KJu2kafQpJ1nDQv4B23jA==", "cpu": [ "x64" ], @@ -765,9 +749,9 @@ } }, "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260111.0.tgz", - "integrity": "sha512-wFVKxNvCyjRaAcgiSnJNJAmIos3p3Vv6Uhf4pFUZ9JIxr69GNlLWlm9SdCPvtwNFAjzSoDaKzDwjj5xqpuCS6Q==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261117.1.tgz", + "integrity": "sha512-gxWngFojq41ULKNKb9rpWYvKotN5hT2I/xot+Bpy31cXzrwcTgtDLSMb2t75sW5BJxH7hihFvikgYb577kB3Zg==", "cpu": [ "arm64" ], @@ -782,9 +766,9 @@ } }, "node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260111.0.tgz", - "integrity": "sha512-zWgd77L7OI1BxgBbG+2gybDahIMgPX5iNo6e3LqcEz1Xm3KfiqgnDyMBcxeQ7xDrj7fHUGAlc//QnKvDchuUoQ==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261117.1.tgz", + "integrity": "sha512-0OR2Btx5EDonOKvvuGDq8rxBSggxoF1ThQjbZN3vsu3GlaF/oXW5f9/iB78OgV0CzMPTi+hZgzc1NR95UJCURA==", "cpu": [ "x64" ], @@ -799,12 +783,33 @@ } }, "node_modules/@cloudflare/workers-types": { - "version": "4.20260702.1", - "resolved": "https://registry.npmmirror.com/@cloudflare/workers-types/-/workers-types-4.20260702.1.tgz", - "integrity": "sha512-mOhf5TUEB1m2vPrxtqoIGfz0fUC9xyxRDx5gWHy5s+OCo6dcV+g7wI1R7gYCMFohhqF/2y2xeKVwMwCJjfn/WA==", + "version": "5.20261121.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20261121.1.tgz", + "integrity": "sha512-eLzyhm8/Qn+yshOObNIVsV8YJyWR9BOBCnnuqmrqY5uhsVDlLMdCmOQ34oC3eoVLkav94Dc7MWcfC+FuaxdNjA==", "dev": true, "license": "MIT OR Apache-2.0" }, + "node_modules/@cloudflare/workers-utils": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-utils/-/workers-utils-0.56.0.tgz", + "integrity": "sha512-Fw3/zR+pQp+5hKn1CHIRkCYz49fyAb2qRqCq01jBGqlKL0rRnZyXYD4j0h9cjaWPYYQUOe5y6L7BNp2ZwsHg5A==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "chalk": "5.3.0", + "dotenv": "16.3.1", + "undici": "7.30.2" + }, + "peerDependencies": { + "vitest": "^4.1.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "vitest": { + "optional": true + } + } + }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmmirror.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -1305,9 +1310,9 @@ } }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", - "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", + "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", "cpu": [ "arm64" ], @@ -1318,19 +1323,19 @@ "darwin" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.2.4" + "@img/sharp-libvips-darwin-arm64": "1.3.4" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", - "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", + "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", "cpu": [ "x64" ], @@ -1341,13 +1346,13 @@ "darwin" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.2.4" + "@img/sharp-libvips-darwin-x64": "1.3.4" } }, "node_modules/@img/sharp-freebsd-wasm32": { @@ -1388,9 +1393,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", - "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", "cpu": [ "arm64" ], @@ -1405,9 +1410,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", - "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", + "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", "cpu": [ "x64" ], @@ -1422,16 +1427,13 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", - "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", + "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", "cpu": [ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1442,16 +1444,13 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", - "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", + "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1469,9 +1468,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1489,9 +1485,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1502,16 +1495,13 @@ } }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", - "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", + "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", "cpu": [ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1522,16 +1512,13 @@ } }, "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", - "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", + "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1542,16 +1529,13 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", - "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", + "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1562,16 +1546,13 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", - "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", + "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1582,55 +1563,49 @@ } }, "node_modules/@img/sharp-linux-arm": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", - "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", + "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", "cpu": [ "arm" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.2.4" + "@img/sharp-libvips-linux-arm": "1.3.4" } }, "node_modules/@img/sharp-linux-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", - "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", + "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.2.4" + "@img/sharp-libvips-linux-arm64": "1.3.4" } }, "node_modules/@img/sharp-linux-ppc64": { @@ -1641,9 +1616,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1667,9 +1639,6 @@ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1686,124 +1655,109 @@ } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", - "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", + "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", "cpu": [ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.2.4" + "@img/sharp-libvips-linux-s390x": "1.3.4" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", - "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", + "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.2.4" + "@img/sharp-libvips-linux-x64": "1.3.4" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", - "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", + "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", "cpu": [ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", - "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", + "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", "cpu": [ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.2.4" + "@img/sharp-libvips-linuxmusl-x64": "1.3.4" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", - "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", - "cpu": [ - "wasm32" - ], + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", + "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", "dev": true, "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "optional": true, "dependencies": { - "@emnapi/runtime": "^1.7.0" + "@emnapi/runtime": "^1.11.3" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -1867,9 +1821,9 @@ } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", - "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", + "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", "cpu": [ "ia32" ], @@ -1880,16 +1834,16 @@ "win32" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": "^20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", - "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", + "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", "cpu": [ "x64" ], @@ -1900,7 +1854,7 @@ "win32" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -2105,9 +2059,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2125,9 +2076,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2145,9 +2093,6 @@ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2165,9 +2110,6 @@ "s390x" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2185,9 +2127,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MIT", "optional": true, "os": [ @@ -2205,9 +2144,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MIT", "optional": true, "os": [ @@ -2368,6 +2304,44 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/node": { + "version": "26.6.6", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", + "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.9.0" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.4" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@vitest/expect": { "version": "4.1.12", "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-4.1.12.tgz", @@ -2481,27 +2455,30 @@ "url": "https://opencollective.com/vitest" } }, - "node_modules/acorn": { - "version": "8.14.0", - "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz", - "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", + "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==", "dev": true, "license": "MIT", - "bin": { - "acorn": "bin/acorn" + "dependencies": { + "event-target-shim": "^5.0.0" }, "engines": { - "node": ">=0.4.0" + "node": ">=6.5" } }, - "node_modules/acorn-walk": { - "version": "8.3.2", - "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.3.2.tgz", - "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", + "node_modules/agentkeepalive": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", + "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", "dev": true, "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, "engines": { - "node": ">=0.4.0" + "node": ">= 8.0.0" } }, "node_modules/assertion-error": { @@ -2514,6 +2491,13 @@ "node": ">=12" } }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, "node_modules/blake3-wasm": { "version": "2.1.5", "resolved": "https://registry.npmmirror.com/blake3-wasm/-/blake3-wasm-2.1.5.tgz", @@ -2521,6 +2505,41 @@ "dev": true, "license": "MIT" }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/cf": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/cf/-/cf-1.0.0-rc.1.tgz", + "integrity": "sha512-mQ9X/FVE1QP2ebXVF/9tlbqoO0TB3tKxUJocaWsic6IuNvThmJc/Ou/4ABJNB/Sj8HxEzvrjT1PRqjySVO5YoA==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/build-output-utils": "1.0.0-rc.1", + "@cloudflare/config": "1.0.0-rc.1", + "@cloudflare/runtime-types": "0.1.30", + "blake3-wasm": "2.1.5", + "miniflare": "5.20261117.0-beta" + }, + "bin": { + "cf": "bin/cf", + "cloudflare": "bin/cf" + }, + "engines": { + "node": "^22.23.0 || ^24.22.0 || ^26.12.0" + } + }, "node_modules/chai": { "version": "6.3.0", "resolved": "https://registry.npmmirror.com/chai/-/chai-6.3.0.tgz", @@ -2531,6 +2550,19 @@ "node": ">=18" } }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, "node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -2538,6 +2570,52 @@ "dev": true, "license": "MIT" }, + "node_modules/cloudflare": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cloudflare/-/cloudflare-5.2.0.tgz", + "integrity": "sha512-dVzqDpPFYR9ApEC9e+JJshFJZXcw4HzM8W+3DHzO5oy9+8rLC53G7x6fEf9A7/gSuSCxuvndzui5qJKftfIM9A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + } + }, + "node_modules/cloudflare/node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/cloudflare/node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2559,6 +2637,16 @@ "url": "https://opencollective.com/express" } }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2569,6 +2657,41 @@ "node": ">=8" } }, + "node_modules/devtools-protocol": { + "version": "0.0.1182435", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1182435.tgz", + "integrity": "sha512-EmlkWb62wSbQNE1gRZZsi4KZYRaF5Skpp183LhRU7+sadKR06O1dHCjZmFSEG6Kv7P6S/UYLxcY3NlYwqKM99w==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/error-stack-parser-es": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", @@ -2579,6 +2702,26 @@ "url": "https://github.com/sponsors/antfu" } }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "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/es-module-lexer": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", @@ -2586,6 +2729,35 @@ "dev": true, "license": "MIT" }, + "node_modules/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/esbuild": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", @@ -2638,17 +2810,14 @@ "@types/estree": "^1.0.0" } }, - "node_modules/exit-hook": { - "version": "2.2.1", - "resolved": "https://registry.npmmirror.com/exit-hook/-/exit-hook-2.2.1.tgz", - "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", + "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==", "dev": true, "license": "MIT", "engines": { "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/expect-type": { @@ -2679,6 +2848,44 @@ } } }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -2694,20 +2901,127 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "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": "BSD-2-Clause" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "node_modules/get-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", "dev": true, "license": "MIT", - "engines": { + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { "node": ">=6" } }, @@ -2854,9 +3168,6 @@ "arm64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2878,9 +3189,6 @@ "arm64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2902,9 +3210,6 @@ "x64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2926,9 +3231,6 @@ "x64" ], "dev": true, - "libc": [ - "musl" - ], "license": "MPL-2.0", "optional": true, "os": [ @@ -2994,55 +3296,71 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/mime": { - "version": "3.0.0", - "resolved": "https://registry.npmmirror.com/mime/-/mime-3.0.0.tgz", - "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", "dev": true, "license": "MIT", - "bin": { - "mime": "cli.js" + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" }, "engines": { - "node": ">=10.0.0" + "node": ">= 0.6" } }, "node_modules/miniflare": { - "version": "4.20260111.0", - "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20260111.0.tgz", - "integrity": "sha512-pUsbDlumPaTzliA+J9HMAM74nLR8wqpCQNOESximab51jAfvL7ZaP5Npzh4PWNV0Jfq28tlqazakuJcw6w5qlA==", + "version": "5.20261117.0-beta", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261117.0-beta.tgz", + "integrity": "sha512-D2ygY04wQUmbpwgBhj828piErZoj7UMlXNGr4EWQp/c1PNGHyYOh0dMIyobjwOXiD5Ifl1EaEVAoNuBHK+qtkw==", "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", - "acorn": "8.14.0", - "acorn-walk": "8.3.2", - "exit-hook": "2.2.1", - "glob-to-regexp": "0.4.1", - "sharp": "^0.34.5", - "stoppable": "1.1.0", - "undici": "7.14.0", - "workerd": "1.20260111.0", - "ws": "8.18.0", - "youch": "4.1.0-beta.10", - "zod": "^3.25.76" - }, - "bin": { - "miniflare": "bootstrap.js" + "sharp": "0.35.5", + "undici": "7.30.1", + "workerd": "1.20261117.1", + "ws": "8.21.0", + "youch": "4.1.0-beta.10" }, "engines": { - "node": ">=18.0.0" + "node": ">=22.12.0" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } } }, - "node_modules/miniflare/node_modules/zod": { - "version": "3.25.76", - "resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", - "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } + "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.20", @@ -3063,6 +3381,48 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/obug": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/obug/-/obug-2.2.1.tgz", @@ -3189,61 +3549,83 @@ } }, "node_modules/sharp": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/sharp/-/sharp-0.34.5.tgz", - "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", + "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", "dev": true, - "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@img/colour": "^1.0.0", + "@img/colour": "^1.1.0", "detect-libc": "^2.1.2", - "semver": "^7.7.3" + "semver": "^7.8.5" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.34.5", - "@img/sharp-darwin-x64": "0.34.5", - "@img/sharp-libvips-darwin-arm64": "1.2.4", - "@img/sharp-libvips-darwin-x64": "1.2.4", - "@img/sharp-libvips-linux-arm": "1.2.4", - "@img/sharp-libvips-linux-arm64": "1.2.4", - "@img/sharp-libvips-linux-ppc64": "1.2.4", - "@img/sharp-libvips-linux-riscv64": "1.2.4", - "@img/sharp-libvips-linux-s390x": "1.2.4", - "@img/sharp-libvips-linux-x64": "1.2.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", - "@img/sharp-libvips-linuxmusl-x64": "1.2.4", - "@img/sharp-linux-arm": "0.34.5", - "@img/sharp-linux-arm64": "0.34.5", - "@img/sharp-linux-ppc64": "0.34.5", - "@img/sharp-linux-riscv64": "0.34.5", - "@img/sharp-linux-s390x": "0.34.5", - "@img/sharp-linux-x64": "0.34.5", - "@img/sharp-linuxmusl-arm64": "0.34.5", - "@img/sharp-linuxmusl-x64": "0.34.5", - "@img/sharp-wasm32": "0.34.5", - "@img/sharp-win32-arm64": "0.34.5", - "@img/sharp-win32-ia32": "0.34.5", - "@img/sharp-win32-x64": "0.34.5" + "@img/sharp-darwin-arm64": "0.35.5", + "@img/sharp-darwin-x64": "0.35.5", + "@img/sharp-freebsd-wasm32": "0.35.5", + "@img/sharp-libvips-darwin-arm64": "1.3.4", + "@img/sharp-libvips-darwin-x64": "1.3.4", + "@img/sharp-libvips-linux-arm": "1.3.4", + "@img/sharp-libvips-linux-arm64": "1.3.4", + "@img/sharp-libvips-linux-ppc64": "1.3.4", + "@img/sharp-libvips-linux-riscv64": "1.3.4", + "@img/sharp-libvips-linux-s390x": "1.3.4", + "@img/sharp-libvips-linux-x64": "1.3.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", + "@img/sharp-libvips-linuxmusl-x64": "1.3.4", + "@img/sharp-linux-arm": "0.35.5", + "@img/sharp-linux-arm64": "0.35.5", + "@img/sharp-linux-ppc64": "0.35.5", + "@img/sharp-linux-riscv64": "0.35.5", + "@img/sharp-linux-s390x": "0.35.5", + "@img/sharp-linux-x64": "0.35.5", + "@img/sharp-linuxmusl-arm64": "0.35.5", + "@img/sharp-linuxmusl-x64": "0.35.5", + "@img/sharp-webcontainers-wasm32": "0.35.5", + "@img/sharp-win32-arm64": "0.35.5", + "@img/sharp-win32-ia32": "0.35.5", + "@img/sharp-win32-x64": "0.35.5" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/sharp/node_modules/@img/sharp-freebsd-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", + "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" } }, "node_modules/sharp/node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", - "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", + "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", "cpu": [ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -3254,16 +3636,13 @@ } }, "node_modules/sharp/node_modules/@img/sharp-libvips-linux-riscv64": { - "version": "1.2.4", - "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", - "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", + "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", "cpu": [ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -3274,61 +3653,75 @@ } }, "node_modules/sharp/node_modules/@img/sharp-linux-ppc64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", - "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", + "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", "cpu": [ "ppc64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.2.4" + "@img/sharp-libvips-linux-ppc64": "1.3.4" } }, "node_modules/sharp/node_modules/@img/sharp-linux-riscv64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", - "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", + "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", "cpu": [ "riscv64" ], "dev": true, - "libc": [ - "glibc" - ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-riscv64": "1.2.4" + "@img/sharp-libvips-linux-riscv64": "1.3.4" + } + }, + "node_modules/sharp/node_modules/@img/sharp-webcontainers-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", + "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" } }, "node_modules/sharp/node_modules/@img/sharp-win32-arm64": { - "version": "0.34.5", - "resolved": "https://registry.npmmirror.com/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", - "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", + "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", "cpu": [ "arm64" ], @@ -3339,7 +3732,7 @@ "win32" ], "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -3376,17 +3769,6 @@ "dev": true, "license": "MIT" }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmmirror.com/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, "node_modules/supports-color": { "version": "10.2.2", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-10.2.2.tgz", @@ -3444,6 +3826,13 @@ "node": ">=14.0.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, "node_modules/tslib": { "version": "2.9.1", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.9.1.tgz", @@ -3476,6 +3865,13 @@ "node": ">=20.18.1" } }, + "node_modules/undici-types": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", + "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", + "dev": true, + "license": "MIT" + }, "node_modules/unenv": { "version": "2.0.0-rc.24", "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.24.tgz", @@ -3654,6 +4050,34 @@ } } }, + "node_modules/web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -3672,9 +4096,9 @@ } }, "node_modules/workerd": { - "version": "1.20260111.0", - "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20260111.0.tgz", - "integrity": "sha512-ov6Pt4k6d/ALfJja/EIHohT9IrY/f6GAa0arWEPat2qekp78xHbVM7jSxNWAMbaE7ZmnQQIFEGD1ZhAWZmQKIg==", + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261117.1.tgz", + "integrity": "sha512-iakDbGVtJRiErpWSM5fYT0z3spJ2Mo1x/POsEajBNLqUbTRwm8vMqbB7g8zPN2tzs6eZYNiO5ECyEnAXO9Foxw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -3685,41 +4109,47 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20260111.0", - "@cloudflare/workerd-darwin-arm64": "1.20260111.0", - "@cloudflare/workerd-linux-64": "1.20260111.0", - "@cloudflare/workerd-linux-arm64": "1.20260111.0", - "@cloudflare/workerd-windows-64": "1.20260111.0" + "@cloudflare/workerd-darwin-64": "1.20261117.1", + "@cloudflare/workerd-darwin-arm64": "1.20261117.1", + "@cloudflare/workerd-linux-64": "1.20261117.1", + "@cloudflare/workerd-linux-arm64": "1.20261117.1", + "@cloudflare/workerd-windows-64": "1.20261117.1" } }, "node_modules/wrangler": { - "version": "4.59.1", - "resolved": "https://registry.npmmirror.com/wrangler/-/wrangler-4.59.1.tgz", - "integrity": "sha512-5DddGSNxHd6dOjREWTDQdovQlZ1Lh80NNRXZFQ4/CrK3fNyVIBj9tqCs9pmXMNrKQ/AnKNeYzEs/l1kr8rHhOg==", + "version": "4.166.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.166.0.tgz", + "integrity": "sha512-qMz0sHGXqEC0Va8T6dAaG0ggp9tCcuHHYMUQzRKbtZg6+MPAPb6oBu1757IaeugNJHPAz+twHiA+zDyXWQLsLw==", "dev": true, "license": "MIT OR Apache-2.0", "dependencies": { - "@cloudflare/kv-asset-handler": "0.4.1", - "@cloudflare/unenv-preset": "2.9.0", - "blake3-wasm": "2.1.5", - "esbuild": "0.27.0", - "miniflare": "4.20260111.0", + "@cloudflare/kv-asset-handler": "0.5.1", + "@cloudflare/unenv-preset": "2.16.2", + "@cloudflare/workers-utils": "0.56.0", + "@cspotcode/source-map-support": "0.8.1", + "@types/yargs": "17.0.24", + "cloudflare": "5.2.0", + "devtools-protocol": "0.0.1182435", + "esbuild": "0.28.2", + "miniflare": "5.20261119.0-beta", "path-to-regexp": "6.3.0", + "undici": "7.30.2", "unenv": "2.0.0-rc.24", - "workerd": "1.20260111.0" + "workerd": "1.20261119.1" }, "bin": { + "cf-wrangler": "bin/cf-wrangler.js", "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" }, "engines": { - "node": ">=20.0.0" + "node": ">=22.12.0" }, "optionalDependencies": { - "fsevents": "~2.3.2" + "fsevents": "2.3.3" }, "peerDependencies": { - "@cloudflare/workers-types": "^4.20260111.0" + "@cloudflare/workers-types": "^5.20261119.1" }, "peerDependenciesMeta": { "@cloudflare/workers-types": { @@ -3727,10 +4157,95 @@ } } }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261119.1.tgz", + "integrity": "sha512-yotoiTGXCl1gTRX+y5ZWSAmzAg6CcBJXhJL6C1DGWUhsjjezNe8FdzraNsefVTOeKsOid2EC+hqOzewczKLvmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261119.1.tgz", + "integrity": "sha512-VPOmfEmMubvw4SPcg/yDgamQXsiVAENgxeCJO8pDggRJFaF93SP0g/hktD8sbfmWBS19BO1kX1EsdgHSgRL9jA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261119.1.tgz", + "integrity": "sha512-aaDf78smiN12Uuwtg6TG6iLVS61sLpy/7DC5PYORf2+TCYw/bygcaqqb8zQJ+XwZ3xYhm/Ws80c/yMMhCMTFYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261119.1.tgz", + "integrity": "sha512-LkyAvTMcKqRUP73HRScWWwTSz3pw09um1hxR+rcGdvsGzao8IR59XXTp/tul6kFdVBL2mD8U3X6j2O8t7I4viw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261119.1.tgz", + "integrity": "sha512-y4RO3QFNWt4j4uq2kmP5tklTvdA3qOA0PXuA66vsCmEtZYYb71ldefJcq5Dt0jrexKf/i4BBaLXZMVYLnohb0g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, "node_modules/wrangler/node_modules/@esbuild/aix-ppc64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", - "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", "cpu": [ "ppc64" ], @@ -3745,9 +4260,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.27.0.tgz", - "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", "cpu": [ "arm" ], @@ -3762,9 +4277,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", - "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", "cpu": [ "arm64" ], @@ -3779,9 +4294,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.27.0.tgz", - "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", "cpu": [ "x64" ], @@ -3796,9 +4311,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", - "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", "cpu": [ "arm64" ], @@ -3813,9 +4328,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", - "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", "cpu": [ "x64" ], @@ -3830,9 +4345,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", - "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", "cpu": [ "arm64" ], @@ -3847,9 +4362,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", - "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", "cpu": [ "x64" ], @@ -3864,9 +4379,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", - "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", "cpu": [ "arm" ], @@ -3881,9 +4396,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", - "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", "cpu": [ "arm64" ], @@ -3898,9 +4413,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ia32": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", - "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", "cpu": [ "ia32" ], @@ -3915,9 +4430,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-loong64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", - "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", "cpu": [ "loong64" ], @@ -3932,9 +4447,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-mips64el": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", - "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", "cpu": [ "mips64el" ], @@ -3949,9 +4464,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ppc64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", - "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", "cpu": [ "ppc64" ], @@ -3966,9 +4481,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-riscv64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", - "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", "cpu": [ "riscv64" ], @@ -3983,9 +4498,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-s390x": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", - "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", "cpu": [ "s390x" ], @@ -4000,9 +4515,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", - "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", "cpu": [ "x64" ], @@ -4017,9 +4532,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", - "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", "cpu": [ "arm64" ], @@ -4034,9 +4549,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", - "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", "cpu": [ "x64" ], @@ -4051,9 +4566,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", - "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", "cpu": [ "arm64" ], @@ -4068,9 +4583,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", - "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", "cpu": [ "x64" ], @@ -4085,9 +4600,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openharmony-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", - "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", "cpu": [ "arm64" ], @@ -4102,9 +4617,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/sunos-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", - "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", "cpu": [ "x64" ], @@ -4119,9 +4634,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-arm64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", - "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", "cpu": [ "arm64" ], @@ -4136,9 +4651,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-ia32": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", - "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", "cpu": [ "ia32" ], @@ -4153,9 +4668,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-x64": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", - "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", "cpu": [ "x64" ], @@ -4170,9 +4685,9 @@ } }, "node_modules/wrangler/node_modules/esbuild": { - "version": "0.27.0", - "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.27.0.tgz", - "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4183,38 +4698,85 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.27.0", - "@esbuild/android-arm": "0.27.0", - "@esbuild/android-arm64": "0.27.0", - "@esbuild/android-x64": "0.27.0", - "@esbuild/darwin-arm64": "0.27.0", - "@esbuild/darwin-x64": "0.27.0", - "@esbuild/freebsd-arm64": "0.27.0", - "@esbuild/freebsd-x64": "0.27.0", - "@esbuild/linux-arm": "0.27.0", - "@esbuild/linux-arm64": "0.27.0", - "@esbuild/linux-ia32": "0.27.0", - "@esbuild/linux-loong64": "0.27.0", - "@esbuild/linux-mips64el": "0.27.0", - "@esbuild/linux-ppc64": "0.27.0", - "@esbuild/linux-riscv64": "0.27.0", - "@esbuild/linux-s390x": "0.27.0", - "@esbuild/linux-x64": "0.27.0", - "@esbuild/netbsd-arm64": "0.27.0", - "@esbuild/netbsd-x64": "0.27.0", - "@esbuild/openbsd-arm64": "0.27.0", - "@esbuild/openbsd-x64": "0.27.0", - "@esbuild/openharmony-arm64": "0.27.0", - "@esbuild/sunos-x64": "0.27.0", - "@esbuild/win32-arm64": "0.27.0", - "@esbuild/win32-ia32": "0.27.0", - "@esbuild/win32-x64": "0.27.0" + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "node_modules/wrangler/node_modules/miniflare": { + "version": "5.20261119.0-beta", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261119.0-beta.tgz", + "integrity": "sha512-HdNQIUPgde5Yg0qFaI6iiYd0aOxAgKQTXDstkBN2G1tPBdslNrUKdySwaGdBix0IFd+yh8M0gkqzw68dIZ2Ugw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "sharp": "0.35.5", + "undici": "7.30.2", + "workerd": "1.20261119.1", + "ws": "8.21.0", + "youch": "4.1.0-beta.10" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/wrangler/node_modules/workerd": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261119.1.tgz", + "integrity": "sha512-lalSvY+ad5asqMgzA/DfrZo7wvuvOHJc/aS1UctUrwu76fJE/LkSKJlprfBu0LeU79Qai5d+xFooQA9CIfj+dQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20261119.1", + "@cloudflare/workerd-darwin-arm64": "1.20261119.1", + "@cloudflare/workerd-linux-64": "1.20261119.1", + "@cloudflare/workerd-linux-arm64": "1.20261119.1", + "@cloudflare/workerd-windows-64": "1.20261119.1" } }, "node_modules/ws": { - "version": "8.18.0", - "resolved": "https://registry.npmmirror.com/ws/-/ws-8.18.0.tgz", - "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", "dev": true, "license": "MIT", "engines": { diff --git a/pkgs/github-ci/worker/package.json b/pkgs/github-ci/worker/package.json index cac7c5831c..e3aa577bf3 100644 --- a/pkgs/github-ci/worker/package.json +++ b/pkgs/github-ci/worker/package.json @@ -4,19 +4,25 @@ "private": true, "type": "module", "description": "GitHub webhook receiver (#5693): workflow_run -> Turso ci_events only; fleet push/PR/issues -> agent events sink + fleet-queue snapshots/watermarks.", + "engines": { + "node": ">=24.22.0" + }, "scripts": { - "deploy": "wrangler deploy", + "deploy": "echo 'npm run deploy is disabled; use the protected GitHub Actions Workers Versions flow' >&2; exit 1", "dev": "wrangler dev", + "build": "cf build", "test": "vitest run", + "test:deployment": "node --test test/deployment-config.test.mjs test/deployment-guard.test.mjs", "typecheck": "tsc --noEmit", "backfill": "esbuild scripts/backfill.ts --bundle --platform=node --format=esm --outfile=.backfill.build.mjs && node .backfill.build.mjs" }, "devDependencies": { "@cloudflare/vitest-pool-workers": "0.23.0", - "@cloudflare/workers-types": "^4.20251011.0", + "@cloudflare/workers-types": "^5.20261119.1", + "cf": "1.0.0-rc.1", "typescript": "^5.6.0", "vitest": "^4.1.0", - "wrangler": "4.59.1" + "wrangler": "4.166.0" }, "overrides": { "undici": "7.30.1" diff --git a/pkgs/github-ci/worker/scripts/deployment-guard.mjs b/pkgs/github-ci/worker/scripts/deployment-guard.mjs new file mode 100644 index 0000000000..a9c3e0f519 --- /dev/null +++ b/pkgs/github-ci/worker/scripts/deployment-guard.mjs @@ -0,0 +1,207 @@ +#!/usr/bin/env node +import { readFileSync, appendFileSync } from "node:fs"; +import { join } from "node:path"; +import { parseArgs } from "node:util"; + +const SECRET_BINDINGS = [ + "GITHUB_WEBHOOK_SECRET", + "TURSO_PLATFORM_TOKEN", + "TURSO_QUEUE_TOKEN", + "EVENTS_BROKER_TOKEN", + "EVENTS_BROKER_ACCESS_CLIENT_ID", + "EVENTS_BROKER_ACCESS_CLIENT_SECRET", +]; +const EXPECTED_TEXT_BINDINGS = { + TURSO_PLATFORM_URL: "https://fleet-platform-dezren39.aws-us-east-1.turso.io", + TURSO_QUEUE_URL: "https://fleet-queue-dezren39.aws-us-east-1.turso.io", + EVENTS_BROKER_URL: "https://queue-broker.security.cab", +}; + +const VERSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; +const COMMIT_SHA = /^[0-9a-f]{40}$/i; + +function usage() { + throw new Error( + "usage: deployment-guard.mjs build | select-upload | verify-version [commit-sha] | verify-deployable | verify-deployment ", + ); +} + +function readJson(path) { + try { + return JSON.parse(readFileSync(path, "utf8")); + } catch { + throw new Error(`could not read valid JSON from ${path}`); + } +} + +function unwrap(value) { + if (!value || typeof value !== "object" || Array.isArray(value)) return value; + if (value.success === false) throw new Error("Cloudflare API response was unsuccessful"); + return Object.hasOwn(value, "result") ? value.result : value; +} + +function rows(value, label) { + let result = unwrap(value); + if (Array.isArray(result)) return result; + if (result && typeof result === "object") { + if (Array.isArray(result.items)) return result.items; + if (Array.isArray(result.versions)) return result.versions; + if (Array.isArray(result.deployments)) return result.deployments; + } + throw new Error(`${label} response did not contain a list`); +} + +function newest(items, label) { + if (!items.length) throw new Error(`${label} response did not contain any records`); + return items + .map((item) => { + const createdOn = item.created_on ?? item.metadata?.created_on; + const createdAt = typeof createdOn === "string" ? Date.parse(createdOn) : Number.NaN; + if (!Number.isFinite(createdAt)) throw new Error(`${label} record is missing a valid created_on timestamp`); + return { item, createdAt }; + }) + .sort((left, right) => right.createdAt - left.createdAt)[0].item; +} + +function annotation(version, key) { + return version?.annotations?.[key] ?? version?.metadata?.annotations?.[key] ?? ""; +} + +function commitFrom(version) { + const tag = annotation(version, "workers/tag"); + const message = annotation(version, "workers/message"); + const match = /^github-ci candidate ([0-9a-f]{40})$/i.exec(message); + if (!match || tag !== `git-${match[1].slice(0, 12)}`) { + throw new Error("version provenance does not match a github-ci CI candidate commit"); + } + return match[1].toLowerCase(); +} + +function bindingsOf(version) { + const bindings = version?.bindings ?? version?.resources?.bindings; + if (Array.isArray(bindings)) return bindings; + const env = version?.env ?? version?.resources?.env; + if (env && typeof env === "object" && !Array.isArray(env)) { + return Object.entries(env).map(([name, value]) => ({ name, ...value })); + } + throw new Error("version response did not include its binding metadata"); +} + +function assertSecrets(version) { + const bindings = bindingsOf(version); + const byName = new Map(bindings.map((binding) => [binding.name, binding])); + const missing = SECRET_BINDINGS.filter((name) => byName.get(name)?.type !== "secret_text"); + if (missing.length) { + throw new Error(`version is missing required secret binding names or types: ${missing.join(", ")}`); + } +} + +function reportOutput(values, summary) { + const outputPath = process.env.GITHUB_OUTPUT; + if (!outputPath) throw new Error("GITHUB_OUTPUT is not set"); + appendFileSync(outputPath, Object.entries(values).map(([key, value]) => `${key}=${value}\n`).join("")); + if (summary && process.env.GITHUB_STEP_SUMMARY) { + appendFileSync(process.env.GITHUB_STEP_SUMMARY, `${summary}\n`); + } +} + +function checkBuild(root) { + const rootConfig = readJson(join(root, "config.json")); + const worker = readJson(join(root, "workers/default/worker.config.json")); + if (rootConfig.producer?.name !== "wrangler" || rootConfig.producer?.version !== "4.166.0") { + throw new Error("Build Output must be produced by the pinned Wrangler 4.166.0 delegate"); + } + if (worker.name !== "github-ci" || worker.compatibilityDate !== "2025-09-15" || worker.workersDev !== true) { + throw new Error("Build Output worker identity, compatibility date, or workers.dev ingress differs from production"); + } + if (Object.hasOwn(worker, "previewUrls")) { + throw new Error("Build Output must preserve the existing preview URL policy without setting it"); + } + for (const [name, value] of Object.entries(EXPECTED_TEXT_BINDINGS)) { + const binding = worker.env?.[name]; + if (binding?.type !== "text" || binding.value !== value) { + throw new Error(`Build Output non-secret binding mismatch: ${name}`); + } + } + for (const name of SECRET_BINDINGS) { + const binding = worker.env?.[name]; + if (binding?.type !== "secret" || Object.hasOwn(binding, "value")) { + throw new Error(`Build Output must declare ${name} as a value-free secret binding`); + } + } + console.log("Build Output v1 has the expected Worker, ingress, production vars, and value-free secret declarations."); +} + +function selectUpload(path, sha) { + if (!COMMIT_SHA.test(sha)) throw new Error("upload commit must be a full Git commit SHA"); + const tag = `git-${sha.slice(0, 12)}`; + const versions = rows(readJson(path), "versions"); + const candidates = versions.filter((version) => + annotation(version, "workers/tag") === tag && annotation(version, "workers/message") === `github-ci candidate ${sha}`, + ); + if (!candidates.length) throw new Error("uploaded version with exact commit tag and message was not listed"); + const version = newest(candidates, "candidate versions"); + if (!VERSION_ID.test(version.id ?? "")) throw new Error("selected upload did not have a Cloudflare Version UUID"); + reportOutput( + { version_id: version.id }, + `Uploaded candidate \`${version.id}\` tagged \`${tag}\` from commit \`${sha}\`; production traffic was unchanged.`, + ); +} + +function verifyVersion(path, requestedId, expectedSha) { + if (!VERSION_ID.test(requestedId)) throw new Error("requested version ID is not a UUID"); + const version = unwrap(readJson(path)); + if (version?.id !== requestedId) throw new Error("Cloudflare returned a different Worker Version ID"); + const sha = commitFrom(version); + if (expectedSha !== undefined && sha !== expectedSha.toLowerCase()) { + throw new Error("version provenance does not match the requested source commit"); + } + assertSecrets(version); + const summary = `Verified candidate provenance \`${sha}\` and all ${SECRET_BINDINGS.length} retained secret binding names for version \`${requestedId}\`.`; + reportOutput({ source_sha: sha }, summary); +} + +function verifyDeployable(path, requestedId) { + const versions = rows(readJson(path), "deployable versions"); + if (!versions.some((version) => version.id === requestedId)) { + throw new Error("requested Worker Version is not in Cloudflare's deployable set"); + } + console.log("Requested version is deployable."); +} + +function verifyDeployment(path, requestedId, sha) { + if (!COMMIT_SHA.test(sha)) throw new Error("deployment provenance must be a full Git commit SHA"); + const deployments = rows(readJson(path), "deployment read-back"); + const latest = newest(deployments, "deployment read-back"); + const versions = latest?.versions; + if (!Array.isArray(versions) || versions.length !== 1 || versions[0].version_id !== requestedId || Number(versions[0].percentage) !== 100) { + throw new Error("latest Cloudflare deployment does not attribute 100% traffic to the selected version"); + } + reportOutput( + { deployed_version_id: requestedId }, + `Read-back confirms version \`${requestedId}\` from commit \`${sha}\` is the latest deployment at 100% traffic.`, + ); +} + +function main() { + const parsed = parseArgs({ + args: process.argv.slice(2), + options: {}, + allowPositionals: true, + strict: true, + }); + const [command, ...args] = parsed.positionals; + if (command === "build" && args.length === 1) return checkBuild(args[0]); + if (command === "select-upload" && args.length === 2) return selectUpload(args[0], args[1]); + if (command === "verify-version" && (args.length === 2 || args.length === 3)) return verifyVersion(args[0], args[1], args[2]); + if (command === "verify-deployable" && args.length === 2) return verifyDeployable(args[0], args[1]); + if (command === "verify-deployment" && args.length === 3) return verifyDeployment(args[0], args[1], args[2]); + usage(); +} + +try { + main(); +} catch (error) { + console.error(`deployment guard: ${error instanceof Error ? error.message : String(error)}`); + process.exitCode = 2; +} diff --git a/pkgs/github-ci/worker/test/deploy_workflows_test.py b/pkgs/github-ci/worker/test/deploy_workflows_test.py index 15ebe3e187..ef51584067 100644 --- a/pkgs/github-ci/worker/test/deploy_workflows_test.py +++ b/pkgs/github-ci/worker/test/deploy_workflows_test.py @@ -1,5 +1,5 @@ #!/usr/bin/env python3 -"""Offline guard tests for the github-ci Worker version workflows.""" +"""Offline guard checks for github-ci Worker deployment workflows.""" from pathlib import Path import unittest @@ -11,25 +11,42 @@ class DeploymentWorkflowTests(unittest.TestCase): - def test_upload_only_creates_a_version_and_keeps_runtime_secrets_out(self): - self.assertIn("wrangler versions upload", UPLOAD) - self.assertNotIn("wrangler versions deploy", UPLOAD) - self.assertNotIn("wrangler deploy", UPLOAD) + def test_upload_uses_cf_and_never_promotes_traffic(self): + self.assertIn("node-version: 24.22.0", UPLOAD) + self.assertIn("npm run build", UPLOAD) + self.assertIn("cf -q workers versions create", UPLOAD) + self.assertIn("--prebuilt --dry-run", UPLOAD) + self.assertIn("workers versions list --worker github-ci", UPLOAD) + self.assertIn("versions get", UPLOAD) + self.assertIn("verify-version", UPLOAD) + self.assertIn("verify-deployable", UPLOAD) + self.assertNotIn("cf workers deployments create", UPLOAD) + self.assertNotRegex(UPLOAD, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)") self.assertNotIn("--secrets-file", UPLOAD) - self.assertIn("CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}", UPLOAD) + for runtime_secret in [ + "GITHUB_WEBHOOK_SECRET", + "TURSO_PLATFORM_TOKEN", + "TURSO_QUEUE_TOKEN", + "EVENTS_BROKER_TOKEN", + "EVENTS_BROKER_ACCESS_CLIENT_ID", + "EVENTS_BROKER_ACCESS_CLIENT_SECRET", + ]: + self.assertNotIn(runtime_secret, UPLOAD) + self.assertNotIn(runtime_secret, PROMOTE) self.assertIn("environment: github-ci-cloudflare-upload", UPLOAD) - self.assertIn("if: github.ref == 'refs/heads/main'", UPLOAD) + self.assertIn("if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main'", UPLOAD) - def test_promotion_is_manual_protected_and_uses_the_supplied_version(self): + def test_promotion_is_manual_cf_only_and_verifies_provenance(self): self.assertIn("workflow_dispatch:", PROMOTE) self.assertIn("version_id:", PROMOTE) self.assertIn("environment: github-ci-production", PROMOTE) - self.assertIn("if: github.ref == 'refs/heads/main'", PROMOTE) - self.assertIn('"${VERSION_ID}@100%"', PROMOTE) - self.assertIn("--name github-ci", PROMOTE) - self.assertIn("wrangler deployments status", PROMOTE) - self.assertIn("versions[0].percentage !== 100", PROMOTE) - self.assertNotRegex(PROMOTE, r"wrangler deploy(?:\s|$)") + self.assertIn("if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main'", PROMOTE) + self.assertIn("cf -q workers versions get", PROMOTE) + self.assertIn("git merge-base --is-ancestor", PROMOTE) + self.assertIn("cf -q workers deployments create", PROMOTE) + self.assertIn("cf -q workers deployments list", PROMOTE) + self.assertIn("verify-deployment", PROMOTE) + self.assertNotRegex(PROMOTE, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)") if __name__ == "__main__": diff --git a/pkgs/github-ci/worker/test/deployment-config.test.mjs b/pkgs/github-ci/worker/test/deployment-config.test.mjs new file mode 100644 index 0000000000..5648a5c0ff --- /dev/null +++ b/pkgs/github-ci/worker/test/deployment-config.test.mjs @@ -0,0 +1,64 @@ +import assert from "node:assert/strict"; +import { readFile, readdir } from "node:fs/promises"; +import test from "node:test"; + +const read = (path) => readFile(new URL(path, import.meta.url), "utf8"); +const SECRET_BINDINGS = [ + "GITHUB_WEBHOOK_SECRET", + "TURSO_PLATFORM_TOKEN", + "TURSO_QUEUE_TOKEN", + "EVENTS_BROKER_TOKEN", + "EVENTS_BROKER_ACCESS_CLIENT_ID", + "EVENTS_BROKER_ACCESS_CLIENT_SECRET", +]; + +test("cf config declares the production non-secret bindings and only secret names", async () => { + const config = await read("../cloudflare.config.ts"); + const wrangler = await read("../wrangler.toml"); + assert.match(config, /name:\s*"github-ci"/); + assert.match(config, /compatibilityDate:\s*"2025-09-15"/); + assert.match(config, /workersDev:\s*true/); + assert.doesNotMatch(config, /previewUrls\s*:/); + for (const [name, value] of [ + ["TURSO_PLATFORM_URL", "https://fleet-platform-dezren39.aws-us-east-1.turso.io"], + ["TURSO_QUEUE_URL", "https://fleet-queue-dezren39.aws-us-east-1.turso.io"], + ["EVENTS_BROKER_URL", "https://queue-broker.security.cab"], + ]) { + assert.match(wrangler, new RegExp(`${name}\\s*=\\s*"${value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}"`)); + assert.match(config, new RegExp(`${name}:\\s*bindings\\.text\\("${value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}"\\)`)); + } + for (const name of SECRET_BINDINGS) assert.match(config, new RegExp(`${name}:\\s*bindings\\.secret\\(\\)`)); + assert.doesNotMatch(config, /bindings\.secret\([^)]/); +}); + +test("Build Output v1 was made by pinned Wrangler and preserves value-free secret names", async () => { + const root = JSON.parse(await read("../.cloudflare/output/v1/config.json")); + const worker = JSON.parse(await read("../.cloudflare/output/v1/workers/default/worker.config.json")); + assert.deepEqual(root.producer, { name: "wrangler", version: "4.166.0" }); + assert.equal(worker.name, "github-ci"); + assert.equal(worker.workersDev, true); + assert.equal(Object.hasOwn(worker, "previewUrls"), false); + for (const name of SECRET_BINDINGS) { + assert.deepEqual(worker.env[name], { type: "secret" }); + } +}); + +test("locked toolchain uses the cf release candidate with matching Build Output v1", async () => { + const pkg = JSON.parse(await read("../package.json")); + const lock = JSON.parse(await read("../package-lock.json")); + assert.equal(pkg.engines.node, ">=24.22.0"); + assert.equal(pkg.devDependencies.cf, "1.0.0-rc.1"); + assert.equal(lock.packages["node_modules/cf"].version, pkg.devDependencies.cf); + assert.equal(pkg.devDependencies.wrangler, "4.166.0"); + assert.equal(lock.packages["node_modules/wrangler"].version, pkg.devDependencies.wrangler); + assert.equal(lock.packages["node_modules/@cloudflare/build-output-utils"].version, "1.0.0-rc.1"); +}); + +test("pinned cf Versions upload requires strict inheritance resolution", async () => { + const distUrl = new URL("../node_modules/cf/dist/", import.meta.url); + const files = await readdir(distUrl); + const uploadModules = files.filter((file) => file.startsWith("static-assets-") && file.endsWith(".mjs")); + assert.ok(uploadModules.length > 0, "cf upload implementation module is present"); + const source = (await Promise.all(uploadModules.map((file) => readFile(new URL(file, distUrl), "utf8")))).join("\n"); + assert.match(source, /bindings_inherit:\s*`strict`/); +}); diff --git a/pkgs/github-ci/worker/test/deployment-guard.test.mjs b/pkgs/github-ci/worker/test/deployment-guard.test.mjs new file mode 100644 index 0000000000..51a8c23b1c --- /dev/null +++ b/pkgs/github-ci/worker/test/deployment-guard.test.mjs @@ -0,0 +1,138 @@ +import assert from "node:assert/strict"; +import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { spawnSync } from "node:child_process"; +import test from "node:test"; + +const SCRIPT = new URL("../scripts/deployment-guard.mjs", import.meta.url); +const SHA = "5f4dcc3b5aa765d61d8327deb882cf9921f7e3e0"; +const VERSION_ID = "01234567-89ab-cdef-0123-456789abcdef"; +const SECRET_NAMES = [ + "GITHUB_WEBHOOK_SECRET", + "TURSO_PLATFORM_TOKEN", + "TURSO_QUEUE_TOKEN", + "EVENTS_BROKER_TOKEN", + "EVENTS_BROKER_ACCESS_CLIENT_ID", + "EVENTS_BROKER_ACCESS_CLIENT_SECRET", +]; + +function candidate(overrides = {}) { + return { + id: VERSION_ID, + created_on: "2026-11-22T12:00:00.000Z", + annotations: { + "workers/tag": `git-${SHA.slice(0, 12)}`, + "workers/message": `github-ci candidate ${SHA}`, + }, + bindings: SECRET_NAMES.map((name) => ({ name, type: "secret_text" })), + ...overrides, + }; +} + +function run(root, args, env = {}) { + return spawnSync(process.execPath, [SCRIPT.pathname, ...args], { + cwd: root, + encoding: "utf8", + env: { ...process.env, ...env }, + }); +} + +test("upload selection binds the exact full commit tag/message and outputs an ID", (t) => { + const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); + t.after(() => rmSync(root, { recursive: true, force: true })); + const versionsPath = join(root, "versions.json"); + const outputPath = join(root, "output"); + const summaryPath = join(root, "summary"); + writeFileSync(versionsPath, JSON.stringify({ result: [candidate()] })); + const result = run(root, ["select-upload", versionsPath, SHA], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(result.status, 0, result.stderr); + assert.match(readFileSync(outputPath, "utf8"), new RegExp(`version_id=${VERSION_ID}`)); + assert.match(readFileSync(summaryPath, "utf8"), new RegExp(SHA)); + assert.notEqual(run(root, ["select-upload", versionsPath, "a".repeat(40)]).status, 0); +}); + +test("version read-back requires CI provenance and every secret binding by name", (t) => { + const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); + t.after(() => rmSync(root, { recursive: true, force: true })); + const versionPath = join(root, "version.json"); + const outputPath = join(root, "output"); + const summaryPath = join(root, "summary"); + writeFileSync(versionPath, JSON.stringify({ result: candidate() })); + const result = run(root, ["verify-version", versionPath, VERSION_ID, SHA], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(result.status, 0, result.stderr); + assert.match(readFileSync(outputPath, "utf8"), new RegExp(`source_sha=${SHA}`)); + + const droppedSecret = candidate({ bindings: candidate().bindings.slice(1) }); + writeFileSync(versionPath, JSON.stringify({ result: droppedSecret })); + assert.notEqual(run(root, ["verify-version", versionPath, VERSION_ID, SHA], { GITHUB_OUTPUT: outputPath }).status, 0); + + const wrongProvenance = candidate({ annotations: { "workers/tag": "manual", "workers/message": "manual" } }); + writeFileSync(versionPath, JSON.stringify({ result: wrongProvenance })); + assert.notEqual(run(root, ["verify-version", versionPath, VERSION_ID], { GITHUB_OUTPUT: outputPath }).status, 0); +}); + +test("version read-back accepts Cloudflare's env map shape without needing secret values", (t) => { + const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); + t.after(() => rmSync(root, { recursive: true, force: true })); + const versionPath = join(root, "version.json"); + const outputPath = join(root, "output"); + const summaryPath = join(root, "summary"); + const version = candidate({ + bindings: undefined, + env: Object.fromEntries(SECRET_NAMES.map((name) => [name, { type: "secret_text" }])), + }); + writeFileSync(versionPath, JSON.stringify({ success: true, result: version })); + const result = run(root, ["verify-version", versionPath, VERSION_ID, SHA], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(result.status, 0, result.stderr); + assert.doesNotMatch(readFileSync(summaryPath, "utf8"), /secret_text/); +}); + +test("promotion requires deployability and latest 100 percent read-back", (t) => { + const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); + t.after(() => rmSync(root, { recursive: true, force: true })); + const apiPath = join(root, "api.json"); + const outputPath = join(root, "output"); + const summaryPath = join(root, "summary"); + + writeFileSync(apiPath, JSON.stringify({ result: { items: [{ id: VERSION_ID }] } })); + assert.equal(run(root, ["verify-deployable", apiPath, VERSION_ID]).status, 0); + assert.notEqual(run(root, ["verify-deployable", apiPath, "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"]).status, 0); + + writeFileSync(apiPath, JSON.stringify({ result: [{ + created_on: "2026-11-22T12:00:00.000Z", + versions: [{ version_id: VERSION_ID, percentage: 100 }], + }] })); + const ok = run(root, ["verify-deployment", apiPath, VERSION_ID, SHA], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(ok.status, 0, ok.stderr); + + writeFileSync(apiPath, JSON.stringify({ result: [ + { + created_on: "2026-11-22T12:01:00.000Z", + versions: [{ version_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", percentage: 100 }], + }, + { + created_on: "2026-11-22T12:00:00.000Z", + versions: [{ version_id: VERSION_ID, percentage: 100 }], + }, + ] })); + assert.notEqual(run(root, ["verify-deployment", apiPath, VERSION_ID, SHA], { GITHUB_OUTPUT: outputPath }).status, 0); +}); + +test("CLI rejects unknown arguments before reading inputs", () => { + const result = run(process.cwd(), ["version", "--dry-rnu", "/does/not/exist"]); + assert.equal(result.status, 2); + assert.match(result.stderr, /Unknown option/); +}); diff --git a/pkgs/github-ci/worker/tsconfig.json b/pkgs/github-ci/worker/tsconfig.json index 1545166c88..61ea69ff3e 100644 --- a/pkgs/github-ci/worker/tsconfig.json +++ b/pkgs/github-ci/worker/tsconfig.json @@ -1,6 +1,7 @@ { "compilerOptions": { "forceConsistentCasingInFileNames": true, + "allowImportingTsExtensions": true, "lib": ["ES2022"], "module": "ESNext", "moduleResolution": "bundler", @@ -10,5 +11,5 @@ "target": "ES2022", "types": ["@cloudflare/workers-types", "@cloudflare/vitest-pool-workers/types"] }, - "include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts"] + "include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts", "cloudflare.config.ts", ".cloudflare/types/**/*.d.ts"] } diff --git a/pkgs/github-ci/worker/vitest.config.ts b/pkgs/github-ci/worker/vitest.config.ts index 9383506d69..d500eec2eb 100644 --- a/pkgs/github-ci/worker/vitest.config.ts +++ b/pkgs/github-ci/worker/vitest.config.ts @@ -5,6 +5,9 @@ import { defineConfig } from "vitest/config"; // as a Vite plugin; the old defineWorkersConfig + test.poolOptions.workers // shape (and the /config export it came from) no longer exists. export default defineConfig({ + test: { + include: ["test/**/*.test.ts"], + }, plugins: [ cloudflareTest({ wrangler: { configPath: "./wrangler.toml" }, From db726b71d415bc815481b6f4d61120cfb21c0df0 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 08:02:18 +0000 Subject: [PATCH 4/5] CI: isolate Worker version deployment toolchain --- .../worker-deploy-ci}/cloudflare.config.ts | 2 +- .github/worker-deploy-ci/package-lock.json | 2303 +++++++++++++++++ .github/worker-deploy-ci/package.json | 17 + .../test/deployment-config.test.mjs | 11 +- .../test/deployment-guard.test.mjs | 278 ++ .../workflows/github-ci-worker-promote.yml | 242 +- .github/workflows/github-ci-worker-tests.yml | 19 +- .github/workflows/github-ci-worker-upload.yml | 179 +- .gitignore | 2 + pkgs/github-ci/worker/.gitignore | 1 - pkgs/github-ci/worker/README.md | 54 +- pkgs/github-ci/worker/package-lock.json | 1586 ++++-------- pkgs/github-ci/worker/package.json | 12 +- .../worker/scripts/deployment-guard.mjs | 400 ++- .../worker/test/deploy_workflows_test.py | 53 +- .../worker/test/deployment-guard.test.mjs | 138 - pkgs/github-ci/worker/tsconfig.json | 3 +- pkgs/github-ci/worker/vitest.config.ts | 3 - 18 files changed, 3906 insertions(+), 1397 deletions(-) rename {pkgs/github-ci/worker => .github/worker-deploy-ci}/cloudflare.config.ts (88%) create mode 100644 .github/worker-deploy-ci/package-lock.json create mode 100644 .github/worker-deploy-ci/package.json rename {pkgs/github-ci/worker => .github/worker-deploy-ci}/test/deployment-config.test.mjs (82%) create mode 100644 .github/worker-deploy-ci/test/deployment-guard.test.mjs delete mode 100644 pkgs/github-ci/worker/test/deployment-guard.test.mjs diff --git a/pkgs/github-ci/worker/cloudflare.config.ts b/.github/worker-deploy-ci/cloudflare.config.ts similarity index 88% rename from pkgs/github-ci/worker/cloudflare.config.ts rename to .github/worker-deploy-ci/cloudflare.config.ts index e22ff9188e..c91185cfee 100644 --- a/pkgs/github-ci/worker/cloudflare.config.ts +++ b/.github/worker-deploy-ci/cloudflare.config.ts @@ -1,5 +1,5 @@ import { bindings, defineConfig } from "cf/config"; -import * as entrypoint from "./src/index.ts" with { type: "cf-worker" }; +import * as entrypoint from "../../pkgs/github-ci/worker/src/index.ts" with { type: "cf-worker" }; export default defineConfig({ worker: { diff --git a/.github/worker-deploy-ci/package-lock.json b/.github/worker-deploy-ci/package-lock.json new file mode 100644 index 0000000000..79f2d648d9 --- /dev/null +++ b/.github/worker-deploy-ci/package-lock.json @@ -0,0 +1,2303 @@ +{ + "name": "github-ci-worker-deployment-toolchain", + "version": "0.1.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "github-ci-worker-deployment-toolchain", + "version": "0.1.0", + "devDependencies": { + "cf": "1.0.0-rc.1", + "wrangler": "4.166.0" + }, + "engines": { + "node": "24.22.0" + } + }, + "node_modules/@cloudflare/build-output-utils": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@cloudflare/build-output-utils/-/build-output-utils-1.0.0-rc.1.tgz", + "integrity": "sha512-IrzZL1UEdVMZPRarrKu2VpnL3MIeNVhCItTebB88SwQ1YJ4mLAe1kQtXmIH7MpdgDYnxAsTZXMtuw9q5jRWCcw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cloudflare/config": "1.0.0-rc.1" + } + }, + "node_modules/@cloudflare/config": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/@cloudflare/config/-/config-1.0.0-rc.1.tgz", + "integrity": "sha512-NQgB+fQbk8IU0iJ6/G9LCSQjJ7JuyRn5CALrPKnQ8vxqayOJlX+av9adhLCMYBeC80ocncW1Gy7quv00uLV3LQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "zod": "4.6.6" + } + }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.1.tgz", + "integrity": "sha512-48OysfSW3MkQY1XjkhkpPkgrEkOvgfoyHzA2eyX5wpzFpijC02uWigv3hkNdJdT3C7ybW/U17yYHXeR68pLeww==", + "dev": true, + "license": "MIT OR Apache-2.0", + "engines": { + "node": ">=22.0.0" + } + }, + "node_modules/@cloudflare/runtime-types": { + "version": "0.1.30", + "resolved": "https://registry.npmjs.org/@cloudflare/runtime-types/-/runtime-types-0.1.30.tgz", + "integrity": "sha512-p68T70lDZT7Vyv5c2SDzB0uqVRVCtj/3WMgXVQESnWVyTybcCwXRM9Ekmh2rQ+aPGhtIWiACvd8pX2yGA9Z5mw==", + "dev": true, + "license": "MIT", + "dependencies": { + "miniflare": "5.20261117.0-beta", + "workerd": "1.20261117.1" + } + }, + "node_modules/@cloudflare/unenv-preset": { + "version": "2.16.2", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz", + "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==", + "dev": true, + "license": "MIT OR Apache-2.0", + "peerDependencies": { + "unenv": "2.0.0-rc.24", + "workerd": ">1.20260305.0 <2.0.0-0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + } + }, + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261117.1.tgz", + "integrity": "sha512-qfAYw6iPoey0BmPsp4z5ARWOa+XSBD3gQzmcBI2ql9pKTSA5eEC8F1oI6BIk/FVguhomfSn5gS4RzbWhTd/EpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261117.1.tgz", + "integrity": "sha512-cInx5Cr9O27oW+ujyI49lTRQZra/lMgWUFiKmGY3jxDncATSxzfQ6udXHkVvK4//1/PfxQTDyMjdQUIN8m6Aqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261117.1.tgz", + "integrity": "sha512-gZLA8X11m/luZwn+YA3+mDu61vdxNJzpksP/QZqjydKTQ+VUCulsK5gtn9Bqst1p3KJu2kafQpJ1nDQv4B23jA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261117.1.tgz", + "integrity": "sha512-gxWngFojq41ULKNKb9rpWYvKotN5hT2I/xot+Bpy31cXzrwcTgtDLSMb2t75sW5BJxH7hihFvikgYb577kB3Zg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261117.1.tgz", + "integrity": "sha512-0OR2Btx5EDonOKvvuGDq8rxBSggxoF1ThQjbZN3vsu3GlaF/oXW5f9/iB78OgV0CzMPTi+hZgzc1NR95UJCURA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workers-utils": { + "version": "0.56.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-utils/-/workers-utils-0.56.0.tgz", + "integrity": "sha512-Fw3/zR+pQp+5hKn1CHIRkCYz49fyAb2qRqCq01jBGqlKL0rRnZyXYD4j0h9cjaWPYYQUOe5y6L7BNp2ZwsHg5A==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "chalk": "5.3.0", + "dotenv": "16.3.1", + "undici": "7.30.2" + }, + "peerDependencies": { + "vitest": "^4.1.0 || ^5.0.0" + }, + "peerDependenciesMeta": { + "vitest": { + "optional": true + } + } + }, + "node_modules/@cloudflare/workers-utils/node_modules/undici": { + "version": "7.30.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.2.tgz", + "integrity": "sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.3.tgz", + "integrity": "sha512-Xz4Tpyki7XyrpbUK1jR1AhdAdaXyhhY4lZ3neLodmhpuWfy2PAQN5B46sAiU4liOXGLkHypn/qU+jvfWSCYYLA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", + "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", + "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", + "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", + "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", + "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", + "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", + "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", + "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", + "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", + "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", + "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", + "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", + "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", + "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", + "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", + "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", + "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", + "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", + "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", + "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", + "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", + "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", + "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", + "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", + "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", + "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/colour": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", + "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", + "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-freebsd-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", + "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", + "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", + "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", + "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", + "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", + "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", + "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", + "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", + "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", + "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", + "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", + "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", + "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", + "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", + "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", + "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.3.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", + "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", + "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", + "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.3.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", + "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.11.3" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-webcontainers-wasm32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", + "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "dependencies": { + "@img/sharp-wasm32": "0.35.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", + "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", + "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", + "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.3.tgz", + "integrity": "sha512-lhTtjtoEArWBjismtfS761S9Hlyn+nIZqOZVYoZ1Xn82PMNMVnk+jj/NhC4fAXGTs7ydONcJiR5vyQBTMDu27g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.6.0.tgz", + "integrity": "sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@poppinss/colors": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz", + "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^4.1.5" + } + }, + "node_modules/@poppinss/dumper": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz", + "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@sindresorhus/is": "^7.0.2", + "supports-color": "^10.0.0" + } + }, + "node_modules/@poppinss/exception": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz", + "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@sindresorhus/is": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz", + "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@speed-highlight/core": { + "version": "1.2.24", + "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.24.tgz", + "integrity": "sha512-qeW2e1l78afw8VhRPfPQ1Gjj+KU5XFQ/OFV5ti6eTa9bruO7mJyZtA4vw0ofqmA3tKCkROE9xLk3VZoeRc98nw==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/@types/node": { + "version": "18.19.130", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", + "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/node-fetch": { + "version": "2.6.13", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", + "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*", + "form-data": "^4.0.4" + } + }, + "node_modules/@types/yargs": { + "version": "17.0.24", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", + "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/yargs-parser": "*" + } + }, + "node_modules/@types/yargs-parser": { + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", + "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==", + "dev": true, + "license": "MIT", + "dependencies": { + "event-target-shim": "^5.0.0" + }, + "engines": { + "node": ">=6.5" + } + }, + "node_modules/agentkeepalive": { + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", + "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "humanize-ms": "^1.2.1" + }, + "engines": { + "node": ">= 8.0.0" + } + }, + "node_modules/asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", + "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/cf": { + "version": "1.0.0-rc.1", + "resolved": "https://registry.npmjs.org/cf/-/cf-1.0.0-rc.1.tgz", + "integrity": "sha512-mQ9X/FVE1QP2ebXVF/9tlbqoO0TB3tKxUJocaWsic6IuNvThmJc/Ou/4ABJNB/Sj8HxEzvrjT1PRqjySVO5YoA==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/build-output-utils": "1.0.0-rc.1", + "@cloudflare/config": "1.0.0-rc.1", + "@cloudflare/runtime-types": "0.1.30", + "blake3-wasm": "2.1.5", + "miniflare": "5.20261117.0-beta" + }, + "bin": { + "cf": "bin/cf", + "cloudflare": "bin/cf" + }, + "engines": { + "node": "^22.23.0 || ^24.22.0 || ^26.12.0" + } + }, + "node_modules/chalk": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^12.17.0 || ^14.13 || >=16.0.0" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/cloudflare": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/cloudflare/-/cloudflare-5.2.0.tgz", + "integrity": "sha512-dVzqDpPFYR9ApEC9e+JJshFJZXcw4HzM8W+3DHzO5oy9+8rLC53G7x6fEf9A7/gSuSCxuvndzui5qJKftfIM9A==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@types/node": "^18.11.18", + "@types/node-fetch": "^2.6.4", + "abort-controller": "^3.0.0", + "agentkeepalive": "^4.2.1", + "form-data-encoder": "1.7.2", + "formdata-node": "^4.3.2", + "node-fetch": "^2.6.7" + } + }, + "node_modules/combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "license": "MIT", + "dependencies": { + "delayed-stream": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/devtools-protocol": { + "version": "0.0.1182435", + "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1182435.tgz", + "integrity": "sha512-EmlkWb62wSbQNE1gRZZsi4KZYRaF5Skpp183LhRU7+sadKR06O1dHCjZmFSEG6Kv7P6S/UYLxcY3NlYwqKM99w==", + "dev": true, + "license": "BSD-3-Clause" + }, + "node_modules/dotenv": { + "version": "16.3.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", + "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", + "dev": true, + "license": "BSD-2-Clause", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, + "node_modules/dunder-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", + "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/error-stack-parser-es": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", + "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "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/es-object-atoms": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", + "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", + "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/esbuild": { + "version": "0.28.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", + "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.28.2", + "@esbuild/android-arm": "0.28.2", + "@esbuild/android-arm64": "0.28.2", + "@esbuild/android-x64": "0.28.2", + "@esbuild/darwin-arm64": "0.28.2", + "@esbuild/darwin-x64": "0.28.2", + "@esbuild/freebsd-arm64": "0.28.2", + "@esbuild/freebsd-x64": "0.28.2", + "@esbuild/linux-arm": "0.28.2", + "@esbuild/linux-arm64": "0.28.2", + "@esbuild/linux-ia32": "0.28.2", + "@esbuild/linux-loong64": "0.28.2", + "@esbuild/linux-mips64el": "0.28.2", + "@esbuild/linux-ppc64": "0.28.2", + "@esbuild/linux-riscv64": "0.28.2", + "@esbuild/linux-s390x": "0.28.2", + "@esbuild/linux-x64": "0.28.2", + "@esbuild/netbsd-arm64": "0.28.2", + "@esbuild/netbsd-x64": "0.28.2", + "@esbuild/openbsd-arm64": "0.28.2", + "@esbuild/openbsd-x64": "0.28.2", + "@esbuild/openharmony-arm64": "0.28.2", + "@esbuild/sunos-x64": "0.28.2", + "@esbuild/win32-arm64": "0.28.2", + "@esbuild/win32-ia32": "0.28.2", + "@esbuild/win32-x64": "0.28.2" + } + }, + "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==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/form-data": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", + "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "es-set-tostringtag": "^2.1.0", + "hasown": "^2.0.4", + "mime-types": "^2.1.35" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/form-data-encoder": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", + "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", + "dev": true, + "license": "MIT" + }, + "node_modules/formdata-node": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", + "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "node-domexception": "1.0.0", + "web-streams-polyfill": "4.0.0-beta.3" + }, + "engines": { + "node": ">= 12.20" + } + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "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-intrinsic": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", + "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.2", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.1.1", + "function-bind": "^1.1.2", + "get-proto": "^1.0.1", + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.1.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/get-proto": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", + "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", + "dev": true, + "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/gopd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-symbols": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/has-tostringtag": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", + "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-symbols": "^1.0.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "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/humanize-ms": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", + "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.0.0" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/math-intrinsics": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", + "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/mime-db": { + "version": "1.52.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", + "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/mime-types": { + "version": "2.1.35", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", + "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "dev": true, + "license": "MIT", + "dependencies": { + "mime-db": "1.52.0" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/miniflare": { + "version": "5.20261117.0-beta", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261117.0-beta.tgz", + "integrity": "sha512-D2ygY04wQUmbpwgBhj828piErZoj7UMlXNGr4EWQp/c1PNGHyYOh0dMIyobjwOXiD5Ifl1EaEVAoNuBHK+qtkw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "sharp": "0.35.5", + "undici": "7.30.1", + "workerd": "1.20261117.1", + "ws": "8.21.0", + "youch": "4.1.0-beta.10" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "deprecated": "Use your platform's native DOMException instead", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "license": "MIT", + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.6.tgz", + "integrity": "sha512-9lpSSU4Mly3mrtruwLs1eLK6+gzbzqeBFwRNjIjE+9LuDpWdYctrQlQ3ej1Ilgi7gknpsTRnPoLP8DpCHqHIJw==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.35.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", + "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "@img/colour": "^1.1.0", + "detect-libc": "^2.1.2", + "semver": "^7.8.5" + }, + "engines": { + "node": ">=20.9.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.35.5", + "@img/sharp-darwin-x64": "0.35.5", + "@img/sharp-freebsd-wasm32": "0.35.5", + "@img/sharp-libvips-darwin-arm64": "1.3.4", + "@img/sharp-libvips-darwin-x64": "1.3.4", + "@img/sharp-libvips-linux-arm": "1.3.4", + "@img/sharp-libvips-linux-arm64": "1.3.4", + "@img/sharp-libvips-linux-ppc64": "1.3.4", + "@img/sharp-libvips-linux-riscv64": "1.3.4", + "@img/sharp-libvips-linux-s390x": "1.3.4", + "@img/sharp-libvips-linux-x64": "1.3.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", + "@img/sharp-libvips-linuxmusl-x64": "1.3.4", + "@img/sharp-linux-arm": "0.35.5", + "@img/sharp-linux-arm64": "0.35.5", + "@img/sharp-linux-ppc64": "0.35.5", + "@img/sharp-linux-riscv64": "0.35.5", + "@img/sharp-linux-s390x": "0.35.5", + "@img/sharp-linux-x64": "0.35.5", + "@img/sharp-linuxmusl-arm64": "0.35.5", + "@img/sharp-linuxmusl-x64": "0.35.5", + "@img/sharp-webcontainers-wasm32": "0.35.5", + "@img/sharp-win32-arm64": "0.35.5", + "@img/sharp-win32-ia32": "0.35.5", + "@img/sharp-win32-x64": "0.35.5" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + } + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true, + "license": "MIT" + }, + "node_modules/tslib": { + "version": "2.9.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.9.1.tgz", + "integrity": "sha512-a4Ux9VKuIMHsOS7ENbEq6hK2ZGYIT27Rtl0E4eD9KqwxhKiQeMZE/9xb3IdYwWaSOyIBQLExhQgXDTYoiCxnWA==", + "dev": true, + "license": "0BSD", + "optional": true + }, + "node_modules/undici": { + "version": "7.30.1", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.1.tgz", + "integrity": "sha512-03KrMbjIFDWQR5RNPrSw3bd1r12JpyFQl9/yxjUbJtqkjmllqC5lFjZh6ujeuJCKr8EOQvRW872Oy/az+nLYxg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true, + "license": "MIT" + }, + "node_modules/unenv": { + "version": "2.0.0-rc.24", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", + "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3" + } + }, + "node_modules/web-streams-polyfill": { + "version": "4.0.0-beta.3", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", + "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14" + } + }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true, + "license": "BSD-2-Clause" + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "license": "MIT", + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, + "node_modules/workerd": { + "version": "1.20261117.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261117.1.tgz", + "integrity": "sha512-iakDbGVtJRiErpWSM5fYT0z3spJ2Mo1x/POsEajBNLqUbTRwm8vMqbB7g8zPN2tzs6eZYNiO5ECyEnAXO9Foxw==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20261117.1", + "@cloudflare/workerd-darwin-arm64": "1.20261117.1", + "@cloudflare/workerd-linux-64": "1.20261117.1", + "@cloudflare/workerd-linux-arm64": "1.20261117.1", + "@cloudflare/workerd-windows-64": "1.20261117.1" + } + }, + "node_modules/wrangler": { + "version": "4.166.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.166.0.tgz", + "integrity": "sha512-qMz0sHGXqEC0Va8T6dAaG0ggp9tCcuHHYMUQzRKbtZg6+MPAPb6oBu1757IaeugNJHPAz+twHiA+zDyXWQLsLw==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/kv-asset-handler": "0.5.1", + "@cloudflare/unenv-preset": "2.16.2", + "@cloudflare/workers-utils": "0.56.0", + "@cspotcode/source-map-support": "0.8.1", + "@types/yargs": "17.0.24", + "cloudflare": "5.2.0", + "devtools-protocol": "0.0.1182435", + "esbuild": "0.28.2", + "miniflare": "5.20261119.0-beta", + "path-to-regexp": "6.3.0", + "undici": "7.30.2", + "unenv": "2.0.0-rc.24", + "workerd": "1.20261119.1" + }, + "bin": { + "cf-wrangler": "bin/cf-wrangler.js", + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=22.12.0" + }, + "optionalDependencies": { + "fsevents": "2.3.3" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^5.20261119.1" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261119.1.tgz", + "integrity": "sha512-yotoiTGXCl1gTRX+y5ZWSAmzAg6CcBJXhJL6C1DGWUhsjjezNe8FdzraNsefVTOeKsOid2EC+hqOzewczKLvmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261119.1.tgz", + "integrity": "sha512-VPOmfEmMubvw4SPcg/yDgamQXsiVAENgxeCJO8pDggRJFaF93SP0g/hktD8sbfmWBS19BO1kX1EsdgHSgRL9jA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261119.1.tgz", + "integrity": "sha512-aaDf78smiN12Uuwtg6TG6iLVS61sLpy/7DC5PYORf2+TCYw/bygcaqqb8zQJ+XwZ3xYhm/Ws80c/yMMhCMTFYA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261119.1.tgz", + "integrity": "sha512-LkyAvTMcKqRUP73HRScWWwTSz3pw09um1hxR+rcGdvsGzao8IR59XXTp/tul6kFdVBL2mD8U3X6j2O8t7I4viw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261119.1.tgz", + "integrity": "sha512-y4RO3QFNWt4j4uq2kmP5tklTvdA3qOA0PXuA66vsCmEtZYYb71ldefJcq5Dt0jrexKf/i4BBaLXZMVYLnohb0g==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/wrangler/node_modules/miniflare": { + "version": "5.20261119.0-beta", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261119.0-beta.tgz", + "integrity": "sha512-HdNQIUPgde5Yg0qFaI6iiYd0aOxAgKQTXDstkBN2G1tPBdslNrUKdySwaGdBix0IFd+yh8M0gkqzw68dIZ2Ugw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "sharp": "0.35.5", + "undici": "7.30.2", + "workerd": "1.20261119.1", + "ws": "8.21.0", + "youch": "4.1.0-beta.10" + }, + "engines": { + "node": ">=22.12.0" + }, + "peerDependencies": { + "kerberos": "^2.0.0" + }, + "peerDependenciesMeta": { + "kerberos": { + "optional": true + } + } + }, + "node_modules/wrangler/node_modules/undici": { + "version": "7.30.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.30.2.tgz", + "integrity": "sha512-mLyPQnHwUxaM/rideoK/+KL8DaAJLRl4aBCfmX444aCSLnIaomqPLtNRe2jdCYcsk5wZzXrDIQC8ZeYNRAYyIA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/wrangler/node_modules/workerd": { + "version": "1.20261119.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261119.1.tgz", + "integrity": "sha512-lalSvY+ad5asqMgzA/DfrZo7wvuvOHJc/aS1UctUrwu76fJE/LkSKJlprfBu0LeU79Qai5d+xFooQA9CIfj+dQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20261119.1", + "@cloudflare/workerd-darwin-arm64": "1.20261119.1", + "@cloudflare/workerd-linux-64": "1.20261119.1", + "@cloudflare/workerd-linux-arm64": "1.20261119.1", + "@cloudflare/workerd-windows-64": "1.20261119.1" + } + }, + "node_modules/ws": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/youch": { + "version": "4.1.0-beta.10", + "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz", + "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@poppinss/dumper": "^0.6.4", + "@speed-highlight/core": "^1.2.7", + "cookie": "^1.0.2", + "youch-core": "^0.3.3" + } + }, + "node_modules/youch-core": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz", + "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/exception": "^1.2.2", + "error-stack-parser-es": "^1.0.5" + } + }, + "node_modules/zod": { + "version": "4.6.6", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz", + "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/.github/worker-deploy-ci/package.json b/.github/worker-deploy-ci/package.json new file mode 100644 index 0000000000..9cddc3865a --- /dev/null +++ b/.github/worker-deploy-ci/package.json @@ -0,0 +1,17 @@ +{ + "name": "github-ci-worker-deployment-toolchain", + "version": "0.1.0", + "private": true, + "type": "module", + "engines": { + "node": "24.22.0" + }, + "scripts": { + "build": "cf build", + "test:offline": "node --test test/deployment-config.test.mjs test/deployment-guard.test.mjs" + }, + "devDependencies": { + "cf": "1.0.0-rc.1", + "wrangler": "4.166.0" + } +} diff --git a/pkgs/github-ci/worker/test/deployment-config.test.mjs b/.github/worker-deploy-ci/test/deployment-config.test.mjs similarity index 82% rename from pkgs/github-ci/worker/test/deployment-config.test.mjs rename to .github/worker-deploy-ci/test/deployment-config.test.mjs index 5648a5c0ff..2827f4f06f 100644 --- a/pkgs/github-ci/worker/test/deployment-config.test.mjs +++ b/.github/worker-deploy-ci/test/deployment-config.test.mjs @@ -14,10 +14,11 @@ const SECRET_BINDINGS = [ test("cf config declares the production non-secret bindings and only secret names", async () => { const config = await read("../cloudflare.config.ts"); - const wrangler = await read("../wrangler.toml"); + const wrangler = await read("../../../pkgs/github-ci/worker/wrangler.toml"); assert.match(config, /name:\s*"github-ci"/); assert.match(config, /compatibilityDate:\s*"2025-09-15"/); assert.match(config, /workersDev:\s*true/); + assert.match(config, /\.\.\/\.\.\/pkgs\/github-ci\/worker\/src\/index\.ts/); assert.doesNotMatch(config, /previewUrls\s*:/); for (const [name, value] of [ ["TURSO_PLATFORM_URL", "https://fleet-platform-dezren39.aws-us-east-1.turso.io"], @@ -46,12 +47,18 @@ test("Build Output v1 was made by pinned Wrangler and preserves value-free secre test("locked toolchain uses the cf release candidate with matching Build Output v1", async () => { const pkg = JSON.parse(await read("../package.json")); const lock = JSON.parse(await read("../package-lock.json")); - assert.equal(pkg.engines.node, ">=24.22.0"); + const workerPkg = JSON.parse(await read("../../../pkgs/github-ci/worker/package.json")); + const workerLock = JSON.parse(await read("../../../pkgs/github-ci/worker/package-lock.json")); + assert.equal(pkg.engines.node, "24.22.0"); assert.equal(pkg.devDependencies.cf, "1.0.0-rc.1"); assert.equal(lock.packages["node_modules/cf"].version, pkg.devDependencies.cf); assert.equal(pkg.devDependencies.wrangler, "4.166.0"); assert.equal(lock.packages["node_modules/wrangler"].version, pkg.devDependencies.wrangler); assert.equal(lock.packages["node_modules/@cloudflare/build-output-utils"].version, "1.0.0-rc.1"); + assert.equal(workerPkg.scripts.deploy, "wrangler deploy"); + assert.equal(workerPkg.devDependencies.wrangler, "4.59.1"); + assert.equal(Object.hasOwn(workerPkg.devDependencies, "cf"), false); + assert.equal(workerLock.packages["node_modules/wrangler"].version, "4.59.1"); }); test("pinned cf Versions upload requires strict inheritance resolution", async () => { diff --git a/.github/worker-deploy-ci/test/deployment-guard.test.mjs b/.github/worker-deploy-ci/test/deployment-guard.test.mjs new file mode 100644 index 0000000000..df53e6e194 --- /dev/null +++ b/.github/worker-deploy-ci/test/deployment-guard.test.mjs @@ -0,0 +1,278 @@ +import assert from "node:assert/strict"; +import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import { spawnSync } from "node:child_process"; +import test from "node:test"; + +const SCRIPT = new URL("../../../pkgs/github-ci/worker/scripts/deployment-guard.mjs", import.meta.url); +const SHA = "5f4dcc3b5aa765d61d8327deb882cf9921f7e3e0"; +const RUN_ID = "123456789"; +const RUN_ATTEMPT = "2"; +const VERSION_ID = "01234567-89ab-cdef-0123-456789abcdef"; +const BASELINE_VERSION_ID = "11234567-89ab-cdef-0123-456789abcdef"; +const BASELINE_DEPLOYMENT_ID = "21234567-89ab-cdef-0123-456789abcdef"; +const DEPLOYMENT_ID = "31234567-89ab-cdef-0123-456789abcdef"; +const SECRET_NAMES = [ + "GITHUB_WEBHOOK_SECRET", + "TURSO_PLATFORM_TOKEN", + "TURSO_QUEUE_TOKEN", + "EVENTS_BROKER_TOKEN", + "EVENTS_BROKER_ACCESS_CLIENT_ID", + "EVENTS_BROKER_ACCESS_CLIENT_SECRET", +]; + +function version(id, createdOn, overrides = {}) { + return { + id, + created_on: createdOn, + annotations: { + "workers/tag": `git-${SHA.slice(0, 12)}`, + "workers/message": `github-ci candidate ${SHA}`, + }, + bindings: SECRET_NAMES.map((name) => ({ name, type: "secret_text" })), + ...overrides, + }; +} + +function baselineDeployment(overrides = {}) { + return { + id: BASELINE_DEPLOYMENT_ID, + created_on: "2026-11-22T12:00:00.000Z", + versions: [{ version_id: BASELINE_VERSION_ID, percentage: 100 }], + ...overrides, + }; +} + +function candidateReceipt() { + return { + schema: "github-ci-worker-upload-receipt/v1", + upload: { + repository: "developing-today/code", + workflow_path: ".github/workflows/github-ci-worker-upload.yml", + workflow_ref: "developing-today/code/.github/workflows/github-ci-worker-upload.yml@refs/heads/main", + event: "workflow_dispatch", + ref: "refs/heads/main", + run_id: RUN_ID, + run_attempt: Number(RUN_ATTEMPT), + source_sha: SHA, + artifact_name: `github-ci-candidate-${RUN_ID}-${RUN_ATTEMPT}`, + }, + baseline: { + deployment_id: BASELINE_DEPLOYMENT_ID, + version_id: BASELINE_VERSION_ID, + created_on: "2026-11-22T12:00:00.000Z", + }, + candidate: { + version_id: VERSION_ID, + created_on: "2026-11-22T12:05:00.000Z", + tag: `git-${SHA.slice(0, 12)}`, + message: `github-ci candidate ${SHA}`, + secret_bindings: SECRET_NAMES.map((name) => ({ name, type: "secret_text" })), + }, + }; +} + +function writeJson(path, value) { + writeFileSync(path, JSON.stringify(value)); +} + +function run(root, args, env = {}) { + return spawnSync(process.execPath, [SCRIPT.pathname, ...args], { + cwd: root, + encoding: "utf8", + env: { ...process.env, ...env }, + }); +} + +function temp(t) { + const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); + t.after(() => rmSync(root, { recursive: true, force: true })); + return root; +} + +function uploadEnv(root) { + return { + GITHUB_REPOSITORY: "developing-today/code", + GITHUB_EVENT_NAME: "workflow_dispatch", + GITHUB_REF: "refs/heads/main", + GITHUB_SHA: SHA, + GITHUB_RUN_ID: RUN_ID, + GITHUB_RUN_ATTEMPT: RUN_ATTEMPT, + GITHUB_WORKFLOW_REF: "developing-today/code/.github/workflows/github-ci-worker-upload.yml@refs/heads/main", + GITHUB_OUTPUT: join(root, "output"), + GITHUB_STEP_SUMMARY: join(root, "summary"), + }; +} + +test("environment check fails closed without required reviewers and exact main policy", (t) => { + const root = temp(t); + const environmentPath = join(root, "environment.json"); + const policiesPath = join(root, "policies.json"); + writeJson(environmentPath, { + name: "github-ci-production", + protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User", reviewer: { login: "reviewer" } }] }], + deployment_branch_policy: { protected_branches: false, custom_branch_policies: true }, + }); + writeJson(policiesPath, { branch_policies: [{ id: 1, name: "main" }] }); + assert.equal(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { + GITHUB_OUTPUT: join(root, "output"), + }).status, 0); + + writeJson(environmentPath, { name: "github-ci-production", protection_rules: [], deployment_branch_policy: { custom_branch_policies: true } }); + assert.notEqual(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { + GITHUB_OUTPUT: join(root, "output"), + }).status, 0); + writeJson(environmentPath, { + name: "github-ci-production", + protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User", reviewer: { login: "reviewer" } }] }], + deployment_branch_policy: { protected_branches: false, custom_branch_policies: true }, + }); + writeJson(policiesPath, { branch_policies: [{ id: 1, name: "main" }, { id: 2, name: "release/*" }] }); + assert.notEqual(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { + GITHUB_OUTPUT: join(root, "output"), + }).status, 0); +}); + +test("baseline and uploaded candidate receipt preserve exact IDs, attempts, provenance, and binding names", (t) => { + const root = temp(t); + const baselinePath = join(root, "baseline-deployments.json"); + const baselineVersionPath = join(root, "baseline-version.json"); + const candidatePath = join(root, "candidate-version.json"); + const receiptPath = join(root, "upload-receipt.json"); + const runPath = join(root, "run-attempt.json"); + writeJson(baselinePath, { result: { deployments: [baselineDeployment()] } }); + writeJson(baselineVersionPath, { result: version(BASELINE_VERSION_ID, "2026-11-22T11:59:00.000Z", { annotations: {} }) }); + writeJson(candidatePath, { result: version(VERSION_ID, "2026-11-22T12:05:00.000Z") }); + + const env = uploadEnv(root); + const written = run(root, ["write-upload-receipt", baselinePath, baselineVersionPath, candidatePath, receiptPath], env); + assert.equal(written.status, 0, written.stderr); + const receipt = JSON.parse(readFileSync(receiptPath, "utf8")); + assert.equal(receipt.upload.run_id, RUN_ID); + assert.equal(receipt.upload.run_attempt, Number(RUN_ATTEMPT)); + assert.equal(receipt.baseline.deployment_id, BASELINE_DEPLOYMENT_ID); + assert.equal(receipt.baseline.version_id, BASELINE_VERSION_ID); + assert.deepEqual(receipt.candidate.secret_bindings.map((binding) => binding.name), SECRET_NAMES); + assert.doesNotMatch(readFileSync(receiptPath, "utf8"), /secret_text.*value|"value"/); + + writeJson(runPath, { + id: Number(RUN_ID), + run_attempt: Number(RUN_ATTEMPT), + path: ".github/workflows/github-ci-worker-upload.yml@main", + event: "workflow_dispatch", + head_branch: "main", + head_sha: SHA, + status: "completed", + conclusion: "success", + repository: { full_name: "developing-today/code" }, + }); + const verified = run(root, ["verify-upload-receipt", receiptPath, runPath, RUN_ID, RUN_ATTEMPT, VERSION_ID, BASELINE_DEPLOYMENT_ID, BASELINE_VERSION_ID], env); + assert.equal(verified.status, 0, verified.stderr); + assert.match(readFileSync(env.GITHUB_OUTPUT, "utf8"), new RegExp(`source_sha=${SHA}`)); + + assert.notEqual(run(root, ["verify-upload-receipt", receiptPath, runPath, RUN_ID, "1", VERSION_ID, BASELINE_DEPLOYMENT_ID, BASELINE_VERSION_ID], env).status, 0); + assert.notEqual(run(root, ["verify-upload-receipt", receiptPath, runPath, RUN_ID, RUN_ATTEMPT, VERSION_ID, DEPLOYMENT_ID, BASELINE_VERSION_ID], env).status, 0); + assert.notEqual(run(root, ["verify-upload-receipt", join(root, "missing.json"), runPath, RUN_ID, RUN_ATTEMPT, VERSION_ID, BASELINE_DEPLOYMENT_ID, BASELINE_VERSION_ID], env).status, 0); +}); + +test("version guards reject missing bindings and verify the existing active baseline", (t) => { + const root = temp(t); + const baselinePath = join(root, "baseline-deployments.json"); + const versionPath = join(root, "version.json"); + const outputPath = join(root, "output"); + writeJson(baselinePath, { result: [baselineDeployment()] }); + writeJson(versionPath, { result: version(BASELINE_VERSION_ID, "2026-11-22T11:59:00.000Z", { annotations: {} }) }); + const good = run(root, ["verify-baseline", baselinePath, versionPath], { GITHUB_OUTPUT: outputPath }); + assert.equal(good.status, 0, good.stderr); + assert.match(readFileSync(outputPath, "utf8"), new RegExp(`baseline_deployment_id=${BASELINE_DEPLOYMENT_ID}`)); + + writeJson(versionPath, { result: version(BASELINE_VERSION_ID, "2026-11-22T11:59:00.000Z", { bindings: [] }) }); + assert.notEqual(run(root, ["verify-baseline", baselinePath, versionPath], { GITHUB_OUTPUT: outputPath }).status, 0); + + const receiptPath = join(root, "receipt.json"); + writeJson(receiptPath, candidateReceipt()); + const changed = { deployments: [baselineDeployment({ id: DEPLOYMENT_ID, created_on: "2026-11-23T12:00:00.000Z" })] }; + writeJson(baselinePath, changed); + assert.notEqual(run(root, ["verify-baseline-current", baselinePath, receiptPath]).status, 0); +}); + +test("version guard accepts Cloudflare env-map reads without secret values", (t) => { + const root = temp(t); + const versionPath = join(root, "version.json"); + writeJson(versionPath, { + result: { + ...version(VERSION_ID, "2026-11-22T12:05:00.000Z"), + bindings: undefined, + env: Object.fromEntries(SECRET_NAMES.map((name) => [name, { type: "secret_text" }])), + }, + }); + const result = run(root, ["verify-version", versionPath, VERSION_ID, SHA], { + GITHUB_OUTPUT: join(root, "output"), + GITHUB_STEP_SUMMARY: join(root, "summary"), + }); + assert.equal(result.status, 0, result.stderr); + assert.doesNotMatch(readFileSync(join(root, "summary"), "utf8"), /secret_text/); +}); + +test("promotion needs the exact create receipt and latest 100 percent deployment read-back", (t) => { + const root = temp(t); + const receiptPath = join(root, "upload-receipt.json"); + const createdPath = join(root, "created.json"); + const deploymentsPath = join(root, "deployments.json"); + const outputPath = join(root, "output"); + const summaryPath = join(root, "summary"); + writeJson(receiptPath, candidateReceipt()); + const created = { + id: DEPLOYMENT_ID, + created_on: "2026-11-23T12:00:00.000Z", + versions: [{ version_id: VERSION_ID, percentage: 100 }], + }; + writeJson(createdPath, { result: created }); + writeJson(deploymentsPath, { result: { deployments: [created, baselineDeployment()] } }); + + const createdResult = run(root, ["verify-created-deployment", createdPath, receiptPath], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(createdResult.status, 0, createdResult.stderr); + assert.match(readFileSync(outputPath, "utf8"), new RegExp(`deployment_id=${DEPLOYMENT_ID}`)); + const readback = run(root, ["verify-promotion-readback", deploymentsPath, receiptPath, createdPath], { + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }); + assert.equal(readback.status, 0, readback.stderr); + + const wrongId = { ...created, id: "41234567-89ab-cdef-0123-456789abcdef" }; + writeJson(createdPath, { result: wrongId }); + assert.notEqual(run(root, ["verify-promotion-readback", deploymentsPath, receiptPath, createdPath], { GITHUB_OUTPUT: outputPath }).status, 0); + writeJson(createdPath, { result: created }); + writeJson(deploymentsPath, { result: { deployments: [{ ...created, versions: [{ version_id: BASELINE_VERSION_ID, percentage: 100 }] }, baselineDeployment()] } }); + assert.notEqual(run(root, ["verify-promotion-readback", deploymentsPath, receiptPath, createdPath], { GITHUB_OUTPUT: outputPath }).status, 0); + + writeJson(deploymentsPath, { result: { deployments: [created, baselineDeployment()] } }); + const promotionReceiptPath = join(root, "promotion-receipt.json"); + const promotionOutput = { + GITHUB_REPOSITORY: "developing-today/code", + GITHUB_EVENT_NAME: "workflow_dispatch", + GITHUB_REF: "refs/heads/main", + GITHUB_WORKFLOW_REF: "developing-today/code/.github/workflows/github-ci-worker-promote.yml@refs/heads/main", + GITHUB_RUN_ID: "987654321", + GITHUB_RUN_ATTEMPT: "1", + GITHUB_OUTPUT: outputPath, + GITHUB_STEP_SUMMARY: summaryPath, + }; + const receiptResult = run(root, ["write-promotion-receipt", receiptPath, createdPath, deploymentsPath, promotionReceiptPath], promotionOutput); + assert.equal(receiptResult.status, 0, receiptResult.stderr); + const promotionReceipt = JSON.parse(readFileSync(promotionReceiptPath, "utf8")); + assert.equal(promotionReceipt.upload.run_attempt, Number(RUN_ATTEMPT)); + assert.equal(promotionReceipt.baseline.deployment_id, BASELINE_DEPLOYMENT_ID); + assert.equal(promotionReceipt.deployment.id, DEPLOYMENT_ID); + assert.equal(promotionReceipt.deployment.percentage, 100); +}); + +test("CLI rejects unknown arguments before reading inputs", () => { + const result = run(process.cwd(), ["verify-version", "--dry-rnu", "/does/not/exist", "bad"]); + assert.equal(result.status, 2); + assert.match(result.stderr, /Unknown option/); +}); diff --git a/.github/workflows/github-ci-worker-promote.yml b/.github/workflows/github-ci-worker-promote.yml index cd077a25fd..d786a2ca6f 100644 --- a/.github/workflows/github-ci-worker-promote.yml +++ b/.github/workflows/github-ci-worker-promote.yml @@ -1,16 +1,38 @@ name: github-ci Worker version promotion -# Explicit promotion is separate from version upload. Configure this -# environment with required reviewers and allow deployment only from main. +# Manual, default-off promotion. The exact successful upload attempt, +# baseline deployment and deployment create/read-back receipts are required. on: workflow_dispatch: inputs: - version_id: - description: Workers Version UUID from an upload workflow run + confirm_promotion: + description: Set true to opt in to protected production promotion required: true + type: boolean + default: false + upload_run_id: + description: Successful upload workflow run ID + required: false + type: string + upload_run_attempt: + description: Exact upload workflow run attempt number + required: false + type: string + version_id: + description: Candidate Workers Version UUID from that receipt + required: false + type: string + baseline_deployment_id: + description: Baseline Deployment UUID from that receipt + required: false + type: string + baseline_version_id: + description: Baseline Worker Version UUID from that receipt + required: false type: string permissions: + actions: read contents: read concurrency: @@ -18,14 +40,51 @@ concurrency: cancel-in-progress: false jobs: + check-production-environment: + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_promotion == true + runs-on: ubuntu-24.04 + timeout-minutes: 5 + outputs: + protected: ${{ steps.verify.outputs.protected }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false + + - name: Check production environment protection without provider credentials + id: verify + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-production + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME" \ + > "$RUNNER_TEMP/production-environment.json" + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ + > "$RUNNER_TEMP/production-branch-policies.json" + node pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ + "$RUNNER_TEMP/production-environment.json" \ + "$RUNNER_TEMP/production-branch-policies.json" \ + "$ENVIRONMENT_NAME" + promote: - if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' + needs: check-production-environment + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_promotion == true && needs.check-production-environment.outputs.protected == 'true' runs-on: ubuntu-24.04 - timeout-minutes: 15 + timeout-minutes: 20 environment: github-ci-production defaults: run: - working-directory: pkgs/github-ci/worker + working-directory: .github/worker-deploy-ci steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -37,23 +96,102 @@ jobs: with: node-version: 24.22.0 cache: npm - cache-dependency-path: pkgs/github-ci/worker/package-lock.json + cache-dependency-path: .github/worker-deploy-ci/package-lock.json - - name: Install pinned cf and locked tooling + - name: Recheck protected environment before provider access + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-production + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME" \ + > "$RUNNER_TEMP/production-environment.json" + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ + > "$RUNNER_TEMP/production-branch-policies.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ + "$RUNNER_TEMP/production-environment.json" \ + "$RUNNER_TEMP/production-branch-policies.json" \ + "$ENVIRONMENT_NAME" + + - name: Install the isolated pinned cf toolchain run: npm ci --ignore-scripts --no-audit --no-fund - - name: Validate Cloudflare credentials and version UUID - id: validate + - name: Validate receipt input identifiers + id: inputs + env: + UPLOAD_RUN_ID: ${{ inputs.upload_run_id }} + UPLOAD_RUN_ATTEMPT: ${{ inputs.upload_run_attempt }} + VERSION_ID_INPUT: ${{ inputs.version_id }} + BASELINE_DEPLOYMENT_ID_INPUT: ${{ inputs.baseline_deployment_id }} + BASELINE_VERSION_ID_INPUT: ${{ inputs.baseline_version_id }} + run: | + set -euo pipefail + [[ "$UPLOAD_RUN_ID" =~ ^[1-9][0-9]*$ ]] + [[ "$UPLOAD_RUN_ATTEMPT" =~ ^[1-9][0-9]*$ ]] + [[ "$VERSION_ID_INPUT" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] + [[ "$BASELINE_DEPLOYMENT_ID_INPUT" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] + [[ "$BASELINE_VERSION_ID_INPUT" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] + echo "upload_run_id=$UPLOAD_RUN_ID" >> "$GITHUB_OUTPUT" + echo "upload_run_attempt=$UPLOAD_RUN_ATTEMPT" >> "$GITHUB_OUTPUT" + echo "version_id=${VERSION_ID_INPUT,,}" >> "$GITHUB_OUTPUT" + echo "baseline_deployment_id=${BASELINE_DEPLOYMENT_ID_INPUT,,}" >> "$GITHUB_OUTPUT" + echo "baseline_version_id=${BASELINE_VERSION_ID_INPUT,,}" >> "$GITHUB_OUTPUT" + + - name: Download the receipt from that exact upload run attempt + uses: actions/download-artifact@v8 + with: + name: github-ci-candidate-${{ steps.inputs.outputs.upload_run_id }}-${{ steps.inputs.outputs.upload_run_attempt }} + path: ${{ runner.temp }}/github-ci-upload + run-id: ${{ steps.inputs.outputs.upload_run_id }} + repository: ${{ github.repository }} + github-token: ${{ github.token }} + + - name: Read the exact upload run attempt record + env: + GITHUB_TOKEN: ${{ github.token }} + UPLOAD_RUN_ID: ${{ steps.inputs.outputs.upload_run_id }} + UPLOAD_RUN_ATTEMPT: ${{ steps.inputs.outputs.upload_run_attempt }} + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/runs/$UPLOAD_RUN_ID/attempts/$UPLOAD_RUN_ATTEMPT" \ + > "$RUNNER_TEMP/github-ci-upload-run-attempt.json" + + - name: Verify exact upload attempt, candidate, and baseline receipt + id: receipt + env: + UPLOAD_RUN_ID: ${{ steps.inputs.outputs.upload_run_id }} + UPLOAD_RUN_ATTEMPT: ${{ steps.inputs.outputs.upload_run_attempt }} + VERSION_ID: ${{ steps.inputs.outputs.version_id }} + BASELINE_DEPLOYMENT_ID: ${{ steps.inputs.outputs.baseline_deployment_id }} + BASELINE_VERSION_ID: ${{ steps.inputs.outputs.baseline_version_id }} + run: | + set -euo pipefail + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-upload-receipt \ + "$RUNNER_TEMP/github-ci-upload/github-ci-upload-receipt.json" \ + "$RUNNER_TEMP/github-ci-upload-run-attempt.json" \ + "$UPLOAD_RUN_ID" "$UPLOAD_RUN_ATTEMPT" "$VERSION_ID" \ + "$BASELINE_DEPLOYMENT_ID" "$BASELINE_VERSION_ID" + + - name: Validate Cloudflare credential presence env: CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - VERSION_ID_INPUT: ${{ inputs.version_id }} run: | set -euo pipefail [[ "$CF_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] [[ -n "$CF_API_TOKEN" ]] - [[ "$VERSION_ID_INPUT" =~ ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$ ]] - echo "version_id=${VERSION_ID_INPUT,,}" >> "$GITHUB_OUTPUT" - name: Require the existing Worker env: @@ -61,63 +199,91 @@ jobs: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null - - name: Read exact version and check secret bindings and provenance - id: candidate + - name: Read candidate version and verify provenance and secret bindings env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - VERSION_ID: ${{ steps.validate.outputs.version_id }} + VERSION_ID: ${{ steps.inputs.outputs.version_id }} + SOURCE_SHA: ${{ steps.receipt.outputs.source_sha }} run: | set -euo pipefail - ./node_modules/.bin/cf -q workers versions get "$VERSION_ID" --worker github-ci \ - > "$RUNNER_TEMP/github-ci-version.json" - node scripts/deployment-guard.mjs verify-version \ - "$RUNNER_TEMP/github-ci-version.json" "$VERSION_ID" + ./node_modules/.bin/cf workers versions get "$VERSION_ID" --worker github-ci \ + > "$RUNNER_TEMP/github-ci-candidate-version.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-version \ + "$RUNNER_TEMP/github-ci-candidate-version.json" "$VERSION_ID" "$SOURCE_SHA" - - name: Require the source commit to be on main history + - name: Require the source commit to remain on main history env: - SOURCE_SHA: ${{ steps.candidate.outputs.source_sha }} + SOURCE_SHA: ${{ steps.receipt.outputs.source_sha }} run: | set -euo pipefail git cat-file -e "${SOURCE_SHA}^{commit}" git merge-base --is-ancestor "$SOURCE_SHA" "$GITHUB_SHA" + - name: Fail if production baseline changed since upload + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: | + set -euo pipefail + ./node_modules/.bin/cf workers deployments list --worker github-ci \ + > "$RUNNER_TEMP/github-ci-current-deployments.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-baseline-current \ + "$RUNNER_TEMP/github-ci-current-deployments.json" \ + "$RUNNER_TEMP/github-ci-upload/github-ci-upload-receipt.json" + - name: Require the selected version to be deployable env: CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - VERSION_ID: ${{ steps.validate.outputs.version_id }} + VERSION_ID: ${{ steps.inputs.outputs.version_id }} run: | set -euo pipefail curl --fail --silent --show-error --max-time 15 \ -H "Authorization: Bearer $CF_API_TOKEN" \ "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ > "$RUNNER_TEMP/github-ci-deployable.json" - node scripts/deployment-guard.mjs verify-deployable \ + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-deployable \ "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" - - name: Create 100 percent deployment for the selected version + - name: Create a 100 percent deployment for the selected version env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - VERSION_ID: ${{ steps.validate.outputs.version_id }} + VERSION_ID: ${{ steps.inputs.outputs.version_id }} run: | set -euo pipefail printf '[{"version_id":"%s","percentage":100}]\n' "$VERSION_ID" \ > "$RUNNER_TEMP/github-ci-deployment-versions.json" - ./node_modules/.bin/cf -q workers deployments create \ + ./node_modules/.bin/cf workers deployments create \ --worker github-ci --strategy percentage \ - --versions "@$RUNNER_TEMP/github-ci-deployment-versions.json" + --versions "@$RUNNER_TEMP/github-ci-deployment-versions.json" \ + > "$RUNNER_TEMP/github-ci-deployment-create.json" - - name: Read back latest deployment and verify provenance - env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} - VERSION_ID: ${{ steps.validate.outputs.version_id }} - SOURCE_SHA: ${{ steps.candidate.outputs.source_sha }} + - name: Verify the exact deployment create and latest read-back run: | set -euo pipefail - ./node_modules/.bin/cf -q workers deployments list --worker github-ci \ + ./node_modules/.bin/cf workers deployments list --worker github-ci \ > "$RUNNER_TEMP/github-ci-deployments.json" - node scripts/deployment-guard.mjs verify-deployment \ - "$RUNNER_TEMP/github-ci-deployments.json" "$VERSION_ID" "$SOURCE_SHA" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-promotion-readback \ + "$RUNNER_TEMP/github-ci-deployments.json" \ + "$RUNNER_TEMP/github-ci-upload/github-ci-upload-receipt.json" \ + "$RUNNER_TEMP/github-ci-deployment-create.json" + + - name: Write the exact promotion receipt + id: promotion-receipt + run: | + set -euo pipefail + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs write-promotion-receipt \ + "$RUNNER_TEMP/github-ci-upload/github-ci-upload-receipt.json" \ + "$RUNNER_TEMP/github-ci-deployment-create.json" \ + "$RUNNER_TEMP/github-ci-deployments.json" \ + "$RUNNER_TEMP/github-ci-promotion-receipt.json" + + - name: Publish the exact promotion receipt + uses: actions/upload-artifact@v7 + with: + name: ${{ steps.promotion-receipt.outputs.promotion_artifact_name }} + path: ${{ runner.temp }}/github-ci-promotion-receipt.json + if-no-files-found: error + retention-days: 30 diff --git a/.github/workflows/github-ci-worker-tests.yml b/.github/workflows/github-ci-worker-tests.yml index 8d03ff26f9..b92139eb87 100644 --- a/.github/workflows/github-ci-worker-tests.yml +++ b/.github/workflows/github-ci-worker-tests.yml @@ -43,12 +43,9 @@ jobs: - name: Set up Node uses: actions/setup-node@v7 with: - node-version: 24.22.0 + node-version: 24 - name: Run the github-ci worker vitest suite working-directory: pkgs/github-ci/worker - env: - XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config - WRANGLER_SEND_METRICS: "false" run: | for f in package.json package-lock.json test/policy.test.ts test/turso.test.ts test/sink.test.ts test/worker.test.ts; do if [ ! -f "$f" ]; then @@ -58,17 +55,3 @@ jobs: done npm ci npm test - npm run typecheck - - - name: Build and verify deployment metadata offline - working-directory: pkgs/github-ci/worker - env: - XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config - WRANGLER_SEND_METRICS: "false" - run: | - npm run build - node scripts/deployment-guard.mjs build .cloudflare/output/v1 - npm run test:deployment - - - name: Check version workflow safety boundaries - run: python3 pkgs/github-ci/worker/test/deploy_workflows_test.py diff --git a/.github/workflows/github-ci-worker-upload.yml b/.github/workflows/github-ci-worker-upload.yml index f6d5d8a61f..ad1442bfe5 100644 --- a/.github/workflows/github-ci-worker-upload.yml +++ b/.github/workflows/github-ci-worker-upload.yml @@ -1,18 +1,19 @@ name: github-ci Worker version upload -# Upload creates an immutable Workers Version only. It never changes -# production traffic. Every Cloudflare API operation uses cf; cf build -# delegates the offline artifact production to the pinned Wrangler. +# Manual, default-off upload. This creates an immutable Worker Version and +# never changes production traffic. Wrangler is used only by `cf build` to +# produce offline Build Output v1. on: - push: - branches: [main] - paths: - - "pkgs/github-ci/worker/**" - - ".github/workflows/github-ci-worker-upload.yml" - - ".github/workflows/github-ci-worker-promote.yml" workflow_dispatch: + inputs: + confirm_upload: + description: Set true to opt in to the protected, immutable upload + required: true + type: boolean + default: false permissions: + actions: read contents: read concurrency: @@ -20,14 +21,51 @@ concurrency: cancel-in-progress: false jobs: + check-upload-environment: + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_upload == true + runs-on: ubuntu-24.04 + timeout-minutes: 5 + outputs: + protected: ${{ steps.verify.outputs.protected }} + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + ref: ${{ github.sha }} + persist-credentials: false + + - name: Check upload environment protection without provider credentials + id: verify + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-cloudflare-upload + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME" \ + > "$RUNNER_TEMP/upload-environment.json" + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ + > "$RUNNER_TEMP/upload-branch-policies.json" + node pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ + "$RUNNER_TEMP/upload-environment.json" \ + "$RUNNER_TEMP/upload-branch-policies.json" \ + "$ENVIRONMENT_NAME" + upload: - if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' + needs: check-upload-environment + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_upload == true && needs.check-upload-environment.outputs.protected == 'true' runs-on: ubuntu-24.04 - timeout-minutes: 20 + timeout-minutes: 25 environment: github-ci-cloudflare-upload defaults: run: - working-directory: pkgs/github-ci/worker + working-directory: .github/worker-deploy-ci steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -38,26 +76,57 @@ jobs: with: node-version: 24.22.0 cache: npm - cache-dependency-path: pkgs/github-ci/worker/package-lock.json + cache-dependency-path: | + pkgs/github-ci/worker/package-lock.json + .github/worker-deploy-ci/package-lock.json - - name: Install pinned cf and locked tooling - run: npm ci --ignore-scripts --no-audit --no-fund + - name: Recheck protected environment before provider access + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-cloudflare-upload + run: | + set -euo pipefail + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME" \ + > "$RUNNER_TEMP/upload-environment.json" + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ + > "$RUNNER_TEMP/upload-branch-policies.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ + "$RUNNER_TEMP/upload-environment.json" \ + "$RUNNER_TEMP/upload-branch-policies.json" \ + "$ENVIRONMENT_NAME" + + - name: Install unchanged Worker package dependencies + working-directory: pkgs/github-ci/worker + run: npm ci --no-audit --no-fund - - name: Typecheck the Worker and cf config + - name: Typecheck the Worker + working-directory: pkgs/github-ci/worker run: npm run typecheck + - name: Install the isolated pinned cf toolchain + run: npm ci --ignore-scripts --no-audit --no-fund + - name: Build Build Output v1 offline env: XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config WRANGLER_SEND_METRICS: "false" run: npm run build - - name: Verify Build Output, secret declarations, and pinned producer + - name: Verify Build Output and offline receipt guards run: | - node scripts/deployment-guard.mjs build .cloudflare/output/v1 - npm run test:deployment + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs build .cloudflare/output/v1 + npm run test:offline + python3 ../../pkgs/github-ci/worker/test/deploy_workflows_test.py - - name: Dry-run the exact prebuilt Version API request + - name: Dry-run the prebuilt Versions request without Cloudflare credentials env: XDG_CONFIG_HOME: ${{ runner.temp }}/cf-config WRANGLER_SEND_METRICS: "false" @@ -66,7 +135,7 @@ jobs: --worker github-ci --tag offline-check --message offline-check --prebuilt --dry-run - - name: Validate Cloudflare credentials + - name: Validate Cloudflare credential presence env: CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} @@ -81,6 +150,32 @@ jobs: CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null + - name: Select the current production baseline + id: select-baseline + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + run: | + set -euo pipefail + ./node_modules/.bin/cf workers deployments list --worker github-ci \ + > "$RUNNER_TEMP/github-ci-baseline-deployments.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-baseline \ + "$RUNNER_TEMP/github-ci-baseline-deployments.json" + + - name: Verify the active baseline retains every required secret binding + id: baseline + env: + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + BASELINE_VERSION_ID: ${{ steps.select-baseline.outputs.baseline_version_id }} + run: | + set -euo pipefail + ./node_modules/.bin/cf workers versions get "$BASELINE_VERSION_ID" --worker github-ci \ + > "$RUNNER_TEMP/github-ci-baseline-version.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-baseline \ + "$RUNNER_TEMP/github-ci-baseline-deployments.json" \ + "$RUNNER_TEMP/github-ci-baseline-version.json" + - name: Upload immutable Workers Version only id: upload env: @@ -89,30 +184,30 @@ jobs: run: | set -euo pipefail tag="git-${GITHUB_SHA:0:12}" - ./node_modules/.bin/cf -q workers versions create \ + ./node_modules/.bin/cf workers versions create \ --worker github-ci \ --tag "$tag" \ --message "github-ci candidate ${GITHUB_SHA}" \ - --prebuilt - ./node_modules/.bin/cf -q workers versions list --worker github-ci \ + --prebuilt \ + > /dev/null + ./node_modules/.bin/cf workers versions list --worker github-ci \ > "$RUNNER_TEMP/github-ci-versions.json" - node scripts/deployment-guard.mjs select-upload \ + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-upload \ "$RUNNER_TEMP/github-ci-versions.json" "$GITHUB_SHA" - - name: Read back exact candidate and verify retained secret bindings - id: candidate + - name: Read back exact candidate and verify retained binding names env: CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} VERSION_ID: ${{ steps.upload.outputs.version_id }} run: | set -euo pipefail - ./node_modules/.bin/cf -q workers versions get "$VERSION_ID" --worker github-ci \ - > "$RUNNER_TEMP/github-ci-version.json" - node scripts/deployment-guard.mjs verify-version \ - "$RUNNER_TEMP/github-ci-version.json" "$VERSION_ID" "$GITHUB_SHA" + ./node_modules/.bin/cf workers versions get "$VERSION_ID" --worker github-ci \ + > "$RUNNER_TEMP/github-ci-candidate-version.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-version \ + "$RUNNER_TEMP/github-ci-candidate-version.json" "$VERSION_ID" "$GITHUB_SHA" - - name: Require the uploaded version to be deployable + - name: Require the candidate to be deployable env: CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} @@ -123,5 +218,23 @@ jobs: -H "Authorization: Bearer $CF_API_TOKEN" \ "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ > "$RUNNER_TEMP/github-ci-deployable.json" - node scripts/deployment-guard.mjs verify-deployable \ + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-deployable \ "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" + + - name: Create the exact upload receipt + id: receipt + run: | + set -euo pipefail + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs write-upload-receipt \ + "$RUNNER_TEMP/github-ci-baseline-deployments.json" \ + "$RUNNER_TEMP/github-ci-baseline-version.json" \ + "$RUNNER_TEMP/github-ci-candidate-version.json" \ + "$RUNNER_TEMP/github-ci-upload-receipt.json" + + - name: Publish receipt for this exact run attempt + uses: actions/upload-artifact@v7 + with: + name: ${{ steps.receipt.outputs.artifact_name }} + path: ${{ runner.temp }}/github-ci-upload-receipt.json + if-no-files-found: error + retention-days: 30 diff --git a/.gitignore b/.gitignore index c204b3053c..2fdb4aa299 100755 --- a/.gitignore +++ b/.gitignore @@ -191,3 +191,5 @@ pm-stack/aggregator/events.json # dirty-tree refusal fire permanently (#5562). Root-anchored so only the # repo-root cache is ignored. /.cache/ + +.github/worker-deploy-ci/.cloudflare/ diff --git a/pkgs/github-ci/worker/.gitignore b/pkgs/github-ci/worker/.gitignore index 943d2a2807..2a11f39f20 100644 --- a/pkgs/github-ci/worker/.gitignore +++ b/pkgs/github-ci/worker/.gitignore @@ -1,2 +1 @@ .backfill.build.mjs -.cloudflare/ diff --git a/pkgs/github-ci/worker/README.md b/pkgs/github-ci/worker/README.md index 289437b1bd..1913c34783 100644 --- a/pkgs/github-ci/worker/README.md +++ b/pkgs/github-ci/worker/README.md @@ -74,34 +74,32 @@ npm run test:deployment ## GitHub Actions version flow -`.github/workflows/github-ci-worker-upload.yml` builds Build Output v1 -and uploads an immutable Workers Version with `cf workers versions -create --prebuilt`; it does not create a deployment or change production -traffic. Its run summary gives the version UUID. The separate -`.github/workflows/github-ci-worker-promote.yml` accepts that UUID and -promotes only that version with `cf workers deployments create`. It runs -only from `main`, uses the protected `github-ci-production` environment, -and verifies the newest Cloudflare deployment serves that version at -100% traffic. - -Add environment secrets `CF_ACCOUNT_ID` and `CF_API_TOKEN` to -`github-ci-cloudflare-upload` and `github-ci-production`. Use separate -account-owned Cloudflare API tokens scoped to the `github-ci` Worker. -Configure `github-ci-production` with required reviewers and restrict -its deployment branches to `main`; the upload environment does not need -production reviewers. The upload workflow checks the Worker exists and -never bootstraps or creates resources. - -Runtime secret values never enter GitHub Actions. The `cf` config -declares their names, and `cf workers versions create` uses strict -binding inheritance from the existing Worker version. Before any -promotion, the workflow reads the candidate version and fails unless -all six secret bindings remain present. It also checks that the version -tag and message identify a full Git commit that is an ancestor of -`main`, and that Cloudflare lists the exact version as deployable. This -is the GitHub CI webhook Worker, not `infra/github-backup`'s GitHub App -backup receiver. Use the GitHub Actions flow for deployments; direct -`npm run deploy` is disabled. +`.github/workflows/github-ci-worker-upload.yml` and +`.github/workflows/github-ci-worker-promote.yml` are manual-only and +default off. Upload builds Build Output v1 with the isolated pinned +`cf` toolchain, then creates an immutable Workers Version with +`cf workers versions create --prebuilt`; it never changes production +traffic. Promotion requires the exact upload run ID and attempt, the +candidate Version UUID, and the baseline Deployment and Version UUIDs +from that upload receipt. It confirms the selected run succeeded on +`main`, the production baseline has not changed, and the newest +Cloudflare Deployment read-back serves the selected candidate at 100%. +Both workflows publish receipts with run, attempt, source, candidate, +baseline, and deployment identifiers. + +Each workflow fails before provider access unless its GitHub environment +exists, has required reviewers, and allows exactly the `main` branch. +Store `CF_ACCOUNT_ID` and `CF_API_TOKEN` as environment secrets in +`github-ci-cloudflare-upload` and `github-ci-production`; use Cloudflare +tokens scoped to the `github-ci` Worker. The upload checks that the Worker +already exists. It also checks the active baseline and uploaded candidate +for all six required secret binding names. Receipt files contain binding +names and types only; secret values are never read or copied by these +workflows. + +The existing operator `npm run deploy` command and Wrangler configuration +remain unchanged. This is the GitHub CI webhook Worker, not +`infra/github-backup`'s GitHub App backup receiver. The cutover from the earlier Postgres receiver is complete (#5693, closeout below). diff --git a/pkgs/github-ci/worker/package-lock.json b/pkgs/github-ci/worker/package-lock.json index 1e6a66770a..e325e93953 100644 --- a/pkgs/github-ci/worker/package-lock.json +++ b/pkgs/github-ci/worker/package-lock.json @@ -9,76 +9,34 @@ "version": "0.1.0", "devDependencies": { "@cloudflare/vitest-pool-workers": "0.23.0", - "@cloudflare/workers-types": "^5.20261119.1", - "cf": "1.0.0-rc.1", + "@cloudflare/workers-types": "^4.20251011.0", "typescript": "^5.6.0", "vitest": "^4.1.0", - "wrangler": "4.166.0" - }, - "engines": { - "node": ">=24.22.0" - } - }, - "node_modules/@cloudflare/build-output-utils": { - "version": "1.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@cloudflare/build-output-utils/-/build-output-utils-1.0.0-rc.1.tgz", - "integrity": "sha512-IrzZL1UEdVMZPRarrKu2VpnL3MIeNVhCItTebB88SwQ1YJ4mLAe1kQtXmIH7MpdgDYnxAsTZXMtuw9q5jRWCcw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cloudflare/config": "1.0.0-rc.1" - } - }, - "node_modules/@cloudflare/config": { - "version": "1.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@cloudflare/config/-/config-1.0.0-rc.1.tgz", - "integrity": "sha512-NQgB+fQbk8IU0iJ6/G9LCSQjJ7JuyRn5CALrPKnQ8vxqayOJlX+av9adhLCMYBeC80ocncW1Gy7quv00uLV3LQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "zod": "4.6.6" - } - }, - "node_modules/@cloudflare/config/node_modules/zod": { - "version": "4.6.6", - "resolved": "https://registry.npmjs.org/zod/-/zod-4.6.6.tgz", - "integrity": "sha512-4UmzQUF5fxvfcYHlbjBmejU+w+hbDnWFx4aS8kBx7nPBHcO2SqPbpAG8snbdg+Xse4pRefR98hgjFgIMCI/UhA==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" + "wrangler": "4.59.1" } }, "node_modules/@cloudflare/kv-asset-handler": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.5.1.tgz", - "integrity": "sha512-48OysfSW3MkQY1XjkhkpPkgrEkOvgfoyHzA2eyX5wpzFpijC02uWigv3hkNdJdT3C7ybW/U17yYHXeR68pLeww==", + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.1.tgz", + "integrity": "sha512-Nu8ahitGFFJztxUml9oD/DLb7Z28C8cd8F46IVQ7y5Btz575pvMY8AqZsXkX7Gds29eCKdMgIHjIvzskHgPSFg==", "dev": true, "license": "MIT OR Apache-2.0", - "engines": { - "node": ">=22.0.0" - } - }, - "node_modules/@cloudflare/runtime-types": { - "version": "0.1.30", - "resolved": "https://registry.npmjs.org/@cloudflare/runtime-types/-/runtime-types-0.1.30.tgz", - "integrity": "sha512-p68T70lDZT7Vyv5c2SDzB0uqVRVCtj/3WMgXVQESnWVyTybcCwXRM9Ekmh2rQ+aPGhtIWiACvd8pX2yGA9Z5mw==", - "dev": true, - "license": "MIT", "dependencies": { - "miniflare": "5.20261117.0-beta", - "workerd": "1.20261117.1" + "mime": "^3.0.0" + }, + "engines": { + "node": ">=18.0.0" } }, "node_modules/@cloudflare/unenv-preset": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.16.2.tgz", - "integrity": "sha512-JBP1+Z7ZSNG/d4mRP+y8VC5dka3tZVMLEZRvS+rzQ4DGV1EoxRFQckcJTTkXbHSQiTj0DtNI01Zwb/V2fX0mvQ==", + "version": "2.9.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/unenv-preset/-/unenv-preset-2.9.0.tgz", + "integrity": "sha512-99nEvuOTCGGGRNaIat8UVVXJ27aZK+U09SYDp0kVjQLwC9wyxcrQ28IqLwrQq2DjWLmBI1+UalGJzdPqYgPlRw==", "dev": true, "license": "MIT OR Apache-2.0", "peerDependencies": { "unenv": "2.0.0-rc.24", - "workerd": ">1.20260305.0 <2.0.0-0" + "workerd": "^1.20251202.0" }, "peerDependenciesMeta": { "workerd": { @@ -305,6 +263,9 @@ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -322,6 +283,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -339,6 +303,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -356,6 +323,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -373,6 +343,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -390,6 +363,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -407,6 +383,9 @@ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -430,6 +409,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -453,6 +435,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -476,6 +461,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -499,6 +487,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -522,6 +513,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -697,10 +691,32 @@ } } }, + "node_modules/@cloudflare/vitest-pool-workers/node_modules/ws": { + "version": "8.21.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", + "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261117.1.tgz", - "integrity": "sha512-qfAYw6iPoey0BmPsp4z5ARWOa+XSBD3gQzmcBI2ql9pKTSA5eEC8F1oI6BIk/FVguhomfSn5gS4RzbWhTd/EpQ==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260111.0.tgz", + "integrity": "sha512-UGAjrGLev2/CMLZy7b+v1NIXA4Hupc/QJBFlJwMqldywMcJ/iEqvuUYYuVI2wZXuXeWkgmgFP87oFDQsg78YTQ==", "cpu": [ "x64" ], @@ -715,9 +731,9 @@ } }, "node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261117.1.tgz", - "integrity": "sha512-cInx5Cr9O27oW+ujyI49lTRQZra/lMgWUFiKmGY3jxDncATSxzfQ6udXHkVvK4//1/PfxQTDyMjdQUIN8m6Aqg==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260111.0.tgz", + "integrity": "sha512-YFAZwidLCQVa6rKCCaiWrhA+eh87a7MUhyd9lat3KSbLBAGpYM+ORpyTXpi2Gjm3j6Mp1e/wtzcFTSeMIy2UqA==", "cpu": [ "arm64" ], @@ -732,9 +748,9 @@ } }, "node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261117.1.tgz", - "integrity": "sha512-gZLA8X11m/luZwn+YA3+mDu61vdxNJzpksP/QZqjydKTQ+VUCulsK5gtn9Bqst1p3KJu2kafQpJ1nDQv4B23jA==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260111.0.tgz", + "integrity": "sha512-zx1GW6FwfOBjCV7QUCRzGRkViUtn3Is/zaaVPmm57xyy9sjtInx6/SdeBr2Y45tx9AnOP1CnaOFFdmH1P7VIEg==", "cpu": [ "x64" ], @@ -749,9 +765,9 @@ } }, "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261117.1.tgz", - "integrity": "sha512-gxWngFojq41ULKNKb9rpWYvKotN5hT2I/xot+Bpy31cXzrwcTgtDLSMb2t75sW5BJxH7hihFvikgYb577kB3Zg==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260111.0.tgz", + "integrity": "sha512-wFVKxNvCyjRaAcgiSnJNJAmIos3p3Vv6Uhf4pFUZ9JIxr69GNlLWlm9SdCPvtwNFAjzSoDaKzDwjj5xqpuCS6Q==", "cpu": [ "arm64" ], @@ -766,9 +782,9 @@ } }, "node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261117.1.tgz", - "integrity": "sha512-0OR2Btx5EDonOKvvuGDq8rxBSggxoF1ThQjbZN3vsu3GlaF/oXW5f9/iB78OgV0CzMPTi+hZgzc1NR95UJCURA==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260111.0.tgz", + "integrity": "sha512-zWgd77L7OI1BxgBbG+2gybDahIMgPX5iNo6e3LqcEz1Xm3KfiqgnDyMBcxeQ7xDrj7fHUGAlc//QnKvDchuUoQ==", "cpu": [ "x64" ], @@ -783,33 +799,12 @@ } }, "node_modules/@cloudflare/workers-types": { - "version": "5.20261121.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-5.20261121.1.tgz", - "integrity": "sha512-eLzyhm8/Qn+yshOObNIVsV8YJyWR9BOBCnnuqmrqY5uhsVDlLMdCmOQ34oC3eoVLkav94Dc7MWcfC+FuaxdNjA==", + "version": "4.20260702.1", + "resolved": "https://registry.npmmirror.com/@cloudflare/workers-types/-/workers-types-4.20260702.1.tgz", + "integrity": "sha512-mOhf5TUEB1m2vPrxtqoIGfz0fUC9xyxRDx5gWHy5s+OCo6dcV+g7wI1R7gYCMFohhqF/2y2xeKVwMwCJjfn/WA==", "dev": true, "license": "MIT OR Apache-2.0" }, - "node_modules/@cloudflare/workers-utils": { - "version": "0.56.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workers-utils/-/workers-utils-0.56.0.tgz", - "integrity": "sha512-Fw3/zR+pQp+5hKn1CHIRkCYz49fyAb2qRqCq01jBGqlKL0rRnZyXYD4j0h9cjaWPYYQUOe5y6L7BNp2ZwsHg5A==", - "dev": true, - "license": "MIT OR Apache-2.0", - "dependencies": { - "@cspotcode/source-map-support": "0.8.1", - "chalk": "5.3.0", - "dotenv": "16.3.1", - "undici": "7.30.2" - }, - "peerDependencies": { - "vitest": "^4.1.0 || ^5.0.0" - }, - "peerDependenciesMeta": { - "vitest": { - "optional": true - } - } - }, "node_modules/@cspotcode/source-map-support": { "version": "0.8.1", "resolved": "https://registry.npmmirror.com/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", @@ -1310,9 +1305,9 @@ } }, "node_modules/@img/sharp-darwin-arm64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.35.5.tgz", - "integrity": "sha512-QRUlFQ0WxvdWyqqG/WtI3iupfD5rBzmCHXSdPsY91sAtVtTo7Q4cb6zOccZ3gqEqkr0f1As1ehLqmEpDsRf+lg==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", + "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", "cpu": [ "arm64" ], @@ -1323,19 +1318,19 @@ "darwin" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.3.4" + "@img/sharp-libvips-darwin-arm64": "1.2.4" } }, "node_modules/@img/sharp-darwin-x64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.35.5.tgz", - "integrity": "sha512-+BR255RhDlpygUpOc/Jdt1nT6DQ3XG/ERo5wbcdOf5Q320dKtPCKPLR1LJs9VGXRaMa8l1uUa0tkCNOXiAxZUw==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", + "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", "cpu": [ "x64" ], @@ -1346,13 +1341,13 @@ "darwin" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.3.4" + "@img/sharp-libvips-darwin-x64": "1.2.4" } }, "node_modules/@img/sharp-freebsd-wasm32": { @@ -1393,9 +1388,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-arm64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.3.4.tgz", - "integrity": "sha512-5R89nBYiRdUlSWJxPhO+GVtaXzXSxKnRu/xqMn3KTA3L9EB9Oy/P+Nn2f2vlhPuUdy/Zusb2DarbyTpGCfEDuw==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", + "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", "cpu": [ "arm64" ], @@ -1410,9 +1405,9 @@ } }, "node_modules/@img/sharp-libvips-darwin-x64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.3.4.tgz", - "integrity": "sha512-iR2OKH80yi0U+dUplyh3/xdpFvps6YkCwsXenIJxqxR1v9o+xtKTGbS9H7cps+2Vxjc8B1j96p75NmTGjIhtpQ==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", + "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", "cpu": [ "x64" ], @@ -1427,13 +1422,16 @@ } }, "node_modules/@img/sharp-libvips-linux-arm": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.3.4.tgz", - "integrity": "sha512-LmRtTsOHuvM2+wlO2Db37dx5MiZhB0FvSunciw48YjdOkZz9KAiRbm8ujeMOA1INqmei5NapFxYEK1D1ZSidmw==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", + "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1444,13 +1442,16 @@ } }, "node_modules/@img/sharp-libvips-linux-arm64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.3.4.tgz", - "integrity": "sha512-Y3dgX/6lE2QhQb+Gxy0WZxfg9MEm/JBjamZpS2IklP7xIQoKN4hzAm7KcMVGtaVDt3neE9OKBC7vAfonA/Lr1A==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", + "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1468,6 +1469,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1485,6 +1489,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1495,13 +1502,16 @@ } }, "node_modules/@img/sharp-libvips-linux-s390x": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.3.4.tgz", - "integrity": "sha512-ra/mB6MikESDUO7Yg+Mi95bFBb9GsObURuhnOv3OqknjGe9sZrG8tCe9q0xSIGrtLgvgw0gKnFWcK4blSgQOuQ==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", + "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1512,13 +1522,16 @@ } }, "node_modules/@img/sharp-libvips-linux-x64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.3.4.tgz", - "integrity": "sha512-GJ//SSXbnwSDes02umB3nDJLFcQzw8a18V8fyhqr6tV515tOEMdImjjxj1AoafMRz56F3PHgftnj1QEKSU1zkw==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", + "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1529,13 +1542,16 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-arm64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.3.4.tgz", - "integrity": "sha512-hvulFwtjUcagsis6BBxHwGFwWoNZjgYmULGVrZcyfNbjA8hKILbRxGg15/7w5HDyXHXUos/j6baAWqnCyQ2DWA==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", + "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1546,13 +1562,16 @@ } }, "node_modules/@img/sharp-libvips-linuxmusl-x64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.3.4.tgz", - "integrity": "sha512-6zXKeE/p39I1AmA3cJG35eyBGNqNddLnUXjhwBnsGjFPWqf5VKkDBEqaEkPDoTEtkxwi2vv8Tcr2mDyP4So7Fg==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", + "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -1563,49 +1582,55 @@ } }, "node_modules/@img/sharp-linux-arm": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.35.5.tgz", - "integrity": "sha512-LEaXK2WdXVK5ykcw0buWyPMsmLLL2vpHLD6yrNSW+JGEL3BZPA4tpKN6iaMc4AxTTAoaX/sU1rOL51lcIz48ZQ==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", + "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", "cpu": [ "arm" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.3.4" + "@img/sharp-libvips-linux-arm": "1.2.4" } }, "node_modules/@img/sharp-linux-arm64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.35.5.tgz", - "integrity": "sha512-LYVx5JTsOM2CBzmxreh+nl64/3H6Xb09iSLknqH47z2T2DFFxDeFLP5y4dJwe6H7uGQlHPyEEtIqyo3DYsRwdQ==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", + "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.3.4" + "@img/sharp-libvips-linux-arm64": "1.2.4" } }, "node_modules/@img/sharp-linux-ppc64": { @@ -1616,6 +1641,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1639,6 +1667,9 @@ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ @@ -1655,109 +1686,124 @@ } }, "node_modules/@img/sharp-linux-s390x": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.35.5.tgz", - "integrity": "sha512-UZasTOFiYzotTsGOCu42BfUzP6Tu6Do/947iRm1RsLKvlllxwGcn4RN27LibGWceix4Y+Pmw3jsnTcCQIgWjqA==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", + "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", "cpu": [ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.3.4" + "@img/sharp-libvips-linux-s390x": "1.2.4" } }, "node_modules/@img/sharp-linux-x64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.35.5.tgz", - "integrity": "sha512-SxFtLTeJInhAA9Q836kux2vZNeOBQEx658qvbboZScr0wIARym3IcGmW7KpVD5sbVg0Ojy+udFQdayYIZyoNog==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", + "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.3.4" + "@img/sharp-libvips-linux-x64": "1.2.4" } }, "node_modules/@img/sharp-linuxmusl-arm64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.35.5.tgz", - "integrity": "sha512-9HbMclmI1zlNkFRs3z9/eBtDjfD0sGlrX1z6b1qwmiFY5ElDLh4BC0LPBdVp7z1DXFiKlIcznf+ZlsuZzLxQqg==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", + "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", "cpu": [ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.3.4" + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" } }, "node_modules/@img/sharp-linuxmusl-x64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.35.5.tgz", - "integrity": "sha512-4KOphqB035HrVdqLZfCgMzzERrQkkzOwRhl4OAkRO1YCldbaFjySXMaK534Mo0V+LndnlJk+sbUyLeU0ULyD1A==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", + "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", "cpu": [ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.3.4" + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" } }, "node_modules/@img/sharp-wasm32": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.35.5.tgz", - "integrity": "sha512-Ptsga1su4tQx+LLF1ECS9U6nz5kmrXKo6XVbtR48Ke3ZRxxgaWBu7IDtEe1quo8hiupwm6WFqxVlXaSf7IINGQ==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", + "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", + "cpu": [ + "wasm32" + ], "dev": true, "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", "optional": true, "dependencies": { - "@emnapi/runtime": "^1.11.3" + "@emnapi/runtime": "^1.7.0" }, "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -1821,9 +1867,9 @@ } }, "node_modules/@img/sharp-win32-ia32": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.35.5.tgz", - "integrity": "sha512-5Zm82LoBc43nhwNybZlG7Y1KO//Zhsn306fQl29ZOuStHLGTo3BWL83q3cznX0poxSAMuYL1On/BHBxkBeKr6A==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", + "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", "cpu": [ "ia32" ], @@ -1834,16 +1880,16 @@ "win32" ], "engines": { - "node": "^20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" } }, "node_modules/@img/sharp-win32-x64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.35.5.tgz", - "integrity": "sha512-x76eH0vEiHlcMQu8Y8IenntaACtddpT6W0wmXtWrnKcnKI7ME5DdgqhAD6SEWOEl1v2zDvkZDhFA9KnURwpfqg==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", + "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", "cpu": [ "x64" ], @@ -1854,7 +1900,7 @@ "win32" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -2059,6 +2105,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2076,6 +2125,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2093,6 +2145,9 @@ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2110,6 +2165,9 @@ "s390x" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2127,6 +2185,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MIT", "optional": true, "os": [ @@ -2144,6 +2205,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MIT", "optional": true, "os": [ @@ -2304,44 +2368,6 @@ "dev": true, "license": "MIT" }, - "node_modules/@types/node": { - "version": "26.6.6", - "resolved": "https://registry.npmjs.org/@types/node/-/node-26.6.6.tgz", - "integrity": "sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~8.9.0" - } - }, - "node_modules/@types/node-fetch": { - "version": "2.6.13", - "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.6.13.tgz", - "integrity": "sha512-QGpRVpzSaUs30JBSGPjOg4Uveu384erbHBoT1zeONvyCfwQxIkUshLAOqN/k9EjGviPRmWTTe6aH2qySWKTVSw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/node": "*", - "form-data": "^4.0.4" - } - }, - "node_modules/@types/yargs": { - "version": "17.0.24", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.24.tgz", - "integrity": "sha512-6i0aC7jV6QzQB8ne1joVZ0eSFIstHsCrobmOtghM11yGlH0j43FKL2UhWdELkyps0zuf7qVTUVCCR+tgSlyLLw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@types/yargs-parser": "*" - } - }, - "node_modules/@types/yargs-parser": { - "version": "21.0.3", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", - "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@vitest/expect": { "version": "4.1.12", "resolved": "https://registry.npmmirror.com/@vitest/expect/-/expect-4.1.12.tgz", @@ -2455,30 +2481,27 @@ "url": "https://opencollective.com/vitest" } }, - "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==", + "node_modules/acorn": { + "version": "8.14.0", + "resolved": "https://registry.npmmirror.com/acorn/-/acorn-8.14.0.tgz", + "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", - "dependencies": { - "event-target-shim": "^5.0.0" + "bin": { + "acorn": "bin/acorn" }, "engines": { - "node": ">=6.5" + "node": ">=0.4.0" } }, - "node_modules/agentkeepalive": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/agentkeepalive/-/agentkeepalive-4.6.0.tgz", - "integrity": "sha512-kja8j7PjmncONqaTsB8fQ+wE2mSU2DJ9D4XKoJ5PFWIdRMa6SLSN1ff4mOr4jCbfRSsxR4keIiySJU0N9T5hIQ==", + "node_modules/acorn-walk": { + "version": "8.3.2", + "resolved": "https://registry.npmmirror.com/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, "license": "MIT", - "dependencies": { - "humanize-ms": "^1.2.1" - }, "engines": { - "node": ">= 8.0.0" + "node": ">=0.4.0" } }, "node_modules/assertion-error": { @@ -2491,13 +2514,6 @@ "node": ">=12" } }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true, - "license": "MIT" - }, "node_modules/blake3-wasm": { "version": "2.1.5", "resolved": "https://registry.npmmirror.com/blake3-wasm/-/blake3-wasm-2.1.5.tgz", @@ -2505,41 +2521,6 @@ "dev": true, "license": "MIT" }, - "node_modules/call-bind-apply-helpers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz", - "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "function-bind": "^1.1.2" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/cf": { - "version": "1.0.0-rc.1", - "resolved": "https://registry.npmjs.org/cf/-/cf-1.0.0-rc.1.tgz", - "integrity": "sha512-mQ9X/FVE1QP2ebXVF/9tlbqoO0TB3tKxUJocaWsic6IuNvThmJc/Ou/4ABJNB/Sj8HxEzvrjT1PRqjySVO5YoA==", - "dev": true, - "license": "MIT OR Apache-2.0", - "dependencies": { - "@cloudflare/build-output-utils": "1.0.0-rc.1", - "@cloudflare/config": "1.0.0-rc.1", - "@cloudflare/runtime-types": "0.1.30", - "blake3-wasm": "2.1.5", - "miniflare": "5.20261117.0-beta" - }, - "bin": { - "cf": "bin/cf", - "cloudflare": "bin/cf" - }, - "engines": { - "node": "^22.23.0 || ^24.22.0 || ^26.12.0" - } - }, "node_modules/chai": { "version": "6.3.0", "resolved": "https://registry.npmmirror.com/chai/-/chai-6.3.0.tgz", @@ -2550,19 +2531,6 @@ "node": ">=18" } }, - "node_modules/chalk": { - "version": "5.3.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", - "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", - "dev": true, - "license": "MIT", - "engines": { - "node": "^12.17.0 || ^14.13 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, "node_modules/cjs-module-lexer": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.2.3.tgz", @@ -2570,52 +2538,6 @@ "dev": true, "license": "MIT" }, - "node_modules/cloudflare": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cloudflare/-/cloudflare-5.2.0.tgz", - "integrity": "sha512-dVzqDpPFYR9ApEC9e+JJshFJZXcw4HzM8W+3DHzO5oy9+8rLC53G7x6fEf9A7/gSuSCxuvndzui5qJKftfIM9A==", - "dev": true, - "license": "Apache-2.0", - "dependencies": { - "@types/node": "^18.11.18", - "@types/node-fetch": "^2.6.4", - "abort-controller": "^3.0.0", - "agentkeepalive": "^4.2.1", - "form-data-encoder": "1.7.2", - "formdata-node": "^4.3.2", - "node-fetch": "^2.6.7" - } - }, - "node_modules/cloudflare/node_modules/@types/node": { - "version": "18.19.130", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.130.tgz", - "integrity": "sha512-GRaXQx6jGfL8sKfaIDD6OupbIHBr9jv7Jnaml9tB7l4v068PAOXqfcujMMo5PhbIs6ggR1XODELqahT2R8v0fg==", - "dev": true, - "license": "MIT", - "dependencies": { - "undici-types": "~5.26.4" - } - }, - "node_modules/cloudflare/node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", - "dev": true, - "license": "MIT" - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "license": "MIT", - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -2637,16 +2559,6 @@ "url": "https://opencollective.com/express" } }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/detect-libc": { "version": "2.1.2", "resolved": "https://registry.npmmirror.com/detect-libc/-/detect-libc-2.1.2.tgz", @@ -2657,41 +2569,6 @@ "node": ">=8" } }, - "node_modules/devtools-protocol": { - "version": "0.0.1182435", - "resolved": "https://registry.npmjs.org/devtools-protocol/-/devtools-protocol-0.0.1182435.tgz", - "integrity": "sha512-EmlkWb62wSbQNE1gRZZsi4KZYRaF5Skpp183LhRU7+sadKR06O1dHCjZmFSEG6Kv7P6S/UYLxcY3NlYwqKM99w==", - "dev": true, - "license": "BSD-3-Clause" - }, - "node_modules/dotenv": { - "version": "16.3.1", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", - "integrity": "sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==", - "dev": true, - "license": "BSD-2-Clause", - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/motdotla/dotenv?sponsor=1" - } - }, - "node_modules/dunder-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz", - "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.1", - "es-errors": "^1.3.0", - "gopd": "^1.2.0" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/error-stack-parser-es": { "version": "1.0.5", "resolved": "https://registry.npmmirror.com/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", @@ -2702,26 +2579,6 @@ "url": "https://github.com/sponsors/antfu" } }, - "node_modules/es-define-property": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", - "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "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/es-module-lexer": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-2.3.2.tgz", @@ -2729,35 +2586,6 @@ "dev": true, "license": "MIT" }, - "node_modules/es-object-atoms": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz", - "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/es-set-tostringtag": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.1.0.tgz", - "integrity": "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==", - "dev": true, - "license": "MIT", - "dependencies": { - "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.6", - "has-tostringtag": "^1.0.2", - "hasown": "^2.0.2" - }, - "engines": { - "node": ">= 0.4" - } - }, "node_modules/esbuild": { "version": "0.28.1", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz", @@ -2810,14 +2638,17 @@ "@types/estree": "^1.0.0" } }, - "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==", + "node_modules/exit-hook": { + "version": "2.2.1", + "resolved": "https://registry.npmmirror.com/exit-hook/-/exit-hook-2.2.1.tgz", + "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", "dev": true, "license": "MIT", "engines": { "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/expect-type": { @@ -2848,44 +2679,6 @@ } } }, - "node_modules/form-data": { - "version": "4.0.6", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.6.tgz", - "integrity": "sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "es-set-tostringtag": "^2.1.0", - "hasown": "^2.0.4", - "mime-types": "^2.1.35" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/form-data-encoder": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/form-data-encoder/-/form-data-encoder-1.7.2.tgz", - "integrity": "sha512-qfqtYan3rxrnCk1VYaA4H+Ms9xdpPqvLZa6xmMgFvhO32x7/3J/ExcTd6qpxM0vH2GdMI+poehyBZvqfMTto8A==", - "dev": true, - "license": "MIT" - }, - "node_modules/formdata-node": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", - "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "node-domexception": "1.0.0", - "web-streams-polyfill": "4.0.0-beta.3" - }, - "engines": { - "node": ">= 12.20" - } - }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz", @@ -2901,124 +2694,17 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, - "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==", + "node_modules/glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmmirror.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } + "license": "BSD-2-Clause" }, - "node_modules/get-intrinsic": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz", - "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "call-bind-apply-helpers": "^1.0.2", - "es-define-property": "^1.0.1", - "es-errors": "^1.3.0", - "es-object-atoms": "^1.1.1", - "function-bind": "^1.1.2", - "get-proto": "^1.0.1", - "gopd": "^1.2.0", - "has-symbols": "^1.1.0", - "hasown": "^2.0.2", - "math-intrinsics": "^1.1.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-proto": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz", - "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==", - "dev": true, - "license": "MIT", - "dependencies": { - "dunder-proto": "^1.0.1", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/gopd": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", - "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-symbols": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", - "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.2.tgz", - "integrity": "sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==", - "dev": true, - "license": "MIT", - "dependencies": { - "has-symbols": "^1.0.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "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/humanize-ms": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/humanize-ms/-/humanize-ms-1.2.1.tgz", - "integrity": "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==", - "dev": true, - "license": "MIT", - "dependencies": { - "ms": "^2.0.0" - } - }, - "node_modules/kleur": { - "version": "4.1.5", - "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz", - "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmmirror.com/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", "dev": true, "license": "MIT", "engines": { @@ -3168,6 +2854,9 @@ "arm64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3189,6 +2878,9 @@ "arm64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3210,6 +2902,9 @@ "x64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3231,6 +2926,9 @@ "x64" ], "dev": true, + "libc": [ + "musl" + ], "license": "MPL-2.0", "optional": true, "os": [ @@ -3296,71 +2994,55 @@ "@jridgewell/sourcemap-codec": "^1.5.5" } }, - "node_modules/math-intrinsics": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz", - "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", + "node_modules/mime": { + "version": "3.0.0", + "resolved": "https://registry.npmmirror.com/mime/-/mime-3.0.0.tgz", + "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true, "license": "MIT", - "dependencies": { - "mime-db": "1.52.0" + "bin": { + "mime": "cli.js" }, "engines": { - "node": ">= 0.6" + "node": ">=10.0.0" } }, "node_modules/miniflare": { - "version": "5.20261117.0-beta", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261117.0-beta.tgz", - "integrity": "sha512-D2ygY04wQUmbpwgBhj828piErZoj7UMlXNGr4EWQp/c1PNGHyYOh0dMIyobjwOXiD5Ifl1EaEVAoNuBHK+qtkw==", + "version": "4.20260111.0", + "resolved": "https://registry.npmmirror.com/miniflare/-/miniflare-4.20260111.0.tgz", + "integrity": "sha512-pUsbDlumPaTzliA+J9HMAM74nLR8wqpCQNOESximab51jAfvL7ZaP5Npzh4PWNV0Jfq28tlqazakuJcw6w5qlA==", "dev": true, "license": "MIT", "dependencies": { "@cspotcode/source-map-support": "0.8.1", - "sharp": "0.35.5", - "undici": "7.30.1", - "workerd": "1.20261117.1", - "ws": "8.21.0", - "youch": "4.1.0-beta.10" + "acorn": "8.14.0", + "acorn-walk": "8.3.2", + "exit-hook": "2.2.1", + "glob-to-regexp": "0.4.1", + "sharp": "^0.34.5", + "stoppable": "1.1.0", + "undici": "7.14.0", + "workerd": "1.20260111.0", + "ws": "8.18.0", + "youch": "4.1.0-beta.10", + "zod": "^3.25.76" }, - "engines": { - "node": ">=22.12.0" - }, - "peerDependencies": { - "kerberos": "^2.0.0" + "bin": { + "miniflare": "bootstrap.js" }, - "peerDependenciesMeta": { - "kerberos": { - "optional": true - } + "engines": { + "node": ">=18.0.0" } }, - "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "node_modules/miniflare/node_modules/zod": { + "version": "3.25.76", + "resolved": "https://registry.npmmirror.com/zod/-/zod-3.25.76.tgz", + "integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } }, "node_modules/nanoid": { "version": "3.3.20", @@ -3381,48 +3063,6 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", - "deprecated": "Use your platform's native DOMException instead", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "license": "MIT", - "engines": { - "node": ">=10.5.0" - } - }, - "node_modules/node-fetch": { - "version": "2.7.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", - "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", - "dev": true, - "license": "MIT", - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, "node_modules/obug": { "version": "2.2.1", "resolved": "https://registry.npmmirror.com/obug/-/obug-2.2.1.tgz", @@ -3549,83 +3189,61 @@ } }, "node_modules/sharp": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.35.5.tgz", - "integrity": "sha512-Ywn4OnzGukp7CDMrp08RQ50YKmuwG47brZgIVPTvBaaAfQlRlygrRqSrxdCiL9M+LlzLBiJ68IR1QqvzHyjC7g==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/sharp/-/sharp-0.34.5.tgz", + "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", "dev": true, + "hasInstallScript": true, "license": "Apache-2.0", "dependencies": { - "@img/colour": "^1.1.0", + "@img/colour": "^1.0.0", "detect-libc": "^2.1.2", - "semver": "^7.8.5" + "semver": "^7.7.3" }, "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-darwin-arm64": "0.35.5", - "@img/sharp-darwin-x64": "0.35.5", - "@img/sharp-freebsd-wasm32": "0.35.5", - "@img/sharp-libvips-darwin-arm64": "1.3.4", - "@img/sharp-libvips-darwin-x64": "1.3.4", - "@img/sharp-libvips-linux-arm": "1.3.4", - "@img/sharp-libvips-linux-arm64": "1.3.4", - "@img/sharp-libvips-linux-ppc64": "1.3.4", - "@img/sharp-libvips-linux-riscv64": "1.3.4", - "@img/sharp-libvips-linux-s390x": "1.3.4", - "@img/sharp-libvips-linux-x64": "1.3.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.3.4", - "@img/sharp-libvips-linuxmusl-x64": "1.3.4", - "@img/sharp-linux-arm": "0.35.5", - "@img/sharp-linux-arm64": "0.35.5", - "@img/sharp-linux-ppc64": "0.35.5", - "@img/sharp-linux-riscv64": "0.35.5", - "@img/sharp-linux-s390x": "0.35.5", - "@img/sharp-linux-x64": "0.35.5", - "@img/sharp-linuxmusl-arm64": "0.35.5", - "@img/sharp-linuxmusl-x64": "0.35.5", - "@img/sharp-webcontainers-wasm32": "0.35.5", - "@img/sharp-win32-arm64": "0.35.5", - "@img/sharp-win32-ia32": "0.35.5", - "@img/sharp-win32-x64": "0.35.5" - }, - "peerDependenciesMeta": { - "@types/node": { - "optional": true - } - } - }, - "node_modules/sharp/node_modules/@img/sharp-freebsd-wasm32": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-freebsd-wasm32/-/sharp-freebsd-wasm32-0.35.5.tgz", - "integrity": "sha512-Y/z91nEZ4uIBX5X3nfTovjU9lHNKFYbL2lpHCLVNmXQK03VIZvXBBt0KxbPGp2SdGSF+2mQU4e+hQaWOt86iAw==", - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "freebsd" - ], - "dependencies": { - "@img/sharp-wasm32": "0.35.5" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" + "@img/sharp-darwin-arm64": "0.34.5", + "@img/sharp-darwin-x64": "0.34.5", + "@img/sharp-libvips-darwin-arm64": "1.2.4", + "@img/sharp-libvips-darwin-x64": "1.2.4", + "@img/sharp-libvips-linux-arm": "1.2.4", + "@img/sharp-libvips-linux-arm64": "1.2.4", + "@img/sharp-libvips-linux-ppc64": "1.2.4", + "@img/sharp-libvips-linux-riscv64": "1.2.4", + "@img/sharp-libvips-linux-s390x": "1.2.4", + "@img/sharp-libvips-linux-x64": "1.2.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", + "@img/sharp-libvips-linuxmusl-x64": "1.2.4", + "@img/sharp-linux-arm": "0.34.5", + "@img/sharp-linux-arm64": "0.34.5", + "@img/sharp-linux-ppc64": "0.34.5", + "@img/sharp-linux-riscv64": "0.34.5", + "@img/sharp-linux-s390x": "0.34.5", + "@img/sharp-linux-x64": "0.34.5", + "@img/sharp-linuxmusl-arm64": "0.34.5", + "@img/sharp-linuxmusl-x64": "0.34.5", + "@img/sharp-wasm32": "0.34.5", + "@img/sharp-win32-arm64": "0.34.5", + "@img/sharp-win32-ia32": "0.34.5", + "@img/sharp-win32-x64": "0.34.5" } }, "node_modules/sharp/node_modules/@img/sharp-libvips-linux-ppc64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.3.4.tgz", - "integrity": "sha512-Le6boB8Tai0Nis+gIxIpKx68UDVVIqdR8Tin5Yf1z2LJJQLDJvCDRqRu+jC2qCoD+eIomonmOwB4smBRxfVpYQ==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", + "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -3636,13 +3254,16 @@ } }, "node_modules/sharp/node_modules/@img/sharp-libvips-linux-riscv64": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.3.4.tgz", - "integrity": "sha512-aHkkIEHPRdQEegJN20MLmGtxYD9R2wQr3Cwpddnu5+YKMt6Uzax7S9h5gpZTo8wyrGuZSlfQ63OevL5mTyOC7Q==", + "version": "1.2.4", + "resolved": "https://registry.npmmirror.com/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", + "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "LGPL-3.0-or-later", "optional": true, "os": [ @@ -3653,75 +3274,61 @@ } }, "node_modules/sharp/node_modules/@img/sharp-linux-ppc64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.35.5.tgz", - "integrity": "sha512-QVxAAq8evVRI9ia2vqgwrmWucn5Dfv+JdWzj75pD8omHLPSP7f8p20O8jxzjCcuCEQEOtYOZUmX1hkiZ0kdevA==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", + "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", "cpu": [ "ppc64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.3.4" + "@img/sharp-libvips-linux-ppc64": "1.2.4" } }, "node_modules/sharp/node_modules/@img/sharp-linux-riscv64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.35.5.tgz", - "integrity": "sha512-LtdreXguaavKODPIfzJ4kffx7UNt1omwtK0rch4EBbbSTXPnxWmYSayXdLJw0fJzQ97kHt1gL/yh4tvU+nCyRQ==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", + "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", "cpu": [ "riscv64" ], "dev": true, + "libc": [ + "glibc" + ], "license": "Apache-2.0", "optional": true, "os": [ "linux" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" }, "optionalDependencies": { - "@img/sharp-libvips-linux-riscv64": "1.3.4" - } - }, - "node_modules/sharp/node_modules/@img/sharp-webcontainers-wasm32": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-webcontainers-wasm32/-/sharp-webcontainers-wasm32-0.35.5.tgz", - "integrity": "sha512-hfhF/FmoQyTUkA0bIKFOtw536BQSeBMe6BF6QyWlrPxT754+TFLaZ7sKKTfvvM0yJgKgaYTwnFCIZ/GuDw5SUA==", - "cpu": [ - "wasm32" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "dependencies": { - "@img/sharp-wasm32": "0.35.5" - }, - "engines": { - "node": ">=20.9.0" - }, - "funding": { - "url": "https://opencollective.com/libvips" + "@img/sharp-libvips-linux-riscv64": "1.2.4" } }, "node_modules/sharp/node_modules/@img/sharp-win32-arm64": { - "version": "0.35.5", - "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.35.5.tgz", - "integrity": "sha512-X4t7g+7ZA5DKblCBEXGjUqqemj4vczING/5viFwAL8h4N3qYeyjwdCvRLHi4EdOUI+2Z7UFlp1VM+p/AuEtm6Q==", + "version": "0.34.5", + "resolved": "https://registry.npmmirror.com/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", + "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", "cpu": [ "arm64" ], @@ -3732,7 +3339,7 @@ "win32" ], "engines": { - "node": ">=20.9.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "funding": { "url": "https://opencollective.com/libvips" @@ -3769,6 +3376,17 @@ "dev": true, "license": "MIT" }, + "node_modules/stoppable": { + "version": "1.1.0", + "resolved": "https://registry.npmmirror.com/stoppable/-/stoppable-1.1.0.tgz", + "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4", + "npm": ">=6" + } + }, "node_modules/supports-color": { "version": "10.2.2", "resolved": "https://registry.npmmirror.com/supports-color/-/supports-color-10.2.2.tgz", @@ -3826,13 +3444,6 @@ "node": ">=14.0.0" } }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true, - "license": "MIT" - }, "node_modules/tslib": { "version": "2.9.1", "resolved": "https://registry.npmmirror.com/tslib/-/tslib-2.9.1.tgz", @@ -3865,13 +3476,6 @@ "node": ">=20.18.1" } }, - "node_modules/undici-types": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.9.0.tgz", - "integrity": "sha512-KTDyRTYX8sWmKXAikPHHSyc63CRPETMctyjKFupcC6OBLXT3xsN0e9aF7m+mIXutFWpUXuedtowG7iLOzp0kQg==", - "dev": true, - "license": "MIT" - }, "node_modules/unenv": { "version": "2.0.0-rc.24", "resolved": "https://registry.npmmirror.com/unenv/-/unenv-2.0.0-rc.24.tgz", @@ -4050,34 +3654,6 @@ } } }, - "node_modules/web-streams-polyfill": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", - "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">= 14" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true, - "license": "BSD-2-Clause" - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "license": "MIT", - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, "node_modules/why-is-node-running": { "version": "2.3.0", "resolved": "https://registry.npmmirror.com/why-is-node-running/-/why-is-node-running-2.3.0.tgz", @@ -4096,9 +3672,9 @@ } }, "node_modules/workerd": { - "version": "1.20261117.1", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261117.1.tgz", - "integrity": "sha512-iakDbGVtJRiErpWSM5fYT0z3spJ2Mo1x/POsEajBNLqUbTRwm8vMqbB7g8zPN2tzs6eZYNiO5ECyEnAXO9Foxw==", + "version": "1.20260111.0", + "resolved": "https://registry.npmmirror.com/workerd/-/workerd-1.20260111.0.tgz", + "integrity": "sha512-ov6Pt4k6d/ALfJja/EIHohT9IrY/f6GAa0arWEPat2qekp78xHbVM7jSxNWAMbaE7ZmnQQIFEGD1ZhAWZmQKIg==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -4109,47 +3685,41 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20261117.1", - "@cloudflare/workerd-darwin-arm64": "1.20261117.1", - "@cloudflare/workerd-linux-64": "1.20261117.1", - "@cloudflare/workerd-linux-arm64": "1.20261117.1", - "@cloudflare/workerd-windows-64": "1.20261117.1" + "@cloudflare/workerd-darwin-64": "1.20260111.0", + "@cloudflare/workerd-darwin-arm64": "1.20260111.0", + "@cloudflare/workerd-linux-64": "1.20260111.0", + "@cloudflare/workerd-linux-arm64": "1.20260111.0", + "@cloudflare/workerd-windows-64": "1.20260111.0" } }, "node_modules/wrangler": { - "version": "4.166.0", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.166.0.tgz", - "integrity": "sha512-qMz0sHGXqEC0Va8T6dAaG0ggp9tCcuHHYMUQzRKbtZg6+MPAPb6oBu1757IaeugNJHPAz+twHiA+zDyXWQLsLw==", + "version": "4.59.1", + "resolved": "https://registry.npmmirror.com/wrangler/-/wrangler-4.59.1.tgz", + "integrity": "sha512-5DddGSNxHd6dOjREWTDQdovQlZ1Lh80NNRXZFQ4/CrK3fNyVIBj9tqCs9pmXMNrKQ/AnKNeYzEs/l1kr8rHhOg==", "dev": true, "license": "MIT OR Apache-2.0", "dependencies": { - "@cloudflare/kv-asset-handler": "0.5.1", - "@cloudflare/unenv-preset": "2.16.2", - "@cloudflare/workers-utils": "0.56.0", - "@cspotcode/source-map-support": "0.8.1", - "@types/yargs": "17.0.24", - "cloudflare": "5.2.0", - "devtools-protocol": "0.0.1182435", - "esbuild": "0.28.2", - "miniflare": "5.20261119.0-beta", + "@cloudflare/kv-asset-handler": "0.4.1", + "@cloudflare/unenv-preset": "2.9.0", + "blake3-wasm": "2.1.5", + "esbuild": "0.27.0", + "miniflare": "4.20260111.0", "path-to-regexp": "6.3.0", - "undici": "7.30.2", "unenv": "2.0.0-rc.24", - "workerd": "1.20261119.1" + "workerd": "1.20260111.0" }, "bin": { - "cf-wrangler": "bin/cf-wrangler.js", "wrangler": "bin/wrangler.js", "wrangler2": "bin/wrangler.js" }, "engines": { - "node": ">=22.12.0" + "node": ">=20.0.0" }, "optionalDependencies": { - "fsevents": "2.3.3" + "fsevents": "~2.3.2" }, "peerDependencies": { - "@cloudflare/workers-types": "^5.20261119.1" + "@cloudflare/workers-types": "^4.20260111.0" }, "peerDependenciesMeta": { "@cloudflare/workers-types": { @@ -4157,95 +3727,10 @@ } } }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-64": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20261119.1.tgz", - "integrity": "sha512-yotoiTGXCl1gTRX+y5ZWSAmzAg6CcBJXhJL6C1DGWUhsjjezNe8FdzraNsefVTOeKsOid2EC+hqOzewczKLvmQ==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-darwin-arm64": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20261119.1.tgz", - "integrity": "sha512-VPOmfEmMubvw4SPcg/yDgamQXsiVAENgxeCJO8pDggRJFaF93SP0g/hktD8sbfmWBS19BO1kX1EsdgHSgRL9jA==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-64": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20261119.1.tgz", - "integrity": "sha512-aaDf78smiN12Uuwtg6TG6iLVS61sLpy/7DC5PYORf2+TCYw/bygcaqqb8zQJ+XwZ3xYhm/Ws80c/yMMhCMTFYA==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20261119.1.tgz", - "integrity": "sha512-LkyAvTMcKqRUP73HRScWWwTSz3pw09um1hxR+rcGdvsGzao8IR59XXTp/tul6kFdVBL2mD8U3X6j2O8t7I4viw==", - "cpu": [ - "arm64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">=16" - } - }, - "node_modules/wrangler/node_modules/@cloudflare/workerd-windows-64": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20261119.1.tgz", - "integrity": "sha512-y4RO3QFNWt4j4uq2kmP5tklTvdA3qOA0PXuA66vsCmEtZYYb71ldefJcq5Dt0jrexKf/i4BBaLXZMVYLnohb0g==", - "cpu": [ - "x64" - ], - "dev": true, - "license": "Apache-2.0", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=16" - } - }, "node_modules/wrangler/node_modules/@esbuild/aix-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.28.2.tgz", - "integrity": "sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/aix-ppc64/-/aix-ppc64-0.27.0.tgz", + "integrity": "sha512-KuZrd2hRjz01y5JK9mEBSD3Vj3mbCvemhT466rSuJYeE/hjuBrHfjjcjMdTm/sz7au+++sdbJZJmuBwQLuw68A==", "cpu": [ "ppc64" ], @@ -4260,9 +3745,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.28.2.tgz", - "integrity": "sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm/-/android-arm-0.27.0.tgz", + "integrity": "sha512-j67aezrPNYWJEOHUNLPj9maeJte7uSMM6gMoxfPC9hOg8N02JuQi/T7ewumf4tNvJadFkvLZMlAq73b9uwdMyQ==", "cpu": [ "arm" ], @@ -4277,9 +3762,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.28.2.tgz", - "integrity": "sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/android-arm64/-/android-arm64-0.27.0.tgz", + "integrity": "sha512-CC3vt4+1xZrs97/PKDkl0yN7w8edvU2vZvAFGD16n9F0Cvniy5qvzRXjfO1l94efczkkQE6g1x0i73Qf5uthOQ==", "cpu": [ "arm64" ], @@ -4294,9 +3779,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/android-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.28.2.tgz", - "integrity": "sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/android-x64/-/android-x64-0.27.0.tgz", + "integrity": "sha512-wurMkF1nmQajBO1+0CJmcN17U4BP6GqNSROP8t0X/Jiw2ltYGLHpEksp9MpoBqkrFR3kv2/te6Sha26k3+yZ9Q==", "cpu": [ "x64" ], @@ -4311,9 +3796,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.28.2.tgz", - "integrity": "sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-arm64/-/darwin-arm64-0.27.0.tgz", + "integrity": "sha512-uJOQKYCcHhg07DL7i8MzjvS2LaP7W7Pn/7uA0B5S1EnqAirJtbyw4yC5jQ5qcFjHK9l6o/MX9QisBg12kNkdHg==", "cpu": [ "arm64" ], @@ -4328,9 +3813,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/darwin-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.28.2.tgz", - "integrity": "sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/darwin-x64/-/darwin-x64-0.27.0.tgz", + "integrity": "sha512-8mG6arH3yB/4ZXiEnXof5MK72dE6zM9cDvUcPtxhUZsDjESl9JipZYW60C3JGreKCEP+p8P/72r69m4AZGJd5g==", "cpu": [ "x64" ], @@ -4345,9 +3830,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.28.2.tgz", - "integrity": "sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.0.tgz", + "integrity": "sha512-9FHtyO988CwNMMOE3YIeci+UV+x5Zy8fI2qHNpsEtSF83YPBmE8UWmfYAQg6Ux7Gsmd4FejZqnEUZCMGaNQHQw==", "cpu": [ "arm64" ], @@ -4362,9 +3847,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/freebsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.28.2.tgz", - "integrity": "sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/freebsd-x64/-/freebsd-x64-0.27.0.tgz", + "integrity": "sha512-zCMeMXI4HS/tXvJz8vWGexpZj2YVtRAihHLk1imZj4efx1BQzN76YFeKqlDr3bUWI26wHwLWPd3rwh6pe4EV7g==", "cpu": [ "x64" ], @@ -4379,9 +3864,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.28.2.tgz", - "integrity": "sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm/-/linux-arm-0.27.0.tgz", + "integrity": "sha512-t76XLQDpxgmq2cNXKTVEB7O7YMb42atj2Re2Haf45HkaUpjM2J0UuJZDuaGbPbamzZ7bawyGFUkodL+zcE+jvQ==", "cpu": [ "arm" ], @@ -4396,9 +3881,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.28.2.tgz", - "integrity": "sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-arm64/-/linux-arm64-0.27.0.tgz", + "integrity": "sha512-AS18v0V+vZiLJyi/4LphvBE+OIX682Pu7ZYNsdUHyUKSoRwdnOsMf6FDekwoAFKej14WAkOef3zAORJgAtXnlQ==", "cpu": [ "arm64" ], @@ -4413,9 +3898,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.28.2.tgz", - "integrity": "sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ia32/-/linux-ia32-0.27.0.tgz", + "integrity": "sha512-Mz1jxqm/kfgKkc/KLHC5qIujMvnnarD9ra1cEcrs7qshTUSksPihGrWHVG5+osAIQ68577Zpww7SGapmzSt4Nw==", "cpu": [ "ia32" ], @@ -4430,9 +3915,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-loong64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.28.2.tgz", - "integrity": "sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-loong64/-/linux-loong64-0.27.0.tgz", + "integrity": "sha512-QbEREjdJeIreIAbdG2hLU1yXm1uu+LTdzoq1KCo4G4pFOLlvIspBm36QrQOar9LFduavoWX2msNFAAAY9j4BDg==", "cpu": [ "loong64" ], @@ -4447,9 +3932,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-mips64el": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.28.2.tgz", - "integrity": "sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-mips64el/-/linux-mips64el-0.27.0.tgz", + "integrity": "sha512-sJz3zRNe4tO2wxvDpH/HYJilb6+2YJxo/ZNbVdtFiKDufzWq4JmKAiHy9iGoLjAV7r/W32VgaHGkk35cUXlNOg==", "cpu": [ "mips64el" ], @@ -4464,9 +3949,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-ppc64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.28.2.tgz", - "integrity": "sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-ppc64/-/linux-ppc64-0.27.0.tgz", + "integrity": "sha512-z9N10FBD0DCS2dmSABDBb5TLAyF1/ydVb+N4pi88T45efQ/w4ohr/F/QYCkxDPnkhkp6AIpIcQKQ8F0ANoA2JA==", "cpu": [ "ppc64" ], @@ -4481,9 +3966,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-riscv64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.28.2.tgz", - "integrity": "sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-riscv64/-/linux-riscv64-0.27.0.tgz", + "integrity": "sha512-pQdyAIZ0BWIC5GyvVFn5awDiO14TkT/19FTmFcPdDec94KJ1uZcmFs21Fo8auMXzD4Tt+diXu1LW1gHus9fhFQ==", "cpu": [ "riscv64" ], @@ -4498,9 +3983,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-s390x": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.28.2.tgz", - "integrity": "sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-s390x/-/linux-s390x-0.27.0.tgz", + "integrity": "sha512-hPlRWR4eIDDEci953RI1BLZitgi5uqcsjKMxwYfmi4LcwyWo2IcRP+lThVnKjNtk90pLS8nKdroXYOqW+QQH+w==", "cpu": [ "s390x" ], @@ -4515,9 +4000,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/linux-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.28.2.tgz", - "integrity": "sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/linux-x64/-/linux-x64-0.27.0.tgz", + "integrity": "sha512-1hBWx4OUJE2cab++aVZ7pObD6s+DK4mPGpemtnAORBvb5l/g5xFGk0vc0PjSkrDs0XaXj9yyob3d14XqvnQ4gw==", "cpu": [ "x64" ], @@ -4532,9 +4017,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.28.2.tgz", - "integrity": "sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.0.tgz", + "integrity": "sha512-6m0sfQfxfQfy1qRuecMkJlf1cIzTOgyaeXaiVaaki8/v+WB+U4hc6ik15ZW6TAllRlg/WuQXxWj1jx6C+dfy3w==", "cpu": [ "arm64" ], @@ -4549,9 +4034,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/netbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.28.2.tgz", - "integrity": "sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/netbsd-x64/-/netbsd-x64-0.27.0.tgz", + "integrity": "sha512-xbbOdfn06FtcJ9d0ShxxvSn2iUsGd/lgPIO2V3VZIPDbEaIj1/3nBBe1AwuEZKXVXkMmpr6LUAgMkLD/4D2PPA==", "cpu": [ "x64" ], @@ -4566,9 +4051,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.28.2.tgz", - "integrity": "sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.0.tgz", + "integrity": "sha512-fWgqR8uNbCQ/GGv0yhzttj6sU/9Z5/Sv/VGU3F5OuXK6J6SlriONKrQ7tNlwBrJZXRYk5jUhuWvF7GYzGguBZQ==", "cpu": [ "arm64" ], @@ -4583,9 +4068,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openbsd-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.28.2.tgz", - "integrity": "sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/openbsd-x64/-/openbsd-x64-0.27.0.tgz", + "integrity": "sha512-aCwlRdSNMNxkGGqQajMUza6uXzR/U0dIl1QmLjPtRbLOx3Gy3otfFu/VjATy4yQzo9yFDGTxYDo1FfAD9oRD2A==", "cpu": [ "x64" ], @@ -4600,9 +4085,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/openharmony-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.28.2.tgz", - "integrity": "sha512-WkhYDmpTjLvGlScA1rwjRUmhl4k8oXR3cIbtqWmELgU/dFeHHlEllxDvdWcNJV9rbzCexB5vz8gtNewWLgCT7Q==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.0.tgz", + "integrity": "sha512-nyvsBccxNAsNYz2jVFYwEGuRRomqZ149A39SHWk4hV0jWxKM0hjBPm3AmdxcbHiFLbBSwG6SbpIcUbXjgyECfA==", "cpu": [ "arm64" ], @@ -4617,9 +4102,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/sunos-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.28.2.tgz", - "integrity": "sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/sunos-x64/-/sunos-x64-0.27.0.tgz", + "integrity": "sha512-Q1KY1iJafM+UX6CFEL+F4HRTgygmEW568YMqDA5UV97AuZSm21b7SXIrRJDwXWPzr8MGr75fUZPV67FdtMHlHA==", "cpu": [ "x64" ], @@ -4634,9 +4119,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-arm64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.28.2.tgz", - "integrity": "sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-arm64/-/win32-arm64-0.27.0.tgz", + "integrity": "sha512-W1eyGNi6d+8kOmZIwi/EDjrL9nxQIQ0MiGqe/AWc6+IaHloxHSGoeRgDRKHFISThLmsewZ5nHFvGFWdBYlgKPg==", "cpu": [ "arm64" ], @@ -4651,9 +4136,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-ia32": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.28.2.tgz", - "integrity": "sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-ia32/-/win32-ia32-0.27.0.tgz", + "integrity": "sha512-30z1aKL9h22kQhilnYkORFYt+3wp7yZsHWus+wSKAJR8JtdfI76LJ4SBdMsCopTR3z/ORqVu5L1vtnHZWVj4cQ==", "cpu": [ "ia32" ], @@ -4668,9 +4153,9 @@ } }, "node_modules/wrangler/node_modules/@esbuild/win32-x64": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.28.2.tgz", - "integrity": "sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/@esbuild/win32-x64/-/win32-x64-0.27.0.tgz", + "integrity": "sha512-aIitBcjQeyOhMTImhLZmtxfdOcuNRpwlPNmlFKPcHQYPhEssw75Cl1TSXJXpMkzaua9FUetx/4OQKq7eJul5Cg==", "cpu": [ "x64" ], @@ -4685,9 +4170,9 @@ } }, "node_modules/wrangler/node_modules/esbuild": { - "version": "0.28.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.2.tgz", - "integrity": "sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==", + "version": "0.27.0", + "resolved": "https://registry.npmmirror.com/esbuild/-/esbuild-0.27.0.tgz", + "integrity": "sha512-jd0f4NHbD6cALCyGElNpGAOtWxSq46l9X/sWB0Nzd5er4Kz2YTm+Vl0qKFT9KUJvD8+fiO8AvoHhFvEatfVixA==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -4698,85 +4183,38 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.28.2", - "@esbuild/android-arm": "0.28.2", - "@esbuild/android-arm64": "0.28.2", - "@esbuild/android-x64": "0.28.2", - "@esbuild/darwin-arm64": "0.28.2", - "@esbuild/darwin-x64": "0.28.2", - "@esbuild/freebsd-arm64": "0.28.2", - "@esbuild/freebsd-x64": "0.28.2", - "@esbuild/linux-arm": "0.28.2", - "@esbuild/linux-arm64": "0.28.2", - "@esbuild/linux-ia32": "0.28.2", - "@esbuild/linux-loong64": "0.28.2", - "@esbuild/linux-mips64el": "0.28.2", - "@esbuild/linux-ppc64": "0.28.2", - "@esbuild/linux-riscv64": "0.28.2", - "@esbuild/linux-s390x": "0.28.2", - "@esbuild/linux-x64": "0.28.2", - "@esbuild/netbsd-arm64": "0.28.2", - "@esbuild/netbsd-x64": "0.28.2", - "@esbuild/openbsd-arm64": "0.28.2", - "@esbuild/openbsd-x64": "0.28.2", - "@esbuild/openharmony-arm64": "0.28.2", - "@esbuild/sunos-x64": "0.28.2", - "@esbuild/win32-arm64": "0.28.2", - "@esbuild/win32-ia32": "0.28.2", - "@esbuild/win32-x64": "0.28.2" - } - }, - "node_modules/wrangler/node_modules/miniflare": { - "version": "5.20261119.0-beta", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-5.20261119.0-beta.tgz", - "integrity": "sha512-HdNQIUPgde5Yg0qFaI6iiYd0aOxAgKQTXDstkBN2G1tPBdslNrUKdySwaGdBix0IFd+yh8M0gkqzw68dIZ2Ugw==", - "dev": true, - "license": "MIT", - "dependencies": { - "@cspotcode/source-map-support": "0.8.1", - "sharp": "0.35.5", - "undici": "7.30.2", - "workerd": "1.20261119.1", - "ws": "8.21.0", - "youch": "4.1.0-beta.10" - }, - "engines": { - "node": ">=22.12.0" - }, - "peerDependencies": { - "kerberos": "^2.0.0" - }, - "peerDependenciesMeta": { - "kerberos": { - "optional": true - } - } - }, - "node_modules/wrangler/node_modules/workerd": { - "version": "1.20261119.1", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20261119.1.tgz", - "integrity": "sha512-lalSvY+ad5asqMgzA/DfrZo7wvuvOHJc/aS1UctUrwu76fJE/LkSKJlprfBu0LeU79Qai5d+xFooQA9CIfj+dQ==", - "dev": true, - "hasInstallScript": true, - "license": "Apache-2.0", - "bin": { - "workerd": "bin/workerd" - }, - "engines": { - "node": ">=16" - }, - "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20261119.1", - "@cloudflare/workerd-darwin-arm64": "1.20261119.1", - "@cloudflare/workerd-linux-64": "1.20261119.1", - "@cloudflare/workerd-linux-arm64": "1.20261119.1", - "@cloudflare/workerd-windows-64": "1.20261119.1" + "@esbuild/aix-ppc64": "0.27.0", + "@esbuild/android-arm": "0.27.0", + "@esbuild/android-arm64": "0.27.0", + "@esbuild/android-x64": "0.27.0", + "@esbuild/darwin-arm64": "0.27.0", + "@esbuild/darwin-x64": "0.27.0", + "@esbuild/freebsd-arm64": "0.27.0", + "@esbuild/freebsd-x64": "0.27.0", + "@esbuild/linux-arm": "0.27.0", + "@esbuild/linux-arm64": "0.27.0", + "@esbuild/linux-ia32": "0.27.0", + "@esbuild/linux-loong64": "0.27.0", + "@esbuild/linux-mips64el": "0.27.0", + "@esbuild/linux-ppc64": "0.27.0", + "@esbuild/linux-riscv64": "0.27.0", + "@esbuild/linux-s390x": "0.27.0", + "@esbuild/linux-x64": "0.27.0", + "@esbuild/netbsd-arm64": "0.27.0", + "@esbuild/netbsd-x64": "0.27.0", + "@esbuild/openbsd-arm64": "0.27.0", + "@esbuild/openbsd-x64": "0.27.0", + "@esbuild/openharmony-arm64": "0.27.0", + "@esbuild/sunos-x64": "0.27.0", + "@esbuild/win32-arm64": "0.27.0", + "@esbuild/win32-ia32": "0.27.0", + "@esbuild/win32-x64": "0.27.0" } }, "node_modules/ws": { - "version": "8.21.0", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.21.0.tgz", - "integrity": "sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==", + "version": "8.18.0", + "resolved": "https://registry.npmmirror.com/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "dev": true, "license": "MIT", "engines": { diff --git a/pkgs/github-ci/worker/package.json b/pkgs/github-ci/worker/package.json index e3aa577bf3..cac7c5831c 100644 --- a/pkgs/github-ci/worker/package.json +++ b/pkgs/github-ci/worker/package.json @@ -4,25 +4,19 @@ "private": true, "type": "module", "description": "GitHub webhook receiver (#5693): workflow_run -> Turso ci_events only; fleet push/PR/issues -> agent events sink + fleet-queue snapshots/watermarks.", - "engines": { - "node": ">=24.22.0" - }, "scripts": { - "deploy": "echo 'npm run deploy is disabled; use the protected GitHub Actions Workers Versions flow' >&2; exit 1", + "deploy": "wrangler deploy", "dev": "wrangler dev", - "build": "cf build", "test": "vitest run", - "test:deployment": "node --test test/deployment-config.test.mjs test/deployment-guard.test.mjs", "typecheck": "tsc --noEmit", "backfill": "esbuild scripts/backfill.ts --bundle --platform=node --format=esm --outfile=.backfill.build.mjs && node .backfill.build.mjs" }, "devDependencies": { "@cloudflare/vitest-pool-workers": "0.23.0", - "@cloudflare/workers-types": "^5.20261119.1", - "cf": "1.0.0-rc.1", + "@cloudflare/workers-types": "^4.20251011.0", "typescript": "^5.6.0", "vitest": "^4.1.0", - "wrangler": "4.166.0" + "wrangler": "4.59.1" }, "overrides": { "undici": "7.30.1" diff --git a/pkgs/github-ci/worker/scripts/deployment-guard.mjs b/pkgs/github-ci/worker/scripts/deployment-guard.mjs index a9c3e0f519..c624ffa378 100644 --- a/pkgs/github-ci/worker/scripts/deployment-guard.mjs +++ b/pkgs/github-ci/worker/scripts/deployment-guard.mjs @@ -1,8 +1,11 @@ #!/usr/bin/env node -import { readFileSync, appendFileSync } from "node:fs"; +import { appendFileSync, readFileSync, writeFileSync } from "node:fs"; import { join } from "node:path"; import { parseArgs } from "node:util"; +const WORKER_NAME = "github-ci"; +const UPLOAD_WORKFLOW = ".github/workflows/github-ci-worker-upload.yml"; +const PROMOTE_WORKFLOW = ".github/workflows/github-ci-worker-promote.yml"; const SECRET_BINDINGS = [ "GITHUB_WEBHOOK_SECRET", "TURSO_PLATFORM_TOKEN", @@ -19,10 +22,11 @@ const EXPECTED_TEXT_BINDINGS = { const VERSION_ID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i; const COMMIT_SHA = /^[0-9a-f]{40}$/i; +const POSITIVE_INTEGER = /^[1-9][0-9]*$/; function usage() { throw new Error( - "usage: deployment-guard.mjs build | select-upload | verify-version [commit-sha] | verify-deployable | verify-deployment ", + "usage: deployment-guard.mjs build | check-environment | select-upload | select-baseline | verify-baseline | verify-version [commit-sha] | verify-deployable | write-upload-receipt | verify-upload-receipt | verify-baseline-current | verify-created-deployment | verify-promotion-readback | write-promotion-receipt ", ); } @@ -36,12 +40,12 @@ function readJson(path) { function unwrap(value) { if (!value || typeof value !== "object" || Array.isArray(value)) return value; - if (value.success === false) throw new Error("Cloudflare API response was unsuccessful"); + if (value.success === false) throw new Error("API response was unsuccessful"); return Object.hasOwn(value, "result") ? value.result : value; } function rows(value, label) { - let result = unwrap(value); + const result = unwrap(value); if (Array.isArray(result)) return result; if (result && typeof result === "object") { if (Array.isArray(result.items)) return result.items; @@ -51,16 +55,22 @@ function rows(value, label) { throw new Error(`${label} response did not contain a list`); } +function createdOn(record, label) { + const value = record?.created_on ?? record?.metadata?.created_on; + const parsed = typeof value === "string" ? Date.parse(value) : Number.NaN; + if (!Number.isFinite(parsed)) throw new Error(`${label} is missing a valid created_on timestamp`); + return { value, parsed }; +} + function newest(items, label) { if (!items.length) throw new Error(`${label} response did not contain any records`); - return items - .map((item) => { - const createdOn = item.created_on ?? item.metadata?.created_on; - const createdAt = typeof createdOn === "string" ? Date.parse(createdOn) : Number.NaN; - if (!Number.isFinite(createdAt)) throw new Error(`${label} record is missing a valid created_on timestamp`); - return { item, createdAt }; - }) - .sort((left, right) => right.createdAt - left.createdAt)[0].item; + const sorted = items + .map((item) => ({ item, ...createdOn(item, `${label} record`) })) + .sort((left, right) => right.parsed - left.parsed); + if (sorted.length > 1 && sorted[0].parsed === sorted[1].parsed && sorted[0].item.id !== sorted[1].item.id) { + throw new Error(`${label} response has ambiguous newest records`); + } + return sorted[0].item; } function annotation(version, key) { @@ -89,11 +99,14 @@ function bindingsOf(version) { function assertSecrets(version) { const bindings = bindingsOf(version); - const byName = new Map(bindings.map((binding) => [binding.name, binding])); - const missing = SECRET_BINDINGS.filter((name) => byName.get(name)?.type !== "secret_text"); + const missing = SECRET_BINDINGS.filter((name) => { + const matching = bindings.filter((binding) => binding.name === name); + return matching.length !== 1 || matching[0].type !== "secret_text"; + }); if (missing.length) { throw new Error(`version is missing required secret binding names or types: ${missing.join(", ")}`); } + return [...SECRET_BINDINGS]; } function reportOutput(values, summary) { @@ -111,7 +124,7 @@ function checkBuild(root) { if (rootConfig.producer?.name !== "wrangler" || rootConfig.producer?.version !== "4.166.0") { throw new Error("Build Output must be produced by the pinned Wrangler 4.166.0 delegate"); } - if (worker.name !== "github-ci" || worker.compatibilityDate !== "2025-09-15" || worker.workersDev !== true) { + if (worker.name !== WORKER_NAME || worker.compatibilityDate !== "2025-09-15" || worker.workersDev !== true) { throw new Error("Build Output worker identity, compatibility date, or workers.dev ingress differs from production"); } if (Object.hasOwn(worker, "previewUrls")) { @@ -132,6 +145,67 @@ function checkBuild(root) { console.log("Build Output v1 has the expected Worker, ingress, production vars, and value-free secret declarations."); } +function checkEnvironment(environmentPath, policiesPath, expectedName) { + const environment = readJson(environmentPath); + const policiesResponse = readJson(policiesPath); + if (environment?.name !== expectedName) throw new Error(`required environment ${expectedName} is missing`); + const rules = environment.protection_rules; + const hasReviewers = Array.isArray(rules) && rules.some((rule) => + rule.type === "required_reviewers" && Array.isArray(rule.reviewers) && rule.reviewers.length > 0, + ); + if (!hasReviewers) throw new Error(`${expectedName} has no required-reviewer protection rule`); + const branchPolicy = environment.deployment_branch_policy; + if (branchPolicy?.protected_branches !== false || branchPolicy?.custom_branch_policies !== true) { + throw new Error(`${expectedName} must restrict deployments with a custom branch policy`); + } + const policies = policiesResponse?.branch_policies; + if (!Array.isArray(policies) || policies.length !== 1 || policies[0]?.name !== "main") { + throw new Error(`${expectedName} must allow exactly the main branch`); + } + reportOutput( + { protected: "true" }, + `Confirmed ${expectedName} exists with required reviewers and an exact main deployment branch policy.`, + ); +} + +function deploymentRecord(path) { + const deployment = newest(rows(readJson(path), "deployment"), "deployment"); + if (!VERSION_ID.test(deployment.id ?? "")) throw new Error("latest deployment has no Cloudflare Deployment UUID"); + const versions = deployment.versions; + if (!Array.isArray(versions) || versions.length !== 1 || !VERSION_ID.test(versions[0]?.version_id ?? "") || Number(versions[0]?.percentage) !== 100) { + throw new Error("latest deployment must serve exactly one version at 100% traffic"); + } + const timestamp = createdOn(deployment, "latest deployment"); + return { + deployment_id: deployment.id, + version_id: versions[0].version_id, + created_on: timestamp.value, + created_at_ms: timestamp.parsed, + }; +} + +function versionRecord(path) { + const version = unwrap(readJson(path)); + if (!VERSION_ID.test(version?.id ?? "")) throw new Error("Worker Version response has no Cloudflare Version UUID"); + const timestamp = createdOn(version, "Worker Version"); + return { version, created_on: timestamp.value, created_at_ms: timestamp.parsed }; +} + +function verifyBaseline(deploymentsPath, versionPath) { + const baseline = deploymentRecord(deploymentsPath); + const version = versionRecord(versionPath); + if (version.version.id !== baseline.version_id) throw new Error("baseline version read-back does not match the active deployment"); + assertSecrets(version.version); + reportOutput( + { + baseline_deployment_id: baseline.deployment_id, + baseline_version_id: baseline.version_id, + baseline_created_on: baseline.created_on, + }, + `Verified active baseline deployment ${baseline.deployment_id}, version ${baseline.version_id}, and all ${SECRET_BINDINGS.length} secret binding names.`, + ); +} + function selectUpload(path, sha) { if (!COMMIT_SHA.test(sha)) throw new Error("upload commit must be a full Git commit SHA"); const tag = `git-${sha.slice(0, 12)}`; @@ -142,23 +216,22 @@ function selectUpload(path, sha) { if (!candidates.length) throw new Error("uploaded version with exact commit tag and message was not listed"); const version = newest(candidates, "candidate versions"); if (!VERSION_ID.test(version.id ?? "")) throw new Error("selected upload did not have a Cloudflare Version UUID"); - reportOutput( - { version_id: version.id }, - `Uploaded candidate \`${version.id}\` tagged \`${tag}\` from commit \`${sha}\`; production traffic was unchanged.`, - ); + reportOutput({ version_id: version.id }, `Uploaded immutable candidate ${version.id} from commit ${sha}; traffic was unchanged.`); } function verifyVersion(path, requestedId, expectedSha) { if (!VERSION_ID.test(requestedId)) throw new Error("requested version ID is not a UUID"); - const version = unwrap(readJson(path)); - if (version?.id !== requestedId) throw new Error("Cloudflare returned a different Worker Version ID"); + const { version } = versionRecord(path); + if (version.id !== requestedId) throw new Error("Cloudflare returned a different Worker Version ID"); const sha = commitFrom(version); if (expectedSha !== undefined && sha !== expectedSha.toLowerCase()) { throw new Error("version provenance does not match the requested source commit"); } assertSecrets(version); - const summary = `Verified candidate provenance \`${sha}\` and all ${SECRET_BINDINGS.length} retained secret binding names for version \`${requestedId}\`.`; - reportOutput({ source_sha: sha }, summary); + reportOutput( + { source_sha: sha }, + `Verified candidate provenance ${sha} and all ${SECRET_BINDINGS.length} retained secret binding names for version ${requestedId}.`, + ); } function verifyDeployable(path, requestedId) { @@ -169,33 +242,282 @@ function verifyDeployable(path, requestedId) { console.log("Requested version is deployable."); } -function verifyDeployment(path, requestedId, sha) { - if (!COMMIT_SHA.test(sha)) throw new Error("deployment provenance must be a full Git commit SHA"); - const deployments = rows(readJson(path), "deployment read-back"); - const latest = newest(deployments, "deployment read-back"); - const versions = latest?.versions; - if (!Array.isArray(versions) || versions.length !== 1 || versions[0].version_id !== requestedId || Number(versions[0].percentage) !== 100) { - throw new Error("latest Cloudflare deployment does not attribute 100% traffic to the selected version"); +function assertUploadRuntime() { + const sourceSha = (process.env.GITHUB_SHA ?? "").toLowerCase(); + if (process.env.GITHUB_REPOSITORY !== "developing-today/code") throw new Error("upload receipt must come from the production repository"); + if (process.env.GITHUB_EVENT_NAME !== "workflow_dispatch" || process.env.GITHUB_REF !== "refs/heads/main") { + throw new Error("upload receipt must come from a manual run on main"); } + if (!COMMIT_SHA.test(sourceSha)) throw new Error("upload receipt is missing the full source commit SHA"); + const runId = process.env.GITHUB_RUN_ID ?? ""; + const attempt = process.env.GITHUB_RUN_ATTEMPT ?? ""; + if (!POSITIVE_INTEGER.test(runId) || !POSITIVE_INTEGER.test(attempt)) throw new Error("upload receipt is missing the exact run ID or attempt"); + const workflowRef = process.env.GITHUB_WORKFLOW_REF ?? ""; + if (!workflowRef.endsWith(`${UPLOAD_WORKFLOW}@refs/heads/main`)) throw new Error("upload receipt came from an unexpected workflow ref"); + return { sourceSha, runId, attempt: Number(attempt), workflowRef }; +} + +function writeUploadReceipt(baselineDeploymentsPath, baselineVersionPath, candidatePath, outputPath) { + const runtime = assertUploadRuntime(); + const baseline = deploymentRecord(baselineDeploymentsPath); + const baselineVersion = versionRecord(baselineVersionPath); + if (baselineVersion.version.id !== baseline.version_id) throw new Error("baseline version read-back does not match the active deployment"); + assertSecrets(baselineVersion.version); + + const candidateRecord = versionRecord(candidatePath); + const candidate = candidateRecord.version; + if (candidate.id === baseline.version_id) throw new Error("uploaded candidate is the same version as the baseline"); + if (candidateRecord.created_at_ms <= baseline.created_at_ms) throw new Error("uploaded candidate is not newer than its production baseline"); + const candidateSha = commitFrom(candidate); + if (candidateSha !== runtime.sourceSha) throw new Error("uploaded candidate provenance does not match this workflow commit"); + const candidateBindings = assertSecrets(candidate); + + const artifactName = `github-ci-candidate-${runtime.runId}-${runtime.attempt}`; + const receipt = { + schema: "github-ci-worker-upload-receipt/v1", + upload: { + repository: process.env.GITHUB_REPOSITORY, + workflow_path: UPLOAD_WORKFLOW, + workflow_ref: runtime.workflowRef, + event: process.env.GITHUB_EVENT_NAME, + ref: process.env.GITHUB_REF, + run_id: runtime.runId, + run_attempt: runtime.attempt, + source_sha: runtime.sourceSha, + artifact_name: artifactName, + }, + baseline: { + deployment_id: baseline.deployment_id, + version_id: baseline.version_id, + created_on: baseline.created_on, + }, + candidate: { + version_id: candidate.id, + created_on: candidateRecord.created_on, + tag: annotation(candidate, "workers/tag"), + message: annotation(candidate, "workers/message"), + secret_bindings: candidateBindings.map((name) => ({ name, type: "secret_text" })), + }, + }; + writeFileSync(outputPath, `${JSON.stringify(receipt, null, 2)}\n`, { flag: "wx" }); reportOutput( - { deployed_version_id: requestedId }, - `Read-back confirms version \`${requestedId}\` from commit \`${sha}\` is the latest deployment at 100% traffic.`, + { version_id: candidate.id, artifact_name: artifactName, baseline_deployment_id: baseline.deployment_id, baseline_version_id: baseline.version_id }, + `Upload receipt ${artifactName} records attempt ${runtime.runId}/${runtime.attempt}, baseline deployment ${baseline.deployment_id}, baseline version ${baseline.version_id}, candidate version ${candidate.id}, and source ${runtime.sourceSha}.`, ); } -function main() { - const parsed = parseArgs({ - args: process.argv.slice(2), - options: {}, - allowPositionals: true, - strict: true, +function validateReceiptShape(receipt, expected) { + if (receipt?.schema !== "github-ci-worker-upload-receipt/v1") throw new Error("upload receipt schema is missing or unsupported"); + const upload = receipt.upload; + const baseline = receipt.baseline; + const candidate = receipt.candidate; + if (!upload || !baseline || !candidate) throw new Error("upload receipt is missing upload, baseline, or candidate records"); + if (upload.repository !== "developing-today/code" || upload.workflow_path !== UPLOAD_WORKFLOW || upload.event !== "workflow_dispatch" || upload.ref !== "refs/heads/main") { + throw new Error("upload receipt does not identify the approved upload workflow on main"); + } + if (String(upload.run_id) !== expected.runId || Number(upload.run_attempt) !== expected.attempt) { + throw new Error("upload receipt run ID or attempt does not match the selected upload run"); + } + if (upload.artifact_name !== `github-ci-candidate-${expected.runId}-${expected.attempt}`) { + throw new Error("upload receipt artifact name does not match the selected run attempt"); + } + if (!COMMIT_SHA.test(upload.source_sha ?? "")) throw new Error("upload receipt is missing a full source commit SHA"); + if (!VERSION_ID.test(candidate.version_id ?? "") || candidate.version_id !== expected.candidateVersionId) { + throw new Error("upload receipt candidate Version UUID does not match the requested version"); + } + if (!VERSION_ID.test(baseline.deployment_id ?? "") || baseline.deployment_id !== expected.baselineDeploymentId) { + throw new Error("upload receipt baseline Deployment UUID does not match the requested baseline"); + } + if (!VERSION_ID.test(baseline.version_id ?? "") || baseline.version_id !== expected.baselineVersionId) { + throw new Error("upload receipt baseline Version UUID does not match the requested baseline"); + } + if (baseline.version_id === candidate.version_id) throw new Error("upload receipt candidate and baseline versions are identical"); + const baselineTime = Date.parse(baseline.created_on ?? ""); + const candidateTime = Date.parse(candidate.created_on ?? ""); + if (!Number.isFinite(baselineTime) || !Number.isFinite(candidateTime) || candidateTime <= baselineTime) { + throw new Error("upload receipt is missing an ordered baseline/candidate timestamp"); + } + const expectedTag = `git-${upload.source_sha.slice(0, 12)}`; + const expectedMessage = `github-ci candidate ${upload.source_sha}`; + if (candidate.tag !== expectedTag || candidate.message !== expectedMessage) throw new Error("upload receipt candidate provenance does not match its source commit"); + const bindingNames = Array.isArray(candidate.secret_bindings) ? candidate.secret_bindings.map((binding) => binding.name) : []; + if (!Array.isArray(candidate.secret_bindings) || candidate.secret_bindings.length !== SECRET_BINDINGS.length || SECRET_BINDINGS.some((name) => bindingNames.filter((candidateName) => candidateName === name).length !== 1) || candidate.secret_bindings.some((binding) => binding.type !== "secret_text")) { + throw new Error("upload receipt is missing one or more required retained secret binding names"); + } + return { upload, baseline, candidate }; +} + +function verifyUploadRun(receiptPath, attemptPath, runIdArg, attemptArg, candidateIdArg, baselineDeploymentIdArg, baselineVersionIdArg) { + if (!POSITIVE_INTEGER.test(runIdArg) || !POSITIVE_INTEGER.test(attemptArg)) throw new Error("selected upload run ID and attempt must be positive integers"); + if (!VERSION_ID.test(candidateIdArg) || !VERSION_ID.test(baselineDeploymentIdArg) || !VERSION_ID.test(baselineVersionIdArg)) { + throw new Error("selected candidate and baseline receipt IDs must be Cloudflare UUIDs"); + } + const expected = { + runId: runIdArg, + attempt: Number(attemptArg), + candidateVersionId: candidateIdArg, + baselineDeploymentId: baselineDeploymentIdArg, + baselineVersionId: baselineVersionIdArg, + }; + const { upload, baseline, candidate } = validateReceiptShape(readJson(receiptPath), expected); + const run = readJson(attemptPath); + const workflowPath = (run.path ?? "").split("@")[0]; + const runId = String(run.run_id ?? run.id ?? ""); + if (runId !== expected.runId || Number(run.run_attempt) !== expected.attempt) throw new Error("GitHub returned a different workflow run attempt"); + if (workflowPath !== UPLOAD_WORKFLOW) throw new Error("selected run attempt is not the github-ci Worker upload workflow"); + if (run.event !== "workflow_dispatch" || run.head_branch !== "main" || run.status !== "completed" || run.conclusion !== "success") { + throw new Error("selected upload run attempt is not a successful manual run on main"); + } + if (run.head_sha?.toLowerCase() !== upload.source_sha) throw new Error("upload receipt source commit does not match the selected run attempt"); + if (run.repository?.full_name !== upload.repository) throw new Error("selected upload run belongs to a different repository"); + reportOutput( + { + source_sha: upload.source_sha, + candidate_version_id: candidate.version_id, + baseline_deployment_id: baseline.deployment_id, + baseline_version_id: baseline.version_id, + }, + `Validated upload receipt from run attempt ${expected.runId}/${expected.attempt} with baseline deployment ${baseline.deployment_id} and candidate version ${candidate.version_id}.`, + ); +} + +function verifyBaselineCurrent(deploymentsPath, receiptPath) { + const candidateReceipt = readJson(receiptPath); + const receipt = validateReceiptShape(candidateReceipt, { + runId: String(candidateReceipt.upload?.run_id ?? ""), + attempt: Number(candidateReceipt.upload?.run_attempt ?? 0), + candidateVersionId: candidateReceipt.candidate?.version_id ?? "", + baselineDeploymentId: candidateReceipt.baseline?.deployment_id ?? "", + baselineVersionId: candidateReceipt.baseline?.version_id ?? "", }); + const current = deploymentRecord(deploymentsPath); + if (current.deployment_id !== receipt.baseline.deployment_id || current.version_id !== receipt.baseline.version_id || current.created_on !== receipt.baseline.created_on) { + throw new Error("production baseline changed after the upload receipt was created"); + } + console.log(`Current production baseline matches receipt ${current.deployment_id}/${current.version_id}.`); +} + +function createdDeployment(path, receipt) { + const response = unwrap(readJson(path)); + const deployment = response?.deployment ?? response; + if (!VERSION_ID.test(deployment?.id ?? "")) throw new Error("deployment create response is missing its exact Deployment UUID"); + const versions = deployment.versions; + if (!Array.isArray(versions) || versions.length !== 1 || versions[0]?.version_id !== receipt.candidate.version_id || Number(versions[0]?.percentage) !== 100) { + throw new Error("deployment create response does not contain the receipted candidate at 100% traffic"); + } + if (deployment.id === receipt.baseline.deployment_id) throw new Error("deployment create response reused the baseline Deployment UUID"); + const timestamp = createdOn(deployment, "created deployment"); + if (timestamp.parsed <= Date.parse(receipt.baseline.created_on)) throw new Error("created deployment is not newer than its receipted baseline"); + return { id: deployment.id, created_on: timestamp.value }; +} + +function promotionReadback(deploymentsPath, receiptPath, createdPath) { + const candidateReceipt = readJson(receiptPath); + const receipt = validateReceiptShape(candidateReceipt, { + runId: String(candidateReceipt.upload?.run_id ?? ""), + attempt: Number(candidateReceipt.upload?.run_attempt ?? 0), + candidateVersionId: candidateReceipt.candidate?.version_id ?? "", + baselineDeploymentId: candidateReceipt.baseline?.deployment_id ?? "", + baselineVersionId: candidateReceipt.baseline?.version_id ?? "", + }); + const created = createdDeployment(createdPath, receipt); + const actual = deploymentRecord(deploymentsPath); + if (actual.deployment_id !== created.id) throw new Error("latest deployment read-back does not match the exact deployment create receipt"); + if (actual.created_on !== created.created_on) throw new Error("latest deployment timestamp does not match the exact deployment create receipt"); + if (actual.version_id !== receipt.candidate.version_id || actual.created_at_ms <= Date.parse(receipt.baseline.created_on)) { + throw new Error("latest deployment read-back does not promote the receipted candidate over its baseline"); + } + return { receipt, created, actual }; +} + +function verifyCreatedDeployment(createdPath, receiptPath) { + const candidateReceipt = readJson(receiptPath); + const receipt = validateReceiptShape(candidateReceipt, { + runId: String(candidateReceipt.upload?.run_id ?? ""), + attempt: Number(candidateReceipt.upload?.run_attempt ?? 0), + candidateVersionId: candidateReceipt.candidate?.version_id ?? "", + baselineDeploymentId: candidateReceipt.baseline?.deployment_id ?? "", + baselineVersionId: candidateReceipt.baseline?.version_id ?? "", + }); + const created = createdDeployment(createdPath, receipt); + reportOutput( + { deployment_id: created.id }, + `Cloudflare created deployment ${created.id} for receipted candidate ${receipt.candidate.version_id}.`, + ); +} + +function verifyPromotionReadback(deploymentsPath, receiptPath, createdPath) { + const { receipt, created } = promotionReadback(deploymentsPath, receiptPath, createdPath); + reportOutput( + { deployment_id: created.id }, + `Read-back confirms new deployment ${created.id} promotes candidate ${receipt.candidate.version_id} at 100% over baseline ${receipt.baseline.deployment_id}.`, + ); +} + +function writePromotionReceipt(receiptPath, createdPath, deploymentsPath, outputPath) { + const { receipt, created } = promotionReadback(deploymentsPath, receiptPath, createdPath); + const runId = process.env.GITHUB_RUN_ID ?? ""; + const attempt = process.env.GITHUB_RUN_ATTEMPT ?? ""; + const workflowRef = process.env.GITHUB_WORKFLOW_REF ?? ""; + if (process.env.GITHUB_REPOSITORY !== receipt.upload.repository || process.env.GITHUB_EVENT_NAME !== "workflow_dispatch" || process.env.GITHUB_REF !== "refs/heads/main") { + throw new Error("promotion receipt must come from a manual run on main in the upload repository"); + } + if (!POSITIVE_INTEGER.test(runId) || !POSITIVE_INTEGER.test(attempt) || !workflowRef.endsWith(`${PROMOTE_WORKFLOW}@refs/heads/main`)) { + throw new Error("promotion receipt is missing its exact workflow run identity"); + } + const promotionReceipt = { + schema: "github-ci-worker-promotion-receipt/v1", + upload: receipt.upload, + baseline: receipt.baseline, + candidate: receipt.candidate, + promotion: { + repository: process.env.GITHUB_REPOSITORY, + workflow_path: PROMOTE_WORKFLOW, + workflow_ref: workflowRef, + event: process.env.GITHUB_EVENT_NAME, + ref: process.env.GITHUB_REF, + run_id: runId, + run_attempt: Number(attempt), + source_sha: receipt.upload.source_sha, + }, + deployment: { + id: created.id, + created_on: created.created_on, + version_id: receipt.candidate.version_id, + percentage: 100, + }, + }; + writeFileSync(outputPath, `${JSON.stringify(promotionReceipt, null, 2)}\n`, { flag: "wx" }); + const artifactName = `github-ci-promotion-${runId}-${attempt}`; + reportOutput( + { promotion_artifact_name: artifactName }, + `Promotion receipt ${artifactName} records upload attempt ${receipt.upload.run_id}/${receipt.upload.run_attempt}, baseline deployment ${receipt.baseline.deployment_id}, and deployment ${created.id} at 100%.`, + ); +} + +function main() { + const parsed = parseArgs({ args: process.argv.slice(2), options: {}, allowPositionals: true, strict: true }); const [command, ...args] = parsed.positionals; if (command === "build" && args.length === 1) return checkBuild(args[0]); + if (command === "check-environment" && args.length === 3) return checkEnvironment(args[0], args[1], args[2]); if (command === "select-upload" && args.length === 2) return selectUpload(args[0], args[1]); + if (command === "select-baseline" && args.length === 1) { + const baseline = deploymentRecord(args[0]); + reportOutput( + { baseline_deployment_id: baseline.deployment_id, baseline_version_id: baseline.version_id, baseline_created_on: baseline.created_on }, + `Selected active baseline deployment ${baseline.deployment_id} and version ${baseline.version_id}.`, + ); + return; + } + if (command === "verify-baseline" && args.length === 2) return verifyBaseline(args[0], args[1]); if (command === "verify-version" && (args.length === 2 || args.length === 3)) return verifyVersion(args[0], args[1], args[2]); if (command === "verify-deployable" && args.length === 2) return verifyDeployable(args[0], args[1]); - if (command === "verify-deployment" && args.length === 3) return verifyDeployment(args[0], args[1], args[2]); + if (command === "write-upload-receipt" && args.length === 4) return writeUploadReceipt(args[0], args[1], args[2], args[3]); + if (command === "verify-upload-receipt" && args.length === 7) return verifyUploadRun(...args); + if (command === "verify-baseline-current" && args.length === 2) return verifyBaselineCurrent(args[0], args[1]); + if (command === "verify-created-deployment" && args.length === 2) return verifyCreatedDeployment(args[0], args[1]); + if (command === "verify-promotion-readback" && args.length === 3) return verifyPromotionReadback(args[0], args[1], args[2]); + if (command === "write-promotion-receipt" && args.length === 4) return writePromotionReceipt(args[0], args[1], args[2], args[3]); usage(); } diff --git a/pkgs/github-ci/worker/test/deploy_workflows_test.py b/pkgs/github-ci/worker/test/deploy_workflows_test.py index ef51584067..8c90925913 100644 --- a/pkgs/github-ci/worker/test/deploy_workflows_test.py +++ b/pkgs/github-ci/worker/test/deploy_workflows_test.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 """Offline guard checks for github-ci Worker deployment workflows.""" +import json from pathlib import Path import unittest @@ -8,21 +9,34 @@ REPO_ROOT = Path(__file__).resolve().parents[4] UPLOAD = (REPO_ROOT / ".github/workflows/github-ci-worker-upload.yml").read_text() PROMOTE = (REPO_ROOT / ".github/workflows/github-ci-worker-promote.yml").read_text() +TOOLCHAIN = json.loads((REPO_ROOT / ".github/worker-deploy-ci/package.json").read_text()) +WORKER_PACKAGE = json.loads((REPO_ROOT / "pkgs/github-ci/worker/package.json").read_text()) class DeploymentWorkflowTests(unittest.TestCase): - def test_upload_uses_cf_and_never_promotes_traffic(self): + def test_upload_is_manual_default_off_cf_only_and_never_promotes(self): + self.assertIn("workflow_dispatch:", UPLOAD) + self.assertIn("default: false", UPLOAD) + self.assertNotIn("push:", UPLOAD) + self.assertIn("inputs.confirm_upload == true", UPLOAD) + self.assertIn("environment: github-ci-cloudflare-upload", UPLOAD) + self.assertIn("check-environment", UPLOAD) self.assertIn("node-version: 24.22.0", UPLOAD) self.assertIn("npm run build", UPLOAD) - self.assertIn("cf -q workers versions create", UPLOAD) + self.assertIn("cf workers versions create", UPLOAD) self.assertIn("--prebuilt --dry-run", UPLOAD) self.assertIn("workers versions list --worker github-ci", UPLOAD) self.assertIn("versions get", UPLOAD) + self.assertIn("select-baseline", UPLOAD) + self.assertIn("verify-baseline", UPLOAD) self.assertIn("verify-version", UPLOAD) self.assertIn("verify-deployable", UPLOAD) + self.assertIn("write-upload-receipt", UPLOAD) + self.assertIn("actions/upload-artifact@v7", UPLOAD) self.assertNotIn("cf workers deployments create", UPLOAD) self.assertNotRegex(UPLOAD, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)") self.assertNotIn("--secrets-file", UPLOAD) + self.assertIn("GITHUB_TOKEN: ${{ github.token }}", UPLOAD) for runtime_secret in [ "GITHUB_WEBHOOK_SECRET", "TURSO_PLATFORM_TOKEN", @@ -33,21 +47,38 @@ def test_upload_uses_cf_and_never_promotes_traffic(self): ]: self.assertNotIn(runtime_secret, UPLOAD) self.assertNotIn(runtime_secret, PROMOTE) - self.assertIn("environment: github-ci-cloudflare-upload", UPLOAD) - self.assertIn("if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main'", UPLOAD) - def test_promotion_is_manual_cf_only_and_verifies_provenance(self): + def test_promotion_requires_exact_upload_attempt_and_readback_receipts(self): self.assertIn("workflow_dispatch:", PROMOTE) - self.assertIn("version_id:", PROMOTE) + self.assertIn("default: false", PROMOTE) + self.assertNotIn("push:", PROMOTE) + self.assertIn("inputs.confirm_promotion == true", PROMOTE) self.assertIn("environment: github-ci-production", PROMOTE) - self.assertIn("if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main'", PROMOTE) - self.assertIn("cf -q workers versions get", PROMOTE) + self.assertIn("check-environment", PROMOTE) + for receipt_input in ("upload_run_id:", "upload_run_attempt:", "version_id:", "baseline_deployment_id:", "baseline_version_id:"): + self.assertIn(receipt_input, PROMOTE) + self.assertIn("actions/download-artifact@v8", PROMOTE) + self.assertIn("actions/runs/$UPLOAD_RUN_ID/attempts/$UPLOAD_RUN_ATTEMPT", PROMOTE) + self.assertIn("verify-upload-receipt", PROMOTE) + self.assertIn("cf workers versions get", PROMOTE) + self.assertIn("verify-baseline-current", PROMOTE) self.assertIn("git merge-base --is-ancestor", PROMOTE) - self.assertIn("cf -q workers deployments create", PROMOTE) - self.assertIn("cf -q workers deployments list", PROMOTE) - self.assertIn("verify-deployment", PROMOTE) + self.assertIn("cf workers deployments create", PROMOTE) + self.assertIn("cf workers deployments list", PROMOTE) + self.assertIn("verify-promotion-readback", PROMOTE) + self.assertIn("write-promotion-receipt", PROMOTE) + self.assertIn("actions/upload-artifact@v7", PROMOTE) + self.assertNotIn("wrangler deploy", PROMOTE) self.assertNotRegex(PROMOTE, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)") + def test_pinned_toolchain_is_separate_from_operator_package(self): + self.assertEqual(TOOLCHAIN["engines"]["node"], "24.22.0") + self.assertEqual(TOOLCHAIN["devDependencies"]["cf"], "1.0.0-rc.1") + self.assertEqual(TOOLCHAIN["devDependencies"]["wrangler"], "4.166.0") + self.assertEqual(WORKER_PACKAGE["scripts"]["deploy"], "wrangler deploy") + self.assertEqual(WORKER_PACKAGE["devDependencies"]["wrangler"], "4.59.1") + self.assertNotIn("cf", WORKER_PACKAGE["devDependencies"]) + if __name__ == "__main__": unittest.main() diff --git a/pkgs/github-ci/worker/test/deployment-guard.test.mjs b/pkgs/github-ci/worker/test/deployment-guard.test.mjs deleted file mode 100644 index 51a8c23b1c..0000000000 --- a/pkgs/github-ci/worker/test/deployment-guard.test.mjs +++ /dev/null @@ -1,138 +0,0 @@ -import assert from "node:assert/strict"; -import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; -import { tmpdir } from "node:os"; -import { join } from "node:path"; -import { spawnSync } from "node:child_process"; -import test from "node:test"; - -const SCRIPT = new URL("../scripts/deployment-guard.mjs", import.meta.url); -const SHA = "5f4dcc3b5aa765d61d8327deb882cf9921f7e3e0"; -const VERSION_ID = "01234567-89ab-cdef-0123-456789abcdef"; -const SECRET_NAMES = [ - "GITHUB_WEBHOOK_SECRET", - "TURSO_PLATFORM_TOKEN", - "TURSO_QUEUE_TOKEN", - "EVENTS_BROKER_TOKEN", - "EVENTS_BROKER_ACCESS_CLIENT_ID", - "EVENTS_BROKER_ACCESS_CLIENT_SECRET", -]; - -function candidate(overrides = {}) { - return { - id: VERSION_ID, - created_on: "2026-11-22T12:00:00.000Z", - annotations: { - "workers/tag": `git-${SHA.slice(0, 12)}`, - "workers/message": `github-ci candidate ${SHA}`, - }, - bindings: SECRET_NAMES.map((name) => ({ name, type: "secret_text" })), - ...overrides, - }; -} - -function run(root, args, env = {}) { - return spawnSync(process.execPath, [SCRIPT.pathname, ...args], { - cwd: root, - encoding: "utf8", - env: { ...process.env, ...env }, - }); -} - -test("upload selection binds the exact full commit tag/message and outputs an ID", (t) => { - const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); - t.after(() => rmSync(root, { recursive: true, force: true })); - const versionsPath = join(root, "versions.json"); - const outputPath = join(root, "output"); - const summaryPath = join(root, "summary"); - writeFileSync(versionsPath, JSON.stringify({ result: [candidate()] })); - const result = run(root, ["select-upload", versionsPath, SHA], { - GITHUB_OUTPUT: outputPath, - GITHUB_STEP_SUMMARY: summaryPath, - }); - assert.equal(result.status, 0, result.stderr); - assert.match(readFileSync(outputPath, "utf8"), new RegExp(`version_id=${VERSION_ID}`)); - assert.match(readFileSync(summaryPath, "utf8"), new RegExp(SHA)); - assert.notEqual(run(root, ["select-upload", versionsPath, "a".repeat(40)]).status, 0); -}); - -test("version read-back requires CI provenance and every secret binding by name", (t) => { - const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); - t.after(() => rmSync(root, { recursive: true, force: true })); - const versionPath = join(root, "version.json"); - const outputPath = join(root, "output"); - const summaryPath = join(root, "summary"); - writeFileSync(versionPath, JSON.stringify({ result: candidate() })); - const result = run(root, ["verify-version", versionPath, VERSION_ID, SHA], { - GITHUB_OUTPUT: outputPath, - GITHUB_STEP_SUMMARY: summaryPath, - }); - assert.equal(result.status, 0, result.stderr); - assert.match(readFileSync(outputPath, "utf8"), new RegExp(`source_sha=${SHA}`)); - - const droppedSecret = candidate({ bindings: candidate().bindings.slice(1) }); - writeFileSync(versionPath, JSON.stringify({ result: droppedSecret })); - assert.notEqual(run(root, ["verify-version", versionPath, VERSION_ID, SHA], { GITHUB_OUTPUT: outputPath }).status, 0); - - const wrongProvenance = candidate({ annotations: { "workers/tag": "manual", "workers/message": "manual" } }); - writeFileSync(versionPath, JSON.stringify({ result: wrongProvenance })); - assert.notEqual(run(root, ["verify-version", versionPath, VERSION_ID], { GITHUB_OUTPUT: outputPath }).status, 0); -}); - -test("version read-back accepts Cloudflare's env map shape without needing secret values", (t) => { - const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); - t.after(() => rmSync(root, { recursive: true, force: true })); - const versionPath = join(root, "version.json"); - const outputPath = join(root, "output"); - const summaryPath = join(root, "summary"); - const version = candidate({ - bindings: undefined, - env: Object.fromEntries(SECRET_NAMES.map((name) => [name, { type: "secret_text" }])), - }); - writeFileSync(versionPath, JSON.stringify({ success: true, result: version })); - const result = run(root, ["verify-version", versionPath, VERSION_ID, SHA], { - GITHUB_OUTPUT: outputPath, - GITHUB_STEP_SUMMARY: summaryPath, - }); - assert.equal(result.status, 0, result.stderr); - assert.doesNotMatch(readFileSync(summaryPath, "utf8"), /secret_text/); -}); - -test("promotion requires deployability and latest 100 percent read-back", (t) => { - const root = mkdtempSync(join(tmpdir(), "github-ci-guard-")); - t.after(() => rmSync(root, { recursive: true, force: true })); - const apiPath = join(root, "api.json"); - const outputPath = join(root, "output"); - const summaryPath = join(root, "summary"); - - writeFileSync(apiPath, JSON.stringify({ result: { items: [{ id: VERSION_ID }] } })); - assert.equal(run(root, ["verify-deployable", apiPath, VERSION_ID]).status, 0); - assert.notEqual(run(root, ["verify-deployable", apiPath, "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa"]).status, 0); - - writeFileSync(apiPath, JSON.stringify({ result: [{ - created_on: "2026-11-22T12:00:00.000Z", - versions: [{ version_id: VERSION_ID, percentage: 100 }], - }] })); - const ok = run(root, ["verify-deployment", apiPath, VERSION_ID, SHA], { - GITHUB_OUTPUT: outputPath, - GITHUB_STEP_SUMMARY: summaryPath, - }); - assert.equal(ok.status, 0, ok.stderr); - - writeFileSync(apiPath, JSON.stringify({ result: [ - { - created_on: "2026-11-22T12:01:00.000Z", - versions: [{ version_id: "aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa", percentage: 100 }], - }, - { - created_on: "2026-11-22T12:00:00.000Z", - versions: [{ version_id: VERSION_ID, percentage: 100 }], - }, - ] })); - assert.notEqual(run(root, ["verify-deployment", apiPath, VERSION_ID, SHA], { GITHUB_OUTPUT: outputPath }).status, 0); -}); - -test("CLI rejects unknown arguments before reading inputs", () => { - const result = run(process.cwd(), ["version", "--dry-rnu", "/does/not/exist"]); - assert.equal(result.status, 2); - assert.match(result.stderr, /Unknown option/); -}); diff --git a/pkgs/github-ci/worker/tsconfig.json b/pkgs/github-ci/worker/tsconfig.json index 61ea69ff3e..1545166c88 100644 --- a/pkgs/github-ci/worker/tsconfig.json +++ b/pkgs/github-ci/worker/tsconfig.json @@ -1,7 +1,6 @@ { "compilerOptions": { "forceConsistentCasingInFileNames": true, - "allowImportingTsExtensions": true, "lib": ["ES2022"], "module": "ESNext", "moduleResolution": "bundler", @@ -11,5 +10,5 @@ "target": "ES2022", "types": ["@cloudflare/workers-types", "@cloudflare/vitest-pool-workers/types"] }, - "include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts", "cloudflare.config.ts", ".cloudflare/types/**/*.d.ts"] + "include": ["src/**/*.ts", "test/**/*.ts", "vitest.config.ts"] } diff --git a/pkgs/github-ci/worker/vitest.config.ts b/pkgs/github-ci/worker/vitest.config.ts index d500eec2eb..9383506d69 100644 --- a/pkgs/github-ci/worker/vitest.config.ts +++ b/pkgs/github-ci/worker/vitest.config.ts @@ -5,9 +5,6 @@ import { defineConfig } from "vitest/config"; // as a Vite plugin; the old defineWorkersConfig + test.poolOptions.workers // shape (and the /config export it came from) no longer exists. export default defineConfig({ - test: { - include: ["test/**/*.test.ts"], - }, plugins: [ cloudflareTest({ wrangler: { configPath: "./wrangler.toml" }, From e486bc9b551e5e39a25dbc1fd18a589a34186168 Mon Sep 17 00:00:00 2001 From: Drewry Pope Date: Mon, 23 Nov 2026 08:47:58 +0000 Subject: [PATCH 5/5] github-ci: fail closed on deployment environment state --- .../test/deployment-guard.test.mjs | 146 +++++++++++++++--- .../workflows/github-ci-worker-promote.yml | 91 +++++++---- .github/workflows/github-ci-worker-upload.yml | 109 +++++++++---- pkgs/github-ci/worker/README.md | 35 +++-- .../worker/scripts/deployment-guard.mjs | 82 ++++++---- .../worker/test/deploy_workflows_test.py | 30 +++- 6 files changed, 368 insertions(+), 125 deletions(-) diff --git a/.github/worker-deploy-ci/test/deployment-guard.test.mjs b/.github/worker-deploy-ci/test/deployment-guard.test.mjs index df53e6e194..7b281aeb99 100644 --- a/.github/worker-deploy-ci/test/deployment-guard.test.mjs +++ b/.github/worker-deploy-ci/test/deployment-guard.test.mjs @@ -1,5 +1,5 @@ import assert from "node:assert/strict"; -import { mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; +import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs"; import { tmpdir } from "node:os"; import { join } from "node:path"; import { spawnSync } from "node:child_process"; @@ -13,6 +13,7 @@ const VERSION_ID = "01234567-89ab-cdef-0123-456789abcdef"; const BASELINE_VERSION_ID = "11234567-89ab-cdef-0123-456789abcdef"; const BASELINE_DEPLOYMENT_ID = "21234567-89ab-cdef-0123-456789abcdef"; const DEPLOYMENT_ID = "31234567-89ab-cdef-0123-456789abcdef"; +const BRANCH_POLICY_ID = 77; const SECRET_NAMES = [ "GITHUB_WEBHOOK_SECRET", "TURSO_PLATFORM_TOKEN", @@ -105,48 +106,104 @@ function uploadEnv(root) { }; } -test("environment check fails closed without required reviewers and exact main policy", (t) => { +test("detached environment gate requires reviewers, self-review prevention, no admin bypass, and typed main", (t) => { const root = temp(t); const environmentPath = join(root, "environment.json"); - const policiesPath = join(root, "policies.json"); - writeJson(environmentPath, { + const policyListPath = join(root, "policy-list.json"); + const policyPath = join(root, "policy.json"); + const environment = { name: "github-ci-production", - protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User", reviewer: { login: "reviewer" } }] }], + can_admins_bypass: false, + protection_rules: [{ + type: "required_reviewers", + prevent_self_review: true, + reviewers: [{ type: "User", reviewer: { id: 123, login: "reviewer" } }], + }], deployment_branch_policy: { protected_branches: false, custom_branch_policies: true }, - }); - writeJson(policiesPath, { branch_policies: [{ id: 1, name: "main" }] }); - assert.equal(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { - GITHUB_OUTPUT: join(root, "output"), - }).status, 0); + }; + writeJson(environmentPath, environment); + writeJson(policyListPath, { total_count: 1, branch_policies: [{ id: BRANCH_POLICY_ID, name: "main" }] }); + writeJson(policyPath, { id: BRANCH_POLICY_ID, name: "main", type: "branch" }); - writeJson(environmentPath, { name: "github-ci-production", protection_rules: [], deployment_branch_policy: { custom_branch_policies: true } }); - assert.notEqual(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { - GITHUB_OUTPUT: join(root, "output"), - }).status, 0); - writeJson(environmentPath, { - name: "github-ci-production", - protection_rules: [{ type: "required_reviewers", reviewers: [{ type: "User", reviewer: { login: "reviewer" } }] }], - deployment_branch_policy: { protected_branches: false, custom_branch_policies: true }, + const outputPath = join(root, "output"); + const selected = run(root, ["select-branch-policy", policyListPath], { GITHUB_OUTPUT: outputPath }); + assert.equal(selected.status, 0, selected.stderr); + assert.match(readFileSync(outputPath, "utf8"), new RegExp(`branch_policy_id=${BRANCH_POLICY_ID}`)); + const verified = run(root, ["check-environment", environmentPath, policyPath, "github-ci-production", String(BRANCH_POLICY_ID)], { + GITHUB_OUTPUT: outputPath, }); - writeJson(policiesPath, { branch_policies: [{ id: 1, name: "main" }, { id: 2, name: "release/*" }] }); - assert.notEqual(run(root, ["check-environment", environmentPath, policiesPath, "github-ci-production"], { - GITHUB_OUTPUT: join(root, "output"), - }).status, 0); + assert.equal(verified.status, 0, verified.stderr); + assert.match(readFileSync(outputPath, "utf8"), /environment_name=github-ci-production/); + + for (const badEnvironment of [ + { ...environment, protection_rules: [] }, + { ...environment, protection_rules: [{ ...environment.protection_rules[0], prevent_self_review: false }] }, + { ...environment, can_admins_bypass: true }, + { ...environment, can_admins_bypass: undefined }, + ]) { + writeJson(environmentPath, badEnvironment); + const failed = run(root, ["check-environment", environmentPath, policyPath, "github-ci-production", String(BRANCH_POLICY_ID)], { + GITHUB_OUTPUT: join(root, "failed-output"), + }); + assert.notEqual(failed.status, 0); + assert.equal(existsSync(join(root, "failed-output")), false, "failed gate must not emit an environment name"); + } + + writeJson(environmentPath, environment); + for (const badPolicy of [ + { id: BRANCH_POLICY_ID, name: "main", type: "tag" }, + { id: BRANCH_POLICY_ID + 1, name: "main", type: "branch" }, + { id: BRANCH_POLICY_ID, name: "release/*", type: "branch" }, + { id: BRANCH_POLICY_ID, name: "main" }, + ]) { + writeJson(policyPath, badPolicy); + assert.notEqual(run(root, ["check-environment", environmentPath, policyPath, "github-ci-production", String(BRANCH_POLICY_ID)], { + GITHUB_OUTPUT: join(root, "bad-policy-output"), + }).status, 0); + } + + writeJson(policyPath, { id: BRANCH_POLICY_ID, name: "main", type: "branch" }); + for (const badList of [ + { total_count: 0, branch_policies: [] }, + { total_count: 2, branch_policies: [{ id: BRANCH_POLICY_ID, name: "main" }, { id: 78, name: "main" }] }, + { total_count: 1, branch_policies: [{ id: BRANCH_POLICY_ID, name: "main" }, { id: 78, name: "main" }] }, + { total_count: 1, branch_policies: [{ id: BRANCH_POLICY_ID, name: "main" }] }, + ]) { + writeJson(policyListPath, badList); + const listOutput = join(root, "list-output"); + const failed = run(root, ["select-branch-policy", policyListPath], { GITHUB_OUTPUT: listOutput }); + if (badList.branch_policies.length !== 1 || badList.total_count !== 1) { + assert.notEqual(failed.status, 0); + assert.equal(existsSync(listOutput), false); + } else { + assert.equal(failed.status, 0, failed.stderr); + } + } }); test("baseline and uploaded candidate receipt preserve exact IDs, attempts, provenance, and binding names", (t) => { const root = temp(t); const baselinePath = join(root, "baseline-deployments.json"); const baselineVersionPath = join(root, "baseline-version.json"); + const createResponsePath = join(root, "create-response.json"); const candidatePath = join(root, "candidate-version.json"); const receiptPath = join(root, "upload-receipt.json"); const runPath = join(root, "run-attempt.json"); writeJson(baselinePath, { result: { deployments: [baselineDeployment()] } }); writeJson(baselineVersionPath, { result: version(BASELINE_VERSION_ID, "2026-11-22T11:59:00.000Z", { annotations: {} }) }); + writeJson(createResponsePath, { success: true, result: { id: VERSION_ID } }); writeJson(candidatePath, { result: version(VERSION_ID, "2026-11-22T12:05:00.000Z") }); const env = uploadEnv(root); - const written = run(root, ["write-upload-receipt", baselinePath, baselineVersionPath, candidatePath, receiptPath], env); + const selected = run(root, ["select-upload-result", createResponsePath], env); + assert.equal(selected.status, 0, selected.stderr); + assert.match(readFileSync(env.GITHUB_OUTPUT, "utf8"), new RegExp(`version_id=${VERSION_ID}`)); + + const invalidCreateResponsePath = join(root, "invalid-create-response.json"); + writeJson(invalidCreateResponsePath, { success: true, result: { metadata: {} } }); + assert.notEqual(run(root, ["select-upload-result", invalidCreateResponsePath], env).status, 0); + + const written = run(root, ["write-upload-receipt", baselinePath, baselineVersionPath, createResponsePath, candidatePath, receiptPath], env); assert.equal(written.status, 0, written.stderr); const receipt = JSON.parse(readFileSync(receiptPath, "utf8")); assert.equal(receipt.upload.run_id, RUN_ID); @@ -156,6 +213,9 @@ test("baseline and uploaded candidate receipt preserve exact IDs, attempts, prov assert.deepEqual(receipt.candidate.secret_bindings.map((binding) => binding.name), SECRET_NAMES); assert.doesNotMatch(readFileSync(receiptPath, "utf8"), /secret_text.*value|"value"/); + writeJson(invalidCreateResponsePath, { success: true, result: { id: BASELINE_VERSION_ID } }); + assert.notEqual(run(root, ["write-upload-receipt", baselinePath, baselineVersionPath, invalidCreateResponsePath, candidatePath, join(root, "wrong-create-receipt.json")], env).status, 0); + writeJson(runPath, { id: Number(RUN_ID), run_attempt: Number(RUN_ATTEMPT), @@ -176,6 +236,46 @@ test("baseline and uploaded candidate receipt preserve exact IDs, attempts, prov assert.notEqual(run(root, ["verify-upload-receipt", join(root, "missing.json"), runPath, RUN_ID, RUN_ATTEMPT, VERSION_ID, BASELINE_DEPLOYMENT_ID, BASELINE_VERSION_ID], env).status, 0); }); +test("strict inheritance is fenced to the serving baseline, not another latest upload", (t) => { + const root = temp(t); + const deploymentsPath = join(root, "deployments.json"); + const versionsPath = join(root, "versions.json"); + writeJson(deploymentsPath, { result: { deployments: [baselineDeployment()] } }); + writeJson(versionsPath, { + result: { + items: [ + { id: BASELINE_VERSION_ID, metadata: { created_on: "2026-11-22T11:59:00.000Z" } }, + ], + }, + }); + const match = run(root, ["verify-inheritance-source", deploymentsPath, versionsPath]); + assert.equal(match.status, 0, match.stderr); + + writeJson(versionsPath, { + result: { + items: [ + { id: VERSION_ID, metadata: { created_on: "2026-11-22T12:01:00.000Z" } }, + ], + }, + }); + const mismatch = run(root, ["verify-inheritance-source", deploymentsPath, versionsPath]); + assert.notEqual(mismatch.status, 0); + assert.match(mismatch.stderr, /latest uploaded Worker Version is not the currently serving production baseline/); + + writeJson(versionsPath, { result: { items: [] } }); + assert.notEqual(run(root, ["verify-inheritance-source", deploymentsPath, versionsPath]).status, 0); + + writeJson(versionsPath, { + result: { + items: [ + { id: BASELINE_VERSION_ID, metadata: { created_on: "2026-11-22T11:59:00.000Z" } }, + { id: VERSION_ID, metadata: { created_on: "2026-11-22T12:01:00.000Z" } }, + ], + }, + }); + assert.notEqual(run(root, ["verify-inheritance-source", deploymentsPath, versionsPath]).status, 0); +}); + test("version guards reject missing bindings and verify the existing active baseline", (t) => { const root = temp(t); const baselinePath = join(root, "baseline-deployments.json"); diff --git a/.github/workflows/github-ci-worker-promote.yml b/.github/workflows/github-ci-worker-promote.yml index d786a2ca6f..4f383c3c20 100644 --- a/.github/workflows/github-ci-worker-promote.yml +++ b/.github/workflows/github-ci-worker-promote.yml @@ -45,15 +45,15 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 5 outputs: - protected: ${{ steps.verify.outputs.protected }} + environment_name: ${{ steps.verify.outputs.environment_name }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.sha }} persist-credentials: false - - name: Check production environment protection without provider credentials - id: verify + - name: Read production environment and its only branch policy + id: policy env: GITHUB_TOKEN: ${{ github.token }} ENVIRONMENT_NAME: github-ci-production @@ -71,17 +71,36 @@ jobs: -H "X-GitHub-Api-Version: 2026-03-10" \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ > "$RUNNER_TEMP/production-branch-policies.json" + node pkgs/github-ci/worker/scripts/deployment-guard.mjs select-branch-policy \ + "$RUNNER_TEMP/production-branch-policies.json" + + - name: Verify production environment protection + id: verify + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-production + BRANCH_POLICY_ID: ${{ steps.policy.outputs.branch_policy_id }} + run: | + set -euo pipefail + [[ "$BRANCH_POLICY_ID" =~ ^[1-9][0-9]*$ ]] + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies/$BRANCH_POLICY_ID" \ + > "$RUNNER_TEMP/production-branch-policy.json" node pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ "$RUNNER_TEMP/production-environment.json" \ - "$RUNNER_TEMP/production-branch-policies.json" \ - "$ENVIRONMENT_NAME" + "$RUNNER_TEMP/production-branch-policy.json" \ + "$ENVIRONMENT_NAME" "$BRANCH_POLICY_ID" promote: needs: check-production-environment - if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_promotion == true && needs.check-production-environment.outputs.protected == 'true' + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_promotion == true && needs.check-production-environment.outputs.environment_name == 'github-ci-production' runs-on: ubuntu-24.04 timeout-minutes: 20 - environment: github-ci-production + environment: + name: ${{ needs.check-production-environment.outputs.environment_name }} defaults: run: working-directory: .github/worker-deploy-ci @@ -98,10 +117,11 @@ jobs: cache: npm cache-dependency-path: .github/worker-deploy-ci/package-lock.json - - name: Recheck protected environment before provider access + - name: Read production environment and its only branch policy + id: policy env: GITHUB_TOKEN: ${{ github.token }} - ENVIRONMENT_NAME: github-ci-production + ENVIRONMENT_NAME: ${{ needs.check-production-environment.outputs.environment_name }} run: | set -euo pipefail curl --fail --silent --show-error --max-time 15 \ @@ -116,10 +136,27 @@ jobs: -H "X-GitHub-Api-Version: 2026-03-10" \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ > "$RUNNER_TEMP/production-branch-policies.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-branch-policy \ + "$RUNNER_TEMP/production-branch-policies.json" + + - name: Recheck production environment protection before provider access + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: ${{ needs.check-production-environment.outputs.environment_name }} + BRANCH_POLICY_ID: ${{ steps.policy.outputs.branch_policy_id }} + run: | + set -euo pipefail + [[ "$BRANCH_POLICY_ID" =~ ^[1-9][0-9]*$ ]] + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies/$BRANCH_POLICY_ID" \ + > "$RUNNER_TEMP/production-branch-policy.json" node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ "$RUNNER_TEMP/production-environment.json" \ - "$RUNNER_TEMP/production-branch-policies.json" \ - "$ENVIRONMENT_NAME" + "$RUNNER_TEMP/production-branch-policy.json" \ + "$ENVIRONMENT_NAME" "$BRANCH_POLICY_ID" - name: Install the isolated pinned cf toolchain run: npm ci --ignore-scripts --no-audit --no-fund @@ -186,23 +223,23 @@ jobs: - name: Validate Cloudflare credential presence env: - CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CF_PROMOTION_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CF_PROMOTION_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} run: | set -euo pipefail - [[ "$CF_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] - [[ -n "$CF_API_TOKEN" ]] + [[ "$CF_PROMOTION_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] + [[ -n "$CF_PROMOTION_API_TOKEN" ]] - name: Require the existing Worker env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null - name: Read candidate version and verify provenance and secret bindings env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} VERSION_ID: ${{ steps.inputs.outputs.version_id }} SOURCE_SHA: ${{ steps.receipt.outputs.source_sha }} run: | @@ -222,8 +259,8 @@ jobs: - name: Fail if production baseline changed since upload env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} run: | set -euo pipefail ./node_modules/.bin/cf workers deployments list --worker github-ci \ @@ -234,22 +271,22 @@ jobs: - name: Require the selected version to be deployable env: - CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CF_PROMOTION_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CF_PROMOTION_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} VERSION_ID: ${{ steps.inputs.outputs.version_id }} run: | set -euo pipefail curl --fail --silent --show-error --max-time 15 \ - -H "Authorization: Bearer $CF_API_TOKEN" \ - "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ + -H "Authorization: Bearer $CF_PROMOTION_API_TOKEN" \ + "https://api.cloudflare.com/client/v4/accounts/$CF_PROMOTION_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ > "$RUNNER_TEMP/github-ci-deployable.json" node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-deployable \ "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" - name: Create a 100 percent deployment for the selected version env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_PROMOTION_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_PROMOTION_API_TOKEN }} VERSION_ID: ${{ steps.inputs.outputs.version_id }} run: | set -euo pipefail diff --git a/.github/workflows/github-ci-worker-upload.yml b/.github/workflows/github-ci-worker-upload.yml index ad1442bfe5..ce92206057 100644 --- a/.github/workflows/github-ci-worker-upload.yml +++ b/.github/workflows/github-ci-worker-upload.yml @@ -26,15 +26,15 @@ jobs: runs-on: ubuntu-24.04 timeout-minutes: 5 outputs: - protected: ${{ steps.verify.outputs.protected }} + environment_name: ${{ steps.verify.outputs.environment_name }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: ref: ${{ github.sha }} persist-credentials: false - - name: Check upload environment protection without provider credentials - id: verify + - name: Read upload environment and its only branch policy + id: policy env: GITHUB_TOKEN: ${{ github.token }} ENVIRONMENT_NAME: github-ci-cloudflare-upload @@ -52,17 +52,36 @@ jobs: -H "X-GitHub-Api-Version: 2026-03-10" \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ > "$RUNNER_TEMP/upload-branch-policies.json" + node pkgs/github-ci/worker/scripts/deployment-guard.mjs select-branch-policy \ + "$RUNNER_TEMP/upload-branch-policies.json" + + - name: Verify upload environment protection + id: verify + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: github-ci-cloudflare-upload + BRANCH_POLICY_ID: ${{ steps.policy.outputs.branch_policy_id }} + run: | + set -euo pipefail + [[ "$BRANCH_POLICY_ID" =~ ^[1-9][0-9]*$ ]] + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies/$BRANCH_POLICY_ID" \ + > "$RUNNER_TEMP/upload-branch-policy.json" node pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ "$RUNNER_TEMP/upload-environment.json" \ - "$RUNNER_TEMP/upload-branch-policies.json" \ - "$ENVIRONMENT_NAME" + "$RUNNER_TEMP/upload-branch-policy.json" \ + "$ENVIRONMENT_NAME" "$BRANCH_POLICY_ID" upload: needs: check-upload-environment - if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_upload == true && needs.check-upload-environment.outputs.protected == 'true' + if: github.repository == 'developing-today/code' && github.ref == 'refs/heads/main' && inputs.confirm_upload == true && needs.check-upload-environment.outputs.environment_name == 'github-ci-cloudflare-upload' runs-on: ubuntu-24.04 timeout-minutes: 25 - environment: github-ci-cloudflare-upload + environment: + name: ${{ needs.check-upload-environment.outputs.environment_name }} defaults: run: working-directory: .github/worker-deploy-ci @@ -80,10 +99,11 @@ jobs: pkgs/github-ci/worker/package-lock.json .github/worker-deploy-ci/package-lock.json - - name: Recheck protected environment before provider access + - name: Read upload environment and its only branch policy + id: policy env: GITHUB_TOKEN: ${{ github.token }} - ENVIRONMENT_NAME: github-ci-cloudflare-upload + ENVIRONMENT_NAME: ${{ needs.check-upload-environment.outputs.environment_name }} run: | set -euo pipefail curl --fail --silent --show-error --max-time 15 \ @@ -98,10 +118,27 @@ jobs: -H "X-GitHub-Api-Version: 2026-03-10" \ "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies" \ > "$RUNNER_TEMP/upload-branch-policies.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-branch-policy \ + "$RUNNER_TEMP/upload-branch-policies.json" + + - name: Recheck upload environment protection before provider access + env: + GITHUB_TOKEN: ${{ github.token }} + ENVIRONMENT_NAME: ${{ needs.check-upload-environment.outputs.environment_name }} + BRANCH_POLICY_ID: ${{ steps.policy.outputs.branch_policy_id }} + run: | + set -euo pipefail + [[ "$BRANCH_POLICY_ID" =~ ^[1-9][0-9]*$ ]] + curl --fail --silent --show-error --max-time 15 \ + -H "Accept: application/vnd.github+json" \ + -H "Authorization: Bearer $GITHUB_TOKEN" \ + -H "X-GitHub-Api-Version: 2026-03-10" \ + "$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/environments/$ENVIRONMENT_NAME/deployment-branch-policies/$BRANCH_POLICY_ID" \ + > "$RUNNER_TEMP/upload-branch-policy.json" node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs check-environment \ "$RUNNER_TEMP/upload-environment.json" \ - "$RUNNER_TEMP/upload-branch-policies.json" \ - "$ENVIRONMENT_NAME" + "$RUNNER_TEMP/upload-branch-policy.json" \ + "$ENVIRONMENT_NAME" "$BRANCH_POLICY_ID" - name: Install unchanged Worker package dependencies working-directory: pkgs/github-ci/worker @@ -137,24 +174,24 @@ jobs: - name: Validate Cloudflare credential presence env: - CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CF_UPLOAD_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CF_UPLOAD_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} run: | set -euo pipefail - [[ "$CF_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] - [[ -n "$CF_API_TOKEN" ]] + [[ "$CF_UPLOAD_ACCOUNT_ID" =~ ^[0-9a-fA-F]{32}$ ]] + [[ -n "$CF_UPLOAD_API_TOKEN" ]] - name: Require the existing Worker env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} run: ./node_modules/.bin/cf -q workers get github-ci >/dev/null - name: Select the current production baseline id: select-baseline env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} run: | set -euo pipefail ./node_modules/.bin/cf workers deployments list --worker github-ci \ @@ -165,8 +202,8 @@ jobs: - name: Verify the active baseline retains every required secret binding id: baseline env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} BASELINE_VERSION_ID: ${{ steps.select-baseline.outputs.baseline_version_id }} run: | set -euo pipefail @@ -179,26 +216,29 @@ jobs: - name: Upload immutable Workers Version only id: upload env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} run: | set -euo pipefail tag="git-${GITHUB_SHA:0:12}" + ./node_modules/.bin/cf workers versions list --worker github-ci --page 1 --per-page 1 \ + > "$RUNNER_TEMP/github-ci-versions-before-upload.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-inheritance-source \ + "$RUNNER_TEMP/github-ci-baseline-deployments.json" \ + "$RUNNER_TEMP/github-ci-versions-before-upload.json" ./node_modules/.bin/cf workers versions create \ --worker github-ci \ --tag "$tag" \ --message "github-ci candidate ${GITHUB_SHA}" \ --prebuilt \ - > /dev/null - ./node_modules/.bin/cf workers versions list --worker github-ci \ - > "$RUNNER_TEMP/github-ci-versions.json" - node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-upload \ - "$RUNNER_TEMP/github-ci-versions.json" "$GITHUB_SHA" + > "$RUNNER_TEMP/github-ci-upload-create-response.json" + node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs select-upload-result \ + "$RUNNER_TEMP/github-ci-upload-create-response.json" - name: Read back exact candidate and verify retained binding names env: - CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CLOUDFLARE_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CLOUDFLARE_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} VERSION_ID: ${{ steps.upload.outputs.version_id }} run: | set -euo pipefail @@ -209,14 +249,14 @@ jobs: - name: Require the candidate to be deployable env: - CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }} - CF_API_TOKEN: ${{ secrets.CF_API_TOKEN }} + CF_UPLOAD_ACCOUNT_ID: ${{ secrets.CF_UPLOAD_ACCOUNT_ID }} + CF_UPLOAD_API_TOKEN: ${{ secrets.CF_UPLOAD_API_TOKEN }} VERSION_ID: ${{ steps.upload.outputs.version_id }} run: | set -euo pipefail curl --fail --silent --show-error --max-time 15 \ - -H "Authorization: Bearer $CF_API_TOKEN" \ - "https://api.cloudflare.com/client/v4/accounts/$CF_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ + -H "Authorization: Bearer $CF_UPLOAD_API_TOKEN" \ + "https://api.cloudflare.com/client/v4/accounts/$CF_UPLOAD_ACCOUNT_ID/workers/scripts/github-ci/versions?deployable=true" \ > "$RUNNER_TEMP/github-ci-deployable.json" node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs verify-deployable \ "$RUNNER_TEMP/github-ci-deployable.json" "$VERSION_ID" @@ -228,6 +268,7 @@ jobs: node ../../pkgs/github-ci/worker/scripts/deployment-guard.mjs write-upload-receipt \ "$RUNNER_TEMP/github-ci-baseline-deployments.json" \ "$RUNNER_TEMP/github-ci-baseline-version.json" \ + "$RUNNER_TEMP/github-ci-upload-create-response.json" \ "$RUNNER_TEMP/github-ci-candidate-version.json" \ "$RUNNER_TEMP/github-ci-upload-receipt.json" diff --git a/pkgs/github-ci/worker/README.md b/pkgs/github-ci/worker/README.md index 1913c34783..8582b88242 100644 --- a/pkgs/github-ci/worker/README.md +++ b/pkgs/github-ci/worker/README.md @@ -84,18 +84,29 @@ candidate Version UUID, and the baseline Deployment and Version UUIDs from that upload receipt. It confirms the selected run succeeded on `main`, the production baseline has not changed, and the newest Cloudflare Deployment read-back serves the selected candidate at 100%. -Both workflows publish receipts with run, attempt, source, candidate, -baseline, and deployment identifiers. - -Each workflow fails before provider access unless its GitHub environment -exists, has required reviewers, and allows exactly the `main` branch. -Store `CF_ACCOUNT_ID` and `CF_API_TOKEN` as environment secrets in -`github-ci-cloudflare-upload` and `github-ci-production`; use Cloudflare -tokens scoped to the `github-ci` Worker. The upload checks that the Worker -already exists. It also checks the active baseline and uploaded candidate -for all six required secret binding names. Receipt files contain binding -names and types only; secret values are never read or copied by these -workflows. +The upload reads the exact Version UUID from the pinned `cf` create +response and binds it to the run-attempt receipt. Before creating a +candidate, it requires the latest uploaded Version to equal the currently +serving baseline; `cf` strict binding inheritance resolves against the +latest uploaded Version. Both workflows publish receipts with run, +attempt, source, candidate, baseline, and deployment identifiers. + +Each workflow first runs a detached read-only gate. It requires required +reviewers, self-review prevention, disabled administrator bypass, and +exactly one typed `branch:main` deployment policy. Only after that check +does the deployment job bind to the environment name emitted by the gate. +GitHub's published branch-policy read response documents only `id`, +`node_id`, and `name`; the gate requires `type: branch` and stops if GitHub +does not return that field. Resolve that API evidence gap before dispatching +either workflow. +Store `CF_UPLOAD_ACCOUNT_ID` and `CF_UPLOAD_API_TOKEN` only as environment +secrets in `github-ci-cloudflare-upload`; store +`CF_PROMOTION_ACCOUNT_ID` and `CF_PROMOTION_API_TOKEN` only as environment +secrets in `github-ci-production`. Use Cloudflare tokens scoped to the +`github-ci` Worker. The upload checks that the Worker already exists. It +also checks the active baseline and uploaded candidate for all six required +secret binding names. Receipt files contain binding names and types only; +secret values are never read or copied by these workflows. The existing operator `npm run deploy` command and Wrangler configuration remain unchanged. This is the GitHub CI webhook Worker, not diff --git a/pkgs/github-ci/worker/scripts/deployment-guard.mjs b/pkgs/github-ci/worker/scripts/deployment-guard.mjs index c624ffa378..eb6cb6c52e 100644 --- a/pkgs/github-ci/worker/scripts/deployment-guard.mjs +++ b/pkgs/github-ci/worker/scripts/deployment-guard.mjs @@ -26,7 +26,7 @@ const POSITIVE_INTEGER = /^[1-9][0-9]*$/; function usage() { throw new Error( - "usage: deployment-guard.mjs build | check-environment | select-upload | select-baseline | verify-baseline | verify-version [commit-sha] | verify-deployable | write-upload-receipt | verify-upload-receipt | verify-baseline-current | verify-created-deployment | verify-promotion-readback | write-promotion-receipt ", + "usage: deployment-guard.mjs build | select-branch-policy | check-environment | select-baseline | verify-baseline | verify-inheritance-source | select-upload-result | verify-version [commit-sha] | verify-deployable | write-upload-receipt | verify-upload-receipt | verify-baseline-current | verify-created-deployment | verify-promotion-readback | write-promotion-receipt ", ); } @@ -145,26 +145,42 @@ function checkBuild(root) { console.log("Build Output v1 has the expected Worker, ingress, production vars, and value-free secret declarations."); } -function checkEnvironment(environmentPath, policiesPath, expectedName) { +function selectBranchPolicy(path) { + const response = unwrap(readJson(path)); + const policies = response?.branch_policies; + if (!Array.isArray(policies) || policies.length !== 1 || response.total_count !== 1) { + throw new Error("environment must have exactly one deployment branch policy"); + } + const policy = policies[0]; + if (policy?.name !== "main" || !Number.isSafeInteger(policy.id) || policy.id < 1) { + throw new Error("environment must have one identified main deployment branch policy"); + } + reportOutput({ branch_policy_id: policy.id }, `Selected the only deployment policy ID for main (${policy.id}).`); +} + +function checkEnvironment(environmentPath, policyPath, expectedName, expectedPolicyId) { const environment = readJson(environmentPath); - const policiesResponse = readJson(policiesPath); + const policy = unwrap(readJson(policyPath)); if (environment?.name !== expectedName) throw new Error(`required environment ${expectedName} is missing`); const rules = environment.protection_rules; - const hasReviewers = Array.isArray(rules) && rules.some((rule) => - rule.type === "required_reviewers" && Array.isArray(rule.reviewers) && rule.reviewers.length > 0, + const reviewerRules = Array.isArray(rules) ? rules.filter((rule) => rule.type === "required_reviewers") : []; + const reviewerRule = reviewerRules[0]; + const hasReviewer = Array.isArray(reviewerRule?.reviewers) && reviewerRule.reviewers.some((entry) => + ["User", "Team"].includes(entry?.type) && Number.isSafeInteger(entry?.reviewer?.id) && entry.reviewer.id > 0, ); - if (!hasReviewers) throw new Error(`${expectedName} has no required-reviewer protection rule`); + if (reviewerRules.length !== 1 || !hasReviewer) throw new Error(`${expectedName} must have exactly one valid required-reviewer protection rule`); + if (reviewerRule.prevent_self_review !== true) throw new Error(`${expectedName} must prevent self-review`); + if (environment.can_admins_bypass !== false) throw new Error(`${expectedName} must disallow administrator bypass`); const branchPolicy = environment.deployment_branch_policy; if (branchPolicy?.protected_branches !== false || branchPolicy?.custom_branch_policies !== true) { throw new Error(`${expectedName} must restrict deployments with a custom branch policy`); } - const policies = policiesResponse?.branch_policies; - if (!Array.isArray(policies) || policies.length !== 1 || policies[0]?.name !== "main") { - throw new Error(`${expectedName} must allow exactly the main branch`); + if (!POSITIVE_INTEGER.test(String(expectedPolicyId)) || String(policy.id) !== String(expectedPolicyId) || policy.name !== "main" || policy.type !== "branch") { + throw new Error(`${expectedName} must have exactly the selected policy as type branch with name main`); } reportOutput( - { protected: "true" }, - `Confirmed ${expectedName} exists with required reviewers and an exact main deployment branch policy.`, + { environment_name: expectedName }, + `Confirmed ${expectedName} has required reviewers, self-review prevention, no administrator bypass, and exactly the selected branch:main policy.`, ); } @@ -206,17 +222,26 @@ function verifyBaseline(deploymentsPath, versionPath) { ); } -function selectUpload(path, sha) { - if (!COMMIT_SHA.test(sha)) throw new Error("upload commit must be a full Git commit SHA"); - const tag = `git-${sha.slice(0, 12)}`; - const versions = rows(readJson(path), "versions"); - const candidates = versions.filter((version) => - annotation(version, "workers/tag") === tag && annotation(version, "workers/message") === `github-ci candidate ${sha}`, - ); - if (!candidates.length) throw new Error("uploaded version with exact commit tag and message was not listed"); - const version = newest(candidates, "candidate versions"); - if (!VERSION_ID.test(version.id ?? "")) throw new Error("selected upload did not have a Cloudflare Version UUID"); - reportOutput({ version_id: version.id }, `Uploaded immutable candidate ${version.id} from commit ${sha}; traffic was unchanged.`); +function verifyInheritanceSource(deploymentsPath, versionsPath) { + const baseline = deploymentRecord(deploymentsPath); + const versions = rows(readJson(versionsPath), "uploaded Worker Versions"); + if (versions.length !== 1) { + throw new Error("inheritance-source check must contain only the first latest Worker Version from page 1"); + } + const latestUploaded = versions[0]; + createdOn(latestUploaded, "latest uploaded Worker Version"); + if (!VERSION_ID.test(latestUploaded.id ?? "")) throw new Error("latest uploaded Worker Version has no Cloudflare Version UUID"); + if (latestUploaded.id !== baseline.version_id) { + throw new Error("latest uploaded Worker Version is not the currently serving production baseline; strict secret inheritance would use another version"); + } + console.log(`Latest uploaded Worker Version ${latestUploaded.id} matches serving baseline ${baseline.version_id}.`); +} + +function selectUploadResult(path) { + const response = unwrap(readJson(path)); + const versionId = response?.id; + if (!VERSION_ID.test(versionId ?? "")) throw new Error("cf Workers Version create response is missing its exact Version UUID"); + reportOutput({ version_id: versionId }, `Captured exact Workers Version UUID ${versionId} from the cf create response.`); } function verifyVersion(path, requestedId, expectedSha) { @@ -257,15 +282,18 @@ function assertUploadRuntime() { return { sourceSha, runId, attempt: Number(attempt), workflowRef }; } -function writeUploadReceipt(baselineDeploymentsPath, baselineVersionPath, candidatePath, outputPath) { +function writeUploadReceipt(baselineDeploymentsPath, baselineVersionPath, createResponsePath, candidatePath, outputPath) { const runtime = assertUploadRuntime(); const baseline = deploymentRecord(baselineDeploymentsPath); const baselineVersion = versionRecord(baselineVersionPath); if (baselineVersion.version.id !== baseline.version_id) throw new Error("baseline version read-back does not match the active deployment"); assertSecrets(baselineVersion.version); + const createResponse = unwrap(readJson(createResponsePath)); + if (!VERSION_ID.test(createResponse?.id ?? "")) throw new Error("cf Workers Version create response is missing its exact Version UUID"); const candidateRecord = versionRecord(candidatePath); const candidate = candidateRecord.version; + if (candidate.id !== createResponse.id) throw new Error("candidate read-back does not match the exact Version UUID returned by cf create"); if (candidate.id === baseline.version_id) throw new Error("uploaded candidate is the same version as the baseline"); if (candidateRecord.created_at_ms <= baseline.created_at_ms) throw new Error("uploaded candidate is not newer than its production baseline"); const candidateSha = commitFrom(candidate); @@ -499,8 +527,9 @@ function main() { const parsed = parseArgs({ args: process.argv.slice(2), options: {}, allowPositionals: true, strict: true }); const [command, ...args] = parsed.positionals; if (command === "build" && args.length === 1) return checkBuild(args[0]); - if (command === "check-environment" && args.length === 3) return checkEnvironment(args[0], args[1], args[2]); - if (command === "select-upload" && args.length === 2) return selectUpload(args[0], args[1]); + if (command === "select-branch-policy" && args.length === 1) return selectBranchPolicy(args[0]); + if (command === "check-environment" && args.length === 4) return checkEnvironment(args[0], args[1], args[2], args[3]); + if (command === "select-upload-result" && args.length === 1) return selectUploadResult(args[0]); if (command === "select-baseline" && args.length === 1) { const baseline = deploymentRecord(args[0]); reportOutput( @@ -510,9 +539,10 @@ function main() { return; } if (command === "verify-baseline" && args.length === 2) return verifyBaseline(args[0], args[1]); + if (command === "verify-inheritance-source" && args.length === 2) return verifyInheritanceSource(args[0], args[1]); if (command === "verify-version" && (args.length === 2 || args.length === 3)) return verifyVersion(args[0], args[1], args[2]); if (command === "verify-deployable" && args.length === 2) return verifyDeployable(args[0], args[1]); - if (command === "write-upload-receipt" && args.length === 4) return writeUploadReceipt(args[0], args[1], args[2], args[3]); + if (command === "write-upload-receipt" && args.length === 5) return writeUploadReceipt(args[0], args[1], args[2], args[3], args[4]); if (command === "verify-upload-receipt" && args.length === 7) return verifyUploadRun(...args); if (command === "verify-baseline-current" && args.length === 2) return verifyBaselineCurrent(args[0], args[1]); if (command === "verify-created-deployment" && args.length === 2) return verifyCreatedDeployment(args[0], args[1]); diff --git a/pkgs/github-ci/worker/test/deploy_workflows_test.py b/pkgs/github-ci/worker/test/deploy_workflows_test.py index 8c90925913..4f91de6b78 100644 --- a/pkgs/github-ci/worker/test/deploy_workflows_test.py +++ b/pkgs/github-ci/worker/test/deploy_workflows_test.py @@ -19,13 +19,23 @@ def test_upload_is_manual_default_off_cf_only_and_never_promotes(self): self.assertIn("default: false", UPLOAD) self.assertNotIn("push:", UPLOAD) self.assertIn("inputs.confirm_upload == true", UPLOAD) - self.assertIn("environment: github-ci-cloudflare-upload", UPLOAD) + self.assertIn("name: ${{ needs.check-upload-environment.outputs.environment_name }}", UPLOAD) + self.assertNotIn("environment: github-ci-cloudflare-upload", UPLOAD) + self.assertIn("steps.verify.outputs.environment_name", UPLOAD) self.assertIn("check-environment", UPLOAD) + self.assertIn("select-branch-policy", UPLOAD) + self.assertIn("deployment-branch-policies/$BRANCH_POLICY_ID", UPLOAD) self.assertIn("node-version: 24.22.0", UPLOAD) self.assertIn("npm run build", UPLOAD) self.assertIn("cf workers versions create", UPLOAD) self.assertIn("--prebuilt --dry-run", UPLOAD) - self.assertIn("workers versions list --worker github-ci", UPLOAD) + self.assertIn("workers versions list --worker github-ci --page 1 --per-page 1", UPLOAD) + self.assertIn("verify-inheritance-source", UPLOAD) + self.assertIn("select-upload-result", UPLOAD) + self.assertIn("github-ci-upload-create-response.json", UPLOAD) + self.assertLess(UPLOAD.index("verify-inheritance-source"), UPLOAD.index("cf workers versions create")) + self.assertLess(UPLOAD.index("cf workers versions create"), UPLOAD.index("select-upload-result")) + self.assertNotIn("select-upload \\", UPLOAD) self.assertIn("versions get", UPLOAD) self.assertIn("select-baseline", UPLOAD) self.assertIn("verify-baseline", UPLOAD) @@ -37,6 +47,11 @@ def test_upload_is_manual_default_off_cf_only_and_never_promotes(self): self.assertNotRegex(UPLOAD, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)") self.assertNotIn("--secrets-file", UPLOAD) self.assertIn("GITHUB_TOKEN: ${{ github.token }}", UPLOAD) + self.assertIn("secrets.CF_UPLOAD_ACCOUNT_ID", UPLOAD) + self.assertIn("secrets.CF_UPLOAD_API_TOKEN", UPLOAD) + self.assertNotIn("secrets.CF_PROMOTION_", UPLOAD) + self.assertNotIn("secrets.CF_ACCOUNT_ID", UPLOAD) + self.assertNotIn("secrets.CF_API_TOKEN", UPLOAD) for runtime_secret in [ "GITHUB_WEBHOOK_SECRET", "TURSO_PLATFORM_TOKEN", @@ -53,8 +68,12 @@ def test_promotion_requires_exact_upload_attempt_and_readback_receipts(self): self.assertIn("default: false", PROMOTE) self.assertNotIn("push:", PROMOTE) self.assertIn("inputs.confirm_promotion == true", PROMOTE) - self.assertIn("environment: github-ci-production", PROMOTE) + self.assertIn("name: ${{ needs.check-production-environment.outputs.environment_name }}", PROMOTE) + self.assertNotIn("environment: github-ci-production", PROMOTE) + self.assertIn("steps.verify.outputs.environment_name", PROMOTE) self.assertIn("check-environment", PROMOTE) + self.assertIn("select-branch-policy", PROMOTE) + self.assertIn("deployment-branch-policies/$BRANCH_POLICY_ID", PROMOTE) for receipt_input in ("upload_run_id:", "upload_run_attempt:", "version_id:", "baseline_deployment_id:", "baseline_version_id:"): self.assertIn(receipt_input, PROMOTE) self.assertIn("actions/download-artifact@v8", PROMOTE) @@ -67,6 +86,11 @@ def test_promotion_requires_exact_upload_attempt_and_readback_receipts(self): self.assertIn("cf workers deployments list", PROMOTE) self.assertIn("verify-promotion-readback", PROMOTE) self.assertIn("write-promotion-receipt", PROMOTE) + self.assertIn("secrets.CF_PROMOTION_ACCOUNT_ID", PROMOTE) + self.assertIn("secrets.CF_PROMOTION_API_TOKEN", PROMOTE) + self.assertNotIn("secrets.CF_UPLOAD_", PROMOTE) + self.assertNotIn("secrets.CF_ACCOUNT_ID", PROMOTE) + self.assertNotIn("secrets.CF_API_TOKEN", PROMOTE) self.assertIn("actions/upload-artifact@v7", PROMOTE) self.assertNotIn("wrangler deploy", PROMOTE) self.assertNotRegex(PROMOTE, r"(?m)^\s*(?:npx\s+)?(?:\./node_modules/\.bin/)?wrangler(?:\s|$)")