Add prompt to wrangler pages download config#5506
Conversation
🦋 Changeset detectedLatest commit: 55f08a3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
|
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/8553967145/npm-package-wrangler-5506You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/5506/npm-package-wrangler-5506Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-wrangler-5506 dev path/to/script.jsAdditional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-create-cloudflare-5506 --no-auto-updatenpm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-cloudflare-kv-asset-handler-5506npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-miniflare-5506npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-cloudflare-pages-shared-5506npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/8553967145/npm-package-cloudflare-vitest-pool-workers-5506Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
petebacondarwin
left a comment
There was a problem hiding this comment.
Is false the correct default option here for non-interactive?
I feel like it should actually fail... because otherwise if someone is expecting their CI to download and keep the wrangler.toml updated before deploying, and haven't specified --force it will just deploy the old wrangler.toml instead.
Co-authored-by: Pete Bacon Darwin <pete@bacondarwin.com>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5506 +/- ##
==========================================
+ Coverage 72.09% 72.17% +0.08%
==========================================
Files 331 331
Lines 17175 17181 +6
Branches 4386 4388 +2
==========================================
+ Hits 12382 12401 +19
+ Misses 4793 4780 -13
|
| ); | ||
| if (!overwrite) { | ||
| return; | ||
| throw new FatalError("Not overwriting existing `wrangler.toml` file"); |
There was a problem hiding this comment.
Will this mean the user gets a fatal error if they choose not to overwrite in the interactive prompt? I guess that is kind of OK DX?
There was a problem hiding this comment.
I think it's ok for now. We can revisit if needed.
What this PR solves / how to test
Adds an interactive prompt to
wrangler pages download configif downloading the config would overwrite an existingwrangler.tomlfile.Fixes DEVX-1243
Author has addressed the following