void 1.2.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/dist/{account-cmd-CdUll_35.mjs → account-cmd-B4i71m7k.mjs} +3 -3
  2. package/dist/{application-analysis-fEqoSeMp.mjs → application-analysis-DYdVoMAY.mjs} +8 -6
  3. package/dist/{application-routing-DAhNP4u3.mjs → application-routing-C8EqRDfv.mjs} +3 -1
  4. package/dist/{auth-link-C87vGXM-.mjs → auth-link-BKwHPbdv.mjs} +3 -3
  5. package/dist/{auth-router-6I81r-ix.mjs → auth-router-DqLx8E0F.mjs} +2 -2
  6. package/dist/{better-auth-shared-D-6z0q0f.mjs → better-auth-shared-7FM3Uk2N.mjs} +48 -2
  7. package/dist/{build-cmd-ex1g-j_e.mjs → build-cmd-Dy4psnt1.mjs} +1 -1
  8. package/dist/{cache-oHzrnY3z.mjs → cache-DV37S6dl.mjs} +1 -1
  9. package/dist/{cancel-deploy-viAMD0Q_.mjs → cancel-deploy-DMPyu1Vt.mjs} +1 -1
  10. package/dist/{cf-build-output-BhVxldCw.mjs → cf-build-output-Bapzc_8Z.mjs} +102 -1
  11. package/dist/cf-build-output-DlBkWdNU.mjs +1 -0
  12. package/dist/cli/cli.mjs +41 -32
  13. package/dist/cli/cloudflare-operation-process.mjs +27 -6
  14. package/dist/cli/env-schema-probe.mjs +2 -2
  15. package/dist/{client-BEkdj1kx.mjs → client-BEMtySaV.mjs} +8 -1
  16. package/dist/client-DyxPQnF_.mjs +1 -0
  17. package/dist/{cloudflare-cmd-DMzCv12s.mjs → cloudflare-cmd-BaqIigwI.mjs} +1 -1
  18. package/dist/{cloudflare-connect-CCRTVg-I.mjs → cloudflare-connect-pNLQmr_e.mjs} +1 -1
  19. package/dist/{cloudflare-operations-DsSaw2BT.mjs → cloudflare-operations-PCM4wucv.mjs} +1 -1
  20. package/dist/{cloudflare-operations-Dh9dEHJj.mjs → cloudflare-operations-vP3b5CQf.mjs} +3 -3
  21. package/dist/config-BTu1o3Dc.mjs +49 -0
  22. package/dist/{config-DQfHOKh9.d.mts → config-Du88-7Y8.d.mts} +2 -1
  23. package/dist/config-entry.d.mts +1 -1
  24. package/dist/{connect-k7R2rPVA.mjs → connect-DwVsBvVh.mjs} +4 -4
  25. package/dist/{create-project-DTuy-l0z.mjs → create-project-CgrnvzyA.mjs} +1 -1
  26. package/dist/{create-project-DV71ol5d.mjs → create-project-CjzbBlTv.mjs} +1 -1
  27. package/dist/{db-DVOkLH5X.mjs → db-rvo64snS.mjs} +13 -13
  28. package/dist/{delete-BbP5eopu.mjs → delete-DWX6dP4M.mjs} +1 -1
  29. package/dist/deploy-CtHE2A3R.mjs +2 -0
  30. package/dist/{deploy-7H32EnUs.mjs → deploy-hRPvw8ci.mjs} +229 -69
  31. package/dist/{deploy-managed-static-DlvcvnQT.mjs → deploy-managed-static-CDYA2p3L.mjs} +30 -14
  32. package/dist/{deploy-transport-BzGEj0Ge.mjs → deploy-transport-JCxw7QDi.mjs} +3 -3
  33. package/dist/deploy.mjs +4 -3
  34. package/dist/{dispatch-DoUnxTNo.mjs → dispatch-OVLeWW8K.mjs} +71 -2
  35. package/dist/{domain-CA2wBgra.mjs → domain-CH5iBD9Y.mjs} +2 -2
  36. package/dist/{email-DXpCc77w.mjs → email-CbTO1l78.mjs} +58 -9
  37. package/dist/{email-cloudflare-D03g2TkS.mjs → email-cloudflare-B8-pq_-W.mjs} +106 -5
  38. package/dist/{env-DgOQ9_8S.mjs → env-BBdw236G.mjs} +3 -3
  39. package/dist/{env-BJjULvL0.mjs → env-BaMz0j7H.mjs} +6 -1
  40. package/dist/{env-validation-BmsdCZEk.mjs → env-validation-BfBVvBNe.mjs} +1 -1
  41. package/dist/{env-validation-Dwq3PJzK.mjs → env-validation-XcukUlFM.mjs} +1 -1
  42. package/dist/{gen-BfmcIi2g.mjs → gen-CCx3t2Ju.mjs} +1 -1
  43. package/dist/gen-TgXy93Rr.mjs +1 -0
  44. package/dist/{github-cmd-CY9LUqLh.mjs → github-cmd-BzkRLkbg.mjs} +1 -1
  45. package/dist/{handler-BbkSPzGF.d.mts → handler-CQv5YDS0.d.mts} +1 -1
  46. package/dist/{help-CxSlPpzJ.mjs → help-CKbrhZha.mjs} +16 -1
  47. package/dist/help-qOZr3wng.mjs +1 -0
  48. package/dist/index.d.mts +2 -4
  49. package/dist/index.mjs +317 -122
  50. package/dist/{info-7VDlhtyy.mjs → info-oBm8yK8J.mjs} +2 -2
  51. package/dist/{init-DxYyOs4-.mjs → init-CBp_uMve.mjs} +217 -197
  52. package/dist/{link-Ddmod1dZ.mjs → link-Dt_QXmM4.mjs} +2 -2
  53. package/dist/{list-MogaugiO.mjs → list-DF6asTdt.mjs} +2 -2
  54. package/dist/{live-Bt8Y_0bg.d.mts → live-CXJ9yC98.d.mts} +1 -1
  55. package/dist/{local-d1-BHBnKWRb.mjs → local-d1-CUhH3qtj.mjs} +1 -1
  56. package/dist/{login-Cttnagmm.mjs → login-BjSyhXlT.mjs} +2 -2
  57. package/dist/login-Cdo8Aco1.mjs +1 -0
  58. package/dist/{logs-CAszUWZI.mjs → logs-DmvBl6xA.mjs} +2 -2
  59. package/dist/{migrate-DyT2jJ8y.mjs → migrate-BXRHpYwR.mjs} +1 -1
  60. package/dist/migrate-COPncCGx.mjs +1 -0
  61. package/dist/nitro.mjs +2 -2
  62. package/dist/{node-WB7c2N4L.mjs → node-DtD7ZiPf.mjs} +4 -4
  63. package/dist/{operator-args-UnE8Y2eK.mjs → operator-args-BsJIYXaT.mjs} +8 -1
  64. package/dist/operator-cmd-DDiX7Y3f.mjs +1 -0
  65. package/dist/{operator-cmd-skshjMGl.mjs → operator-cmd-DjZKGGgN.mjs} +4 -3
  66. package/dist/pages/client.d.mts +21 -4
  67. package/dist/pages/client.mjs +174 -35
  68. package/dist/pages/index.d.mts +18 -2
  69. package/dist/pages/index.mjs +2 -52
  70. package/dist/pages/islands-plugin.d.mts +1 -1
  71. package/dist/pages/islands-plugin.mjs +9 -3
  72. package/dist/pages/protocol.d.mts +2 -2
  73. package/dist/platform-args-BC8_hsDj.mjs +1 -0
  74. package/dist/{platform-args-DVbVClZl.mjs → platform-args-BMD2gjc_.mjs} +1 -1
  75. package/dist/{platform-auth-config-C-pm5Qzx.mjs → platform-auth-config-BgnuMbml.mjs} +3 -3
  76. package/dist/{platform-auth-protection-SHhvim1L.mjs → platform-auth-protection-NjRejttU.mjs} +2 -2
  77. package/dist/{platform-auth-recovery-DXVWs-wA.mjs → platform-auth-recovery-Ug12d9W5.mjs} +2 -2
  78. package/dist/{platform-cmd-PiNRkopU.mjs → platform-cmd-BYKLMPCn.mjs} +1 -1
  79. package/dist/{platform-cmd-D5I1beUX.mjs → platform-cmd-HByuZAO7.mjs} +4 -4
  80. package/dist/{platform-domain-jpmBfZeb.mjs → platform-domain-DLSQ8GF8.mjs} +2 -2
  81. package/dist/{platform-lifecycle-DyKmuNY6.mjs → platform-lifecycle-3dwFJmnq.mjs} +102 -40
  82. package/dist/{platform-lifecycle-DH3Yr1qQ.mjs → platform-lifecycle-BRqcxerG.mjs} +1 -1
  83. package/dist/{platform-management-7m-PLaPJ.mjs → platform-management-ZK6XcbCo.mjs} +1 -1
  84. package/dist/{platform-management--vDwSn35.mjs → platform-management-ZZ6bQM5j.mjs} +1 -1
  85. package/dist/{platform-recovery-BiNpZZab.mjs → platform-recovery-8vNE5dNN.mjs} +2 -2
  86. package/dist/{plugin-inference-DUjCd55H.mjs → plugin-inference-CeiB6BG5.mjs} +53 -18
  87. package/dist/{prepare-BcAE5Sdj.mjs → prepare-5BR7Splm.mjs} +1 -1
  88. package/dist/prepare-B3VrSF1Z.mjs +1 -0
  89. package/dist/{prepare-DA-17DhO.mjs → prepare-Dseww74N.mjs} +4 -4
  90. package/dist/{prerender-render-Cijv7UFo.mjs → prerender-render-CaShbHJ3.mjs} +13 -1
  91. package/dist/prerender-render.d.mts +1 -0
  92. package/dist/prerender-render.mjs +1 -1
  93. package/dist/{project-cmd-DA4K5faU.mjs → project-cmd-CjLNNxwe.mjs} +15 -15
  94. package/dist/{project-team-CQBNveX3.mjs → project-team-DE5drjcl.mjs} +1 -1
  95. package/dist/{project-token-CCalFyQf.mjs → project-token-XEYEXfiJ.mjs} +1 -1
  96. package/dist/{project-zero-trust-DPnkiEuT.mjs → project-zero-trust-6VPU8zmV.mjs} +1 -1
  97. package/dist/{protocol-BBDpJz3G.d.mts → protocol-BekmFxCI.d.mts} +2 -2
  98. package/dist/{provision-DtROpNNI.mjs → provision-B7UFrBH7.mjs} +1 -1
  99. package/dist/{provision-BFLCrnUp.mjs → provision-Chq0NRAV.mjs} +1 -1
  100. package/dist/{requests-BpH0kImL.mjs → requests-CG-Pj8ze.mjs} +1 -1
  101. package/dist/{rollback-CXS1tAa-.mjs → rollback-CIrm2txZ.mjs} +2 -2
  102. package/dist/{route-types-BZi26DVS.mjs → route-types--PAOzHlH.mjs} +49 -28
  103. package/dist/routes-stub.d.mts +22 -13
  104. package/dist/runtime/better-auth-mysql.mjs +1 -1
  105. package/dist/runtime/better-auth-pg.mjs +1 -1
  106. package/dist/runtime/better-auth.mjs +1 -1
  107. package/dist/runtime/handler.d.mts +1 -1
  108. package/dist/runtime/live-client.d.mts +1 -1
  109. package/dist/runtime/live.d.mts +1 -1
  110. package/dist/runtime/log.mjs +19 -1
  111. package/dist/runtime/routing.d.mts +2 -2
  112. package/dist/runtime/routing.mjs +4 -3
  113. package/dist/runtime/validator.d.mts +1 -1
  114. package/dist/runtime/ws-server.d.mts +1 -1
  115. package/dist/runtime/ws.d.mts +1 -1
  116. package/dist/{scan-8IzYXiU_.mjs → scan-N9WzdcAl.mjs} +302 -23
  117. package/dist/{secret-BbXHfLAt.mjs → secret-BL6g7mF5.mjs} +3 -3
  118. package/dist/static-asset-marker-Btf-6oCD.mjs +32 -0
  119. package/dist/{types-7AIz0OZu.d.mts → types-w72dljaA.d.mts} +6 -1
  120. package/dist/{version-metadata-tS39iW09.mjs → version-metadata-DmaZNTYW.mjs} +1 -1
  121. package/dist/worker-conditions-AWFRcFxR.mjs +11 -0
  122. package/dist/{wrangler-F96NnLyb.mjs → wrangler-CDiEBCdS.mjs} +2 -1
  123. package/dist/wrangler-DOPr4jyI.mjs +1 -0
  124. package/dist/{wrapper-D3sZyh2C.mjs → wrapper-CEiDeCqD.mjs} +6 -10
  125. package/dist/{ws-BH-im_tX.d.mts → ws-D1zWiB_P.d.mts} +1 -1
  126. package/docs/guide/auth.md +3 -1
  127. package/docs/guide/edge/static-assets.md +10 -0
  128. package/docs/guide/email/domains.md +1 -1
  129. package/docs/guide/email/receiving.md +2 -0
  130. package/docs/guide/email/sending.md +1 -1
  131. package/docs/guide/pages-routing/actions-and-forms.md +19 -13
  132. package/docs/guide/pages-routing/markdown.md +2 -0
  133. package/docs/guide/pages-routing/overview.md +34 -3
  134. package/docs/guide/platform/administration/email.md +18 -0
  135. package/docs/guide/platform/installation/prerequisites.md +9 -4
  136. package/docs/guide/platform/installation/uninstall.md +2 -0
  137. package/docs/guide/queues.md +13 -1
  138. package/docs/guide/quickstart.md +26 -1
  139. package/docs/guide/sandboxes.md +2 -2
  140. package/docs/guide/server-routing.md +38 -2
  141. package/docs/guide/type-safety.md +7 -7
  142. package/docs/guide/websockets.md +4 -2
  143. package/docs/reference/api/pages.md +4 -4
  144. package/docs/reference/cli/email.md +13 -0
  145. package/docs/reference/cli/platform-email.md +2 -2
  146. package/docs/reference/cli.md +2 -1
  147. package/docs/reference/structure.md +3 -1
  148. package/package.json +8 -7
  149. package/sandbox.Dockerfile +1 -1
  150. package/templates/assets/icons.svg +49 -0
  151. package/templates/assets/react.svg +1 -0
  152. package/templates/assets/solid.svg +1 -0
  153. package/templates/assets/stack.svg +35 -0
  154. package/templates/assets/svelte.svg +1 -0
  155. package/templates/assets/void.svg +5 -0
  156. package/templates/assets/vue.svg +1 -0
  157. package/dist/cf-build-output-BJHuSsVN.mjs +0 -1
  158. package/dist/client-BiRDZTSd.mjs +0 -1
  159. package/dist/config-CyUJzi3q.mjs +0 -32
  160. package/dist/deploy-CE0Ev0Ob.mjs +0 -2
  161. package/dist/gen-NrOlWZaG.mjs +0 -1
  162. package/dist/help-BeAFFE5C.mjs +0 -1
  163. package/dist/login-DgDwlKc_.mjs +0 -1
  164. package/dist/migrate-n49ZeS1X.mjs +0 -1
  165. package/dist/operator-cmd-d2MvJOrl.mjs +0 -1
  166. package/dist/parse-filename-DioPHiR9.mjs +0 -77
  167. package/dist/platform-args-kQrgxScY.mjs +0 -1
  168. package/dist/prepare-C4I0f--h.mjs +0 -1
  169. package/dist/wrangler-BLb3_luP.mjs +0 -1
@@ -1,49 +1,50 @@
1
1
  import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-3h0WiCiA.mjs";
2
2
  import { a as join, c as resolve, n as dirname, o as normalize, r as extname, s as relative, t as basename } from "./dist-ipQi0Q8y.mjs";
3
3
  import { t as require_picocolors } from "./picocolors-BsDfhxIw.mjs";
4
- import { r as detectFramework } from "./plugin-inference-DUjCd55H.mjs";
4
+ import { r as detectFramework } from "./plugin-inference-CeiB6BG5.mjs";
5
5
  import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-DGu_QZ_Q.mjs";
6
6
  import { m as resolveBindingNames, p as readConfig, u as isNodeTarget } from "./config-DHgSEWT7.mjs";
7
- import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, o as requiresSandboxPlatformImage, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync } from "./application-analysis-fEqoSeMp.mjs";
7
+ import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, o as requiresSandboxPlatformImage, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync } from "./application-analysis-DYdVoMAY.mjs";
8
8
  import { t as collectMigrations } from "./collect-Dew86qce.mjs";
9
9
  import { o as validateSsrEntry } from "./entry-BEM8ZuGP.mjs";
10
10
  import { r as hasEmailHandlers } from "./email-B9ayYQEG.mjs";
11
- import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
12
11
  import { a as resolveDistDir, c as hasDocumentRoutes, l as resolveAssetConfig, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, s as hasApiRoutes } from "./isr-config-fZaJJ8t7.mjs";
