Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(wrangler): allow to output pages deployments in JSON #6570

Closed
wants to merge 1 commit into from

Conversation

mlafeldt
Copy link

@mlafeldt mlafeldt commented Aug 23, 2024

What this PR solves / how to test

This makes it possible to further process the output of wrangler pages deployment list, e.g. like this

$ wrangler pages deployment list --project-name example --format json | jq .[0]
{
  "environment": "Production",
  "branch": "main",
  "source": "f4c86e5",
  "deployment": "https://0d903966.example.pages.dev",
  "status": "13 minutes ago",
  "build": "https://dash.cloudflare.com/..."
}

In general, I've found the command's default table output to be barely readable as it wraps lines and shortens column fields, even on my MacBook Pro's high-res monitor.

image

refs #2012

Author has addressed the following

  • Tests
    • TODO (before merge)
    • Included
    • Not necessary because:
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required / Maybe required
    • Not required because:
  • Changeset (Changeset guidelines)
    • TODO (before merge)
    • Included
    • Not necessary because:
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Not necessary because:

@mlafeldt mlafeldt requested review from a team as code owners August 23, 2024 12:50
Copy link

changeset-bot bot commented Aug 23, 2024

⚠️ No Changeset found

Latest commit: 4494416

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@mlafeldt
Copy link
Author

We might prefer --json over --format json, though wrangler is not consistent when it comes to flags.

Copy link
Contributor

@penalosa penalosa left a comment

Choose a reason for hiding this comment

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

This looks great, thank you! This will need tests, and should use the --json flag rather than --format json

@penalosa
Copy link
Contributor

Closing this for now, since we haven't heard from you in a while. We'd be happy to accept a PR for this feature though, feel free to open a new one with associated tests and I can make sure it gets merged and released!

@penalosa penalosa closed this Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants