Wrangler: add Pages detection to autoconfig flows#12382
Wrangler: add Pages detection to autoconfig flows#12382dario-piotrowicz merged 7 commits intomainfrom
Conversation
🦋 Changeset detectedLatest commit: 1e12592 The changes in this PR will be included in the next version bump. 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 |
|
Claude finished @dario-piotrowicz's task —— View job Changeset Review
✅ All changesets look good The changeset in
|
create-cloudflare
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-shared
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-pool-workers
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
837b93d to
9afe921
Compare
| if (existsSync(functionsPath)) { | ||
| const functionsStat = statSync(functionsPath); | ||
| if (functionsStat.isDirectory()) { | ||
| const pagesConfirmed = await confirm( |
There was a problem hiding this comment.
just to double check, will this auto-accept in CI?
There was a problem hiding this comment.
yes it will... confirming that the project is a Pages one and then erroring...
I guess we should auto-deny instead... in that case CI would proceed (even though that might also be incorrect)...? 🤔
what do you think?
There was a problem hiding this comment.
oh sorry i got confused 😅
i think the behaviour in CI needs to proceed with a folder called functions to avoid breaking anyone. sorry i know its a bit of an edgecase!
47e64aa to
7b951c2
Compare
7b951c2 to
6fc4329
Compare
f316834 to
7f905bf
Compare
bdc09c3 to
008187d
Compare
…es when there is no out-dir
Fixes https://jira.cfdata.org/browse/DEVX-2439
When running the autoconfig logic (via
wrangler setup,wrangler deploy --x-autoconfig, or the programmatic autoconfig API), Wrangler now detects when a project appears to be a Pages project and handles it appropriately:wrangler deploy, it warns the user but still allows them to proceedwrangler setupand the programmatic autoconfig API, it throws a fatal errorA picture of a cute animal (not mandatory, but encouraged)