13
12
  import { t as writeFileAtomic } from "./atomic-write-Dq6R0BPN.mjs";
14
13
  import { s as listPlatformConnections } from "./platform-registry-B9mWX9LO.mjs";
15
14
  import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
16
15
  import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-DeWj5F9Y.mjs";
17
16
  import { i as persistCloudflareConfig, r as materializeCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-DchHxPTo.mjs";
18
- import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-F96NnLyb.mjs";
17
+ import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-CDiEBCdS.mjs";
19
18
  import { r as trustedCloudflareWorkerAccessHeaders, t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
20
19
  import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
21
20
  import { a as getApiUrl, c as getToken, l as getTokenSource } from "./auth-B6iOCjKI.mjs";
22
- import { c as resolveRemoteMode, t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BJjULvL0.mjs";
23
- import { a as buildEnv, n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-tS39iW09.mjs";
24
- import { a as emailConfigInputs, c as renderAddressMap, d as collectPrerenderPathsNode, f as prerenderPages, i as createNodeEmailDns, l as renderEmailChecklist, n as SEND_EMAIL_BINDING, o as preflightEmail, p as prerenderPagesNode, r as applyEmailSetup, t as EMAIL_FROM_VAR, u as collectPrerenderPaths } from "./email-cloudflare-D03g2TkS.mjs";
25
- import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-DAhNP4u3.mjs";
26
- import { a as record, i as migrateBuiltWranglerConfig, n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-BhVxldCw.mjs";
21
+ import { i as otherQueueConsumers, n as chooseCloudflareQueueName, o as scopedCloudflareQueueName, r as cloudflareQueueName } from "./dispatch-OVLeWW8K.mjs";
22
+ import { l as resolveRemoteMode, n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BaMz0j7H.mjs";
23
+ import { t as assertNoPrerenderFailures } from "./prerender-render-CaShbHJ3.mjs";
24
+ import { a as buildEnv, n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DmaZNTYW.mjs";
25
+ import { a as emailConfigInputs, c as renderAddressMap, d as isGeneratedAssetHeaders, g as prerenderPagesNode, h as prerenderPages, i as createNodeEmailDns, l as renderEmailChecklist, m as collectPrerenderPathsNode, n as SEND_EMAIL_BINDING, o as preflightEmail, p as collectPrerenderPaths, r as applyEmailSetup, t as EMAIL_FROM_VAR } from "./email-cloudflare-B8-pq_-W.mjs";
26
+ import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-C8EqRDfv.mjs";
27
+ import { a as record, i as migrateBuiltWranglerConfig, n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-Bapzc_8Z.mjs";
27
28
  import { i as validateMigrations, t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
28
29
  import { A as confirm, K as select, L as log, tt as isCancel } from "./dist-Cor9XGoz.mjs";
29
30
  import { r as getPackageDir } from "./agents-CuNtT0D_.mjs";
30
- import { a as isExpiredTokenError, r as PlatformClient } from "./client-BEkdj1kx.mjs";
31
+ import { a as isExpiredTokenError, r as PlatformClient } from "./client-BEMtySaV.mjs";
31
32
  import { o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-BpgYODYx.mjs";
32
33
  import { t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
33
34
  import { i as safePositional, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-ByHk0xg4.mjs";
34
35
  import { a as FRAMEWORK_PRESETS, c as hasBackendFiles, i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, o as detectPreset, s as formatProjectCommand, t as createCloudflareProcessRunner, u as resolveProjectCommand } from "./cloudflare-process-8jEYIeim.mjs";
35
- import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-Dwq3PJzK.mjs";
36
- import { a as needsWrapper, r as cleanupWrapper, t as bundleEntry } from "./wrapper-D3sZyh2C.mjs";
37
- import { A as resolveDeployLiveBindingConfig, C as generateDeployWrapperIfNeeded, D as hasPrerenderSources, E as hasNonPageBackend, F as resolveStaticDeployPreset, I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, N as resolveFullDeployBuildCommand, O as log$1, P as resolveStaticBuildCommand, S as ensureManagedHyperdrive, T as getGitCommit, _ as hasDeploySchemaDrift, a as collectAndHashAssets, b as assertWorkerMainUploaded, c as formatDeploySummary, d as mergeAndLintRoutingRules, f as streamDirectR2Deploy, g as getDeploySchemaDriftMessage, h as assertDeploySchemaDriftFree, i as buildStaticManifest, j as resolveDeployWorkerMain, k as promptDeployProjectConfig, l as printDeployContext, m as warnUnpublishedRouting, n as runStaticDeploy, o as collectWorkerFiles, p as warnIgnoredNotFoundForFramework, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeploySuccess, v as assertEnvSchemaValid, w as getExitCode, x as createProjectFromSlug, y as assertProjectDeployAccess } from "./deploy-managed-static-DlvcvnQT.mjs";
38
- import { a as checkCloudflareProvisionDrift, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, m as isRealKvId, s as deleteEnvVarCaseAware } from "./provision-DtROpNNI.mjs";
39
- import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-BzGEj0Ge.mjs";
36
+ import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-XcukUlFM.mjs";
37
+ import { a as needsWrapper, r as cleanupWrapper, t as bundleEntry } from "./wrapper-CEiDeCqD.mjs";
38
+ import { A as promptDeployProjectConfig, C as ensureManagedHyperdrive, D as hasNonPageBackend, E as getGitCommit, F as resolveStaticBuildCommand, I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, O as hasPrerenderSources, P as resolveFullDeployBuildCommand, R as validateDeployMigrations, S as createProjectFromSlug, T as getExitCode, _ as getDeploySchemaDriftMessage, a as collectAndHashAssets, b as assertProjectDeployAccess, c as readWranglerHtmlHandling, d as printDeploySuccess, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, h as warnUnpublishedRouting, i as buildStaticManifest, j as resolveDeployLiveBindingConfig, k as log$1, l as formatDeploySummary, m as warnIgnoredNotFoundForFramework, n as runStaticDeploy, o as collectWorkerFiles, p as streamDirectR2Deploy, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeployContext, v as hasDeploySchemaDrift, w as generateDeployWrapperIfNeeded, x as assertWorkerMainUploaded, y as assertEnvSchemaValid } from "./deploy-managed-static-CDYA2p3L.mjs";
39
+ import { a as checkCloudflareProvisionDrift, d as isQueueConfirmedAbsent, f as isRealD1Id, g as provisionCloudflareResources, i as assertValidResourceName, m as isRealKvId, s as deleteEnvVarCaseAware } from "./provision-B7UFrBH7.mjs";
40
+ import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-JCxw7QDi.mjs";
40
41
  import { n as getCfCliVersion, r as getVoidUserAgent, t as publishCloudflareObservability } from "./cf-worker-settings-BECvvTVd.mjs";
41
42
  import { t as sanitizeTerminalLogText } from "./terminal-log-text-D9ACPOuG.mjs";
42
- import { t as promptForLoginToken } from "./login-Cttnagmm.mjs";
43
+ import { t as promptForLoginToken } from "./login-BjSyhXlT.mjs";
43
44
  import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-Byo_0_N9.mjs";
44
- import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-Dh9dEHJj.mjs";
45
+ import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-vP3b5CQf.mjs";
45
46
  import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-BzKMWnO4.mjs";
46
- import { a as discoverFrameworkWranglerFiles, i as writeVoidProjectConfig, t as migrateLegacyVoidConfig } from "./migrate-DyT2jJ8y.mjs";
47
+ import { a as discoverFrameworkWranglerFiles, i as writeVoidProjectConfig, t as migrateLegacyVoidConfig } from "./migrate-BXRHpYwR.mjs";
47
48
  import { a as runMySqlMigrations } from "./runner-mysql-BWmbk5IE.mjs";
48
49
  import { i as runPgMigrations } from "./runner-pg-Cr3qrqi4.mjs";
49
50
  import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
@@ -62,6 +63,7 @@ import ignore from "ignore";
62
63
  import { CloudflareWorkerInspectionError, activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeWorkersDevSubdomain, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
63
64
  import { setTimeout as setTimeout$1 } from "node:timers/promises";
64
65
  import mime from "mime";
66
+ import { Buffer as Buffer$1 } from "node:buffer";
65
67
  import { Minimatch } from "minimatch";
66
68
  //#region src/cli/cloudflare-candidate.ts
67
69
  const CANDIDATE_FILE = ".void/cloudflare-candidate.json";
@@ -786,7 +788,10 @@ async function computeDesiredCloudflareResources(root, voidConfig, configPath, a
786
788
  };
787
789
  reasons.set(binding, analysis.reasons.r2[0]);
788
790
  }
789
- desired.queues = analysis.queues.map((q) => q.name);
791
+ if (analysis.queues.length > 0) {
792
+ desired.queueNames = Object.fromEntries(analysis.queues.map((q) => [q.name, scopedCloudflareQueueName(toValidWorkerName(workerName), q.name)]));
793
+ desired.queues = Object.values(desired.queueNames);
794
+ }
790
795
  if (needsDatabase && dialect !== "sqlite") {
791
796
  const binding = "HYPERDRIVE";
792
797
  desired.hyperdrive = {
@@ -1772,6 +1777,9 @@ async function ensureCloudflareAuthSecret(options) {
1772
1777
  return { created: true };
1773
1778
  }
1774
1779
  //#endregion
1780
+ //#region src/cli/node-buffer.ts
1781
+ const Buffer$2 = Buffer$1;
1782
+ //#endregion
1775
1783
  //#region src/cli/cf-version-api.ts
1776
1784
  var CloudflareApiError = class extends Error {
1777
1785
  status;
@@ -2090,11 +2098,22 @@ function assetConfigFromOutput(value) {
2090
2098
  ...config.runWorkerFirst === void 0 ? {} : { run_worker_first: config.runWorkerFirst }
2091
2099
  };
2092
2100
  }
2093
- /**
2094
- * The version API placement. Smart placement is normalized the same way as cf's own version
2095
- * uploads. Targeted placement is rejected: the Workers beta version endpoint can drop its
2096
- * target, and an atomic upload is live before a read-back could catch that.
2097
- */
2101
+ /** The region, host or hostname of a targeted placement. */
2102
+ function placementTarget(placement) {
2103
+ if (!placement) return;
2104
+ for (const kind of [
2105
+ "region",
2106
+ "host",
2107
+ "hostname"
2108
+ ]) {
2109
+ const value = placement[kind];
2110
+ if (typeof value === "string" && value) return {
2111
+ kind,
2112
+ value
2113
+ };
2114
+ }
2115
+ }
2116
+ /** The version API placement, in the shape cf's own version uploads send. */
2098
2117
  function placementFromOutput(placement) {
2099
2118
  if (!placement) return;
2100
2119
  const hint = "hint" in placement ? placement.hint : void 0;
@@ -2102,8 +2121,22 @@ function placementFromOutput(placement) {
2102
2121
  mode: "smart",
2103
2122
  ...hint ? { hint } : {}
2104
2123
  };
2105
- const target = "region" in placement && placement.region && "region" || "host" in placement && placement.host && "host" || "hostname" in placement && placement.hostname && "hostname";
2106
- if (target) throw new Error(`Cloudflare placement.${target} cannot be deployed while the Worker has secrets. Remove cloudflare.placement from void.config.ts, or set it to { mode: 'smart' }.`);
2124
+ const target = placementTarget(placement);
2125
+ return target ? {
2126
+ mode: "targeted",
2127
+ [target.kind]: target.value
2128
+ } : void 0;
2129
+ }
2130
+ /**
2131
+ * Whether the upload reply still names the requested target. The Workers beta version
2132
+ * endpoint has replied `placement: {}` after dropping one (terraform-provider-cloudflare#7273).
2133
+ * It now replies with the target alone, e.g. `{ region }`.
2134
+ */
2135
+ function keepsPlacementTarget(placement, target) {
2136
+ const reply = record(placement);
2137
+ if (!reply) return false;
2138
+ const targets = reply.target === void 0 ? [reply] : reply.target;
2139
+ return Array.isArray(targets) && targets.length === 1 && record(targets[0])?.[target.kind] === target.value;
2107
2140
  }
2108
2141
  async function apiResult(url, token, method, body, verifyUploader, timeout = 12e4) {
2109
2142
  assertUploaderUnchanged(verifyUploader);
@@ -2333,6 +2366,22 @@ async function ensureContainerApplications(options) {
2333
2366
  assertContainerApplicationSettings(confirmed, plan);
2334
2367
  }
2335
2368
  }
2369
+ /**
2370
+ * The `_headers` file a native build generated for its fingerprinted files.
2371
+ * This API takes it as a `_headers` module, as cf does on its JSON version
2372
+ * uploads. A user-authored `_headers` is not sent on this path.
2373
+ */
2374
+ function readGeneratedAssetHeaders(output) {
2375
+ if (!output.assetsDirectory) return;
2376
+ let text;
2377
+ try {
2378
+ text = readFileSync(join(getWorkerAssetsDir(output.directory), "_headers"), "utf8");
2379
+ } catch (cause) {
2380
+ if (cause instanceof Error && "code" in cause && cause.code === "ENOENT") return;
2381
+ throw cause;
2382
+ }
2383
+ return isGeneratedAssetHeaders(text) ? text : void 0;
2384
+ }
2336
2385
  async function uploadAssets(options) {
2337
2386
  if (!options.output.assetsDirectory) return;
2338
2387
  const directory = getWorkerAssetsDir(options.output.directory);
@@ -2460,6 +2509,12 @@ async function uploadPinnedCloudflareVersion(options) {
2460
2509
  content_base64: readFileSync(join(getWorkerBundleDir(options.output.directory), name)).toString("base64")
2461
2510
  });
2462
2511
  }
2512
+ const generatedHeaders = readGeneratedAssetHeaders(options.output);
2513
+ if (generatedHeaders !== void 0) modules.push({
2514
+ name: "_headers",
2515
+ content_type: "text/plain",
2516
+ content_base64: Buffer$2.from(generatedHeaders).toString("base64")
2517
+ });
2463
2518
  await preflightWorkflowExports({
2464
2519
  exports,
2465
2520
  accountUrl,
@@ -2522,6 +2577,8 @@ async function uploadPinnedCloudflareVersion(options) {
2522
2577
  } catch {
2523
2578
  throw new Error(`Cloudflare Worker version ${versionId} was uploaded${options.atomic ? " and may already be published" : ""}, but its Container applications could not be verified. Read back the Worker deployment and Container identities before retrying.`);
2524
2579
  }
2580
+ const target = placementTarget(config.placement);
2581
+ if (target && !keepsPlacementTarget(uploaded.placement, target)) throw new Error(`Cloudflare did not keep placement.${target.kind} "${target.value}" on Worker version ${versionId}${options.atomic ? ", which is already live" : ", so it was not deployed"}. Deploy again, or set cloudflare.placement to { mode: 'smart' } in void.config.ts.`);
2525
2582
  return {
2526
2583
  id: versionId,
2527
2584
  urls: Array.isArray(uploaded.urls) ? uploaded.urls.filter((url) => typeof url === "string") : []
@@ -2952,7 +3009,7 @@ function createCfVersionRunner(options) {
2952
3009
  "versions",
2953
3010
  "create",
2954
3011
  "--prebuilt",
2955
- ...operation.message ? ["--message", operation.message] : [],
3012
+ ...operation.message ? [`--message=${operation.message}`] : [],
2956
3013
  ...operation.secretsFilePath ? ["--secrets-file", operation.secretsFilePath] : [],
2957
3014
  ...operation.previewAlias ? ["--preview-alias", operation.previewAlias] : []
2958
3015
  ], command.capture));
@@ -2979,7 +3036,8 @@ function createCfVersionRunner(options) {
2979
3036
  strategy: "percentage",
2980
3037
  versions: parsed,
2981
3038
  annotations: { "workers/message": operation.message }
2982
- })] : []
3039
+ })] : [],
3040
+ ...operation.bypassDeploymentChecks ? ["--bypass-deployment-checks"] : []
2983
3041
  ], command.capture);
2984
3042
  }
2985
3043
  if (operation.type === "worker.deploy") {
@@ -2989,7 +3047,7 @@ function createCfVersionRunner(options) {
2989
3047
  return uploadedResult(await run([
2990
3048
  "deploy",
2991
3049
  "--prebuilt",
2992
- ...operation.message ? ["--message", operation.message] : [],
3050
+ ...operation.message ? [`--message=${operation.message}`] : [],
2993
3051
  ...operation.secretsFilePath ? ["--secrets-file", operation.secretsFilePath] : []
2994
3052
  ], command.capture));
2995
3053
  }
@@ -3383,6 +3441,10 @@ async function activateCloudflareVersionWithProgress(activate, options) {
3383
3441
  }
3384
3442
  }
3385
3443
  function formatCloudflareActivationError(result) {
3444
+ const message = formatCloudflareActivationFailure(result);
3445
+ return result.restoredOlderSecrets ? `${message}\nCloudflare refused to restore the previous version because this deploy changed a secret, so Void forced the restore. The previous version runs with its old secret values; deploy again to apply the new ones.` : message;
3446
+ }
3447
+ function formatCloudflareActivationFailure(result) {
3386
3448
  const status = result.status === void 0 ? "" : ` (exit ${String(result.status)})`;
3387
3449
  const cloudflareCode = result.cloudflareErrorCode === void 0 ? "" : ` Cloudflare error code: ${String(result.cloudflareErrorCode)}.`;
3388
3450
  const diagnostic = result.diagnostic ? `\n\n${result.diagnostic}` : "";
@@ -3494,6 +3556,7 @@ async function prepareCloudflareFrameworkArtifact(options) {
3494
3556
  await generateDeployWrapperIfNeeded(root, join(root, preset.workerDir), preset.workerMain, {
3495
3557
  crons,
3496
3558
  queues,
3559
+ cloudflareQueueNames: options.cloudflareQueueNames,
3497
3560
  hasMigrations: false,
3498
3561
  migrationDialect: analysis.dialect,
3499
3562
  readiness: true,
@@ -3640,7 +3703,8 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
3640
3703
  headerRules: merged.headerRules,
3641
3704
  redirectRules: merged.redirectRules,
3642
3705
  fallbackRules: merged.fallbackRules,
3643
- notFound: voidConfig.routing?.notFound
3706
+ notFound: voidConfig.routing?.notFound,
3707
+ html_handling: readWranglerHtmlHandling(rootConfig)
3644
3708
  });
3645
3709
  const entryPath = join(root, ".void", "deploy", "cloudflare", "static-edge.mjs");
3646
3710
  mkdirSync(dirname(entryPath), { recursive: true });
@@ -4155,12 +4219,14 @@ async function buildCloudflareWorker(input) {
4155
4219
  const buildChildEnv = scrubManagedDeployBuildMarkers(scrubWranglerAuthCredentials(deployChildEnv(accountId, apiBaseUrl)));
4156
4220
  deleteEnvVarCaseAware(buildChildEnv, CLOUDFLARE_DEPLOY_BUILD_ENV);
4157
4221
  buildChildEnv[CLOUDFLARE_DEPLOY_BUILD_ENV] = "1";
4222
+ deleteEnvVarCaseAware(buildChildEnv, CLOUDFLARE_QUEUE_NAMES_BUILD_ENV);
4223
+ if (desired.queueNames) buildChildEnv[CLOUDFLARE_QUEUE_NAMES_BUILD_ENV] = JSON.stringify(desired.queueNames);
4158
4224
  deleteEnvVarCaseAware(buildChildEnv, CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV);
4159
4225
  if (existingWorker) buildChildEnv[CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV] = "1";
4160
4226
  deleteEnvVarCaseAware(buildChildEnv, "NODE_ENV");
4161
4227
  buildChildEnv.NODE_ENV = "production";
4162
4228
  const runBuild = deps.runBuild ?? ((env) => {
4163
- const command = frameworkPreset ? voidConfig.inference?.build ?? resolveProjectCommand(root, frameworkPreset.buildCommand) : resolveProjectCommand(root, "vite build");
4229
+ const command = resolveFullDeployBuildCommand(root, voidConfig.inference?.build, frameworkPreset?.buildCommand).command;
4164
4230
  execSync(command, {
4165
4231
  cwd: root,
4166
4232
  stdio: "inherit",
@@ -4185,7 +4251,8 @@ async function buildCloudflareWorker(input) {
4185
4251
  preset: frameworkPreset,
4186
4252
  requiredSecretNames: schemaFacts.requiredKeys,
4187
4253
  ai: needsAI ? { binding: aiBindingName } : void 0,
4188
- preserveBindings: existingWorker !== null
4254
+ preserveBindings: existingWorker !== null,
4255
+ cloudflareQueueNames: desired.queueNames
4189
4256
  });
4190
4257
  } catch (error) {
4191
4258
  log$1.error(`deploy: could not prepare ${detectedFramework.name} for Cloudflare — ${getErrorMessage(error)}`);
@@ -4639,6 +4706,114 @@ function existingAddresses(rootConfig, pre) {
4639
4706
  return Array.isArray(rootConfig.addresses) ? rootConfig.addresses.map((a) => typeof a === "string" ? a.toLowerCase() : "").filter((a) => pre.addresses.includes(a)) : [];
4640
4707
  }
4641
4708
  //#endregion
4709
+ //#region src/cli/deploy-cloudflare-queues.ts
4710
+ function isValidQueueName(name) {
4711
+ try {
4712
+ assertValidResourceName("queue", name);
4713
+ return true;
4714
+ } catch {
4715
+ return false;
4716
+ }
4717
+ }
4718
+ /**
4719
+ * Pick each queue's Cloudflare name from the account's queues and write it into `desired`.
4720
+ * Returns the chosen names that do not exist yet, or a message that blocks the deploy.
4721
+ */
4722
+ async function chooseCloudflareQueueNames(input) {
4723
+ const { desired, workerName, configPath, runWrangler } = input;
4724
+ if (!desired.queueNames) return {
4725
+ ok: true,
4726
+ absent: []
4727
+ };
4728
+ const lookup = async (name) => {
4729
+ const info = await Promise.resolve(runWrangler({
4730
+ type: "queues.info",
4731
+ name,
4732
+ configPath
4733
+ }, { capture: true }));
4734
+ if (isQueueConfirmedAbsent(info)) return null;
4735
+ const data = info.data;
4736
+ if (!isCleanCloudflareExit(info) || !isRecord(data) || data.name !== name || !Array.isArray(data.consumers)) throw new Error(`deploy: could not read Cloudflare queue ${name} and its consumers. Retry \`void deploy --platform cloudflare\`.`);
4737
+ return { consumers: data.consumers };
4738
+ };
4739
+ const invalid = Object.keys(desired.queueNames).filter((queueName) => !isValidQueueName(queueName)).map((queueName) => ` • ${queueName} (queue)`);
4740
+ if (invalid.length > 0) return {
4741
+ ok: false,
4742
+ message: [
4743
+ "Deploy blocked — these queue names are not valid Cloudflare queue names:",
4744
+ ...invalid,
4745
+ "",
4746
+ "A queue takes its name from its path in queues/; nested segments are joined with \"-\".",
4747
+ "A queue name must be 1–63 characters, contain only letters, digits and \"-\", and",
4748
+ "begin and end with a letter or digit.",
4749
+ "",
4750
+ "Rename the offending file(s) in queues/ and retry."
4751
+ ].join("\n")
4752
+ };
4753
+ const queueNames = desired.queueNames;
4754
+ const clashes = Object.keys(queueNames).filter((queueName) => Object.hasOwn(queueNames, queueNames[queueName])).map((queueName) => ` • ${queueName} uses the Cloudflare queue ${queueNames[queueName]}, which is also a queue in queues/`);
4755
+ if (clashes.length > 0) return {
4756
+ ok: false,
4757
+ message: [
4758
+ "Deploy blocked — these queues would share a Cloudflare queue:",
4759
+ ...clashes,
4760
+ "",
4761
+ `A queue's Cloudflare name is the Worker name, "-", then its name from queues/.`,
4762
+ "Rename one of the files in queues/, then retry."
4763
+ ].join("\n")
4764
+ };
4765
+ const names = {};
4766
+ const absent = [];
4767
+ const tooLong = [];
4768
+ const taken = [];
4769
+ for (const queueName of Object.keys(desired.queueNames)) {
4770
+ const scopedName = desired.queueNames[queueName];
4771
+ const scoped = isValidQueueName(scopedName) ? await lookup(scopedName) : null;
4772
+ const plain = scoped?.consumers.includes(workerName) ? void 0 : await lookup(queueName);
4773
+ const choice = chooseCloudflareQueueName({
4774
+ workerName,
4775
+ queueName,
4776
+ scopedName,
4777
+ scoped,
4778
+ plain
4779
+ });
4780
+ names[queueName] = choice.name;
4781
+ if (!isValidQueueName(choice.name)) {
4782
+ tooLong.push(` • ${choice.name} (${choice.name.length} characters)`);
4783
+ continue;
4784
+ }
4785
+ const state = choice.kept ? plain : scoped;
4786
+ if (state === null) absent.push(choice.name);
4787
+ for (const consumer of otherQueueConsumers(state, workerName)) taken.push(` • ${choice.name} is consumed by ${consumer === null ? "a non-Worker (HTTP pull) consumer" : `Worker ${consumer}`}`);
4788
+ if (choice.kept) input.info(`Queue ${queueName} keeps its Cloudflare name ${choice.name}, because this Worker already consumes it.`);
4789
+ }
4790
+ if (tooLong.length > 0) return {
4791
+ ok: false,
4792
+ message: [
4793
+ "Deploy blocked — these Cloudflare queue names are longer than 63 characters:",
4794
+ ...tooLong,
4795
+ "",
4796
+ `A queue's Cloudflare name is the Worker name, "-", then its name from queues/.`,
4797
+ "Shorten the Worker name or rename the file(s) in queues/, then retry."
4798
+ ].join("\n")
4799
+ };
4800
+ if (taken.length > 0) return {
4801
+ ok: false,
4802
+ message: [
4803
+ `Deploy blocked — Worker ${workerName} cannot consume these queues:`,
4804
+ ...taken,
4805
+ "",
4806
+ "A Cloudflare queue has one consumer. Rename the file in queues/ or the Worker, then retry."
4807
+ ].join("\n")
4808
+ };
4809
+ desired.queueNames = names;
4810
+ desired.queues = Object.values(names);
4811
+ return {
4812
+ ok: true,
4813
+ absent
4814
+ };
4815
+ }
4816
+ //#endregion
4642
4817
  //#region src/cli/deploy-cloudflare-preflight.ts
4643
4818
  /** Validate source-level native deploy inputs before account operations or project code. */
4644
4819
  async function prepareCloudflareDeploySource(root, options, voidConfig) {
@@ -4895,53 +5070,38 @@ async function preflightCloudflareWorker(input) {
4895
5070
  return exit(1);
4896
5071
  }
4897
5072
  };
4898
- const { missing: initiallyMissing } = checkCloudflareProvisionDrift(configPath, desired);
4899
- const d1NeedsConfigReconciliation = !existingWorker && d1MigrationsDirMissing();
4900
- if (options.provision || initiallyMissing.length > 0 || d1NeedsConfigReconciliation) await provisionAndVerify();
4901
- else {
4902
- const invalidQueues = desired.queues.filter((name) => {
4903
- try {
4904
- assertValidResourceName("queue", name);
4905
- return false;
4906
- } catch {
4907
- return true;
4908
- }
5073
+ let queueNames;
5074
+ try {
5075
+ queueNames = await chooseCloudflareQueueNames({
5076
+ desired,
5077
+ workerName,
5078
+ configPath,
5079
+ runWrangler,
5080
+ info: (message) => log$1.info(message)
4909
5081
  });
4910
- if (invalidQueues.length > 0) {
4911
- log$1.error([
4912
- "Deploy blocked — these queue names are not valid Cloudflare queue names:",
4913
- ...invalidQueues.map((name) => ` • ${name} (queue)`),
4914
- "",
4915
- "A queue takes its name from its path in queues/; nested segments are joined with \"-\".",
4916
- "A queue name must be 1–63 characters, contain only letters, digits and \"-\", and",
4917
- "begin and end with a letter or digit.",
4918
- "",
4919
- "Rename the offending file(s) in queues/ and retry."
4920
- ].join("\n"));
4921
- return exit(1);
4922
- }
4923
- const absentQueues = [];
4924
- for (const name of desired.queues) {
4925
- const info = await Promise.resolve(runWrangler({
4926
- type: "queues.info",
4927
- name,
4928
- configPath
4929
- }, { capture: true }));
4930
- if (isQueueConfirmedAbsent(info)) absentQueues.push(name);
4931
- }
4932
- if (absentQueues.length > 0) await provisionAndVerify();
5082
+ } catch (error) {
5083
+ log$1.error(getErrorMessage(error));
5084
+ return exit(1);
5085
+ }
5086
+ if (!queueNames.ok) {
5087
+ log$1.error(queueNames.message);
5088
+ return exit(1);
4933
5089
  }
5090
+ const absentQueues = queueNames.absent;
5091
+ const { missing: initiallyMissing } = checkCloudflareProvisionDrift(configPath, desired);
5092
+ const d1NeedsConfigReconciliation = !existingWorker && d1MigrationsDirMissing();
5093
+ if (options.provision || initiallyMissing.length > 0 || d1NeedsConfigReconciliation || absentQueues.length > 0) await provisionAndVerify();
4934
5094
  const frameworkQueues = detectedFramework ? source.analysis.queues : [];
4935
5095
  writeProvisionedWranglerConfig(root, {
4936
5096
  name: workerName,
4937
5097
  accountId,
4938
5098
  ...detectedFramework ? { queues: {
4939
5099
  producers: frameworkQueues.map((queue) => ({
4940
- queue: queue.name,
5100
+ queue: cloudflareQueueName(queue.name, desired.queueNames),
4941
5101
  binding: queue.bindingName
4942
5102
  })),
4943
5103
  consumers: frameworkQueues.map((queue) => ({
4944
- queue: queue.name,
5104
+ queue: cloudflareQueueName(queue.name, desired.queueNames),
4945
5105
  ...queue.maxBatchSize != null && { max_batch_size: queue.maxBatchSize },
4946
5106
  ...queue.maxBatchTimeout != null && { max_batch_timeout: queue.maxBatchTimeout },
4947
5107
  ...queue.maxRetries != null && { max_retries: queue.maxRetries },
@@ -5392,7 +5552,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
5392
5552
  voidToken: await client.createPrerenderToken(config.projectId)
5393
5553
  });
5394
5554
  if (result.paths.length === 0) log$1.info("No pages to prerender");
5395
- else if (result.failed.length > 0) voidWarn(`${formatCount(result.failed.length, "page")} failed to prerender`);
5555
+ else assertNoPrerenderFailures(result.failed);
5396
5556
  }
5397
5557
  const analysis = await analyzeApplication(root, {
5398
5558
  config: voidConfig,
@@ -1,29 +1,29 @@
1
1
  import { a as join, c as resolve, n as dirname, r as extname, s as relative } from "./dist-ipQi0Q8y.mjs";
2
- import { m as needsApplicationDatabase } from "./plugin-inference-DUjCd55H.mjs";
2
+ import { h as needsApplicationDatabase } from "./plugin-inference-CeiB6BG5.mjs";
3
3
  import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
4
4
  import { u as isNodeTarget } from "./config-DHgSEWT7.mjs";
5
5
  import { t as collectMigrations } from "./collect-Dew86qce.mjs";
6
6
  import { i as collectFiles, t as collectPages } from "./isr-config-fZaJJ8t7.mjs";
7
7
  import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-D522zd0A.mjs";
8
8
  import { s as shouldLinkDeployProject, t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
9
- import { E as resolveLiveBindingConfig, O as syncWranglerBindings, a as LIVE_MIGRATION_TAG, g as normalizeWranglerCompatibilityFlags, u as ensureWranglerCompat, v as readExistingLiveBindingConfig } from "./wrangler-F96NnLyb.mjs";
9
+ import { E as resolveLiveBindingConfig, O as syncWranglerBindings, a as LIVE_MIGRATION_TAG, g as normalizeWranglerCompatibilityFlags, u as ensureWranglerCompat, v as readExistingLiveBindingConfig } from "./wrangler-CDiEBCdS.mjs";
10
10
  import { n as buildMigrationPlanBundle } from "./plan-BhLO2p4w.mjs";
11
11
  import { l as getTokenSource } from "./auth-B6iOCjKI.mjs";
12
12
  import { t as discoverSchema } from "./discover-LaV0tbIu.mjs";
13
13
  import { t as findEnvFile } from "./env-types-BicfKBhV.mjs";
14
- import { a as buildEnv } from "./version-metadata-tS39iW09.mjs";
14
+ import { a as buildEnv } from "./version-metadata-DmaZNTYW.mjs";
15
15
  import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-BIaXIkkv.mjs";
16
16
  import { i as validateMigrations, r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
17
17
  import { L as log$1, N as intro, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
18
18
  import { t as formatCloudflareUserMessage } from "./cloudflare-user-output-Q-k0QoNQ.mjs";
19
- import { c as platformErrorMessage, i as isCliOutdatedError, n as PlatformApiError, o as isHeadersTimeoutError, s as parsePlatformErrorBody } from "./client-BEkdj1kx.mjs";
19
+ import { c as platformErrorMessage, i as isCliOutdatedError, n as PlatformApiError, o as isHeadersTimeoutError, s as parsePlatformErrorBody } from "./client-BEMtySaV.mjs";
20
20
  import { f as import_picocolors, h as sanitizeTerminalText, m as printSuccess, o as formatCount, p as note, r as createSpinner, u as getErrorMessage } from "./output-BpgYODYx.mjs";
21
- import { a as promptProjectSelection, i as reportProjectCreationWarnings, o as promptProjectSetupAction, r as promptAndCreateProject } from "./create-project-DV71ol5d.mjs";
21
+ import { a as promptProjectSelection, i as reportProjectCreationWarnings, o as promptProjectSetupAction, r as promptAndCreateProject } from "./create-project-CjzbBlTv.mjs";
22
22
  import { o as detectPreset, s as formatProjectCommand, u as resolveProjectCommand } from "./cloudflare-process-8jEYIeim.mjs";
23
- import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-Dwq3PJzK.mjs";
24
- import { a as needsWrapper, i as generateWrapper } from "./wrapper-D3sZyh2C.mjs";
23
+ import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-XcukUlFM.mjs";
24
+ import { a as needsWrapper, i as generateWrapper } from "./wrapper-CEiDeCqD.mjs";
25
25
  import { n as drizzleKitBin } from "./yarn-pnp-DLbEFMT0.mjs";
26
- import { t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-BzGEj0Ge.mjs";
26
+ import { t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-JCxw7QDi.mjs";
27
27
  import { cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync } from "node:fs";
28
28
  import { createDeployArtifact, createDeployUploadPayload } from "@void/deploy-core";
29
29
  import { createHash } from "node:crypto";
@@ -168,14 +168,14 @@ function resolveStaticBuildCommand(preset, buildOverride, hasExplicitDir = false
168
168
  * the user's own text and is used verbatim for both, so what is printed is
169
169
  * exactly what is executed.
170
170
  */
171
- function resolveFullDeployBuildCommand(root, buildOverride) {
171
+ function resolveFullDeployBuildCommand(root, buildOverride, fallbackBuildCommand = "vite build") {
172
172
  if (buildOverride) return {
173
173
  label: buildOverride,
174
174
  command: buildOverride
175
175
  };
176
176
  return {
177
- label: formatProjectCommand(root, "vite build"),
178
- command: resolveProjectCommand(root, "vite build")
177
+ label: formatProjectCommand(root, fallbackBuildCommand),
178
+ command: resolveProjectCommand(root, fallbackBuildCommand)
179
179
  };
180
180
  }
181
181
  /**
@@ -1459,18 +1459,34 @@ function collectWorkerFiles(workerDir) {
1459
1459
  }
1460
1460
  return out;
1461
1461
  }
1462
+ const WRANGLER_HTML_HANDLING = /* @__PURE__ */ new Set([
1463
+ "auto-trailing-slash",
1464
+ "force-trailing-slash",
1465
+ "drop-trailing-slash",
1466
+ "none"
1467
+ ]);
1468
+ /** Read `assets.html_handling` from a materialized root Wrangler config object. */
1469
+ function readWranglerHtmlHandling(rootConfig) {
1470
+ const assets = rootConfig.assets;
1471
+ if (typeof assets !== "object" || assets === null || Array.isArray(assets)) return;
1472
+ const value = assets.html_handling;
1473
+ return typeof value === "string" && WRANGLER_HTML_HANDLING.has(value) ? value : void 0;
1474
+ }
1462
1475
  /**
1463
1476
  * Build a static-deploy manifest. Pure shape transformation — no I/O.
1464
1477
  */
1465
1478
  function buildStaticManifest(opts) {
1466
- const { appType, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, notFound } = opts;
1479
+ const { appType, hashedAssetsPrefix, headerRules, redirectRules, fallbackRules, notFound, html_handling } = opts;
1467
1480
  const { assetConfig, fallbackRules: resolvedFallbackRules } = resolveSpaFallbackChain(appType, fallbackRules, notFound);
1468
1481
  const manifest = {
1469
1482
  version: 3,
1470
1483
  assetManifestVersion: 2,
1471
1484
  bindings: {},
1472
1485
  type: appType,
1473
- assetConfig
1486
+ assetConfig: html_handling === void 0 ? assetConfig : {
1487
+ ...assetConfig,
1488
+ html_handling
1489
+ }
1474
1490
  };
1475
1491
  if (hashedAssetsPrefix) manifest.hashedAssetsPrefix = hashedAssetsPrefix;
1476
1492
  if (headerRules && headerRules.length > 0) manifest.headerRules = headerRules;
@@ -1638,4 +1654,4 @@ async function runStaticDeploy(root, config, client, preset, skipBuild, gitMetad
1638
1654
  printDeploySuccess(result.published !== false);
1639
1655
  }
1640
1656
  //#endregion
1641
- export { resolveDeployLiveBindingConfig as A, generateDeployWrapperIfNeeded as C, hasPrerenderSources as D, hasNonPageBackend as E, resolveStaticDeployPreset as F, toManifestSchedulesAndQueues as I, validateDeployMigrations as L, resolveDeployWranglerCompat as M, resolveFullDeployBuildCommand as N, log as O, resolveStaticBuildCommand as P, ensureManagedHyperdrive as S, getGitCommit as T, hasDeploySchemaDrift as _, collectAndHashAssets as a, assertWorkerMainUploaded as b, formatDeploySummary as c, mergeAndLintRoutingRules as d, streamDirectR2Deploy as f, getDeploySchemaDriftMessage as g, assertDeploySchemaDriftFree as h, buildStaticManifest as i, resolveDeployWorkerMain as j, promptDeployProjectConfig as k, printDeployContext as l, warnUnpublishedRouting as m, runStaticDeploy as n, collectWorkerFiles as o, warnIgnoredNotFoundForFramework as p, buildFrameworkManifest as r, detectNonSpaFallbackWarning as s, assembleVoidManifest as t, printDeploySuccess as u, assertEnvSchemaValid as v, getExitCode as w, createProjectFromSlug as x, assertProjectDeployAccess as y };
1657
+ export { promptDeployProjectConfig as A, ensureManagedHyperdrive as C, hasNonPageBackend as D, getGitCommit as E, resolveStaticBuildCommand as F, resolveStaticDeployPreset as I, toManifestSchedulesAndQueues as L, resolveDeployWorkerMain as M, resolveDeployWranglerCompat as N, hasPrerenderSources as O, resolveFullDeployBuildCommand as P, validateDeployMigrations as R, createProjectFromSlug as S, getExitCode as T, getDeploySchemaDriftMessage as _, collectAndHashAssets as a, assertProjectDeployAccess as b, readWranglerHtmlHandling as c, printDeploySuccess as d, mergeAndLintRoutingRules as f, assertDeploySchemaDriftFree as g, warnUnpublishedRouting as h, buildStaticManifest as i, resolveDeployLiveBindingConfig as j, log as k, formatDeploySummary as l, warnIgnoredNotFoundForFramework as m, runStaticDeploy as n, collectWorkerFiles as o, streamDirectR2Deploy as p, buildFrameworkManifest as r, detectNonSpaFallbackWarning as s, assembleVoidManifest as t, printDeployContext as u, hasDeploySchemaDrift as v, generateDeployWrapperIfNeeded as w, assertWorkerMainUploaded as x, assertEnvSchemaValid as y };
@@ -1,8 +1,8 @@
1
1
  import { a as join } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
3
- import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BJjULvL0.mjs";
4
- import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-tS39iW09.mjs";
5
- import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-DtROpNNI.mjs";
3
+ import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BaMz0j7H.mjs";
4
+ import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DmaZNTYW.mjs";
5
+ import { _ as provisionEnv, r as assertNoTransportRedirectInProjectDotenv, s as deleteEnvVarCaseAware, v as resolvePinnedApiBaseUrl } from "./provision-B7UFrBH7.mjs";
6
6
  import { readWranglerTopLevelString } from "@void/deploy-cloudflare";
7
7
  //#region src/cli/deploy-transport.ts
8
8
  /**
package/dist/deploy.mjs CHANGED
@@ -3,10 +3,10 @@ import { p as readConfig, u as isNodeTarget } from "./config-DHgSEWT7.mjs";
3
3
  import { o as validateSsrEntry } from "./entry-BEM8ZuGP.mjs";
4
4
  import { r as hasEmailHandlers } from "./email-B9ayYQEG.mjs";
5
5
  import { a as resolveDistDir, c as hasDocumentRoutes, l as resolveAssetConfig, n as collectRevalidate, o as resolveWorkerDirName, s as hasApiRoutes } from "./isr-config-fZaJJ8t7.mjs";
6
- import { t as analyzeApplication } from "./application-routing-DAhNP4u3.mjs";
7
- import { t as prepareCfBuildOutput$1 } from "./cf-build-output-BhVxldCw.mjs";
6
+ import { t as analyzeApplication } from "./application-routing-C8EqRDfv.mjs";
7
+ import { t as prepareCfBuildOutput$1 } from "./cf-build-output-Bapzc_8Z.mjs";
8
8
  import { o as detectPreset } from "./cloudflare-process-8jEYIeim.mjs";
9
- import { F as resolveStaticDeployPreset, I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, a as collectAndHashAssets, b as assertWorkerMainUploaded, d as mergeAndLintRoutingRules, h as assertDeploySchemaDriftFree, i as buildStaticManifest, j as resolveDeployWorkerMain, o as collectWorkerFiles, t as assembleVoidManifest } from "./deploy-managed-static-DlvcvnQT.mjs";
9
+ import { I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, R as validateDeployMigrations, a as collectAndHashAssets, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, i as buildStaticManifest, o as collectWorkerFiles, t as assembleVoidManifest, x as assertWorkerMainUploaded } from "./deploy-managed-static-CDYA2p3L.mjs";
10
10
  import { existsSync } from "node:fs";
11
11
  import { createDeployArtifact } from "@void/deploy-core";
12
12
  //#region src/deploy.ts
@@ -80,6 +80,7 @@ async function prepareDeployArtifact(root = process.cwd()) {
80
80
  const rules = mergeAndLintRoutingRules(clientDir, config.routing);
81
81
  const manifest = assembleVoidManifest(pages ? scan.pages : null, false, {
82
82
  bindings,
83
+ vars: config.worker?.vars,
83
84
  hasEmailHandlers: scan.email !== void 0 && hasEmailHandlers(scan.email),
84
85
  migrations,
85
86
  schedules,