diff --git a/.changeset/dependabot-update-13993.md b/.changeset/dependabot-update-13993.md deleted file mode 100644 index 025beb1d8f..0000000000 --- a/.changeset/dependabot-update-13993.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -"miniflare": patch -"wrangler": patch ---- - -Update dependencies of "miniflare", "wrangler" - -The following dependency versions have been updated: - -| Dependency | From | To | -| ---------- | ------------ | ------------ | -| workerd | 1.20260520.1 | 1.20260521.1 | diff --git a/.changeset/fix-vitest-pool-workers-external-list.md b/.changeset/fix-vitest-pool-workers-external-list.md deleted file mode 100644 index adf382ffb0..0000000000 --- a/.changeset/fix-vitest-pool-workers-external-list.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@cloudflare/vitest-pool-workers": patch ---- - -Derive bundler externals from `package.json` and shrink the published bundle - -The bundler's `external` list was previously hand-maintained and out of sync with `package.json` — `undici` and `semver` were both listed as external despite being only `devDependencies`. The published `dist/pool/index.mjs` consequently contained a top-level `import { fetch } from "undici"` that was only resolvable because pnpm happened to hoist `undici` from other packages' devDependencies during local development. - -The bundler now derives its `external` list from `dependencies` + `peerDependencies` in `package.json`, making it impossible for a `devDependency` to silently end up externalized. - -Combined with the new `"sideEffects": false` declaration in `@cloudflare/workers-utils`, the unused `cloudflared` / `tunnel` exports (and their transitive `undici` import) are now tree-shaken out of the pool entirely. `dist/pool/index.mjs` no longer references `undici` at all, and shrinks from ~489 KB to ~125 KB. diff --git a/.changeset/fix-workers-utils-sideeffects-undici.md b/.changeset/fix-workers-utils-sideeffects-undici.md deleted file mode 100644 index 3722024446..0000000000 --- a/.changeset/fix-workers-utils-sideeffects-undici.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"@cloudflare/workers-utils": patch ---- - -Mark `@cloudflare/workers-utils` as side-effect-free and properly declare `undici` as a runtime dependency - -The package now declares `"sideEffects": false` in its `package.json` so that downstream bundlers can tree-shake unused exports. In particular, consumers that only use a subset of the package (for example, `getTodaysCompatDate` from the main entry) will no longer carry the `cloudflared` / `tunnel` exports — or their transitive dependencies — in their final bundle. - -`undici` has been moved from `devDependencies` to `dependencies`. Previously it was incorrectly listed as a devDependency while the bundler config marked it as external, leaving the published `dist/index.mjs` with an unresolved `import { fetch } from "undici"` for anyone installing the package directly. `undici` is deliberately kept external (rather than bundled) so that downstream consumers don't end up with two copies of `undici` in their bundle — which would break `instanceof Request`/`Response`/`Headers` checks across the boundary and prevent `setGlobalDispatcher` / proxy configuration from applying to the bundled copy. - -`vitest` has been added as an optional `peerDependency` because the `./test-helpers` sub-export uses `vitest`'s `vi`, `beforeEach`, and `afterEach` APIs at runtime; consumers that import from `./test-helpers` must have `vitest` installed themselves. diff --git a/.changeset/fuzzy-cameras-peel.md b/.changeset/fuzzy-cameras-peel.md deleted file mode 100644 index 84f30d816f..0000000000 --- a/.changeset/fuzzy-cameras-peel.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"miniflare": patch ---- - -Fix TCP requests failing when `outboundService` is configured - -Workers using `outboundService` can now open TCP connections with `cloudflare:sockets`. Previously, TCP requests could throw an error when a custom outbound service was configured. diff --git a/.changeset/include-column-names-d1-export.md b/.changeset/include-column-names-d1-export.md deleted file mode 100644 index 8afd2008c1..0000000000 --- a/.changeset/include-column-names-d1-export.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"wrangler": patch ---- - -Include column names in D1 SQL export INSERT statements - -D1 SQL exports now include column names in INSERT statements (e.g., `INSERT INTO "table" ("col1","col2") VALUES(...)`). This ensures that exported SQL can be successfully imported even when the target table has columns in a different order than the original, which commonly occurs during iterative development when schemas evolve. diff --git a/.changeset/workflows-schedule.md b/.changeset/workflows-schedule.md deleted file mode 100644 index 91e780b247..0000000000 --- a/.changeset/workflows-schedule.md +++ /dev/null @@ -1,40 +0,0 @@ ---- -"wrangler": minor ---- - -Add `schedule` property to Workflow bindings for cron-based triggering - -> **Note:** This is a configuration-only change. Scheduled triggering of Workflow instances is not yet available — adding `schedule` to a Workflow binding will not result in scheduled invocations at this time. This change lays the groundwork for an upcoming feature. - -Workflow bindings in `wrangler.json` now accept an optional `schedule` field that configures one or more cron expressions to automatically trigger new workflow instances on a schedule. - -```jsonc -// wrangler.json -{ - "workflows": [ - { - "binding": "MY_WORKFLOW", - "name": "my-workflow", - "class_name": "MyWorkflow", - "schedule": "0 9 * * 1", - }, - ], -} -``` - -Multiple schedules can be provided as an array: - -```jsonc -{ - "workflows": [ - { - "binding": "MY_WORKFLOW", - "name": "my-workflow", - "class_name": "MyWorkflow", - "schedule": ["0 9 * * 1", "0 17 * * 5"], - }, - ], -} -``` - -The schedule is sent to the Workflows control plane on `wrangler deploy`. Configuring `schedule` on a workflow binding that references an external `script_name` is an error — the schedule must be configured on the worker that defines the workflow. diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 279bbe4655..4b8ac47b36 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -10,6 +10,10 @@ updates: day: "sunday" time: "06:00" versioning-strategy: increase + # Match the 24h minimumReleaseAge enforced by pnpm in pnpm-workspace.yaml + # so Dependabot doesn't open PRs that CI will then reject. + cooldown: + default-days: 1 # the following is used to add the [C3] prefix to the PR title, # we override the commit message but setting a prefix like this # makes it so that also the PR title gets such prefix diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 157a9afa0d..fabdeaaa23 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -45,13 +45,16 @@ jobs: if: steps.meta.outputs.dependency-group == 'workerd-and-workers-types' env: PR_NUMBER: ${{ github.event.pull_request.number }} + REPO: ${{ github.repository }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | set -euo pipefail - # Pull commits and changed files via the GitHub API. - commits_json=$(gh pr view "$PR_NUMBER" --json commits) - files_json=$(gh pr view "$PR_NUMBER" --json files) + # Pull commits and changed files via the GitHub API. `--repo` is + # required because this workflow runs without `actions/checkout`, + # so `gh` has no git remote to infer the repo from. + commits_json=$(gh pr view --repo "$REPO" "$PR_NUMBER" --json commits) + files_json=$(gh pr view --repo "$REPO" "$PR_NUMBER" --json files) fail() { echo "verified=false" >> "$GITHUB_OUTPUT" @@ -83,7 +86,7 @@ jobs: # `gh pr view --json commits` doesn't expose signature info, so look # it up via the REST commit endpoint. - first_verified=$(gh api "repos/${{ github.repository }}/commits/$first_oid" --jq '.commit.verification.verified') + first_verified=$(gh api "repos/$REPO/commits/$first_oid" --jq '.commit.verification.verified') if [ "$first_verified" != "true" ]; then fail "first commit (Dependabot) does not have a verified signature" fi diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md index ad8e88c29a..d9c505af80 100644 --- a/packages/cli/CHANGELOG.md +++ b/packages/cli/CHANGELOG.md @@ -1,5 +1,12 @@ # @cloudflare/cli +## 0.1.4 + +### Patch Changes + +- Updated dependencies [[`90092c0`](https://github.com/cloudflare/workers-sdk/commit/90092c0bca526e2e08a25fe7969534426eb6fd9f)]: + - @cloudflare/workers-utils@0.21.1 + ## 0.1.3 ### Patch Changes diff --git a/packages/cli/package.json b/packages/cli/package.json index b96f7c7b0b..67a4d893b3 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/cli-shared-helpers", - "version": "0.1.3", + "version": "0.1.4", "description": "Internal shared CLI helpers for workers-sdk. Not intended for external use — APIs may change without notice.", "keywords": [ "cli", diff --git a/packages/miniflare/CHANGELOG.md b/packages/miniflare/CHANGELOG.md index 5270d819e4..c7947d2d4f 100644 --- a/packages/miniflare/CHANGELOG.md +++ b/packages/miniflare/CHANGELOG.md @@ -1,5 +1,21 @@ # miniflare +## 4.20260521.0 + +### Patch Changes + +- [#13993](https://github.com/cloudflare/workers-sdk/pull/13993) [`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260520.1 | 1.20260521.1 | + +- [#13999](https://github.com/cloudflare/workers-sdk/pull/13999) [`30657e1`](https://github.com/cloudflare/workers-sdk/commit/30657e1db097135d97209c3ae0cc623fc66827b9) Thanks [@edmundhung](https://github.com/edmundhung)! - Fix TCP requests failing when `outboundService` is configured + + Workers using `outboundService` can now open TCP connections with `cloudflare:sockets`. Previously, TCP requests could throw an error when a custom outbound service was configured. + ## 4.20260520.0 ### Patch Changes diff --git a/packages/miniflare/package.json b/packages/miniflare/package.json index d180350d31..949ebe5123 100644 --- a/packages/miniflare/package.json +++ b/packages/miniflare/package.json @@ -1,6 +1,6 @@ { "name": "miniflare", - "version": "4.20260520.0", + "version": "4.20260521.0", "description": "Fun, full-featured, fully-local simulator for Cloudflare Workers", "keywords": [ "cloudflare", diff --git a/packages/mock-npm-registry/src/index.ts b/packages/mock-npm-registry/src/index.ts index dad3d876fc..f3efe3b663 100644 --- a/packages/mock-npm-registry/src/index.ts +++ b/packages/mock-npm-registry/src/index.ts @@ -76,6 +76,24 @@ export async function startMockNpmRegistry(...targetPackages: string[]) { "npm_config_registry", `http://localhost:${registryPort}` ); + // `pnpm run` exports `npm_config_minimum_release_age` from the workspace + // pnpm-workspace.yaml to subprocess env vars, but does NOT export the + // matching `minimumReleaseAgeExclude` array. Tests using this mock registry + // install freshly-published first-party packages, so the 24h cooldown would + // reject them. Set the exclude list as a comma-separated env var so the + // constraint still applies to other (third-party) deps pulled via uplinks. + const revert_npm_config_minimum_release_age_exclude = overrideProcessEnv( + "npm_config_minimum_release_age_exclude", + [ + ...pkgs.keys(), + // workerd and @cloudflare/workers-types are pulled in transitively + // (e.g. via miniflare) and may have been bumped same-day. Keep this + // list in sync with `minimumReleaseAgeExclude` in pnpm-workspace.yaml. + "workerd", + "@cloudflare/workerd-*", + "@cloudflare/workers-types", + ].join(",") + ); if (debugLog.enabled) { debugLog("Updated"); @@ -105,6 +123,7 @@ export async function startMockNpmRegistry(...targetPackages: string[]) { revert_NPM_CONFIG_USERCONFIG(); revert_npm_config_registry(); revert_npm_config_userconfig(); + revert_npm_config_minimum_release_age_exclude(); if (debugLog.enabled) { debugLog("After"); debugLog(execSync("pnpm config list", { encoding: "utf8" })); diff --git a/packages/pages-shared/CHANGELOG.md b/packages/pages-shared/CHANGELOG.md index def1b8de20..ea4beeb7e7 100644 --- a/packages/pages-shared/CHANGELOG.md +++ b/packages/pages-shared/CHANGELOG.md @@ -1,5 +1,12 @@ # @cloudflare/pages-shared +## 0.13.139 + +### Patch Changes + +- Updated dependencies [[`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8), [`30657e1`](https://github.com/cloudflare/workers-sdk/commit/30657e1db097135d97209c3ae0cc623fc66827b9)]: + - miniflare@4.20260521.0 + ## 0.13.138 ### Patch Changes diff --git a/packages/pages-shared/package.json b/packages/pages-shared/package.json index acaa3759b9..5f7f426fea 100644 --- a/packages/pages-shared/package.json +++ b/packages/pages-shared/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/pages-shared", - "version": "0.13.138", + "version": "0.13.139", "repository": { "type": "git", "url": "https://github.com/cloudflare/workers-sdk.git", diff --git a/packages/vite-plugin-cloudflare/CHANGELOG.md b/packages/vite-plugin-cloudflare/CHANGELOG.md index b661fe128d..a9e9d6678a 100644 --- a/packages/vite-plugin-cloudflare/CHANGELOG.md +++ b/packages/vite-plugin-cloudflare/CHANGELOG.md @@ -1,5 +1,21 @@ # @cloudflare/vite-plugin +## 1.38.0 + +### Minor Changes + +- [#13989](https://github.com/cloudflare/workers-sdk/pull/13989) [`f598eac`](https://github.com/cloudflare/workers-sdk/commit/f598eac72bcdf838ba890bcbd100e99ee8fac17f) Thanks [@MattieTK](https://github.com/MattieTK)! - Print a QR code alongside the tunnel URL when sharing via Cloudflare Tunnel + + When a tunnel is started (via `wrangler dev --tunnel` or the Vite plugin with `tunnel: true`), a scannable QR code is now printed to the terminal beneath the tunnel URL. This makes it easy to open the tunnel on a mobile device without manually copying the URL. + + The QR code uses Unicode block characters for a compact representation and is generated best-effort -- if generation fails for any reason, the tunnel URL is still displayed as before. + +### Patch Changes + +- Updated dependencies [[`52e9082`](https://github.com/cloudflare/workers-sdk/commit/52e9082e32d7bffaeca92f27ab472b56964ba2bb), [`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8), [`fc1f7b9`](https://github.com/cloudflare/workers-sdk/commit/fc1f7b977908b78a4379d1d7b261ca7c69022ba3), [`30657e1`](https://github.com/cloudflare/workers-sdk/commit/30657e1db097135d97209c3ae0cc623fc66827b9), [`8c569c6`](https://github.com/cloudflare/workers-sdk/commit/8c569c6232588594e7a48219bbd020955f5fd5a4), [`f598eac`](https://github.com/cloudflare/workers-sdk/commit/f598eac72bcdf838ba890bcbd100e99ee8fac17f), [`3a1fbed`](https://github.com/cloudflare/workers-sdk/commit/3a1fbed5988efe03ae50cc502eff6a4785728396)]: + - wrangler@4.94.0 + - miniflare@4.20260521.0 + ## 1.37.3 ### Patch Changes diff --git a/packages/vite-plugin-cloudflare/package.json b/packages/vite-plugin-cloudflare/package.json index dc661c26db..908a5fdf13 100644 --- a/packages/vite-plugin-cloudflare/package.json +++ b/packages/vite-plugin-cloudflare/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vite-plugin", - "version": "1.37.3", + "version": "1.38.0", "description": "Cloudflare plugin for Vite", "keywords": [ "cloudflare", @@ -68,6 +68,7 @@ "mlly": "^1.7.4", "open": "catalog:default", "picocolors": "^1.1.1", + "qr": "^0.6.0", "semver": "^7.7.1", "tinyglobby": "catalog:default", "tree-kill": "catalog:default", diff --git a/packages/vite-plugin-cloudflare/src/plugins/tunnel.ts b/packages/vite-plugin-cloudflare/src/plugins/tunnel.ts index a9652f92fd..8e663f550d 100644 --- a/packages/vite-plugin-cloudflare/src/plugins/tunnel.ts +++ b/packages/vite-plugin-cloudflare/src/plugins/tunnel.ts @@ -2,6 +2,7 @@ import { startTunnel } from "@cloudflare/workers-utils"; import getPort from "get-port"; import { buildPublicUrl } from "miniflare"; import colors from "picocolors"; +import encodeQR from "qr"; import * as wrangler from "wrangler"; import { assertIsNotPreview, assertIsPreview } from "../context"; import { debuglog, createPlugin } from "../utils"; @@ -539,6 +540,17 @@ function patchPrintUrls(server: vite.ViteDevServer | vite.PreviewServer) { } } + // Print a QR code for the first tunnel URL so it can be scanned from a mobile device + const primaryUrl = publicUrls[0]; + if (primaryUrl) { + try { + const qrCode = encodeQR(primaryUrl, "ascii", { border: 1 }); + server.config.logger.info(`\n${qrCode}`); + } catch { + // QR generation is best-effort; don't disrupt the dev session if it fails + } + } + // Add an extra newline after the URLs to improve readability server.config.logger.info(""); }; diff --git a/packages/vitest-pool-workers/CHANGELOG.md b/packages/vitest-pool-workers/CHANGELOG.md index 71fccaa8f4..e0de51d651 100644 --- a/packages/vitest-pool-workers/CHANGELOG.md +++ b/packages/vitest-pool-workers/CHANGELOG.md @@ -1,5 +1,21 @@ # @cloudflare/vitest-pool-workers +## 0.16.9 + +### Patch Changes + +- [#13933](https://github.com/cloudflare/workers-sdk/pull/13933) [`90092c0`](https://github.com/cloudflare/workers-sdk/commit/90092c0bca526e2e08a25fe7969534426eb6fd9f) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Derive bundler externals from `package.json` and shrink the published bundle + + The bundler's `external` list was previously hand-maintained and out of sync with `package.json` — `undici` and `semver` were both listed as external despite being only `devDependencies`. The published `dist/pool/index.mjs` consequently contained a top-level `import { fetch } from "undici"` that was only resolvable because pnpm happened to hoist `undici` from other packages' devDependencies during local development. + + The bundler now derives its `external` list from `dependencies` + `peerDependencies` in `package.json`, making it impossible for a `devDependency` to silently end up externalized. + + Combined with the new `"sideEffects": false` declaration in `@cloudflare/workers-utils`, the unused `cloudflared` / `tunnel` exports (and their transitive `undici` import) are now tree-shaken out of the pool entirely. `dist/pool/index.mjs` no longer references `undici` at all, and shrinks from ~489 KB to ~125 KB. + +- Updated dependencies [[`52e9082`](https://github.com/cloudflare/workers-sdk/commit/52e9082e32d7bffaeca92f27ab472b56964ba2bb), [`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8), [`fc1f7b9`](https://github.com/cloudflare/workers-sdk/commit/fc1f7b977908b78a4379d1d7b261ca7c69022ba3), [`30657e1`](https://github.com/cloudflare/workers-sdk/commit/30657e1db097135d97209c3ae0cc623fc66827b9), [`8c569c6`](https://github.com/cloudflare/workers-sdk/commit/8c569c6232588594e7a48219bbd020955f5fd5a4), [`f598eac`](https://github.com/cloudflare/workers-sdk/commit/f598eac72bcdf838ba890bcbd100e99ee8fac17f), [`3a1fbed`](https://github.com/cloudflare/workers-sdk/commit/3a1fbed5988efe03ae50cc502eff6a4785728396)]: + - wrangler@4.94.0 + - miniflare@4.20260521.0 + ## 0.16.8 ### Patch Changes diff --git a/packages/vitest-pool-workers/package.json b/packages/vitest-pool-workers/package.json index 47e24ce2d4..a26fe2cc6a 100644 --- a/packages/vitest-pool-workers/package.json +++ b/packages/vitest-pool-workers/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/vitest-pool-workers", - "version": "0.16.8", + "version": "0.16.9", "description": "Workers Vitest integration for writing Vitest unit and integration tests that run inside the Workers runtime", "keywords": [ "cloudflare", diff --git a/packages/workers-utils/CHANGELOG.md b/packages/workers-utils/CHANGELOG.md index f0b4e32640..6da6542d14 100644 --- a/packages/workers-utils/CHANGELOG.md +++ b/packages/workers-utils/CHANGELOG.md @@ -1,5 +1,17 @@ # @cloudflare/workers-utils +## 0.21.1 + +### Patch Changes + +- [#13933](https://github.com/cloudflare/workers-sdk/pull/13933) [`90092c0`](https://github.com/cloudflare/workers-sdk/commit/90092c0bca526e2e08a25fe7969534426eb6fd9f) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Mark `@cloudflare/workers-utils` as side-effect-free and properly declare `undici` as a runtime dependency + + The package now declares `"sideEffects": false` in its `package.json` so that downstream bundlers can tree-shake unused exports. In particular, consumers that only use a subset of the package (for example, `getTodaysCompatDate` from the main entry) will no longer carry the `cloudflared` / `tunnel` exports — or their transitive dependencies — in their final bundle. + + `undici` has been moved from `devDependencies` to `dependencies`. Previously it was incorrectly listed as a devDependency while the bundler config marked it as external, leaving the published `dist/index.mjs` with an unresolved `import { fetch } from "undici"` for anyone installing the package directly. `undici` is deliberately kept external (rather than bundled) so that downstream consumers don't end up with two copies of `undici` in their bundle — which would break `instanceof Request`/`Response`/`Headers` checks across the boundary and prevent `setGlobalDispatcher` / proxy configuration from applying to the bundled copy. + + `vitest` has been added as an optional `peerDependency` because the `./test-helpers` sub-export uses `vitest`'s `vi`, `beforeEach`, and `afterEach` APIs at runtime; consumers that import from `./test-helpers` must have `vitest` installed themselves. + ## 0.21.0 ### Minor Changes diff --git a/packages/workers-utils/package.json b/packages/workers-utils/package.json index 58ef2ae998..b4be794db8 100644 --- a/packages/workers-utils/package.json +++ b/packages/workers-utils/package.json @@ -1,6 +1,6 @@ { "name": "@cloudflare/workers-utils", - "version": "0.21.0", + "version": "0.21.1", "description": "Internal utility package for workers-sdk. Not intended for external use — APIs may change without notice.", "homepage": "https://github.com/cloudflare/workers-sdk/tree/main/packages/workers-utils#readme", "bugs": { diff --git a/packages/wrangler/CHANGELOG.md b/packages/wrangler/CHANGELOG.md index 76388b6ec4..bd1261ceaa 100644 --- a/packages/wrangler/CHANGELOG.md +++ b/packages/wrangler/CHANGELOG.md @@ -1,5 +1,81 @@ # wrangler +## 4.94.0 + +### Minor Changes + +- [#13897](https://github.com/cloudflare/workers-sdk/pull/13897) [`52e9082`](https://github.com/cloudflare/workers-sdk/commit/52e9082e32d7bffaeca92f27ab472b56964ba2bb) Thanks [@dario-piotrowicz](https://github.com/dario-piotrowicz)! - Add automatic Cloudflare skills installation for AI coding agents + + Wrangler now detects AI coding agents and offers to install Cloudflare skill files from the `cloudflare/skills` GitHub repository. Users are prompted once interactively; subsequent runs skip the prompt. Use `--install-skills` to install without prompting. + +- [#13989](https://github.com/cloudflare/workers-sdk/pull/13989) [`f598eac`](https://github.com/cloudflare/workers-sdk/commit/f598eac72bcdf838ba890bcbd100e99ee8fac17f) Thanks [@MattieTK](https://github.com/MattieTK)! - Print a QR code alongside the tunnel URL when sharing via Cloudflare Tunnel + + When a tunnel is started (via `wrangler dev --tunnel` or the Vite plugin with `tunnel: true`), a scannable QR code is now printed to the terminal beneath the tunnel URL. This makes it easy to open the tunnel on a mobile device without manually copying the URL. + + The QR code uses Unicode block characters for a compact representation and is generated best-effort -- if generation fails for any reason, the tunnel URL is still displayed as before. + +- [#13467](https://github.com/cloudflare/workers-sdk/pull/13467) [`3a1fbed`](https://github.com/cloudflare/workers-sdk/commit/3a1fbed5988efe03ae50cc502eff6a4785728396) Thanks [@deloreyj](https://github.com/deloreyj)! - Add `schedule` property to Workflow bindings for cron-based triggering + + > **Note:** This is a configuration-only change. Scheduled triggering of Workflow instances is not yet available — adding `schedule` to a Workflow binding will not result in scheduled invocations at this time. This change lays the groundwork for an upcoming feature. + + Workflow bindings in `wrangler.json` now accept an optional `schedule` field that configures one or more cron expressions to automatically trigger new workflow instances on a schedule. + + ```jsonc + // wrangler.json + { + "workflows": [ + { + "binding": "MY_WORKFLOW", + "name": "my-workflow", + "class_name": "MyWorkflow", + "schedule": "0 9 * * 1" + } + ] + } + ``` + + Multiple schedules can be provided as an array: + + ```jsonc + { + "workflows": [ + { + "binding": "MY_WORKFLOW", + "name": "my-workflow", + "class_name": "MyWorkflow", + "schedule": ["0 9 * * 1", "0 17 * * 5"] + } + ] + } + ``` + + The schedule is sent to the Workflows control plane on `wrangler deploy`. Configuring `schedule` on a workflow binding that references an external `script_name` is an error — the schedule must be configured on the worker that defines the workflow. + +### Patch Changes + +- [#13993](https://github.com/cloudflare/workers-sdk/pull/13993) [`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8) Thanks [@dependabot](https://github.com/apps/dependabot)! - Update dependencies of "miniflare", "wrangler" + + The following dependency versions have been updated: + + | Dependency | From | To | + | ---------- | ------------ | ------------ | + | workerd | 1.20260520.1 | 1.20260521.1 | + +- [#14008](https://github.com/cloudflare/workers-sdk/pull/14008) [`fc1f7b9`](https://github.com/cloudflare/workers-sdk/commit/fc1f7b977908b78a4379d1d7b261ca7c69022ba3) Thanks [@petebacondarwin](https://github.com/petebacondarwin)! - Fix Access Service Token authentication for applications that only allow service tokens + + When using remote bindings against a Worker behind a Cloudflare Access application configured to only allow Service Auth tokens (no interactive user authentication), Wrangler previously ignored the `CLOUDFLARE_ACCESS_CLIENT_ID` and `CLOUDFLARE_ACCESS_CLIENT_SECRET` environment variables and the request would fail with a 403. + + This happened because Wrangler detects Access by looking for a 302 redirect to `cloudflareaccess.com`. A service-auth-only Access application has no interactive login path, so it responds with a hard 403 instead of redirecting. Wrangler concluded the domain was not behind Access and skipped attaching the service token headers entirely. + + The env-var check now runs before the Access detection step, so the configured service token credentials are always used when present. + +- [#12277](https://github.com/cloudflare/workers-sdk/pull/12277) [`8c569c6`](https://github.com/cloudflare/workers-sdk/commit/8c569c6232588594e7a48219bbd020955f5fd5a4) Thanks [@penalosa](https://github.com/penalosa)! - Include column names in D1 SQL export INSERT statements + + D1 SQL exports now include column names in INSERT statements (e.g., `INSERT INTO "table" ("col1","col2") VALUES(...)`). This ensures that exported SQL can be successfully imported even when the target table has columns in a different order than the original, which commonly occurs during iterative development when schemas evolve. + +- Updated dependencies [[`0733688`](https://github.com/cloudflare/workers-sdk/commit/07336888e0bc82925e4023f5b72a0062f10d77b8), [`30657e1`](https://github.com/cloudflare/workers-sdk/commit/30657e1db097135d97209c3ae0cc623fc66827b9)]: + - miniflare@4.20260521.0 + ## 4.93.1 ### Patch Changes diff --git a/packages/wrangler/package.json b/packages/wrangler/package.json index e71fe13f2b..b11f23fd19 100644 --- a/packages/wrangler/package.json +++ b/packages/wrangler/package.json @@ -1,6 +1,6 @@ { "name": "wrangler", - "version": "4.93.1", + "version": "4.94.0", "description": "Command-line interface for all things Cloudflare Workers", "keywords": [ "assembly", @@ -71,6 +71,7 @@ "esbuild": "catalog:default", "miniflare": "workspace:*", "path-to-regexp": "6.3.0", + "rosie-skills": "^0.6.3", "unenv": "2.0.0-rc.24", "workerd": "1.20260521.1" }, @@ -145,6 +146,7 @@ "patch-console": "^1.0.0", "pretty-bytes": "^6.0.0", "prompts": "^2.4.2", + "qr": "^0.6.0", "recast": "0.23.11", "resolve": "^1.22.8", "semiver": "^1.1.0", diff --git a/packages/wrangler/scripts/deps.ts b/packages/wrangler/scripts/deps.ts index 2f90199540..006f02c570 100644 --- a/packages/wrangler/scripts/deps.ts +++ b/packages/wrangler/scripts/deps.ts @@ -35,6 +35,10 @@ export const EXTERNAL_DEPENDENCIES = [ // workerd contains a native binary, so must be external. Wrangler depends on a pinned version. "workerd", + + // rosie-skills contains inlined WASM that is loaded at runtime via import.meta.url-relative + // path resolution, so it cannot be bundled. + "rosie-skills", ]; /** diff --git a/packages/wrangler/src/__tests__/access.test.ts b/packages/wrangler/src/__tests__/access.test.ts index da611448ae..c2eec32944 100644 --- a/packages/wrangler/src/__tests__/access.test.ts +++ b/packages/wrangler/src/__tests__/access.test.ts @@ -25,6 +25,20 @@ describe("access", () => { expect(await domainUsesAccess("access-protected.com")).toBeTruthy(); expect(await domainUsesAccess("not-access-protected.com")).toBeFalsy(); }); + + it("should return false when the domain responds with a 403 (service-auth-only Access app)", async ({ + expect, + }) => { + // When an Access application is configured to only allow Service + // Auth tokens, the domain responds with a hard 403 instead of + // redirecting to cloudflareaccess.com, so this detection method + // cannot recognise it as Access-protected. This is why + // `getAccessHeaders` must check the env vars before calling + // `domainUsesAccess`. + expect( + await domainUsesAccess("access-service-auth-only.com") + ).toBeFalsy(); + }); }); describe("getAccessHeaders", () => { @@ -50,6 +64,26 @@ describe("access", () => { expect(std.warn).toMatchInlineSnapshot(`""`); }); + it("should return service token headers for a service-auth-only domain (403 response)", async ({ + expect, + }) => { + // Regression test: when the Access application is configured to + // only allow Service Auth tokens, the domain responds with a + // hard 403 instead of redirecting to cloudflareaccess.com. + // `domainUsesAccess` returns false in this case, so the env var + // check must happen first - otherwise Wrangler would return + // empty headers and the request would fail with a 403. + vi.stubEnv("CLOUDFLARE_ACCESS_CLIENT_ID", "test-client-id.access"); + vi.stubEnv("CLOUDFLARE_ACCESS_CLIENT_SECRET", "test-client-secret"); + + const headers = await getAccessHeaders("access-service-auth-only.com"); + expect(headers).toEqual({ + "CF-Access-Client-Id": "test-client-id.access", + "CF-Access-Client-Secret": "test-client-secret", + }); + expect(std.warn).toMatchInlineSnapshot(`""`); + }); + it("should warn when only CLOUDFLARE_ACCESS_CLIENT_ID is set", async ({ expect, }) => { diff --git a/packages/wrangler/src/__tests__/agents-skills-install.test.ts b/packages/wrangler/src/__tests__/agents-skills-install.test.ts new file mode 100644 index 0000000000..ec9151f6b7 --- /dev/null +++ b/packages/wrangler/src/__tests__/agents-skills-install.test.ts @@ -0,0 +1,571 @@ +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { getGlobalWranglerConfigPath } from "@cloudflare/workers-utils"; +import { runInTempDir } from "@cloudflare/workers-utils/test-helpers"; +import ci from "ci-info"; +import { afterEach, beforeEach, describe, test, vi } from "vitest"; +import { sendMetricsEvent } from "../metrics/send-event"; +import { mockConsoleMethods } from "./helpers/mock-console"; +import { clearDialogs, mockConfirm } from "./helpers/mock-dialogs"; +import { useMockIsTTY } from "./helpers/mock-istty"; +import type { maybeInstallCloudflareSkillsGlobally as InstallFnType } from "../agents-skills-install"; +import type * as SendEventModule from "../metrics/send-event"; + +// Undo the global no-op mock from vitest.setup.ts so we test the real implementation +vi.unmock("../agents-skills-install"); + +// Mock rosie-skills to avoid real network/WASM calls. +const mockRosieInstall = vi.fn(); +const mockRosieAgents = vi.fn(); +vi.mock("rosie-skills", () => ({ + install: mockRosieInstall, + agents: mockRosieAgents, +})); + +// Mock sendMetricsEvent so we can verify metrics are sent for each code path. +vi.mock("../metrics/send-event", async (importOriginal) => { + const original = await importOriginal(); + return { + ...original, + sendMetricsEvent: vi.fn(), + }; +}); + +/** Default rosie.agents() return value: Claude Code detected, Cursor not detected. */ +const DEFAULT_AGENTS = [ + { + name: "claude", + display: "Claude Code", + detected: true, + installPath: "/fake/.claude/skills", + }, + { + name: "cursor", + display: "Cursor", + detected: false, + installPath: null, + }, +]; + +/** Default rosie.install() return value matching a successful single-agent install. */ +const DEFAULT_INSTALL_RESULT = { + skills: [ + { + name: "cloudflare", + kind: "skill" as const, + installedAgents: ["claude"], + failedAgents: [], + }, + ], + installedAgents: ["claude"], + failedAgents: [], + installedInstruction: null, +}; + +/** Writes the skills-install metadata file to the global wrangler config path. */ +function writeMetadataFile(content: Record): void { + const configDir = getGlobalWranglerConfigPath(); + mkdirSync(configDir, { recursive: true }); + writeFileSync( + path.join(configDir, "agents-skills-install.jsonc"), + JSON.stringify(content) + ); +} + +/** Reads and parses the skills-install metadata file. */ +function readMetadataFile(): Record { + const filePath = path.join( + getGlobalWranglerConfigPath(), + "agents-skills-install.jsonc" + ); + return JSON.parse(readFileSync(filePath, "utf8")); +} + +/** + * Re-imports the agents-skills-install module with a fresh module graph. + * This is necessary because tests need a clean module state after mocks + * are reconfigured per test. + */ +async function freshImport(): Promise { + vi.resetModules(); + const mod = await import("../agents-skills-install"); + return mod.maybeInstallCloudflareSkillsGlobally; +} + +describe("maybeInstallCloudflareSkillsGlobally", () => { + runInTempDir(); + const std = mockConsoleMethods(); + const { setIsTTY } = useMockIsTTY(); + + beforeEach(() => { + setIsTTY(true); + mockRosieAgents.mockResolvedValue(DEFAULT_AGENTS); + mockRosieInstall.mockResolvedValue(DEFAULT_INSTALL_RESULT); + }); + + afterEach(() => { + clearDialogs(); + }); + + describe("skip conditions", () => { + test("skips silently when metadata file exists and sends no metrics", async ({ + expect, + }) => { + writeMetadataFile({ accepted: true, date: "2025-01-01T00:00:00Z" }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieAgents).not.toHaveBeenCalled(); + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).not.toHaveBeenCalled(); + }); + + test("force=true ignores existing metadata file", async ({ expect }) => { + writeMetadataFile({ accepted: true, date: "2025-01-01T00:00:00Z" }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + expect(mockRosieInstall).toHaveBeenCalledWith("cloudflare/skills", { + global: true, + agent: ["claude"], + lockfile: false, + }); + expect(std.out).toContain( + "Successfully installed Cloudflare skills for: Claude Code." + ); + }); + + test("skips and sends skills_install_skipped when no agents are detected", async ({ + expect, + }) => { + mockRosieAgents.mockResolvedValueOnce([ + { + name: "claude", + display: "Claude Code", + detected: false, + installPath: null, + }, + ]); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "No supported agents detected" }, + {} + ); + }); + + test("skips and sends skills_install_skipped when rosie.agents() returns empty", async ({ + expect, + }) => { + mockRosieAgents.mockResolvedValueOnce([]); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "No supported agents detected" }, + {} + ); + }); + + test("warns and sends skills_install_skipped when rosie.install() throws", async ({ + expect, + }) => { + mockRosieInstall.mockRejectedValueOnce(new Error("network failure")); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + // force=true so we don't need to mock the confirm dialog + await maybeInstallCloudflareSkillsGlobally(true); + + expect(std.warn).toContain( + "Failed to install Cloudflare skills: network failure" + ); + expect(std.warn).toContain( + "You can retry by running `wrangler --install-skills`, or install skills manually as described here: https://github.com/cloudflare/skills#installing" + ); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "Failed to install skills" }, + {} + ); + }); + + test("sends skills_install_skipped with errorMessage when rosie.agents() throws", async ({ + expect, + }) => { + mockRosieAgents.mockRejectedValueOnce(new Error("WASM load failed")); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { + reason: "Failed to install skills", + errorMessage: "WASM load failed", + }, + {} + ); + }); + + test("skips in CI and sends skills_install_skipped when ci.isCI is true", async ({ + expect, + }) => { + vi.mocked(ci).isCI = true; + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + // Verify neither agent detection nor install was attempted + expect(mockRosieAgents).not.toHaveBeenCalled(); + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "Running in CI" }, + {} + ); + }); + + test("force=true bypasses CI check and installs skills", async ({ + expect, + }) => { + vi.mocked(ci).isCI = true; + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + expect(mockRosieInstall).toHaveBeenCalledWith("cloudflare/skills", { + global: true, + agent: ["claude"], + lockfile: false, + }); + }); + + test("logs info and sends skills_install_skipped when TTY is false", async ({ + expect, + }) => { + setIsTTY(false); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(std.out).toContain( + "Cloudflare agent skills are available for: Claude Code" + ); + // Verify no install call was made + expect(mockRosieInstall).not.toHaveBeenCalled(); + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "Non-interactive terminal" }, + {} + ); + }); + }); + + describe("user prompt interaction", () => { + test("writes metadata, sends skills_install_skipped, and does not install when user declines", async ({ + expect, + }) => { + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: false, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + // must not log a success message when the user declined + expect(std.out).not.toContain( + "Successfully installed Cloudflare skills for:" + ); + + // must not call rosie.install when user declined + expect(mockRosieInstall).not.toHaveBeenCalled(); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(false); + expect(metadata.date).toBeDefined(); + + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_skipped", + { reason: "User declined" }, + {} + ); + }); + + test("calls rosie.install, logs success, and sends skills_install_completed when user accepts", async ({ + expect, + }) => { + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: true, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieInstall).toHaveBeenCalledWith("cloudflare/skills", { + global: true, + agent: ["claude"], + lockfile: false, + }); + + expect(std.out).toContain( + "Successfully installed Cloudflare skills for: Claude Code." + ); + + expect(sendMetricsEvent).toHaveBeenCalledWith( + "skills_install_completed", + { + agents: [ + { + name: "Claude Code", + rosieId: "claude", + globalSkillsPath: "/fake/.claude/skills", + }, + ], + }, + {} + ); + }); + + test("force=true installs skills without prompting", async ({ expect }) => { + // No mockConfirm — if a prompt fires, the test will fail with "Unexpected call to prompts" + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + expect(mockRosieInstall).toHaveBeenCalledWith("cloudflare/skills", { + global: true, + agent: ["claude"], + lockfile: false, + }); + + expect(std.out).toContain( + "Successfully installed Cloudflare skills for: Claude Code." + ); + }); + }); + + describe("multiple agents", () => { + test("detects and installs skills for multiple agents", async ({ + expect, + }) => { + mockRosieAgents.mockResolvedValueOnce([ + { + name: "claude", + display: "Claude Code", + detected: true, + installPath: "/fake/.claude/skills", + }, + { + name: "cursor", + display: "Cursor", + detected: true, + installPath: "/fake/.cursor/skills", + }, + ]); + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: true, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + expect(mockRosieInstall).toHaveBeenCalledWith("cloudflare/skills", { + global: true, + agent: ["claude", "cursor"], + lockfile: false, + }); + + expect(std.out).toContain( + "Successfully installed Cloudflare skills for: Claude Code, Cursor." + ); + }); + }); + + describe("install failure", () => { + test("writes metadata with installFailed when rosie.install() throws", async ({ + expect, + }) => { + mockRosieInstall.mockRejectedValueOnce( + new Error("tarball download failed") + ); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + expect(std.warn).toContain( + "Failed to install Cloudflare skills: tarball download failed" + ); + expect(std.warn).toContain( + "You can retry by running `wrangler --install-skills`, or install skills manually as described here: https://github.com/cloudflare/skills#installing" + ); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(true); + expect(metadata.installFailed).toBe(true); + }); + + test("success message excludes agents that failed", async ({ expect }) => { + mockRosieAgents.mockResolvedValueOnce([ + { + name: "claude", + display: "Claude Code", + detected: true, + installPath: "/fake/.claude/skills", + }, + { + name: "cursor", + display: "Cursor", + detected: true, + installPath: "/fake/.cursor/skills", + }, + ]); + mockRosieInstall.mockResolvedValueOnce({ + skills: [ + { + name: "cloudflare", + kind: "skill", + installedAgents: ["claude"], + failedAgents: ["cursor"], + }, + ], + installedAgents: ["claude"], + failedAgents: ["cursor"], + installedInstruction: null, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + // Success message should only mention succeeded agents + expect(std.out).toContain( + "Successfully installed Cloudflare skills for: Claude Code." + ); + expect(std.out).not.toContain("Cursor"); + + // Warning should mention the failed agent and retry hint + expect(std.warn).toContain( + "Skills installation failed for agents: cursor." + ); + expect(std.warn).toContain( + "You can retry by running `wrangler --install-skills`, or install skills manually as described here: https://github.com/cloudflare/skills#installing" + ); + }); + }); + + describe("metadata file", () => { + test("writes metadata file with correct content when user accepts", async ({ + expect, + }) => { + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: true, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(true); + expect(metadata.date).toMatch(/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}/); + expect(metadata.detectedAgents).toEqual( + expect.arrayContaining([ + expect.objectContaining({ + name: "Claude Code", + rosieId: "claude", + }), + ]) + ); + expect(metadata.installFailed).toBe(false); + }); + + test("writes metadata file when user declines", async ({ expect }) => { + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: false, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(false); + }); + + test("does not include installFailed in metadata when user declines", async ({ + expect, + }) => { + mockConfirm({ + text: expect.stringContaining("Claude Code") as unknown as string, + result: false, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(false); + + const metadata = readMetadataFile(); + expect(metadata.installFailed).toBeUndefined(); + }); + + test("sets installFailed to true when rosie.install() throws", async ({ + expect, + }) => { + mockRosieInstall.mockRejectedValueOnce(new Error("download failed")); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + const metadata = readMetadataFile(); + expect(metadata.installFailed).toBe(true); + }); + + test("sets installFailed to agent names on partial failure", async ({ + expect, + }) => { + mockRosieInstall.mockResolvedValueOnce({ + skills: [ + { + name: "cloudflare", + kind: "skill", + installedAgents: ["claude"], + failedAgents: ["cursor"], + }, + ], + installedAgents: ["claude"], + failedAgents: ["cursor"], + installedInstruction: null, + }); + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(true); + expect(metadata.installFailed).toEqual(["cursor"]); + }); + + test("sets installFailed to false when all agents succeed", async ({ + expect, + }) => { + const maybeInstallCloudflareSkillsGlobally = await freshImport(); + + await maybeInstallCloudflareSkillsGlobally(true); + + const metadata = readMetadataFile(); + expect(metadata.accepted).toBe(true); + expect(metadata.installFailed).toBe(false); + }); + }); +}); diff --git a/packages/wrangler/src/__tests__/ai.test.ts b/packages/wrangler/src/__tests__/ai.test.ts index 3fb437b372..dabc64d70b 100644 --- a/packages/wrangler/src/__tests__/ai.test.ts +++ b/packages/wrangler/src/__tests__/ai.test.ts @@ -27,12 +27,13 @@ describe("ai help", () => { wrangler ai finetune Interact with finetune files GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -59,12 +60,13 @@ describe("ai help", () => { wrangler ai finetune Interact with finetune files GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -82,12 +84,13 @@ describe("ai help", () => { wrangler ai models schema Get model schema GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -104,12 +107,13 @@ describe("ai help", () => { model The model to fetch a schema for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/cert.test.ts b/packages/wrangler/src/__tests__/cert.test.ts index 9e2b9eec22..cc599b0c7c 100644 --- a/packages/wrangler/src/__tests__/cert.test.ts +++ b/packages/wrangler/src/__tests__/cert.test.ts @@ -501,12 +501,13 @@ describe("wrangler", () => { wrangler cert delete Delete an mTLS certificate GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/cloudchamber/create.test.ts b/packages/wrangler/src/__tests__/cloudchamber/create.test.ts index fddbc29cbd..17a16beaf0 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/create.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/create.test.ts @@ -81,12 +81,13 @@ describe("cloudchamber create", () => { Create a new deployment [alpha] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --image Image to use for your deployment [string] diff --git a/packages/wrangler/src/__tests__/cloudchamber/curl.test.ts b/packages/wrangler/src/__tests__/cloudchamber/curl.test.ts index 8b58b9a75b..a4372a58c9 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/curl.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/curl.test.ts @@ -38,12 +38,13 @@ describe("cloudchamber curl", () => { path [string] [required] [default: "/"] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -H, --header Add headers in the form of --header : [array] diff --git a/packages/wrangler/src/__tests__/cloudchamber/delete.test.ts b/packages/wrangler/src/__tests__/cloudchamber/delete.test.ts index 23f84feeca..2b52b86a4f 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/delete.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/delete.test.ts @@ -34,12 +34,13 @@ describe("cloudchamber delete", () => { deploymentId Deployment you want to delete [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/cloudchamber/images.test.ts b/packages/wrangler/src/__tests__/cloudchamber/images.test.ts index da8557bf37..9f7b8a5ec5 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/images.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/images.test.ts @@ -36,12 +36,13 @@ describe("cloudchamber image", () => { wrangler cloudchamber registries list List registries configured for this account [alpha] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -188,12 +189,13 @@ describe("cloudchamber image list", () => { List images in the Cloudflare managed registry [alpha] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --filter Regex to filter results [string] @@ -446,12 +448,13 @@ describe("cloudchamber image delete", () => { image Image and tag to delete, of the form IMAGE:TAG [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/cloudchamber/list.test.ts b/packages/wrangler/src/__tests__/cloudchamber/list.test.ts index 644112ba74..2a3af29565 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/list.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/list.test.ts @@ -34,12 +34,13 @@ describe("cloudchamber list", () => { deploymentIdPrefix Optional deploymentId to filter deployments. This means that 'list' will only showcase deployments that contain this ID prefix [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --location Filter deployments by location [string] diff --git a/packages/wrangler/src/__tests__/cloudchamber/modify.test.ts b/packages/wrangler/src/__tests__/cloudchamber/modify.test.ts index 0e9afad01e..4eb5d9e33b 100644 --- a/packages/wrangler/src/__tests__/cloudchamber/modify.test.ts +++ b/packages/wrangler/src/__tests__/cloudchamber/modify.test.ts @@ -49,12 +49,13 @@ describe("cloudchamber modify", () => { deploymentId The deployment you want to modify [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --var Container environment variables [array] diff --git a/packages/wrangler/src/__tests__/containers/delete.test.ts b/packages/wrangler/src/__tests__/containers/delete.test.ts index 1f74c22f1b..54a79c1373 100644 --- a/packages/wrangler/src/__tests__/containers/delete.test.ts +++ b/packages/wrangler/src/__tests__/containers/delete.test.ts @@ -35,12 +35,13 @@ describe("containers delete", () => { ID ID of the container to delete [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/containers/images.test.ts b/packages/wrangler/src/__tests__/containers/images.test.ts index 9ca095985c..81bdcc2119 100644 --- a/packages/wrangler/src/__tests__/containers/images.test.ts +++ b/packages/wrangler/src/__tests__/containers/images.test.ts @@ -39,12 +39,13 @@ describe("containers images list", () => { List images in the Cloudflare managed registry GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --filter Regex to filter results [string] @@ -209,12 +210,13 @@ describe("containers images delete", () => { image Image and tag to delete, of the form IMAGE:TAG [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/containers/info.test.ts b/packages/wrangler/src/__tests__/containers/info.test.ts index 449ff77ed9..c2fccf56a1 100644 --- a/packages/wrangler/src/__tests__/containers/info.test.ts +++ b/packages/wrangler/src/__tests__/containers/info.test.ts @@ -34,12 +34,13 @@ describe("containers info", () => { ID ID of the container to view [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/containers/instances.test.ts b/packages/wrangler/src/__tests__/containers/instances.test.ts index 7bef08e0c9..0cb5a7cfcc 100644 --- a/packages/wrangler/src/__tests__/containers/instances.test.ts +++ b/packages/wrangler/src/__tests__/containers/instances.test.ts @@ -106,12 +106,13 @@ describe("containers instances", () => { ID ID of the application to list instances for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --per-page Number of instances per page [number] [default: 25] diff --git a/packages/wrangler/src/__tests__/containers/list.test.ts b/packages/wrangler/src/__tests__/containers/list.test.ts index 97a02c885a..6b1e8cbfc7 100644 --- a/packages/wrangler/src/__tests__/containers/list.test.ts +++ b/packages/wrangler/src/__tests__/containers/list.test.ts @@ -48,12 +48,13 @@ describe("containers list", () => { List containers GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --per-page Number of containers per page [number] [default: 25] diff --git a/packages/wrangler/src/__tests__/containers/push.test.ts b/packages/wrangler/src/__tests__/containers/push.test.ts index 3dc98eadda..8ebcf9e7d6 100644 --- a/packages/wrangler/src/__tests__/containers/push.test.ts +++ b/packages/wrangler/src/__tests__/containers/push.test.ts @@ -45,12 +45,13 @@ describe("containers push", () => { TAG The tag of the local image to push [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path-to-docker Path to your docker binary if it's not on $PATH [string] [default: "docker"]" diff --git a/packages/wrangler/src/__tests__/containers/registries.test.ts b/packages/wrangler/src/__tests__/containers/registries.test.ts index b37a2dc7d1..8059656617 100644 --- a/packages/wrangler/src/__tests__/containers/registries.test.ts +++ b/packages/wrangler/src/__tests__/containers/registries.test.ts @@ -35,12 +35,13 @@ describe("containers registries --help", () => { wrangler containers registries credentials [DOMAIN] Get a temporary password for a specific domain GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/containers/ssh.test.ts b/packages/wrangler/src/__tests__/containers/ssh.test.ts index 359dec7874..c9ade55b01 100644 --- a/packages/wrangler/src/__tests__/containers/ssh.test.ts +++ b/packages/wrangler/src/__tests__/containers/ssh.test.ts @@ -30,12 +30,13 @@ describe("containers ssh", () => { ID ID of the container instance [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/d1/d1.test.ts b/packages/wrangler/src/__tests__/d1/d1.test.ts index addae8f9ca..601fac3c4f 100644 --- a/packages/wrangler/src/__tests__/d1/d1.test.ts +++ b/packages/wrangler/src/__tests__/d1/d1.test.ts @@ -29,12 +29,13 @@ describe("d1", () => { wrangler d1 insights Get information about the queries run on a D1 database [experimental] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -68,12 +69,13 @@ describe("d1", () => { wrangler d1 insights Get information about the queries run on a D1 database [experimental] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -94,12 +96,13 @@ describe("d1", () => { wrangler d1 migrations apply Apply any unapplied D1 migrations GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -118,12 +121,13 @@ describe("d1", () => { wrangler d1 time-travel restore Restore a database back to a specific point-in-time GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/deployments.test.ts b/packages/wrangler/src/__tests__/deployments.test.ts index c9fb3457df..7d4f03bfe1 100644 --- a/packages/wrangler/src/__tests__/deployments.test.ts +++ b/packages/wrangler/src/__tests__/deployments.test.ts @@ -65,12 +65,13 @@ describe("deployments", () => { wrangler deployments status View the current state of your production GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/docs.test.ts b/packages/wrangler/src/__tests__/docs.test.ts index cc31b0613c..01afb83f48 100644 --- a/packages/wrangler/src/__tests__/docs.test.ts +++ b/packages/wrangler/src/__tests__/docs.test.ts @@ -46,12 +46,13 @@ describe("wrangler docs", () => { search Enter search terms (e.g. the wrangler command) you want to know more about [array] [default: []] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -y, --yes Takes you to the docs, even if search fails [boolean]" diff --git a/packages/wrangler/src/__tests__/experimental-commands-api.test.ts b/packages/wrangler/src/__tests__/experimental-commands-api.test.ts index 6278406a4b..53924cd5c5 100644 --- a/packages/wrangler/src/__tests__/experimental-commands-api.test.ts +++ b/packages/wrangler/src/__tests__/experimental-commands-api.test.ts @@ -46,6 +46,11 @@ describe("experimental_getWranglerCommands", () => { "hidden": true, "type": "boolean", }, + "install-skills": { + "default": false, + "describe": "Install Cloudflare agents skills, if not already present, without asking the user for confirmation", + "type": "boolean", + }, "v": { "alias": "version", "describe": "Show version number", diff --git a/packages/wrangler/src/__tests__/helpers/msw/handlers/access.ts b/packages/wrangler/src/__tests__/helpers/msw/handlers/access.ts index 83fbf05270..5f495ea5ea 100644 --- a/packages/wrangler/src/__tests__/helpers/msw/handlers/access.ts +++ b/packages/wrangler/src/__tests__/helpers/msw/handlers/access.ts @@ -10,4 +10,11 @@ export default [ http.get("https://not-access-protected.com/", () => { return HttpResponse.json("OK", { status: 200 }); }), + // Simulates an Access application configured to only allow Service Auth + // tokens: the domain is behind Access but responds with a hard 403 instead + // of redirecting to cloudflareaccess.com, because there is no interactive + // login path for users. + http.get("https://access-service-auth-only.com/", () => { + return HttpResponse.json(null, { status: 403 }); + }), ]; diff --git a/packages/wrangler/src/__tests__/hyperdrive.test.ts b/packages/wrangler/src/__tests__/hyperdrive.test.ts index 16a6aae2b6..2a1325d4fc 100644 --- a/packages/wrangler/src/__tests__/hyperdrive.test.ts +++ b/packages/wrangler/src/__tests__/hyperdrive.test.ts @@ -41,12 +41,13 @@ describe("hyperdrive help", () => { wrangler hyperdrive update Update a Hyperdrive config GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -76,12 +77,13 @@ describe("hyperdrive help", () => { wrangler hyperdrive update Update a Hyperdrive config GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/index.test.ts b/packages/wrangler/src/__tests__/index.test.ts index 67a92345ec..8536d4e174 100644 --- a/packages/wrangler/src/__tests__/index.test.ts +++ b/packages/wrangler/src/__tests__/index.test.ts @@ -89,12 +89,13 @@ describe("wrangler", () => { wrangler tunnel 🚇 Manage Cloudflare Tunnels [experimental] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose" `); @@ -167,12 +168,13 @@ describe("wrangler", () => { wrangler tunnel 🚇 Manage Cloudflare Tunnels [experimental] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose" `); @@ -264,12 +266,13 @@ describe("wrangler", () => { wrangler secret bulk [file] Upload multiple secrets for a Worker at once GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -290,12 +293,13 @@ describe("wrangler", () => { wrangler kv namespace rename [old-name] Rename a KV namespace GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -316,12 +320,13 @@ describe("wrangler", () => { wrangler kv key delete Remove a single key value pair from the given namespace GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -341,12 +346,13 @@ describe("wrangler", () => { wrangler kv bulk delete Delete multiple key-value pairs from a namespace GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -366,12 +372,13 @@ describe("wrangler", () => { wrangler r2 sql Send queries and manage R2 SQL [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/kv/help.test.ts b/packages/wrangler/src/__tests__/kv/help.test.ts index 459ebf2ee8..5dfce0af60 100644 --- a/packages/wrangler/src/__tests__/kv/help.test.ts +++ b/packages/wrangler/src/__tests__/kv/help.test.ts @@ -38,12 +38,13 @@ describe("kv", () => { wrangler kv bulk Interact with multiple Workers KV key-value pairs at once GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -61,12 +62,13 @@ describe("kv", () => { wrangler kv bulk Interact with multiple Workers KV key-value pairs at once GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -93,12 +95,13 @@ describe("kv", () => { wrangler kv bulk Interact with multiple Workers KV key-value pairs at once GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/kv/key.test.ts b/packages/wrangler/src/__tests__/kv/key.test.ts index 6381412d31..9b3d663024 100644 --- a/packages/wrangler/src/__tests__/kv/key.test.ts +++ b/packages/wrangler/src/__tests__/kv/key.test.ts @@ -372,12 +372,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -421,12 +422,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -472,12 +474,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -521,12 +524,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -567,12 +571,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -618,12 +623,13 @@ describe("kv", () => { value The value to write [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --path Read value from the file at a given path [string] @@ -1061,12 +1067,13 @@ describe("kv", () => { key The key value to get. [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --text Decode the returned value as a utf8 string [boolean] [default: false] @@ -1102,12 +1109,13 @@ describe("kv", () => { key The key value to get. [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --text Decode the returned value as a utf8 string [boolean] [default: false] @@ -1144,12 +1152,13 @@ describe("kv", () => { key The key value to get. [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --text Decode the returned value as a utf8 string [boolean] [default: false] diff --git a/packages/wrangler/src/__tests__/kv/namespace.test.ts b/packages/wrangler/src/__tests__/kv/namespace.test.ts index d2c901cd5e..90cfd1ab48 100644 --- a/packages/wrangler/src/__tests__/kv/namespace.test.ts +++ b/packages/wrangler/src/__tests__/kv/namespace.test.ts @@ -67,12 +67,13 @@ describe("kv", () => { namespace The name of the new namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --preview Interact with a preview namespace [boolean] @@ -105,12 +106,13 @@ describe("kv", () => { namespace The name of the new namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --preview Interact with a preview namespace [boolean] @@ -649,12 +651,13 @@ describe("kv", () => { old-name The current name of the namespace to rename [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --namespace-id The id of the namespace to rename [string] diff --git a/packages/wrangler/src/__tests__/mtls-certificates.test.ts b/packages/wrangler/src/__tests__/mtls-certificates.test.ts index e9f59bd250..0ac6d77692 100644 --- a/packages/wrangler/src/__tests__/mtls-certificates.test.ts +++ b/packages/wrangler/src/__tests__/mtls-certificates.test.ts @@ -415,12 +415,13 @@ describe("wrangler", () => { wrangler mtls-certificate delete Delete an mTLS certificate GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/pages/deploy.test.ts b/packages/wrangler/src/__tests__/pages/deploy.test.ts index 93b5c6d5a8..3f43936421 100644 --- a/packages/wrangler/src/__tests__/pages/deploy.test.ts +++ b/packages/wrangler/src/__tests__/pages/deploy.test.ts @@ -81,10 +81,11 @@ describe("pages deploy", () => { directory The directory of static files to upload [string] GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --project-name The name of the project you want to deploy to [string] diff --git a/packages/wrangler/src/__tests__/pages/pages.test.ts b/packages/wrangler/src/__tests__/pages/pages.test.ts index c1e7af734b..7cbbc7b55d 100644 --- a/packages/wrangler/src/__tests__/pages/pages.test.ts +++ b/packages/wrangler/src/__tests__/pages/pages.test.ts @@ -35,10 +35,11 @@ describe("pages", () => { wrangler pages download Download settings from your project GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -58,10 +59,11 @@ describe("pages", () => { command The proxy command to run [deprecated] [string] GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --compatibility-date Date to use for compatibility checks [string] @@ -107,10 +109,11 @@ describe("pages", () => { wrangler pages project delete Delete a Cloudflare Pages project GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -134,10 +137,11 @@ describe("pages", () => { wrangler pages deployment delete Delete a deployment in your Cloudflare Pages project GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -156,10 +160,11 @@ describe("pages", () => { directory The directory of static files to upload [string] GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --project-name The name of the project you want to deploy to [string] @@ -191,10 +196,11 @@ describe("pages", () => { wrangler pages secret list List all secrets for a Pages project GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -213,10 +219,11 @@ describe("pages", () => { wrangler pages download config [projectName] Download your Pages project config as a Wrangler configuration file [experimental] GLOBAL FLAGS - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/queues/queues-subscription.test.ts b/packages/wrangler/src/__tests__/queues/queues-subscription.test.ts index d2e80e1489..6749a78f16 100644 --- a/packages/wrangler/src/__tests__/queues/queues-subscription.test.ts +++ b/packages/wrangler/src/__tests__/queues/queues-subscription.test.ts @@ -74,12 +74,13 @@ describe("queues subscription", () => { queue The name of the queue to create the subscription for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --source The event source type [string] [required] [choices: "kv", "r2", "superSlurper", "vectorize", "workersAi.model", "workersBuilds.worker", "workflows.workflow"] @@ -252,12 +253,13 @@ describe("queues subscription", () => { queue The name of the queue to list subscriptions for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --page Page number for pagination [number] [default: 1] @@ -428,12 +430,13 @@ describe("queues subscription", () => { queue The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --id The ID of the subscription to retrieve [string] [required] @@ -548,12 +551,13 @@ describe("queues subscription", () => { queue The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --id The ID of the subscription to delete [string] [required] diff --git a/packages/wrangler/src/__tests__/queues/queues.test.ts b/packages/wrangler/src/__tests__/queues/queues.test.ts index 4c00c388b5..d019e4a209 100644 --- a/packages/wrangler/src/__tests__/queues/queues.test.ts +++ b/packages/wrangler/src/__tests__/queues/queues.test.ts @@ -46,12 +46,13 @@ describe("wrangler", () => { wrangler queues subscription Manage event subscriptions for a queue GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -94,12 +95,13 @@ describe("wrangler", () => { List queues GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --page Page number for pagination [number]" @@ -243,12 +245,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 86400 [number] @@ -484,12 +487,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --delivery-delay-secs How long a published message should be delayed for, in seconds. Must be between 0 and 86400 [number] @@ -652,12 +656,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -726,12 +731,13 @@ describe("wrangler", () => { wrangler queues consumer worker Configure Queue Worker Consumers GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -776,12 +782,13 @@ describe("wrangler", () => { script-name Name of the consumer script [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --batch-size Maximum number of messages per batch [number] @@ -1140,12 +1147,13 @@ describe("wrangler", () => { script-name Name of the consumer script [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1571,12 +1579,13 @@ describe("wrangler", () => { wrangler queues consumer http list List HTTP pull consumers for a queue GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1620,12 +1629,13 @@ describe("wrangler", () => { queue-name Name of the queue for the consumer [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --batch-size Maximum number of messages per batch [number] @@ -1770,12 +1780,13 @@ describe("wrangler", () => { queue-name Name of the queue for the consumer [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1859,12 +1870,13 @@ describe("wrangler", () => { queue-name Name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --json Output in JSON format [boolean] [default: false]" @@ -2089,12 +2101,13 @@ describe("wrangler", () => { queue-name Name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --json Output in JSON format [boolean] [default: false]" @@ -2253,12 +2266,13 @@ describe("wrangler", () => { queue-name Name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --json Output in JSON format [boolean] [default: false]" @@ -2437,12 +2451,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); it("should return queue info with worker producers when the queue has workers configured as producers", async ({ @@ -2616,12 +2631,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -2732,12 +2748,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -2840,12 +2857,13 @@ describe("wrangler", () => { name The name of the queue [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --force Skip the confirmation dialog and forcefully purge the Queue [boolean]" diff --git a/packages/wrangler/src/__tests__/r2/bucket.test.ts b/packages/wrangler/src/__tests__/r2/bucket.test.ts index 54a223b507..bdf09ddf99 100644 --- a/packages/wrangler/src/__tests__/r2/bucket.test.ts +++ b/packages/wrangler/src/__tests__/r2/bucket.test.ts @@ -119,12 +119,13 @@ describe("r2", () => { wrangler r2 bucket lock Manage lock rules for an R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -162,12 +163,13 @@ describe("r2", () => { wrangler r2 bucket lock Manage lock rules for an R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -341,12 +343,13 @@ describe("r2", () => { name The name of the new bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --location The optional location hint that determines geographic placement of the R2 bucket [string] [choices: "weur", "eeur", "apac", "wnam", "enam", "oc"] @@ -379,12 +382,13 @@ describe("r2", () => { name The name of the new bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --location The optional location hint that determines geographic placement of the R2 bucket [string] [choices: "weur", "eeur", "apac", "wnam", "enam", "oc"] @@ -514,12 +518,13 @@ describe("r2", () => { wrangler r2 bucket update storage-class Update the default storage class of an existing R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); expect(std.err).toMatchInlineSnapshot(` "X [ERROR] Unknown argument: foo @@ -545,12 +550,13 @@ describe("r2", () => { name The name of the existing bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction of the bucket to be updated [string] @@ -610,12 +616,13 @@ describe("r2", () => { bucket The name of the bucket to delete [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string]" @@ -675,12 +682,13 @@ describe("r2", () => { bucket The name of the bucket to delete [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string]" @@ -747,12 +755,13 @@ describe("r2", () => { wrangler r2 bucket sippy get Check the status of Sippy on an R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -850,12 +859,13 @@ describe("r2", () => { name The name of the bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string] @@ -895,12 +905,13 @@ describe("r2", () => { name The name of the bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string]" @@ -953,12 +964,13 @@ describe("r2", () => { name The name of the bucket [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string]" @@ -1028,12 +1040,13 @@ describe("r2", () => { wrangler r2 bucket catalog snapshot-expiration Control settings for automatic snapshot expiration maintenance jobs for your R2 data catalog [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1090,12 +1103,13 @@ describe("r2", () => { bucket The name of the bucket to enable [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); expect(std.err).toMatchInlineSnapshot(` "X [ERROR] Not enough non-option arguments: got 0, need at least 1 @@ -1123,12 +1137,13 @@ describe("r2", () => { bucket The name of the bucket to disable the data catalog for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); expect(std.err).toMatchInlineSnapshot(` "X [ERROR] Not enough non-option arguments: got 0, need at least 1 @@ -1221,12 +1236,13 @@ describe("r2", () => { bucket The name of the R2 bucket whose data catalog status to retrieve [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); expect(std.err).toMatchInlineSnapshot(` "X [ERROR] Not enough non-option arguments: got 0, need at least 1 @@ -1331,12 +1347,13 @@ describe("r2", () => { wrangler r2 bucket catalog compaction disable [namespace] [table] Disable automatic file compaction for your R2 data catalog or a specific table [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1409,12 +1426,13 @@ describe("r2", () => { table The name of the table (optional, for table-level compaction) [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --target-size The target size for compacted files in MB (allowed values: 64, 128, 256, 512) [number] [default: 128] @@ -1545,12 +1563,13 @@ describe("r2", () => { table The name of the table (optional, for table-level compaction) [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); expect(std.err).toMatchInlineSnapshot(` "X [ERROR] Not enough non-option arguments: got 0, need at least 1 @@ -1691,12 +1710,13 @@ describe("r2", () => { wrangler r2 bucket catalog snapshot-expiration disable [namespace] [table] Disable automatic snapshot expiration for your R2 data catalog or a specific table [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -1821,12 +1841,13 @@ describe("r2", () => { table The name of the table (optional, for table-level snapshot expiration) [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --older-than-days Delete snapshots older than this many days, defaults to 30 [number] @@ -1940,12 +1961,13 @@ describe("r2", () => { table The name of the table (optional, for table-level snapshot expiration) [string] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --force Skip confirmation prompt [boolean] [default: false]" @@ -2243,12 +2265,13 @@ describe("r2", () => { bucket The name of the R2 bucket to get event notification rules for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -J, --jurisdiction The jurisdiction where the bucket exists [string]" @@ -2617,12 +2640,13 @@ describe("r2", () => { bucket The name of the R2 bucket to create an event notification rule for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --event-types, --event-type The type of event(s) that will emit event notifications [array] [required] [choices: "object-create", "object-delete"] @@ -2783,12 +2807,13 @@ describe("r2", () => { bucket The name of the R2 bucket to delete an event notification rule for [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --queue The name of the queue that corresponds to the event notification rule. If no rule is provided, all event notification rules associated with the bucket and queue will be deleted [string] [required] diff --git a/packages/wrangler/src/__tests__/r2/bulk.test.ts b/packages/wrangler/src/__tests__/r2/bulk.test.ts index 64544a3859..a44ba48449 100644 --- a/packages/wrangler/src/__tests__/r2/bulk.test.ts +++ b/packages/wrangler/src/__tests__/r2/bulk.test.ts @@ -29,12 +29,13 @@ describe("r2", () => { "wrangler r2 bulk GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/r2/help.test.ts b/packages/wrangler/src/__tests__/r2/help.test.ts index ec436e00d4..ecde93149d 100644 --- a/packages/wrangler/src/__tests__/r2/help.test.ts +++ b/packages/wrangler/src/__tests__/r2/help.test.ts @@ -26,12 +26,13 @@ describe("r2", () => { wrangler r2 sql Send queries and manage R2 SQL [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -59,12 +60,13 @@ describe("r2", () => { wrangler r2 sql Send queries and manage R2 SQL [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/r2/local-uploads.test.ts b/packages/wrangler/src/__tests__/r2/local-uploads.test.ts index 35ea29f4eb..664f76c643 100644 --- a/packages/wrangler/src/__tests__/r2/local-uploads.test.ts +++ b/packages/wrangler/src/__tests__/r2/local-uploads.test.ts @@ -33,12 +33,13 @@ describe("r2 bucket local-uploads", () => { wrangler r2 bucket local-uploads disable Disable local uploads for an R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/r2/object.test.ts b/packages/wrangler/src/__tests__/r2/object.test.ts index 654338fb06..d5436aa5c6 100644 --- a/packages/wrangler/src/__tests__/r2/object.test.ts +++ b/packages/wrangler/src/__tests__/r2/object.test.ts @@ -36,12 +36,13 @@ describe("r2", () => { wrangler r2 object delete Delete an object in an R2 bucket GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); describe("remote", () => { diff --git a/packages/wrangler/src/__tests__/register-yargs-command-skills.test.ts b/packages/wrangler/src/__tests__/register-yargs-command-skills.test.ts new file mode 100644 index 0000000000..b83ec19961 --- /dev/null +++ b/packages/wrangler/src/__tests__/register-yargs-command-skills.test.ts @@ -0,0 +1,47 @@ +import { runInTempDir, seed } from "@cloudflare/workers-utils/test-helpers"; +import { beforeEach, describe, test, vi } from "vitest"; +import { maybeInstallCloudflareSkillsGlobally } from "../agents-skills-install"; +import { mockConsoleMethods } from "./helpers/mock-console"; +import { runWrangler } from "./helpers/run-wrangler"; + +vi.mock("../package-manager", async (importOriginal) => { + const actual = (await importOriginal()) as Record; + return { + ...actual, + getPackageManager() { + return { + type: "npm", + npx: "npx", + }; + }, + }; +}); + +describe("register-yargs-command skills integration", () => { + runInTempDir(); + mockConsoleMethods(); + + beforeEach(async () => { + // Seed a wrangler config so `wrangler setup` skips autoconfig and + // returns quickly — we only care about the skills install call. + await seed({ + "wrangler.jsonc": JSON.stringify({ name: "test-worker" }), + }); + }); + + test("calls maybeInstallCloudflareSkillsGlobally with false by default", async ({ + expect, + }) => { + await runWrangler("setup"); + + expect(maybeInstallCloudflareSkillsGlobally).toHaveBeenCalledWith(false); + }); + + test("calls maybeInstallCloudflareSkillsGlobally with true when --install-skills is passed", async ({ + expect, + }) => { + await runWrangler("setup --install-skills"); + + expect(maybeInstallCloudflareSkillsGlobally).toHaveBeenCalledWith(true); + }); +}); diff --git a/packages/wrangler/src/__tests__/secrets-store.test.ts b/packages/wrangler/src/__tests__/secrets-store.test.ts index 1cc53a8668..9225d618a3 100644 --- a/packages/wrangler/src/__tests__/secrets-store.test.ts +++ b/packages/wrangler/src/__tests__/secrets-store.test.ts @@ -37,12 +37,13 @@ describe("secrets-store help", () => { wrangler secrets-store secret 🔐 Manage Secrets within the Secrets Store [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -67,12 +68,13 @@ describe("secrets-store help", () => { wrangler secrets-store secret 🔐 Manage Secrets within the Secrets Store [open beta] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/setup.test.ts b/packages/wrangler/src/__tests__/setup.test.ts index cc4af04b75..b6a5cb1da1 100644 --- a/packages/wrangler/src/__tests__/setup.test.ts +++ b/packages/wrangler/src/__tests__/setup.test.ts @@ -37,12 +37,13 @@ describe("wrangler setup", () => { 🪄 Setup a project to work on Cloudflare GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS -y, --yes Answer "yes" to any prompts for configuring your project [boolean] [default: false] diff --git a/packages/wrangler/src/__tests__/tunnel/tunnel.test.ts b/packages/wrangler/src/__tests__/tunnel/tunnel.test.ts index 80472d2766..9ca7a24e3b 100644 --- a/packages/wrangler/src/__tests__/tunnel/tunnel.test.ts +++ b/packages/wrangler/src/__tests__/tunnel/tunnel.test.ts @@ -80,12 +80,13 @@ describe("tunnel help", () => { wrangler tunnel quick-start Start a free, temporary tunnel without an account (https://try.cloudflare.com) [experimental] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/vectorize/vectorize.test.ts b/packages/wrangler/src/__tests__/vectorize/vectorize.test.ts index a239149e1d..aba69d1445 100644 --- a/packages/wrangler/src/__tests__/vectorize/vectorize.test.ts +++ b/packages/wrangler/src/__tests__/vectorize/vectorize.test.ts @@ -41,12 +41,13 @@ describe("vectorize help", () => { wrangler vectorize delete-metadata-index Delete metadata indexes GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -85,12 +86,13 @@ describe("vectorize help", () => { wrangler vectorize delete-metadata-index Delete metadata indexes GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -116,12 +118,13 @@ describe("vectorize help", () => { name The name of the Vectorize index. [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --json Return output as JSON [boolean] [default: false] @@ -151,12 +154,13 @@ describe("vectorize help", () => { name The name of the Vectorize index [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --vector Vector to query the Vectorize Index [number] @@ -1081,12 +1085,13 @@ describe("vectorize commands", () => { name The name of the Vectorize index [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean] + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean] OPTIONS --count Maximum number of vectors to return (1-1000) [number] diff --git a/packages/wrangler/src/__tests__/versions/versions.help.test.ts b/packages/wrangler/src/__tests__/versions/versions.help.test.ts index a9488f6224..5933c9afcf 100644 --- a/packages/wrangler/src/__tests__/versions/versions.help.test.ts +++ b/packages/wrangler/src/__tests__/versions/versions.help.test.ts @@ -24,12 +24,13 @@ describe("versions --help", () => { wrangler versions secret Generate a secret that can be referenced in a Worker GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); @@ -56,12 +57,13 @@ describe("versions subhelp", () => { wrangler versions secret Generate a secret that can be referenced in a Worker GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/vitest.setup.ts b/packages/wrangler/src/__tests__/vitest.setup.ts index 10d56dad53..8cbab7e541 100644 --- a/packages/wrangler/src/__tests__/vitest.setup.ts +++ b/packages/wrangler/src/__tests__/vitest.setup.ts @@ -221,6 +221,10 @@ vi.mock("../metrics/metrics-config", async (importOriginal) => { return realModule; }); +vi.mock("../agents-skills-install", () => ({ + maybeInstallCloudflareSkillsGlobally: vi.fn().mockResolvedValue(undefined), +})); + vi.mock("prompts", () => { return { __esModule: true, diff --git a/packages/wrangler/src/__tests__/vpc.test.ts b/packages/wrangler/src/__tests__/vpc.test.ts index 7212a2009d..3fa4b2c74a 100644 --- a/packages/wrangler/src/__tests__/vpc.test.ts +++ b/packages/wrangler/src/__tests__/vpc.test.ts @@ -40,12 +40,13 @@ describe("vpc help", () => { wrangler vpc service 🔗 Manage VPC services GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -69,12 +70,13 @@ describe("vpc help", () => { wrangler vpc service update Update a VPC service GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/__tests__/worker-namespace.test.ts b/packages/wrangler/src/__tests__/worker-namespace.test.ts index 997c1778f8..ccf45154e3 100644 --- a/packages/wrangler/src/__tests__/worker-namespace.test.ts +++ b/packages/wrangler/src/__tests__/worker-namespace.test.ts @@ -46,12 +46,13 @@ describe("dispatch-namespace", () => { wrangler dispatch-namespace rename Rename a dispatch namespace GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]", + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]", "warn": "", } `); @@ -100,12 +101,13 @@ describe("dispatch-namespace", () => { name Name of the dispatch namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -152,12 +154,13 @@ describe("dispatch-namespace", () => { name Name of the dispatch namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -213,12 +216,13 @@ describe("dispatch-namespace", () => { name Name of the dispatch namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); @@ -325,12 +329,13 @@ describe("dispatch-namespace", () => { newName New name of the dispatch namespace [string] [required] GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); diff --git a/packages/wrangler/src/__tests__/workflows.test.ts b/packages/wrangler/src/__tests__/workflows.test.ts index 4f8552d6f4..4802bd4a6a 100644 --- a/packages/wrangler/src/__tests__/workflows.test.ts +++ b/packages/wrangler/src/__tests__/workflows.test.ts @@ -159,12 +159,13 @@ describe("wrangler workflows", () => { wrangler workflows instances Manage Workflow instances GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" ` ); }); @@ -194,12 +195,13 @@ describe("wrangler workflows", () => { wrangler workflows instances resume Resume a workflow instance GLOBAL FLAGS - -c, --config Path to Wrangler configuration file [string] - --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] - -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] - --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] - -h, --help Show help [boolean] - -v, --version Show version number [boolean]" + -c, --config Path to Wrangler configuration file [string] + --cwd Run as if Wrangler was started in the specified directory instead of the current working directory [string] + -e, --env Environment to use for operations, and for selecting .env and .dev.vars files [string] + --env-file Path to an .env file to load - can be specified multiple times - values from earlier files are overridden by values in later files [array] + -h, --help Show help [boolean] + --install-skills Install Cloudflare agents skills, if not already present, without asking the user for confirmation [boolean] [default: false] + -v, --version Show version number [boolean]" `); }); }); diff --git a/packages/wrangler/src/agents-skills-install.ts b/packages/wrangler/src/agents-skills-install.ts new file mode 100644 index 0000000000..b2c5d92038 --- /dev/null +++ b/packages/wrangler/src/agents-skills-install.ts @@ -0,0 +1,268 @@ +import { mkdirSync, readFileSync, writeFileSync } from "node:fs"; +import path from "node:path"; +import { + getGlobalWranglerConfigPath, + parseJSONC, +} from "@cloudflare/workers-utils"; +import ci from "ci-info"; +import { confirm } from "./dialogs"; +import isInteractive from "./is-interactive"; +import { logger } from "./logger"; +import { sendMetricsEvent } from "./metrics"; + +/** + * Detects AI coding agents installed on the user's machine and, if + * appropriate, offers to install Cloudflare skill files into their global + * skills directories. + * + * Skills are installed via the rosie-skills JS API, which handles + * downloading from the `cloudflare/skills` GitHub repository, agent + * detection, and file placement. + * + * @param force - When `true` the interactive prompt is skipped and skills are + * installed unconditionally (used by `--install-skills`). + */ +export async function maybeInstallCloudflareSkillsGlobally( + force: boolean +): Promise { + const sendResultMetricsEvent = ( + result: + | { skippedBecause: string; errorMessage?: string } + | { + targetedAgents: AgentInfo[]; + } + ) => { + if ("skippedBecause" in result) { + sendMetricsEvent( + "skills_install_skipped", + { + reason: result.skippedBecause, + ...(result.errorMessage ? { errorMessage: result.errorMessage } : {}), + }, + {} + ); + } else { + sendMetricsEvent( + "skills_install_completed", + { + agents: result.targetedAgents, + }, + {} + ); + } + }; + + // If the user has already been prompted, don't ask again + const existingConfig = readSkillsInstallMetadataFile(); + if (existingConfig !== undefined && !force) { + // Note: no metrics event is sent in this case + return; + } + + if (ci.isCI && !force) { + // In CI environments, skip silently + sendResultMetricsEvent({ skippedBecause: "Running in CI" }); + return; + } + + let detectedAgents: AgentInfo[]; + try { + detectedAgents = await getDetectedAgents(); + } catch (err) { + sendResultMetricsEvent({ + skippedBecause: "Failed to install skills", + errorMessage: err instanceof Error ? err.message : String(err), + }); + return; + } + + if (detectedAgents.length === 0) { + sendResultMetricsEvent({ + skippedBecause: "No supported agents detected", + }); + return; + } + + // In non-interactive terminals (but not CI), log a message + if (!force && !isInteractive()) { + logger.log( + `Cloudflare agent skills are available for: ${detectedAgents.map(({ name }) => name).join(", ")}. Run wrangler in an interactive terminal to install them, or use \`--install-skills\` to install without prompting.` + ); + sendResultMetricsEvent({ + skippedBecause: "Non-interactive terminal", + }); + return; + } + + const accepted = + force || + (await confirm( + `Wrangler detected the following AI coding agents: ${detectedAgents.map(({ name }) => name).join(", ")}. Would you like to install Cloudflare skills for them?`, + { defaultValue: true, fallbackValue: false } + )); + + if (!accepted) { + writeSkillsInstallMetadataFile({ + accepted: false, + date: new Date().toISOString(), + detectedAgents, + }); + sendResultMetricsEvent({ skippedBecause: "User declined" }); + return; + } + + try { + const rosie = await import("rosie-skills"); + const agentNames = detectedAgents.map((a) => a.rosieId); + const { failedAgents } = await rosie.install(SKILLS_REPO, { + global: true, + agent: agentNames, + lockfile: false, + }); + + const failedSet = new Set(failedAgents); + const succeededAgents = detectedAgents.filter( + (a) => !failedSet.has(a.rosieId) + ); + + if (succeededAgents.length > 0) { + logger.log( + `Successfully installed Cloudflare skills for: ${succeededAgents.map(({ name }) => name).join(", ")}.` + ); + } + + if (failedAgents.length > 0) { + logger.warn( + `Skills installation failed for agents: ${failedAgents.join(", ")}.` + ); + logger.warn(SKILLS_INSTALL_RETRY_HINT); + } + + writeSkillsInstallMetadataFile({ + accepted: true, + date: new Date().toISOString(), + detectedAgents, + installFailed: failedAgents.length > 0 ? failedAgents : false, + }); + + sendResultMetricsEvent({ + targetedAgents: succeededAgents, + }); + return; + } catch (err) { + logger.warn( + `Failed to install Cloudflare skills: ${err instanceof Error ? err.message : String(err)}` + ); + logger.warn(SKILLS_INSTALL_RETRY_HINT); + + writeSkillsInstallMetadataFile({ + accepted: true, + date: new Date().toISOString(), + detectedAgents, + installFailed: true, + }); + + sendResultMetricsEvent({ + skippedBecause: "Failed to install skills", + }); + } +} + +/** The GitHub repo spec for Cloudflare skills, used with rosie.install(). */ +const SKILLS_REPO = "cloudflare/skills"; + +/** Actionable hint appended to skills-install failure warnings, directing users to retry or install manually. */ +const SKILLS_INSTALL_RETRY_HINT = + "You can retry by running `wrangler --install-skills`, or install skills manually as described here: https://github.com/cloudflare/skills#installing"; + +/** + * Describes a detected AI coding agent. + */ +type AgentInfo = { + /** Human-readable display name of the agent (e.g. "Claude Code"). */ + name: string; + /** Rosie's short identifier for the agent (e.g. "claude"). */ + rosieId: string; + /** Absolute path to the agent's global skills directory. */ + globalSkillsPath: string; +}; + +/** + * Persisted configuration that tracks whether the user has been prompted + * about installing Cloudflare agent skills globally. + */ +interface SkillsInstallMetadata { + /** Whether the user accepted the prompt to install skills. */ + accepted: boolean; + /** ISO date string of when the user was prompted. */ + date: string; + /** All agents detected on the user's machine. */ + detectedAgents?: AgentInfo[]; + /** + * `true` when the entire `rosie.install()` call threw, or `string[]` with + * the names of agents whose symlinks could not be created. `false` if + * installation succeeded for all agents. Absent when no installation was + * attempted (user declined or prompt was skipped). + */ + installFailed?: boolean | string[]; +} + +/** Jsonc metadata file created when Cloudflare agent skills are installed */ +const SKILLS_INSTALL_METADATA_FILENAME = "agents-skills-install.jsonc"; + +/** + * Returns the absolute path to the skills install config file within the global wrangler config directory. + */ +function getSkillsInstallMetadataFilePath(): string { + return path.resolve( + getGlobalWranglerConfigPath(), + SKILLS_INSTALL_METADATA_FILENAME + ); +} + +/** + * Reads and parses the skills install metadata file. + * + * @returns The parsed metadata file, or `undefined` if the file doesn't exist or can't be parsed. + */ +function readSkillsInstallMetadataFile(): SkillsInstallMetadata | undefined { + try { + const content = readFileSync(getSkillsInstallMetadataFilePath(), "utf8"); + return parseJSONC(content) as SkillsInstallMetadata; + } catch { + return undefined; + } +} + +/** + * Persists the skills install metadata to disk, creating parent directories as needed. + */ +function writeSkillsInstallMetadataFile(metadata: SkillsInstallMetadata): void { + const configPath = getSkillsInstallMetadataFilePath(); + mkdirSync(path.dirname(configPath), { recursive: true }); + writeFileSync(configPath, JSON.stringify(metadata, null, "\t")); +} + +/** + * Queries rosie for detected agents on the user's machine. + * + * @returns Array of detected agents with their display names, rosie IDs, and skills paths. + */ +async function getDetectedAgents(): Promise { + const rosie = await import("rosie-skills"); + const allAgents = await rosie.agents(); + return allAgents + .filter( + ( + agent + ): agent is typeof agent & { + detected: true; + installPath: string; + } => agent.detected && agent.installPath !== null + ) + .map((agent) => ({ + name: agent.display, + rosieId: agent.name, + globalSkillsPath: agent.installPath, + })); +} diff --git a/packages/wrangler/src/core/register-yargs-command.ts b/packages/wrangler/src/core/register-yargs-command.ts index a2d30e1a0a..7e48c79e44 100644 --- a/packages/wrangler/src/core/register-yargs-command.ts +++ b/packages/wrangler/src/core/register-yargs-command.ts @@ -7,6 +7,7 @@ import { UserError, } from "@cloudflare/workers-utils"; import chalk from "chalk"; +import { maybeInstallCloudflareSkillsGlobally } from "../agents-skills-install"; import { fetchResult } from "../cfetch"; import { createCloudflareClient } from "../cfetch/internal"; import { readConfig } from "../config"; @@ -137,19 +138,21 @@ function createHandler(def: InternalCommandDefinition, argv: string[]) { await printWranglerBanner(); } - // Suppress statusMessage when printBanner is a dynamic function that - // returned false (e.g. `--json` mode). When printBanner is the static - // boolean `false`, we preserve existing behaviour and still show - // status warnings — those commands opted out of the Wrangler banner, - // not necessarily the status message. - const statusMessageEnabled = - typeof shouldPrintBanner !== "function" || bannerEnabled; + await maybeInstallCloudflareSkillsGlobally(args.installSkills); if (!getWranglerHideBanner()) { if (def.metadata.deprecated) { logger.warn(def.metadata.deprecatedMessage); } + // Suppress statusMessage when printBanner is a dynamic function that + // returned false (e.g. `--json` mode). When printBanner is the static + // boolean `false`, we preserve existing behaviour and still show + // status warnings — those commands opted out of the Wrangler banner, + // not necessarily the status message. + const statusMessageEnabled = + typeof shouldPrintBanner !== "function" || bannerEnabled; + if (statusMessageEnabled && def.metadata.statusMessage) { logger.warn(def.metadata.statusMessage); } diff --git a/packages/wrangler/src/dev.ts b/packages/wrangler/src/dev.ts index 537c0cb2e9..3efdf3b242 100644 --- a/packages/wrangler/src/dev.ts +++ b/packages/wrangler/src/dev.ts @@ -360,7 +360,7 @@ export type AdditionalDevProps = { showInteractiveDevSession?: boolean; }; -type DevArguments = (typeof dev)["args"]; +type DevArguments = Omit<(typeof dev)["args"], "installSkills">; export type StartDevOptions = DevArguments & // These options can be passed in directly when called with the `wrangler.dev()` API. diff --git a/packages/wrangler/src/index.ts b/packages/wrangler/src/index.ts index 5fcf762300..6cca264f82 100644 --- a/packages/wrangler/src/index.ts +++ b/packages/wrangler/src/index.ts @@ -537,6 +537,12 @@ export function createCLIParser(argv: string[]) { hidden: true, alias: "x-auto-create", }, + "install-skills": { + describe: + "Install Cloudflare agents skills, if not already present, without asking the user for confirmation", + type: "boolean", + default: false, + }, } as const; // Type check result against CommonYargsOptions to make sure we've included // all common options @@ -613,7 +619,7 @@ export function createCLIParser(argv: string[]) { "Examples:": `${chalk.bold("EXAMPLES")}`, }); wrangler.group( - ["config", "cwd", "env", "env-file", "help", "version"], + ["config", "cwd", "env", "env-file", "help", "install-skills", "version"], `${chalk.bold("GLOBAL FLAGS")}` ); diff --git a/packages/wrangler/src/metrics/send-event.ts b/packages/wrangler/src/metrics/send-event.ts index 8a5bd4c2e8..de7cd61c59 100644 --- a/packages/wrangler/src/metrics/send-event.ts +++ b/packages/wrangler/src/metrics/send-event.ts @@ -71,7 +71,8 @@ export type EventNames = | "update pipeline" | "show pipeline" | "provision resources" - | AutoConfigEvent; + | AutoConfigEvent + | SkillsInstallEvent; /** Event related to the autoconfig flow */ type AutoConfigEvent = @@ -82,6 +83,9 @@ type AutoConfigEvent = | "autoconfig_configuration_started" | "autoconfig_configuration_completed"; +/** Event related to the agent skills install flow */ +type SkillsInstallEvent = "skills_install_skipped" | "skills_install_completed"; + /** * Send a metrics event, with no extra properties, to Cloudflare, if usage tracking is enabled. * diff --git a/packages/wrangler/src/tunnel/dev.ts b/packages/wrangler/src/tunnel/dev.ts index b4f315a25d..2423061817 100644 --- a/packages/wrangler/src/tunnel/dev.ts +++ b/packages/wrangler/src/tunnel/dev.ts @@ -1,6 +1,7 @@ import { dim } from "@cloudflare/cli-shared-helpers/colors"; import { startTunnel } from "@cloudflare/workers-utils"; import chalk from "chalk"; +import encodeQR from "qr"; import { formatHostname } from "../dev/start-dev"; import { logger } from "../logger"; import { resolveNamedTunnel } from "./client"; @@ -159,11 +160,23 @@ export class TunnelManager { logger.log( `⬣ Sharing via Cloudflare Tunnel: ${chalk.green(publicUrls[0])}` ); + this.printQrCode(publicUrls[0]); } else if (publicUrls.length > 1) { logger.log( "⬣ Sharing via Cloudflare Tunnel:\n" + publicUrls.map((url) => ` ${chalk.green(url)}`).join("\n") ); + // Print a QR code for the first URL when multiple are available + this.printQrCode(publicUrls[0]); + } + } + + private printQrCode(url: string): void { + try { + const qrCode = encodeQR(url, "ascii", { border: 1 }); + logger.log(`\n${qrCode}`); + } catch { + // QR generation is best-effort; don't disrupt the dev session if it fails } } } diff --git a/packages/wrangler/src/user/access.ts b/packages/wrangler/src/user/access.ts index 7719eaf3fc..e86647bfa3 100644 --- a/packages/wrangler/src/user/access.ts +++ b/packages/wrangler/src/user/access.ts @@ -75,16 +75,15 @@ export async function domainUsesAccess(domain: string): Promise { export async function getAccessHeaders( domain: string ): Promise> { - if (!(await domainUsesAccess(domain))) { - return {}; - } - logger.debug("Getting Access headers for domain:", domain); - if (headersCache[domain]) { - logger.debug("Using cached Access headers for domain:", domain); - return headersCache[domain]; - } - - // 1. If Access Service Token credentials are provided, use them directly + // 1. If Access Service Token credentials are provided, use them directly. + // + // This check intentionally comes before `domainUsesAccess()`, which detects + // Access by looking for a 302 redirect to `cloudflareaccess.com`. When an + // Access application is configured to only allow Service Auth tokens (no + // interactive user authentication), the domain responds with a hard 403 + // instead of redirecting, so `domainUsesAccess()` returns false. If we + // gated the env var check on `domainUsesAccess()` we would never attach + // the service token headers and the request would fail with a 403. const clientId = getAccessClientIdFromEnv(); const clientSecret = getAccessClientSecretFromEnv(); @@ -110,6 +109,15 @@ export async function getAccessHeaders( ); } + if (!(await domainUsesAccess(domain))) { + return {}; + } + logger.debug("Getting Access headers for domain:", domain); + if (headersCache[domain]) { + logger.debug("Using cached Access headers for domain:", domain); + return headersCache[domain]; + } + // 2. If non-interactive (CI), error with actionable message if (isNonInteractiveOrCI()) { throw new UserError( diff --git a/packages/wrangler/src/yargs-types.ts b/packages/wrangler/src/yargs-types.ts index e3fe55c59f..85989e225a 100644 --- a/packages/wrangler/src/yargs-types.ts +++ b/packages/wrangler/src/yargs-types.ts @@ -12,6 +12,7 @@ export interface CommonYargsOptions { "env-file": string[] | undefined; "experimental-provision": boolean | undefined; "experimental-auto-create": boolean; + "install-skills": boolean; } export type CommonYargsArgvSanitized

= OnlyCamelCase< diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 81e7274594..acded701f8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2414,6 +2414,9 @@ importers: picocolors: specifier: ^1.1.1 version: 1.1.1 + qr: + specifier: ^0.6.0 + version: 0.6.0 semver: specifier: ^7.7.1 version: 7.7.3 @@ -3943,6 +3946,9 @@ importers: path-to-regexp: specifier: 6.3.0 version: 6.3.0 + rosie-skills: + specifier: ^0.6.3 + version: 0.6.3 unenv: specifier: 2.0.0-rc.24 version: 2.0.0-rc.24 @@ -4160,6 +4166,9 @@ importers: prompts: specifier: ^2.4.2 version: 2.4.2 + qr: + specifier: ^0.6.0 + version: 0.6.0 recast: specifier: 0.23.11 version: 0.23.11 @@ -13174,6 +13183,10 @@ packages: pure-rand@6.1.0: resolution: {integrity: sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==} + qr@0.6.0: + resolution: {integrity: sha512-P23VoX7SipHALdiIYG+D+LT/6n22dNKwV92FAb3d+Nlki/5WisSsfLt0UDFz2XEBtuwrECTznvu+chKKFCSYhA==} + engines: {node: '>= 20.19.0'} + qs@6.10.3: resolution: {integrity: sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==} engines: {node: '>=0.6'} @@ -13535,6 +13548,26 @@ packages: engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + rosie-skills-darwin-arm64@0.6.3: + resolution: {integrity: sha512-DrgUIT+bEmGrGjZkomgnCfc1b1GwpM7r7Y4k8UjfkrOd0Zh1sDgd+X2ilGP12KUA8kIuUuqhzgX5TCEm83Fkbw==} + cpu: [arm64] + os: [darwin] + + rosie-skills-freebsd-x64@0.6.3: + resolution: {integrity: sha512-bm032ltYtn3aKVJo8VfxiUYZ5xCl23erxYsayNcLG3yUGOaNbWMtVR69wxct7RjUgtPKal87gRbFUA1zlvVSDg==} + cpu: [x64] + os: [freebsd] + + rosie-skills-linux-x64@0.6.3: + resolution: {integrity: sha512-eGdu8VBcmFV/uYIqJHdj/WSd2SRsJn3wmvsUmEc9AWWPzCT2WfSuRhJJAFssPLZ/Qyneg56G6mAke3A0Jrkwwg==} + cpu: [x64] + os: [linux] + + rosie-skills@0.6.3: + resolution: {integrity: sha512-oIugHHNQHkW+LPbVrJTbE6Tx74dTSCQSXViVXBJ4MxGJkLnGZYZkVP7DRe0WwREx/Spah7V53UZncTlW0yfOWg==} + engines: {node: '>=18'} + hasBin: true + rou3@0.7.12: resolution: {integrity: sha512-iFE4hLDuloSWcD7mjdCDhx2bKcIsYbtOTpfH5MHHLSKMOUyjqQXTeZVa289uuwEGEKFoE/BAPbhaU4B774nceg==} @@ -24299,6 +24332,8 @@ snapshots: pure-rand@6.1.0: {} + qr@0.6.0: {} + qs@6.10.3: dependencies: side-channel: 1.0.4 @@ -24837,6 +24872,21 @@ snapshots: '@rollup/rollup-win32-x64-msvc': 4.57.1 fsevents: 2.3.3 + rosie-skills-darwin-arm64@0.6.3: + optional: true + + rosie-skills-freebsd-x64@0.6.3: + optional: true + + rosie-skills-linux-x64@0.6.3: + optional: true + + rosie-skills@0.6.3: + optionalDependencies: + rosie-skills-darwin-arm64: 0.6.3 + rosie-skills-freebsd-x64: 0.6.3 + rosie-skills-linux-x64: 0.6.3 + rou3@0.7.12: {} router@2.2.0: diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index fa0f999933..f86ef8b35f 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -30,6 +30,20 @@ gitChecks: false # URLs. Only direct dependencies may use exotic sources. blockExoticSubdeps: true +# Require packages to be at least 24 hours old before they can be installed. +# This mitigates supply-chain attacks where a malicious version is published and +# yanked quickly, by ensuring there is a window for detection before adoption. +# Value is in minutes (1440 = 24 hours). +minimumReleaseAge: 1440 + +# First-party Cloudflare packages are exempt from the cooldown so they can be +# adopted same-day. +minimumReleaseAgeExclude: + - "workerd" + # Platform-specific workerd binaries published in lock-step with workerd. + - "@cloudflare/workerd-*" + - "@cloudflare/workers-types" + # ────────────────────────────────────────────────────────────────────────────── # Build scripts # pnpm 10 blocks lifecycle scripts by default. Only the packages listed here