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

Support wrangler pages secret put|delete|list|bulk #5549

Merged
merged 11 commits into from
Apr 10, 2024

Conversation

penalosa
Copy link
Contributor

@penalosa penalosa commented Apr 7, 2024

What this PR solves / how to test

This PR supports adding secrets to a Pages project using the Wrangler CLI. Similarly to wrangler secret, this PR adds a wrangler pages secret set of commands. There are several differences to the Workers commands:

  • --project is used to specify the project to target, compared to --name for Workers.
  • The only environments that are supported are --env=production|preview
  • secret:bulk is renamed to secret bulk
  • The output is slightly friendlier

Fixes #5180

Author has addressed the following

@penalosa penalosa requested review from a team as code owners April 7, 2024 16:13
Copy link

changeset-bot bot commented Apr 7, 2024

🦋 Changeset detected

Latest commit: aa583ce

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

This PR includes changesets to release 2 packages
Name Type
wrangler Minor
@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

Copy link
Contributor

github-actions bot commented Apr 7, 2024

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/8621208400/npm-package-wrangler-5549

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

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

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-wrangler-5549 dev path/to/script.js
Additional artifacts:
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-create-cloudflare-5549 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-cloudflare-kv-asset-handler-5549
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-miniflare-5549
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-cloudflare-pages-shared-5549
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8621208400/npm-package-cloudflare-vitest-pool-workers-5549

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


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20240404.0
workerd 1.20240404.0 1.20240404.0
workerd --version 1.20240404.0 2024-04-04

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

@penalosa penalosa requested a review from RamIdeas April 9, 2024 16:42
Copy link
Contributor

@admah admah left a comment

Choose a reason for hiding this comment

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

Left some suggestions for messaging updates.

packages/wrangler/src/pages/secret/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/secret/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/secret/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/secret/index.ts Outdated Show resolved Hide resolved
packages/wrangler/src/pages/secret/index.ts Outdated Show resolved Hide resolved
penalosa and others added 5 commits April 9, 2024 20:26
Co-authored-by: Adam Murray <[email protected]>
Co-authored-by: Adam Murray <[email protected]>
Co-authored-by: Adam Murray <[email protected]>
Co-authored-by: Adam Murray <[email protected]>
Co-authored-by: Adam Murray <[email protected]>
@penalosa penalosa requested a review from admah April 10, 2024 12:55
Copy link
Contributor

@admah admah left a comment

Choose a reason for hiding this comment

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

LGTM!

@penalosa penalosa merged commit 113ac41 into main Apr 10, 2024
15 checks passed
@penalosa penalosa deleted the penalosa/pages-secrets branch April 10, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: Wrangler secret for pages
3 participants