FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: :sparkles: introduce json output for cf pages deployment list by gnekich · Pull Request #8318 · cloudflare/workers-sdk · GitHub

Repository navigation

feat: ✨ introduce json output for cf pages deployment list - #8318

Merged
petebacondarwin merged 3 commits into
cloudflare:mainfrom
gnekich:feat/introduce-json-output-for-pages-deployments-list
Aug 11, 2025
Merged

petebacondarwin merged 3 commits into
cloudflare:mainfrom
gnekich:feat/introduce-json-output-for-pages-deployments-list

Conversation

gnekich commented Mar 1, 2025 •
edited by petebacondarwin
Loading

Copy link
Copy Markdown
Contributor

…as it enables other tools like jq to parse the data, also fixes [#2437]
It also introduces Id of the deployment to the output

Fixes #2437 .

added --json flag to the wrangler pages deployment list

This enables scripts like this to work:

#!/bin/bash

# List all deployments and get their IDs
deployments=$(npx wrangler pages deployment list --json | jq -r '.[].Id')

# Get the last deployment ID
last_deployment=$(echo "$deployments" | head -n 1)

# Loop through all deployments and delete each one except the last
for deployment in $deployments; do
  if [ "$deployment" != "$last_deployment" ]; then
    echo "Deleting deployment $deployment ..."
    npx wrangler pages deployment delete $deployment
  fi
done

  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: covered by non-e2e tests
  • Public documentation

gnekich requested review from a team as code owners March 1, 2025 18:50

changeset-bot Bot commented Mar 1, 2025 •
edited
Loading

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 9f6c6b4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
wrangler Minor
@cloudflare/vite-plugin Major
@cloudflare/vitest-pool-workers Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

github-actions Bot commented Mar 1, 2025 •
edited
Loading

Copy link
Copy Markdown
Contributor

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-wrangler-8318

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/8318/npm-package-wrangler-8318

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-wrangler-8318 dev path/to/script.js
Additional artifacts:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-workers-bindings-extension-8318 -O ./cloudflare-workers-bindings-extension.0.0.0-v577ad398c.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-v577ad398c.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-create-cloudflare-8318 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-kv-asset-handler-8318

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-miniflare-8318

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-pages-shared-8318

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-unenv-preset-8318

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-vite-plugin-8318

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-vitest-pool-workers-8318

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-workers-editor-shared-8318

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-workers-shared-8318

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/13641985438/npm-package-cloudflare-workflows-shared-8318

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.111.0 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20250214.1
workerd 1.20250214.0 1.20250214.0
workerd --version 1.20250214.0 2025-02-14

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

Copy link
Copy Markdown
Contributor

Thanks for this contribution @gnekich - it seems like a reasonable additional feature. In order to land this it will need tests see packages/wrangler/src/__tests__/pages/deployment-list.test.ts and a changeset. Would you be able to add those?

gnekich commented Mar 3, 2025

Copy link
Copy Markdown
Contributor Author

Thanks for the review, @petebacondarwin! I've added the tests and a changeset as requested.

petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks good. Please can you update the changeset type?

Comment thread .changeset/young-mammals-spend.md Outdated
github-project-automation Bot moved this from Untriaged to In Review in workers-sdk Apr 2, 2025
petebacondarwin self-assigned this Jul 21, 2025
petebacondarwin force-pushed the feat/introduce-json-output-for-pages-deployments-list branch from d4a8ccf to 43d1d66 Compare July 21, 2025 13:37

pkg-pr-new Bot commented Jul 21, 2025

Copy link
Copy Markdown
create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@8318

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@8318

miniflare

npm i https://pkg.pr.new/miniflare@8318

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@8318

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@8318

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@8318

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@8318

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@8318

wrangler

npm i https://pkg.pr.new/wrangler@8318

commit: 9f6c6b4

github-project-automation Bot moved this from In Review to Approved in workers-sdk Jul 21, 2025
petebacondarwin added skip-v3-pr ci:skip-pr-description-validation Skip validation of the required PR description format labels Jul 21, 2025
petebacondarwin added a commit to cloudflare/cloudflare-docs that referenced this pull request Jul 30, 2025
petebacondarwin merged commit 8cf47f9 into cloudflare:main Aug 11, 2025
github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 11, 2025
workers-devprod added the contribution [Holopin] Recognizes an open-source contribution, big or small label Aug 11, 2025

holopin-bot Bot commented Aug 11, 2025

Copy link
Copy Markdown

Congratulations @gnekich, the maintainer of this repository has issued you a holobyte! Here it is: https://holopin.io/holobyte/cme6swqin446007ldcwkxnhaa

This badge can only be claimed by you, so make sure that your GitHub account is linked to your Holopin account. You can manage those preferences here: https://holopin.io/account.
Or if you're new to Holopin, you can simply sign up with GitHub, which will do the trick!

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip-pr-description-validation Skip validation of the required PR description format contribution [Holopin] Recognizes an open-source contribution, big or small

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: Support JSON output on pages cli functions

4 participants


Back | FazBrowse Home | New Git URL