void 1.4.0 → 1.5.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 (444) hide show
  1. package/README.md +1 -1
  2. package/dist/{account-cmd-HP8bixYo.mjs → account-cmd-ChVKPZ-w.mjs} +7 -8
  3. package/dist/{action-key-XZ9HkWAO.mjs → action-key-XtKKbbsi.mjs} +1 -2
  4. package/dist/{agents-CuNtT0D_.mjs → agents-DRo8gzni.mjs} +2 -3
  5. package/dist/{application-analysis-DDOQwiXk.mjs → application-analysis-2vGZrKzg.mjs} +18 -24
  6. package/dist/{application-routing-4719u_kf.mjs → application-routing-DnUQoOJD.mjs} +2 -3
  7. package/dist/{ast-CsZ_q_gc.mjs → ast-Cv0JwXqb.mjs} +1 -2
  8. package/dist/{ast-bindings-C3yaPs1y.mjs → ast-bindings-BkivMJIo.mjs} +6 -11
  9. package/dist/{atomic-write-Dq6R0BPN.mjs → atomic-write-DA6eD1Kp.mjs} +1 -2
  10. package/dist/{auth-g2TQbDLD.d.mts → auth-CH4PLAX1.d.mts} +0 -2
  11. package/dist/{auth-Cbqi1iVX.mjs → auth-CL-p_rqV.mjs} +1 -1
  12. package/dist/{auth-B6iOCjKI.mjs → auth-Dy8svcqQ.mjs} +6 -7
  13. package/dist/{auth-3sGB0zJ1.mjs → auth-YVjBX5NY.mjs} +1 -2
  14. package/dist/{auth-client-Bawdj38n.d.mts → auth-client-6-Ft9i9T.d.mts} +0 -2
  15. package/dist/{auth-client-BWBT8HLp.mjs → auth-client-DwCdwKbw.mjs} +1 -2
  16. package/dist/{auth-client-react-CMLwT2xI.mjs → auth-client-react-CJdeErvM.mjs} +1 -2
  17. package/dist/{auth-client-react-7GFffu8R.d.mts → auth-client-react-DvQLe5Zb.d.mts} +0 -2
  18. package/dist/{auth-client-solid-UoreJWZG.mjs → auth-client-solid-BRvgvp6h.mjs} +1 -2
  19. package/dist/{auth-client-solid-DyTFL4cq.d.mts → auth-client-solid-P9pEtKGp.d.mts} +0 -2
  20. package/dist/{auth-client-svelte-zetW0KIH.d.mts → auth-client-svelte-B5j8irT6.d.mts} +0 -2
  21. package/dist/{auth-client-svelte-Cv_WvrRk.mjs → auth-client-svelte-BSqUCEed.mjs} +1 -2
  22. package/dist/{auth-client-vue-bChShbQP.d.mts → auth-client-vue-BEiAfavk.d.mts} +0 -2
  23. package/dist/{auth-client-vue-CFk7Xbv3.mjs → auth-client-vue-CPkbRtOO.mjs} +1 -2
  24. package/dist/{auth-link-CedYpDCy.mjs → auth-link-D4uMdOsw.mjs} +7 -8
  25. package/dist/{auth-migrations-BO27GDNr.mjs → auth-migrations-DDeifS3v.mjs} +1 -2
  26. package/dist/{auth-router-vafo7x8w.mjs → auth-router-62dna450.mjs} +6 -7
  27. package/dist/{base64-DVrOndmI.mjs → base64-ikl9yBy3.mjs} +1 -2
  28. package/dist/{better-auth-shared-BHB8kiTE.d.mts → better-auth-shared-BJyG2mH0.d.mts} +2 -6
  29. package/dist/{better-auth-shared-7FM3Uk2N.mjs → better-auth-shared-CiclgPde.mjs} +4 -5
  30. package/dist/{build-cmd-9vUAQ1_V.mjs → build-cmd-D93K_4Sa.mjs} +7 -8
  31. package/dist/{cache-jvwLNb0h.mjs → cache-CiIzEED4.mjs} +7 -8
  32. package/dist/{cancel-deploy-Dw0UmWKO.mjs → cancel-deploy-BNoGfn2e.mjs} +6 -7
  33. package/dist/{cf-access-CWP4avfP.mjs → cf-access-BmBT2h8_.mjs} +3 -4
  34. package/dist/{cf-access-BM9G0lhO.mjs → cf-access-pejlJmuy.mjs} +1 -2
  35. package/dist/{cf-build-output-XpNR9zoh.mjs → cf-build-output-B1C8U83u.mjs} +41 -314
  36. package/dist/cf-build-output-CmDOcA7K.mjs +1 -0
  37. package/dist/{cf-command-values-ByHk0xg4.mjs → cf-command-values-Ccl-zRhl.mjs} +10 -7
  38. package/dist/cf-config-migrate-Dy8MrKgF.mjs +326 -0
  39. package/dist/{cf-worker-settings-Dg27RzyT.mjs → cf-worker-settings-CARs4Wy9.mjs} +3 -5
  40. package/dist/cli/cli.mjs +66 -76
  41. package/dist/cli/cloudflare-operation-process.mjs +14 -18
  42. package/dist/cli/env-schema-probe.d.mts +1 -5
  43. package/dist/cli/env-schema-probe.mjs +4 -5
  44. package/dist/client-DVtAKeUm.mjs +1 -0
  45. package/dist/{client-B3LnB_bE.mjs → client-Qayy9xEh.mjs} +10 -12
  46. package/dist/{cloudflare-auth-DyD_kVFr.mjs → cloudflare-auth-CEu-1Ps_.mjs} +2 -3
  47. package/dist/{cloudflare-cmd-D-b_u3T4.mjs → cloudflare-cmd-DiFGaLow.mjs} +7 -8
  48. package/dist/{cloudflare-config-CH1AylZT.mjs → cloudflare-config-Chet188_.mjs} +22 -17
  49. package/dist/{cloudflare-connect-zTJh8UnN.mjs → cloudflare-connect-BdgAQBc7.mjs} +5 -6
  50. package/dist/{cloudflare-operations-Bc-7fN44.mjs → cloudflare-operations-CWA24vCh.mjs} +8 -9
  51. package/dist/{cloudflare-operations-BtulCNOg.mjs → cloudflare-operations-D8MoezuN.mjs} +1 -1
  52. package/dist/{cloudflare-process-8jEYIeim.mjs → cloudflare-process-DjJ638A-.mjs} +7 -9
  53. package/dist/{cloudflare-user-output-Q-k0QoNQ.mjs → cloudflare-user-output-zEwuGrEJ.mjs} +1 -2
  54. package/dist/collect-8i0wU63d.mjs +1 -0
  55. package/dist/{collect-Dew86qce.mjs → collect-C6Blu9yw.mjs} +2 -3
  56. package/dist/{config-BV2ASlpn.mjs → config-BszFVhpk.mjs} +1 -1
  57. package/dist/{config-tqMM6DwY.mjs → config-Bt4rw93x.mjs} +5 -6
  58. package/dist/{config-CAdZVTLN.d.mts → config-CzsNzGVH.d.mts} +2 -6
  59. package/dist/{config-OFOAimzt.mjs → config-DkA9jYF2.mjs} +4 -5
  60. package/dist/{config-D-6q7EBH.mjs → config-WlvEcL82.mjs} +3 -4
  61. package/dist/config-entry.d.mts +1 -3
  62. package/dist/config-entry.mjs +1 -2
  63. package/dist/{connect-BOM6zvFX.mjs → connect-b9mJbb6X.mjs} +10 -11
  64. package/dist/{create-project-Bxd02EHN.mjs → create-project-eomwm0wa.mjs} +9 -11
  65. package/dist/{create-project-C2K0DN2O.mjs → create-project-rnjum4_V.mjs} +1 -1
  66. package/dist/{database-provider-Cx525bwX.mjs → database-provider-DkZo4VwN.mjs} +1 -2
  67. package/dist/database-provider.d.mts +1 -3
  68. package/dist/database-provider.mjs +1 -1
  69. package/dist/{db-Cdvr3zwG.mjs → db-UPWmiSk1.mjs} +52 -54
  70. package/dist/{db-types-0eCiqYb1.mjs → db-types-C_8amnB0.mjs} +3 -4
  71. package/dist/{delete-lETE6Tpt.mjs → delete-BeeYi1WO.mjs} +7 -8
  72. package/dist/deploy-CfU7CR-b.mjs +2 -0
  73. package/dist/{deploy-CdM-LAxX.mjs → deploy-CwmCcTlq.mjs} +83 -112
  74. package/dist/{deploy-managed-static-DjeBFG2c.mjs → deploy-managed-static-gPDxyp3v.mjs} +33 -40
  75. package/dist/{deploy-transport-DIq_gFTP.mjs → deploy-transport-L6zzPE9T.mjs} +6 -7
  76. package/dist/deploy.d.mts +1 -3
  77. package/dist/deploy.mjs +10 -11
  78. package/dist/{dev-inbox-D0jxye_D.mjs → dev-inbox-CwH5VuZj.mjs} +3 -4
  79. package/dist/discover-D4mQthao.mjs +1 -0
  80. package/dist/{discover-LaV0tbIu.mjs → discover-Dhkzxgdt.mjs} +3 -4
  81. package/dist/{dispatch-CLa2LThw.mjs → dispatch-CiJ1Xrba.mjs} +12 -15
  82. package/dist/{dist-Cegxq8gs.mjs → dist-B6eN80gc.mjs} +199 -118
  83. package/dist/{dist-D15hFhP0.mjs → dist-BWNkVq50.mjs} +8 -15
  84. package/dist/{dist-Cor9XGoz.mjs → dist-D23AAMxT.mjs} +9 -16
  85. package/dist/{dist-ipQi0Q8y.mjs → dist-DMYe8CZJ.mjs} +1 -2
  86. package/dist/{dist-B1PLt4_8.mjs → dist-eV_Ep60B.mjs} +1 -1
  87. package/dist/{domain-DyhNtdYf.mjs → domain-3xdH9p2L.mjs} +8 -9
  88. package/dist/{dotenv-CNazY3-w.mjs → dotenv-CEI8hapP.mjs} +1 -2
  89. package/dist/{drizzle-9TubSZvI.mjs → drizzle-C8MPqt5m.mjs} +1 -1
  90. package/dist/{drizzle-BQfyvQKX.mjs → drizzle-lFdzSEa9.mjs} +2 -3
  91. package/dist/{email-B9ayYQEG.mjs → email-BHY72ixO.mjs} +3 -4
  92. package/dist/{email-DM2wDcBN.mjs → email-Du3YRnM5.mjs} +14 -15
  93. package/dist/{email-cloudflare-PMbAev9Q.mjs → email-cloudflare-CtD8qE13.mjs} +18 -21
  94. package/dist/{email-protocol-D9nTvhCp.mjs → email-protocol-DTs_TjCS.mjs} +1 -2
  95. package/dist/{entry-BEM8ZuGP.mjs → entry-CBZsCy3O.mjs} +5 -6
  96. package/dist/{env-78hbN-oI.mjs → env-Cnvp0pGy.mjs} +10 -11
  97. package/dist/{env-BaMz0j7H.mjs → env-CuzZZyjB.mjs} +3 -4
  98. package/dist/{env-0jrMQJI_.mjs → env-DtKg5G26.mjs} +2 -3
  99. package/dist/{env-helpers--wFmQ_5Q.mjs → env-helpers-Dj_SIwPu.mjs} +1 -2
  100. package/dist/{env-helpers-CyKtOBpj.d.mts → env-helpers-U56xuFgL.d.mts} +1 -3
  101. package/dist/{env-public-6lqiSD2b.d.mts → env-public-CeNeO_AT.d.mts} +2 -4
  102. package/dist/{env-raw-D74P4ebM.mjs → env-raw-e8qgqAzQ.mjs} +1 -2
  103. package/dist/{env-types-BicfKBhV.mjs → env-types-DqzVBKnS.mjs} +4 -5
  104. package/dist/{env-validation-BUfFZ6bt.mjs → env-validation-C8Cmvas0.mjs} +1 -1
  105. package/dist/{env-validation-B3VobvXm.mjs → env-validation-GV1oD4EV.mjs} +9 -10
  106. package/dist/{error-pages-CLIJ7aYq.mjs → error-pages-COVBnzK7.mjs} +6 -12
  107. package/dist/{fetch-CUX0tB78.d.mts → fetch-B-gLGYVl.d.mts} +0 -4
  108. package/dist/{fetch-CtESUYWd.mjs → fetch-C8yhLoF3.mjs} +3 -4
  109. package/dist/{fetch-error-Bw0n-IY-.mjs → fetch-error-DmlRM6e4.mjs} +2 -4
  110. package/dist/{fetch-stream-BspOeTAI.mjs → fetch-stream-DafNtVJC.mjs} +4 -5
  111. package/dist/{fetch-stream-DfkAzZf-.d.mts → fetch-stream-DuwxWmBM.d.mts} +1 -3
  112. package/dist/{gen-CFmsUsW1.mjs → gen-BvVmpZ5f.mjs} +12 -13
  113. package/dist/gen-i61rdQgg.mjs +1 -0
  114. package/dist/{generate-DkEb9rL-.mjs → generate-BOp1g1H_.mjs} +1 -1
  115. package/dist/{generate-B1m4Cm4n.mjs → generate-CWb8aOsm.mjs} +4 -5
  116. package/dist/{generated-wrangler-config-DeWj5F9Y.mjs → generated-wrangler-config-CoDaaFsA.mjs} +1 -2
  117. package/dist/{git-metadata-D-gurjzG.mjs → git-metadata-Cukp5kV5.mjs} +1 -2
  118. package/dist/{github-cmd-De-_IWbM.mjs → github-cmd-X2GKiLi-.mjs} +8 -9
  119. package/dist/{handler-BHktmuTL.d.mts → handler-Drm_lyrV.d.mts} +13 -26
  120. package/dist/{handler-BZ1t7-Rv.mjs → handler-xmzz0U38.mjs} +4 -5
  121. package/dist/{head-D2VF4ApL.mjs → head-5XPcnG-j.mjs} +1 -2
  122. package/dist/{head-C8K_iGe6.d.mts → head-MeF_5M_3.d.mts} +0 -2
  123. package/dist/{headers--vaK_chu.mjs → headers-DEUBAM6W.mjs} +4 -5
  124. package/dist/help-BcZDUcTw.mjs +1 -0
  125. package/dist/{help-CKbrhZha.mjs → help-EWDNxST-.mjs} +19 -11
  126. package/dist/{inbound-VrOLqwZY.mjs → inbound-DQfekMtz.mjs} +5 -6
  127. package/dist/{inbound-Da7XsjH3.d.mts → inbound-DSKSHDUj.d.mts} +0 -4
  128. package/dist/index.d.mts +23 -13
  129. package/dist/index.mjs +452 -208
  130. package/dist/{info-Yg0-V5Rs.mjs → info-jW8_d3VI.mjs} +6 -7
  131. package/dist/{init-CDiJQycf.mjs → init-jDQ5G9QC.mjs} +42 -59
  132. package/dist/{isr-config-fZaJJ8t7.mjs → isr-config-DhBkzCdY.mjs} +5 -9
  133. package/dist/{limits-D0vD1M9A.mjs → limits-CrHLm5Tk.mjs} +1 -2
  134. package/dist/{limits-CFsDKQvU.d.mts → limits-_xIf5z_P.d.mts} +0 -2
  135. package/dist/{link-Dllip08S.mjs → link-DOyxX5Xs.mjs} +8 -9
  136. package/dist/{list-BYRP6am0.mjs → list-C9pTYDtl.mjs} +8 -9
  137. package/dist/{live-BllfDuzA.d.mts → live-CDBHyYiR.d.mts} +2 -4
  138. package/dist/{live-BcHoTDFe.mjs → live-DF4HUl2m.mjs} +5 -7
  139. package/dist/{load-user-env-DD5qveNU.mjs → load-user-env-CSwdofj0.mjs} +1 -2
  140. package/dist/{local-d1-CAwAs9GH.mjs → local-d1-CKfek6Z4.mjs} +4 -5
  141. package/dist/{log-BMwmN5Ae.mjs → log-D9hwSySP.mjs} +3 -4
  142. package/dist/login-C0MiQrYs.mjs +1 -0
  143. package/dist/{login-PcFy5mlC.mjs → login-koQbjzPd.mjs} +6 -7
  144. package/dist/{logs-DmJTBhed.mjs → logs-cTU5TsRW.mjs} +8 -9
  145. package/dist/migrate-BG09-KOv.mjs +1 -0
  146. package/dist/{migrate-B8S2xTcb.mjs → migrate-C62pGTfr.mjs} +20 -16
  147. package/dist/{migration-handler-CwlEQUoo.d.mts → migration-handler-D8mDx3Ew.d.mts} +0 -4
  148. package/dist/{migration-handler-Cg0Y4EPu.mjs → migration-handler-DCehTlWs.mjs} +1 -2
  149. package/dist/{mime-BAyHPskU.mjs → mime-DKkO7ZtA.mjs} +2 -3
  150. package/dist/{mysql-migration-sql-BIS5vbNk.mjs → mysql-migration-sql-CI9VTwjt.mjs} +3 -5
  151. package/dist/{neon-DTZr7Bu7.mjs → neon-CJzQSycr.mjs} +2 -3
  152. package/dist/nitro.d.mts +0 -2
  153. package/dist/nitro.mjs +5 -6
  154. package/dist/{node-CDOPrGSl.mjs → node-BfAt2rz8.mjs} +8 -9
  155. package/dist/{operator-args-BsJIYXaT.mjs → operator-args-D79WQP70.mjs} +2 -3
  156. package/dist/{operator-auth-Cr2zCc-J.mjs → operator-auth-CfDcmzpo.mjs} +2 -3
  157. package/dist/{operator-client-C-ROjk1I.mjs → operator-client-BIY4-N_6.mjs} +3 -4
  158. package/dist/operator-cmd-BhHXIL2G.mjs +1 -0
  159. package/dist/{operator-cmd-DmkmS2wL.mjs → operator-cmd-CnAvSqJ5.mjs} +8 -9
  160. package/dist/{output-BpgYODYx.mjs → output-BCdLioKP.mjs} +4 -5
  161. package/dist/output-E6gecbbV.mjs +1 -0
  162. package/dist/{package-json-BjYqR-So.mjs → package-json-DvS6IFRv.mjs} +2 -3
  163. package/dist/pages/client.d.mts +9 -25
  164. package/dist/pages/client.mjs +28 -33
  165. package/dist/pages/head.d.mts +1 -1
  166. package/dist/pages/head.mjs +1 -1
  167. package/dist/pages/index.d.mts +4 -16
  168. package/dist/pages/index.mjs +9 -11
  169. package/dist/pages/islands-plugin.d.mts +29 -11
  170. package/dist/pages/islands-plugin.mjs +3 -4
  171. package/dist/pages/prefetch.d.mts +1 -1
  172. package/dist/pages/prefetch.mjs +1 -1
  173. package/dist/pages/protocol.d.mts +2 -2
  174. package/dist/pages/protocol.mjs +2 -2
  175. package/dist/pages/serialize.d.mts +1 -1
  176. package/dist/pages/serialize.mjs +1 -1
  177. package/dist/{pg-J2HbZIkX.mjs → pg-DoyPxa_X.mjs} +1 -2
  178. package/dist/{picocolors-BsDfhxIw.mjs → picocolors-D1NxSLw-.mjs} +2 -3
  179. package/dist/{plan-BhLO2p4w.mjs → plan-BOD70XGS.mjs} +1 -2
  180. package/dist/plan-CQ-N4gws.mjs +1 -0
  181. package/dist/{platform-args-BMD2gjc_.mjs → platform-args-Bv9hoLEL.mjs} +4 -7
  182. package/dist/platform-args-C1kqYUen.mjs +1 -0
  183. package/dist/{platform-auth-config-CImnfohz.mjs → platform-auth-config-CLj0EvnB.mjs} +10 -11
  184. package/dist/{platform-auth-protection-BogLhtHi.mjs → platform-auth-protection-DQDSxVhr.mjs} +10 -11
  185. package/dist/{platform-auth-recovery-B-mEaWEi.mjs → platform-auth-recovery-DD3oLerq.mjs} +9 -11
  186. package/dist/{platform-cmd-DZK2ixMl.mjs → platform-cmd-PLNLg-2N.mjs} +12 -13
  187. package/dist/{platform-cmd-CV8NxIIn.mjs → platform-cmd-WnOmdLzR.mjs} +1 -1
  188. package/dist/{platform-discovery-CHhNs8Nn.mjs → platform-discovery-B0eZjZ3B.mjs} +2 -3
  189. package/dist/{platform-domain-CRvelPGE.mjs → platform-domain-Bnq0vg0q.mjs} +7 -8
  190. package/dist/{platform-lifecycle-CPYY7E9B.mjs → platform-lifecycle-BCsFg1Tl.mjs} +53 -88
  191. package/dist/{platform-lifecycle-DwXq7kZt.mjs → platform-lifecycle-BQiN9HN5.mjs} +1 -1
  192. package/dist/{platform-management-lXdgGgAM.mjs → platform-management-CMJR8Zi-.mjs} +1 -1
  193. package/dist/{platform-management-BOnGbMSM.mjs → platform-management-nzCDwtiN.mjs} +7 -9
  194. package/dist/{platform-plans-config-CeydDSj0.mjs → platform-plans-config-Dx1agneU.mjs} +5 -6
  195. package/dist/{platform-recovery-noaALXnE.mjs → platform-recovery-DBNoME3I.mjs} +5 -6
  196. package/dist/{platform-registry-B9mWX9LO.mjs → platform-registry-DZ_2Xuqd.mjs} +4 -6
  197. package/dist/{platform-setup-Ca53gtt0.mjs → platform-setup-VEcHu0Vq.mjs} +4 -5
  198. package/dist/{plugin-inference-CeiB6BG5.mjs → plugin-inference-DmwjC3y2.mjs} +16 -24
  199. package/dist/{prefetch-Ce6la4EI.d.mts → prefetch-CG0K6JPd.d.mts} +0 -2
  200. package/dist/{prefetch-Bsc_Pb6c.mjs → prefetch-L93_1Jk7.mjs} +1 -2
  201. package/dist/prepare-BJMmfq3W.mjs +1 -0
  202. package/dist/{prepare-BuOS18AM.mjs → prepare-BPsfLWaW.mjs} +4 -5
  203. package/dist/{prepare-D604Yiyr.mjs → prepare-pfl2LIMy.mjs} +12 -13
  204. package/dist/{prerender-render-CaShbHJ3.mjs → prerender-render-RlAj6hh8.mjs} +2 -3
  205. package/dist/prerender-render.d.mts +1 -3
  206. package/dist/prerender-render.mjs +1 -1
  207. package/dist/{project-rqDnVsJN.mjs → project-CLwxcEdq.mjs} +3 -4
  208. package/dist/{project-zdB3fs9G.mjs → project-DVsTAWFh.mjs} +1 -1
  209. package/dist/{project-cmd-DBYqAIbe.mjs → project-cmd-5Izu4Pg3.mjs} +21 -23
  210. package/dist/{project-paths-DGu_QZ_Q.mjs → project-paths-CdGv9Tmi.mjs} +3 -5
  211. package/dist/project-slug-BUy0lmyR.mjs +1 -0
  212. package/dist/{project-slug-23TpquG4.mjs → project-slug-CO6ci9XG.mjs} +0 -1
  213. package/dist/{project-team-BjCLgTRC.mjs → project-team-DSUyjZFh.mjs} +7 -8
  214. package/dist/{project-token-BB6PwaA9.mjs → project-token-wj09YQSB.mjs} +7 -8
  215. package/dist/{project-tsconfig-CVvk6Z_e.mjs → project-tsconfig-Cf2NFjlM.mjs} +4 -6
  216. package/dist/{project-zero-trust-CWDh1P_t.mjs → project-zero-trust-BMHf2YF0.mjs} +7 -8
  217. package/dist/{protocol-DimNxVRr.mjs → protocol-0-lp9ZYx.mjs} +6 -7
  218. package/dist/{protocol-D5XDySYu.d.mts → protocol-xdrl-In0.d.mts} +3 -5
  219. package/dist/{providers-BNKRacMr.d.mts → providers-D5P8j_8D.d.mts} +0 -2
  220. package/dist/{providers-BUHwJlmM.mjs → providers-ZARwX2cL.mjs} +1 -2
  221. package/dist/{provision-DztLJ97X.mjs → provision-CRiNnlfE.mjs} +6 -7
  222. package/dist/{provision-DfxLCg-d.mjs → provision-CxHIGBIZ.mjs} +1 -1
  223. package/dist/{queues-BWKt1Xo4.d.mts → queues-DdM42xXW.d.mts} +0 -2
  224. package/dist/{r2-conditions-B8xUgJRc.mjs → r2-conditions-BqkQNt2n.mjs} +1 -2
  225. package/dist/{requests-D_pbzDyz.mjs → requests-DicgB5jU.mjs} +6 -7
  226. package/dist/resolve-project-CgfjtOwz.mjs +1 -0
  227. package/dist/{resolve-project-Xoi6eTWY.mjs → resolve-project-D0YNnJfm.mjs} +4 -5
  228. package/dist/{resource-name-C7LVpcRm.mjs → resource-name-DlJ9QXzg.mjs} +1 -2
  229. package/dist/{response-Tn7rU0MV.mjs → response-HmNjB30w.mjs} +1 -2
  230. package/dist/{rollback-CjfIYsJx.mjs → rollback-DrDZOKNE.mjs} +7 -8
  231. package/dist/{rolldown-runtime-3h0WiCiA.mjs → rolldown-runtime-uD8oG6U2.mjs} +1 -2
  232. package/dist/{route-types-DvEGmPif.mjs → route-types-irZc1txT.mjs} +43 -8
  233. package/dist/route-url-BGOiyKNz.d.mts +24 -0
  234. package/dist/route-url-CRDF-I0I.mjs +57 -0
  235. package/dist/routes-stub.d.mts +4 -3
  236. package/dist/routes-stub.mjs +1 -1
  237. package/dist/{routing-assets-DdSFxoLp.mjs → routing-assets-DJIVOrCh.mjs} +1 -2
  238. package/dist/{runner-3uGC-oLF.mjs → runner-5MCSimKx.mjs} +5 -6
  239. package/dist/{runner-WCdfeI0q.mjs → runner-QMeOpScZ.mjs} +1 -1
  240. package/dist/{runner-mysql-BcHnLUuM.mjs → runner-mysql-0zVmB1JW.mjs} +1 -1
  241. package/dist/{runner-mysql-BWmbk5IE.mjs → runner-mysql-Bdmsp_x4.mjs} +3 -4
  242. package/dist/{runner-pg-Cgp-cr_p.mjs → runner-pg-2pjltt0t.mjs} +1 -1
  243. package/dist/{runner-pg-Cr3qrqi4.mjs → runner-pg-mYc75KfH.mjs} +2 -3
  244. package/dist/runtime/ai.d.mts +0 -4
  245. package/dist/runtime/ai.mjs +6 -8
  246. package/dist/runtime/auth-client-react.d.mts +1 -1
  247. package/dist/runtime/auth-client-react.mjs +1 -1
  248. package/dist/runtime/auth-client-solid.d.mts +1 -1
  249. package/dist/runtime/auth-client-solid.mjs +1 -1
  250. package/dist/runtime/auth-client-svelte.d.mts +1 -1
  251. package/dist/runtime/auth-client-svelte.mjs +1 -1
  252. package/dist/runtime/auth-client-vue.d.mts +1 -1
  253. package/dist/runtime/auth-client-vue.mjs +1 -1
  254. package/dist/runtime/auth-client.d.mts +1 -1
  255. package/dist/runtime/auth-client.mjs +1 -1
  256. package/dist/runtime/auth.d.mts +1 -1
  257. package/dist/runtime/auth.mjs +1 -1
  258. package/dist/runtime/better-auth-mysql.d.mts +2 -4
  259. package/dist/runtime/better-auth-mysql.mjs +3 -4
  260. package/dist/runtime/better-auth-pg.d.mts +2 -4
  261. package/dist/runtime/better-auth-pg.mjs +4 -5
  262. package/dist/runtime/better-auth.d.mts +2 -4
  263. package/dist/runtime/better-auth.mjs +3 -4
  264. package/dist/runtime/client-react.d.mts +4 -4
  265. package/dist/runtime/client-react.mjs +4 -4
  266. package/dist/runtime/client-solid.d.mts +4 -4
  267. package/dist/runtime/client-solid.mjs +4 -4
  268. package/dist/runtime/client-svelte.d.mts +4 -4
  269. package/dist/runtime/client-svelte.mjs +4 -4
  270. package/dist/runtime/client-vue.d.mts +4 -4
  271. package/dist/runtime/client-vue.mjs +4 -4
  272. package/dist/runtime/client.d.mts +4 -4
  273. package/dist/runtime/client.mjs +4 -4
  274. package/dist/runtime/db.d.mts +0 -2
  275. package/dist/runtime/db.mjs +2 -3
  276. package/dist/runtime/durable.d.mts +0 -2
  277. package/dist/runtime/durable.mjs +3 -4
  278. package/dist/runtime/email/testing.d.mts +1 -5
  279. package/dist/runtime/email/testing.mjs +5 -6
  280. package/dist/runtime/email-protocol.d.mts +0 -2
  281. package/dist/runtime/email-protocol.mjs +1 -1
  282. package/dist/runtime/email.d.mts +1 -5
  283. package/dist/runtime/email.mjs +6 -7
  284. package/dist/runtime/env-public-client.d.mts +1 -3
  285. package/dist/runtime/env-public-client.mjs +2 -3
  286. package/dist/runtime/env-public.d.mts +2 -2
  287. package/dist/runtime/env-public.mjs +5 -7
  288. package/dist/runtime/env.d.mts +0 -4
  289. package/dist/runtime/env.mjs +1 -1
  290. package/dist/runtime/fetch-server.d.mts +1 -3
  291. package/dist/runtime/fetch-server.mjs +3 -4
  292. package/dist/runtime/fetch-stream.d.mts +2 -2
  293. package/dist/runtime/fetch-stream.mjs +2 -2
  294. package/dist/runtime/fetch.d.mts +1 -1
  295. package/dist/runtime/fetch.mjs +2 -2
  296. package/dist/runtime/handler.d.mts +1 -1
  297. package/dist/runtime/handler.mjs +2 -2
  298. package/dist/runtime/isr.d.mts +1 -3
  299. package/dist/runtime/isr.mjs +2 -3
  300. package/dist/runtime/kv.d.mts +1 -3
  301. package/dist/runtime/kv.mjs +2 -3
  302. package/dist/runtime/limits.d.mts +1 -1
  303. package/dist/runtime/limits.mjs +1 -1
  304. package/dist/runtime/live-client.d.mts +1 -3
  305. package/dist/runtime/live-client.mjs +1 -2
  306. package/dist/runtime/live-server.d.mts +0 -2
  307. package/dist/runtime/live-server.mjs +3 -4
  308. package/dist/runtime/live.d.mts +1 -1
  309. package/dist/runtime/live.mjs +1 -1
  310. package/dist/runtime/log.d.mts +3 -3
  311. package/dist/runtime/log.mjs +26 -18
  312. package/dist/runtime/migration-handler-mysql.d.mts +2 -4
  313. package/dist/runtime/migration-handler-mysql.mjs +2 -3
  314. package/dist/runtime/migration-handler-pg.d.mts +2 -4
  315. package/dist/runtime/migration-handler-pg.mjs +2 -3
  316. package/dist/runtime/migration-handler.d.mts +1 -1
  317. package/dist/runtime/migration-handler.mjs +1 -1
  318. package/dist/runtime/queues.d.mts +1 -1
  319. package/dist/runtime/queues.mjs +2 -3
  320. package/dist/runtime/remote/binding-handler.d.mts +1 -3
  321. package/dist/runtime/remote/binding-handler.mjs +3 -4
  322. package/dist/runtime/remote/index.d.mts +1 -3
  323. package/dist/runtime/remote/index.mjs +8 -13
  324. package/dist/runtime/response.d.mts +1 -3
  325. package/dist/runtime/response.mjs +1 -1
  326. package/dist/runtime/route-url.d.mts +2 -2
  327. package/dist/runtime/route-url.mjs +1 -1
  328. package/dist/runtime/routing.d.mts +7 -10
  329. package/dist/runtime/routing.mjs +18 -19
  330. package/dist/runtime/sandbox-container.d.mts +1 -1
  331. package/dist/runtime/sandbox-container.mjs +1 -1
  332. package/dist/runtime/sandbox.d.mts +2 -2
  333. package/dist/runtime/sandbox.mjs +5 -6
  334. package/dist/runtime/seed.d.mts +0 -2
  335. package/dist/runtime/seed.mjs +1 -2
  336. package/dist/runtime/sse-client.d.mts +1 -3
  337. package/dist/runtime/sse-client.mjs +1 -2
  338. package/dist/runtime/sse.d.mts +1 -3
  339. package/dist/runtime/sse.mjs +1 -1
  340. package/dist/runtime/storage.d.mts +1 -3
  341. package/dist/runtime/storage.mjs +2 -3
  342. package/dist/runtime/validator.d.mts +1 -1
  343. package/dist/runtime/validator.mjs +1 -1
  344. package/dist/runtime/ws-server.d.mts +3 -5
  345. package/dist/runtime/ws-server.mjs +3 -4
  346. package/dist/runtime/ws.d.mts +1 -1
  347. package/dist/runtime/ws.mjs +3 -4
  348. package/dist/{sandbox-q3waMc2T.d.mts → sandbox-DE1WsxuB.d.mts} +2 -4
  349. package/dist/{sandbox-container-a9LRUtii.mjs → sandbox-container-BuxhwCgt.mjs} +1 -2
  350. package/dist/{sandbox-container-ChQRum-j.d.mts → sandbox-container-CZFZdMso.d.mts} +0 -2
  351. package/dist/{scan-N9WzdcAl.mjs → scan-DSQtH3oS.mjs} +31 -25
  352. package/dist/{secret-3X0PxmuX.mjs → secret-C_QtTzJG.mjs} +17 -15
  353. package/dist/{serialize-YHvlcG3Q.mjs → serialize-DUuYuaY3.mjs} +2 -4
  354. package/dist/{serialize-DtR8Vwa_.d.mts → serialize-I4EmS-Wf.d.mts} +0 -2
  355. package/dist/{skills-CrUO3PJ0.mjs → skills-D393E4lB.mjs} +4 -5
  356. package/dist/{sqlite-validation-BzKMWnO4.mjs → sqlite-validation-CLJXXN93.mjs} +1 -2
  357. package/dist/{sse-CMvCgjNk.mjs → sse-CxR30yMF.mjs} +1 -2
  358. package/dist/{standard-schema-Fo_vCAZh.d.mts → standard-schema-CuDawHOC.d.mts} +0 -2
  359. package/dist/{static-asset-marker-Btf-6oCD.mjs → static-asset-marker-NR1XS2z5.mjs} +1 -2
  360. package/dist/{subcommand-prompt-D9OhhbGG.mjs → subcommand-prompt-CxJXporl.mjs} +3 -4
  361. package/dist/sveltekit.d.mts +0 -2
  362. package/dist/sveltekit.mjs +2 -3
  363. package/dist/{terminal-log-text-D9ACPOuG.mjs → terminal-log-text-DNsWJREL.mjs} +1 -2
  364. package/dist/{types-w72dljaA.d.mts → types-agfx0alu.d.mts} +0 -4
  365. package/dist/validate-DY1U9rET.mjs +1 -0
  366. package/dist/{validate-CnZPMq4q.mjs → validate-Ddzl-IwT.mjs} +4 -5
  367. package/dist/{validation-error-Dg9Recn1.mjs → validation-error-rDVbUJet.mjs} +2 -4
  368. package/dist/{validator-BTOu0fB0.mjs → validator-CTfmzZYb.mjs} +2 -5
  369. package/dist/{version-metadata-D2vfMQzv.mjs → version-metadata-Blf5H9BQ.mjs} +4 -6
  370. package/dist/{worker-conditions-AWFRcFxR.mjs → worker-conditions-CBZ0RYsZ.mjs} +1 -2
  371. package/dist/wrangler-CPRX2d9A.mjs +1 -0
  372. package/dist/{wrangler-I-scB_1t.mjs → wrangler-p-kLCJqF.mjs} +6 -8
  373. package/dist/{wrapper-BBl1rC32.mjs → wrapper-iejSJDwL.mjs} +17 -14
  374. package/dist/{ws-B3ClMVDh.d.mts → ws-DzBD-NUj.d.mts} +3 -5
  375. package/dist/{yarn-pnp-DLbEFMT0.mjs → yarn-pnp-DgWbE7z5.mjs} +2 -3
  376. package/docs/guide/database.md +4 -4
  377. package/docs/guide/deployment.md +1 -1
  378. package/docs/guide/edge/headers.md +2 -6
  379. package/docs/guide/edge/redirects.md +4 -4
  380. package/docs/guide/edge/static-assets.md +0 -10
  381. package/docs/guide/email/domains.md +3 -1
  382. package/docs/guide/email/receiving.md +3 -3
  383. package/docs/guide/email/sending.md +1 -1
  384. package/docs/guide/pages-routing/actions-and-forms.md +6 -9
  385. package/docs/guide/pages-routing/islands.md +2 -2
  386. package/docs/guide/pages-routing/loaders.md +3 -3
  387. package/docs/guide/pages-routing/markdown.md +6 -6
  388. package/docs/guide/pages-routing/overview.md +34 -27
  389. package/docs/guide/platform/administration/email.md +6 -8
  390. package/docs/guide/platform/installation/credentials.md +6 -6
  391. package/docs/guide/platform/installation/maintenance.md +9 -25
  392. package/docs/guide/platform/installation/prerequisites.md +1 -1
  393. package/docs/guide/platform/installation/setup.md +1 -1
  394. package/docs/guide/platform/installation/uninstall.md +1 -1
  395. package/docs/guide/queues.md +4 -8
  396. package/docs/guide/self-hosted-platform.md +3 -3
  397. package/docs/guide/server-routing.md +7 -7
  398. package/docs/guide/type-safety.md +42 -0
  399. package/docs/guide/typed-fetch.md +1 -1
  400. package/docs/guide/websockets.md +1 -1
  401. package/docs/integrations/cloudflare.md +2 -2
  402. package/docs/integrations/frameworks/analog.md +1 -1
  403. package/docs/integrations/frameworks/nuxt.md +1 -1
  404. package/docs/integrations/frameworks/sveltekit.md +1 -1
  405. package/docs/integrations/frameworks/tanstack-start.md +1 -1
  406. package/docs/integrations/hono.md +5 -5
  407. package/docs/reference/api/auth.md +1 -1
  408. package/docs/reference/api/deploy.md +6 -6
  409. package/docs/reference/api/pages.md +9 -1
  410. package/docs/reference/api/plugin.md +4 -4
  411. package/docs/reference/api/resources.md +4 -1
  412. package/docs/reference/api/rewrites.md +20 -2
  413. package/docs/reference/api/types.md +41 -0
  414. package/docs/reference/api.md +2 -2
  415. package/docs/reference/cli/database.md +15 -9
  416. package/docs/reference/cli/email.md +4 -2
  417. package/docs/reference/cli/platform-installation.md +2 -2
  418. package/docs/reference/cli/project.md +2 -2
  419. package/docs/reference/cli/secrets.md +3 -1
  420. package/docs/reference/cli/setup.md +3 -3
  421. package/docs/reference/cli.md +1 -1
  422. package/docs/reference/config.md +2 -2
  423. package/package.json +35 -32
  424. package/sandbox.Dockerfile +1 -1
  425. package/dist/cf-build-output-bd8Uwv1P.mjs +0 -1
  426. package/dist/client-BZb9j66F.mjs +0 -1
  427. package/dist/collect-BWhkgtAn.mjs +0 -1
  428. package/dist/deploy-CX94CmKa.mjs +0 -2
  429. package/dist/discover-D4TPKo57.mjs +0 -1
  430. package/dist/gen-BhWBT4iu.mjs +0 -1
  431. package/dist/help-qOZr3wng.mjs +0 -1
  432. package/dist/login-BAPmYnb7.mjs +0 -1
  433. package/dist/migrate-BIYTPQE6.mjs +0 -1
  434. package/dist/operator-cmd-CjazwOyb.mjs +0 -1
  435. package/dist/output-BW9uK099.mjs +0 -1
  436. package/dist/plan-CKX_jWnD.mjs +0 -1
  437. package/dist/platform-args-BC8_hsDj.mjs +0 -1
  438. package/dist/prepare-DU-tOpS5.mjs +0 -1
  439. package/dist/project-slug-6cyz8E7k.mjs +0 -1
  440. package/dist/resolve-project-DD1vu8s9.mjs +0 -1
  441. package/dist/route-url-BgPja1GS.d.mts +0 -5
  442. package/dist/route-url-BjGv_KKY.mjs +0 -28
  443. package/dist/validate-D7Wn8PUX.mjs +0 -1
  444. package/dist/wrangler-UnwdISay.mjs +0 -1
package/dist/index.mjs CHANGED
@@ -1,55 +1,61 @@
1
- import { n as __toESM } from "./rolldown-runtime-3h0WiCiA.mjs";
2
- import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative } from "./dist-ipQi0Q8y.mjs";
3
- import { t as require_picocolors } from "./picocolors-BsDfhxIw.mjs";
4
- import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-CeiB6BG5.mjs";
5
- import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-DGu_QZ_Q.mjs";
6
- import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-D-6q7EBH.mjs";
7
- import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-OFOAimzt.mjs";
8
- import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-N9WzdcAl.mjs";
9
- import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-CsZ_q_gc.mjs";
10
- import { n as bindingResolver } from "./ast-bindings-C3yaPs1y.mjs";
11
- import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-DDOQwiXk.mjs";
12
- import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-BMwmN5Ae.mjs";
13
- import { t as MagicString } from "./dist-Cegxq8gs.mjs";
14
- import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-BEM8ZuGP.mjs";
15
- import { r as hasEmailHandlers } from "./email-B9ayYQEG.mjs";
16
- import { a as resolveDistDir, c as hasDocumentRoutes, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, s as hasApiRoutes, t as collectPages, u as resolveAssetRoutingPolicy } from "./isr-config-fZaJJ8t7.mjs";
17
- import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers--vaK_chu.mjs";
18
- import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
19
- import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-CH1AylZT.mjs";
20
- import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-I-scB_1t.mjs";
21
- import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CAwAs9GH.mjs";
22
- import { n as scopedAccessCredentials } from "./cf-access-BM9G0lhO.mjs";
23
- import { n as ensurePlatformProxyAccess } from "./cf-access-CWP4avfP.mjs";
24
- import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-B6iOCjKI.mjs";
25
- import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-CVvk6Z_e.mjs";
26
- import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-CLa2LThw.mjs";
27
- import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-D0jxye_D.mjs";
28
- import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
29
- import { a as findReservedEnvKeys, c as reservedEnvKeysMessage, i as findLegacyEnvFiles, l as resolveRemoteMode, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as loadLocalEnv } from "./env-BaMz0j7H.mjs";
30
- import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-BicfKBhV.mjs";
31
- import { t as loadUserEnvFile } from "./load-user-env-DD5qveNU.mjs";
32
- import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-D74P4ebM.mjs";
33
- import { t as ASSET_EXTENSIONS } from "./routing-assets-DdSFxoLp.mjs";
34
- import { t as assertNoPrerenderFailures } from "./prerender-render-CaShbHJ3.mjs";
35
- import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-D2vfMQzv.mjs";
36
- import { d as isGeneratedAssetHeaders, f as resolveAssetWorkerBypass, g as prerenderPagesNode, h as prerenderPages, n as SEND_EMAIL_BINDING, u as isAssetBypassRule } from "./email-cloudflare-PMbAev9Q.mjs";
37
- import { r as defer } from "./validation-error-Dg9Recn1.mjs";
38
- import { i as safeJsonStringify } from "./protocol-DimNxVRr.mjs";
39
- import { n as completeApplicationAnalysis } from "./application-routing-4719u_kf.mjs";
40
- import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-DvEGmPif.mjs";
41
- import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-BZ1t7-Rv.mjs";
1
+ import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
2
+ import { a as join, c as resolve, i as isAbsolute, n as dirname, o as normalize, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
3
+ import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
4
+ import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-DmwjC3y2.mjs";
5
+ import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-CdGv9Tmi.mjs";
6
+ import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-WlvEcL82.mjs";
7
+ import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-DkA9jYF2.mjs";
8
+ import { f as invalidateSourceAnalysis, o as resolveLayoutIds, p as isRouteEnabledForEnvironment } from "./scan-DSQtH3oS.mjs";
9
+ import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
10
+ import { n as bindingResolver } from "./ast-bindings-BkivMJIo.mjs";
11
+ import { a as hasSandboxSqliteMigration, c as sandboxContainerConfig, i as assertSandboxNamespaceConfig, n as DEFAULT_SANDBOX_CLASS_NAME, p as scanJobsSync, r as SANDBOX_MIGRATION_TAG, s as resolveSandboxConfig, t as analyzeApplicationSync, u as scanQueuesSync } from "./application-analysis-2vGZrKzg.mjs";
12
+ import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-D9hwSySP.mjs";
13
+ import { t as MagicString } from "./dist-B6eN80gc.mjs";
14
+ import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-CBZsCy3O.mjs";
15
+ import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
16
+ import { a as resolveDistDir, c as hasDocumentRoutes, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, s as hasApiRoutes, t as collectPages, u as resolveAssetRoutingPolicy } from "./isr-config-DhBkzCdY.mjs";
17
+ import { n as mergeRoutingRules, t as lintRoutingPhases } from "./headers-DEUBAM6W.mjs";
18
+ import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
19
+ import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
20
+ import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
21
+ import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-Chet188_.mjs";
22
+ import { A as syncWranglerWebSockets, E as resolveLiveBindingConfig, O as syncWranglerBindings, T as readWranglerWebSocketTombstones, a as LIVE_MIGRATION_TAG, b as readRootWranglerConfig, d as ensureWranglerCompatibilityDate, f as ensureWranglerNodejsAlsFlag, g as normalizeWranglerCompatibilityFlags, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, p as findBindingNameOwner, u as ensureWranglerCompat, v as readExistingLiveBindingConfig, x as readWranglerCompat } from "./wrangler-p-kLCJqF.mjs";
23
+ import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CKfek6Z4.mjs";
24
+ import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
25
+ import { n as ensurePlatformProxyAccess } from "./cf-access-BmBT2h8_.mjs";
26
+ import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-Dy8svcqQ.mjs";
27
+ import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Dy8MrKgF.mjs";
28
+ import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
29
+ import { a as findReservedEnvKeys, c as reservedEnvKeysMessage, i as findLegacyEnvFiles, l as resolveRemoteMode, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
30
+ import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-Cf2NFjlM.mjs";
31
+ import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-CiJ1Xrba.mjs";
32
+ import { _ as parseCapturedMessage, a as DEV_INBOX_ENV_VAR, c as DEV_INBOX_TOKEN_ENV_VAR, f as clearDevBuffer, g as listDevMessages, l as DEV_INBOX_TOKEN_HEADER, m as findDevMessage, n as DEV_INBOX_ACK_VALUE, o as DEV_INBOX_MAX_CAPTURE_BYTES, s as DEV_INBOX_PREFIX, t as DEV_INBOX_ACK_HEADER, u as DEV_INBOX_TOKEN_QUERY, v as pushToDevBuffer } from "./dev-inbox-CwH5VuZj.mjs";
33
+ import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-DqzVBKnS.mjs";
34
+ import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
35
+ import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-e8qgqAzQ.mjs";
36
+ import { t as ASSET_EXTENSIONS } from "./routing-assets-DJIVOrCh.mjs";
37
+ import { t as assertNoPrerenderFailures } from "./prerender-render-RlAj6hh8.mjs";
38
+ import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-Blf5H9BQ.mjs";
39
+ import { d as isGeneratedAssetHeaders, f as resolveAssetWorkerBypass, g as prerenderPagesNode, h as prerenderPages, n as SEND_EMAIL_BINDING, u as isAssetBypassRule } from "./email-cloudflare-CtD8qE13.mjs";
40
+ import { r as defer } from "./validation-error-rDVbUJet.mjs";
41
+ import { i as safeJsonStringify } from "./protocol-0-lp9ZYx.mjs";
42
+ import { n as completeApplicationAnalysis } from "./application-routing-DnUQoOJD.mjs";
43
+ import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-irZc1txT.mjs";
44
+ import { a as defineMiddleware, c as defineScheduled, i as defineHead, n as basicAuth, o as defineQueue, r as defineHandler, s as defineRender, t as VoidAssetRewriteError } from "./handler-xmzz0U38.mjs";
42
45
  import module, { builtinModules, createRequire } from "node:module";
43
- import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
44
- import { cloudflare } from "@cloudflare/vite-plugin";
46
+ import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
45
47
  import { createRunnableDevEnvironment, defaultServerConditions, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
46
48
  import { fileURLToPath, pathToFileURL } from "node:url";
47
49
  import { appendSqliteClassMigration } from "@void/deploy-core";
48
50
  import { randomBytes, timingSafeEqual } from "node:crypto";
49
51
  import { homedir } from "node:os";
50
52
  import { isDeepStrictEqual, parseEnv } from "node:util";
53
+ import { getRootConfigPath, getWorkerAssetsDir, getWorkerConfigPath, readBuildOutput } from "@cloudflare/build-output-utils";
54
+ import { convertToWranglerConfig } from "@cloudflare/config";
55
+ import { cloudflare } from "@cloudflare/vite-plugin";
56
+ import { parse } from "smol-toml";
51
57
  import { compilePattern, matchPattern } from "@void/edge";
52
- //#region src/pages/dev-css-assets.ts
58
+ // src/pages/dev-css-assets.ts
53
59
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
54
60
  const DEV_CSS_ASSET_MODULE_ID = "virtual:void-pages-dev-assets";
55
61
  const DEV_CSS_ASSET_ENDPOINT = "/__void/dev/pages-css";
@@ -432,8 +438,7 @@ export async function getVoidPagesDevCss(request, env, payload) {
432
438
  }
433
439
  }];
434
440
  }
435
- //#endregion
436
- //#region src/plugin-ai-setup.ts
441
+ // src/plugin-ai-setup.ts
437
442
  /**
438
443
  * Decide whether to inject a Workers AI binding into the built wrangler config.
439
444
  *
@@ -488,11 +493,11 @@ function readVoidDevCredentials(root) {
488
493
  * block the server. On completion, writes project.json and restarts the server.
489
494
  */
490
495
  async function runAiSetupPrompt(root, token, apiUrl, server) {
491
- const { select, text, isCancel, log } = await import("./dist-B1PLt4_8.mjs");
492
- const { PlatformClient } = await import("./client-BZb9j66F.mjs");
493
- const { attachSelectedPlatform, writeProjectConfig } = await import("./project-zdB3fs9G.mjs");
494
- const { inferDefaultSlug } = await import("./resolve-project-DD1vu8s9.mjs");
495
- const { printSuccess } = await import("./output-BW9uK099.mjs");
496
+ const { select, text, isCancel, log } = await import("./dist-eV_Ep60B.mjs");
497
+ const { PlatformClient } = await import("./client-DVtAKeUm.mjs");
498
+ const { attachSelectedPlatform, writeProjectConfig } = await import("./project-DVsTAWFh.mjs");
499
+ const { inferDefaultSlug } = await import("./resolve-project-CgfjtOwz.mjs");
500
+ const { printSuccess } = await import("./output-E6gecbbV.mjs");
496
501
  const client = new PlatformClient(token, { apiUrl });
497
502
  let projects;
498
503
  try {
@@ -518,8 +523,8 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
518
523
  let projectId;
519
524
  let slug;
520
525
  if (result === "__create__") {
521
- const { validateProjectSlug } = await import("./project-slug-6cyz8E7k.mjs");
522
- const { createProjectWithSlugRetry } = await import("./create-project-C2K0DN2O.mjs");
526
+ const { validateProjectSlug } = await import("./project-slug-BUy0lmyR.mjs");
527
+ const { createProjectWithSlugRetry } = await import("./create-project-rnjum4_V.mjs");
523
528
  let created;
524
529
  try {
525
530
  created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
@@ -551,8 +556,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
551
556
  await server.restart();
552
557
  printSuccess(`Linked to ${slug}.`);
553
558
  }
554
- //#endregion
555
- //#region src/plugin-binding-runtime.ts
559
+ // src/plugin-binding-runtime.ts
556
560
  const envModuleResolved = fileURLToPath(import.meta.resolve("#self/_env"));
557
561
  const kvModuleResolved = fileURLToPath(import.meta.resolve("void/kv"));
558
562
  const storageModuleResolved = fileURLToPath(import.meta.resolve("void/storage"));
@@ -604,8 +608,7 @@ export const storage = new Proxy({}, {
604
608
  }
605
609
  };
606
610
  }
607
- //#endregion
608
- //#region src/plugin-client-stubs.ts
611
+ // src/plugin-client-stubs.ts
609
612
  function createClientStubsPlugin() {
610
613
  const STUB_PREFIX = "\0void-client-stub:";
611
614
  const SERVER_ONLY_STUBS = {
@@ -677,8 +680,258 @@ function createClientStubsPlugin() {
677
680
  }
678
681
  };
679
682
  }
680
- //#endregion
681
- //#region src/plugin-dev-config.ts
683
+ // src/plugin-cloudflare-config.ts
684
+ /** Match the old plugin's patch semantics, including its array concatenation. */
685
+ function mergeCloudflareConfig(patch, fallback) {
686
+ const result = { ...fallback };
687
+ for (const [key, value] of Object.entries(patch)) {
688
+ if (value === void 0) continue;
689
+ const previous = result[key];
690
+ result[key] = Array.isArray(value) && Array.isArray(previous) ? [...value, ...previous] : value && previous && typeof value === "object" && typeof previous === "object" && !Array.isArray(value) && !Array.isArray(previous) ? mergeCloudflareConfig(value, previous) : value;
691
+ }
692
+ return result;
693
+ }
694
+ /** Use Cloudflare's public migration API rather than maintaining a second binding translator. */
695
+ function toNativeCloudflareConfig(raw, root) {
696
+ const packagePath = join(root, "package.json");
697
+ const packageName = existsSync(packagePath) ? JSON.parse(readFileSync(packagePath, "utf8")).name : void 0;
698
+ const name = String(packageName ?? basename(root)).replaceAll("_", "-").replace(/[^a-z0-9- ]/g, "-").replace(/^(-+)|(-+)$/g, "").slice(0, 63) || "my-worker";
699
+ const { env, vars, ...base } = raw;
700
+ const selected = process.env.CLOUDFLARE_ENV ? env?.[process.env.CLOUDFLARE_ENV] : void 0;
701
+ const values = selected ? selected.vars : vars;
702
+ const environments = env && Object.fromEntries(Object.entries(env).map(([name, { vars: _vars, ...config }]) => [`void-environment-${name}`, config]));
703
+ const config = migrateBuiltWranglerConfig({
704
+ name,
705
+ compatibility_date: "2026-02-24",
706
+ ...base,
707
+ ...environments && process.env.CLOUDFLARE_ENV ? { env: environments } : {}
708
+ }, process.env.CLOUDFLARE_ENV ? `void-environment-${process.env.CLOUDFLARE_ENV}` : "void-top-level");
709
+ if (!config.worker) throw new Error("Void requires a Cloudflare Worker configuration.");
710
+ for (const [name, value] of Object.entries(values ?? {})) {
711
+ config.worker.env ??= {};
712
+ config.worker.env[name] = typeof value === "string" ? {
713
+ type: "text",
714
+ value
715
+ } : {
716
+ type: "json",
717
+ value
718
+ };
719
+ }
720
+ const main = selected?.main ?? raw.main;
721
+ if (main) config.worker.entrypoint = main.startsWith("virtual:") ? main : resolve(root, main);
722
+ return {
723
+ ...config,
724
+ worker: config.worker
725
+ };
726
+ }
727
+ function nativeAuxiliaryWorkers(workers, root) {
728
+ return workers?.map(({ configPath, config, ...options }) => ({
729
+ ...options,
730
+ config({ entryWorkerConfig }) {
731
+ const path = configPath ? resolve(root, configPath) : void 0;
732
+ const base = path ? path.endsWith(".toml") ? parse(readFileSync(path, "utf8")) : readGeneratedWranglerConfigFile(path) : {};
733
+ return toNativeCloudflareConfig(mergeCloudflareConfig((typeof config === "function" ? config(base, { entryWorkerConfig: convertToWranglerConfig({
734
+ worker: entryWorkerConfig,
735
+ containers: []
736
+ }) }) : config) ?? {}, base), path ? dirname(path) : root).worker;
737
+ }
738
+ }));
739
+ }
740
+ // src/plugin-cloudflare-preview.ts
741
+ /** Give preview local bindings without changing the deployable build or storing their values. */
742
+ function withLocalPreviewBindings(plugins, root) {
743
+ let directory;
744
+ const cleanup = () => {
745
+ if (directory) {
746
+ rmSync(directory, {
747
+ recursive: true,
748
+ force: true
749
+ });
750
+ directory = void 0;
751
+ }
752
+ process.removeListener("exit", cleanup);
753
+ };
754
+ const entry = plugins.find((plugin) => plugin.name === "vite-plugin-cloudflare");
755
+ if (!entry?.config) throw new Error("The Cloudflare plugin no longer exposes its configuration hook.");
756
+ const hook = typeof entry.config === "function" ? entry.config : entry.config.handler;
757
+ entry.config = async function(config, environment) {
758
+ if (!environment.isPreview) return hook.call(this, config, environment);
759
+ cleanup();
760
+ const parent = join(root, ".void");
761
+ mkdirSync(parent, { recursive: true });
762
+ directory = mkdtempSync(join(parent, "preview-"));
763
+ process.once("exit", cleanup);
764
+ try {
765
+ const output = dirname(getRootConfigPath(root));
766
+ cpSync(output, dirname(getRootConfigPath(directory)), { recursive: true });
767
+ const path = getWorkerConfigPath(directory);
768
+ const worker = JSON.parse(readFileSync(path, "utf8"));
769
+ worker.env ??= {};
770
+ for (const name of Object.keys(loadLocalEnv(root))) {
771
+ const binding = worker.env[name];
772
+ if (!binding || [
773
+ "text",
774
+ "json",
775
+ "secret"
776
+ ].includes(binding.type)) worker.env[name] = { type: "secret" };
777
+ }
778
+ writeFileAtomic(path, JSON.stringify(worker));
779
+ return await hook.call(this, {
780
+ ...config,
781
+ root: directory,
782
+ envDir: root
783
+ }, environment);
784
+ } catch (error) {
785
+ cleanup();
786
+ throw error;
787
+ }
788
+ };
789
+ return [...plugins, {
790
+ name: "void:cloudflare-preview-cleanup",
791
+ configurePreviewServer(server) {
792
+ server.httpServer.once("close", cleanup);
793
+ }
794
+ }];
795
+ }
796
+ // src/plugin-cloudflare.ts
797
+ function isInside(directory, path) {
798
+ const child = relative(directory, path);
799
+ return child !== ".." && !child.startsWith("../") && !isAbsolute(child);
800
+ }
801
+ /** Keep Void's public configuration and artifact layout while running the v2 plugin. */
802
+ function cloudflare$1(options) {
803
+ const root = process.cwd();
804
+ let workerConfig;
805
+ let native;
806
+ let pluginNative;
807
+ const outputDirectories = /* @__PURE__ */ new Map();
808
+ const bridge = {
809
+ name: "void:cloudflare-config",
810
+ config(_userConfig, environment) {
811
+ if (environment.isPreview) return;
812
+ let base = options.configPath ? readGeneratedWranglerConfigFile(options.configPath) : {};
813
+ if (process.env.CLOUDFLARE_ENV && base.env) {
814
+ const selected = base.env[process.env.CLOUDFLARE_ENV];
815
+ if (!selected) throw new Error(`Cloudflare environment ${process.env.CLOUDFLARE_ENV} is not configured.`);
816
+ const original = base;
817
+ base = convertToWranglerConfig(toNativeCloudflareConfig(base, root));
818
+ base.main = selected.main ?? original.main;
819
+ base.migrations = selected.migrations ?? original.migrations;
820
+ base.assets = {
821
+ ...base.assets,
822
+ directory: selected.assets?.directory ?? original.assets?.directory
823
+ };
824
+ }
825
+ workerConfig = mergeCloudflareConfig(options.config(base), base);
826
+ native = toNativeCloudflareConfig(workerConfig, root);
827
+ pluginNative = structuredClone(native);
828
+ if (environment.command === "build" && native.containers.length > 0) {
829
+ pluginNative.containers = [];
830
+ for (const declaration of Object.values(pluginNative.worker?.exports ?? {})) if ("container" in declaration) delete declaration.container;
831
+ }
832
+ }
833
+ };
834
+ const directories = {
835
+ name: "void:cloudflare-output-directories",
836
+ enforce: "post",
837
+ config(userConfig) {
838
+ const environmentNames = [options.viteEnvironment.name ?? "ssr", ...options.viteEnvironment.childEnvironments ?? []];
839
+ for (const name of [...environmentNames, "client"]) outputDirectories.set(name, resolve(root, userConfig.environments?.[name]?.build?.outDir ?? join(userConfig.build?.outDir ?? "dist", name)));
840
+ }
841
+ };
842
+ const output = {
843
+ name: "void:cloudflare-build-output",
844
+ enforce: "post",
845
+ writeBundle: {
846
+ order: "post",
847
+ handler() {
848
+ if (this.environment?.name !== "client") return;
849
+ const source = resolve(root, this.environment.config.build.outDir);
850
+ const destination = outputDirectories.get("client");
851
+ if (destination && source !== destination && existsSync(source)) {
852
+ mkdirSync(destination, { recursive: true });
853
+ cpSync(source, destination, { recursive: true });
854
+ }
855
+ }
856
+ },
857
+ buildApp: {
858
+ order: "post",
859
+ async handler(builder) {
860
+ if (Object.values(native.worker?.env ?? {}).some((binding) => binding.type === "assets")) mkdirSync(getWorkerAssetsDir(root), { recursive: true });
861
+ const worker = (await readBuildOutput(root)).workers.default;
862
+ const environment = options.viteEnvironment.name ?? "ssr";
863
+ const destination = outputDirectories.get(environment);
864
+ const client = outputDirectories.get("client");
865
+ if (!worker.bundleDir || !worker.config.manifest) throw new Error("Void requires a built Cloudflare Worker.");
866
+ for (const directory of [destination, client]) if (directory !== root && isInside(root, directory) && !isInside(directory, worker.bundleDir)) rmSync(directory, {
867
+ recursive: true,
868
+ force: true
869
+ });
870
+ mkdirSync(destination, { recursive: true });
871
+ cpSync(worker.bundleDir, destination, { recursive: true });
872
+ if (worker.assetsDir) {
873
+ mkdirSync(client, { recursive: true });
874
+ cpSync(worker.assetsDir, client, { recursive: true });
875
+ }
876
+ const config = {
877
+ ...workerConfig,
878
+ name: worker.config.name,
879
+ account_id: native.accountId,
880
+ compatibility_date: worker.config.compatibilityDate,
881
+ compatibility_flags: worker.config.compatibilityFlags,
882
+ main: worker.config.manifest.mainModule,
883
+ no_bundle: true,
884
+ rules: [{
885
+ type: "ESModule",
886
+ globs: ["**/*.js", "**/*.mjs"]
887
+ }],
888
+ ...process.env.CLOUDFLARE_ENV ? { targetEnvironment: process.env.CLOUDFLARE_ENV } : {},
889
+ ...workerConfig.assets || worker.assetsDir ? { assets: {
890
+ ...workerConfig.assets,
891
+ directory: relative(destination, client)
892
+ } } : {}
893
+ };
894
+ delete config.env;
895
+ writeFileAtomic(join(destination, "wrangler.json"), `${JSON.stringify(config, null, 2)}\n`);
896
+ if (options.finalizeAssets) {
897
+ options.finalizeAssets(client, builder.environments.client);
898
+ const finalized = JSON.parse(readFileSync(join(destination, "wrangler.json"), "utf8"));
899
+ if (worker.config.assets && finalized.assets) {
900
+ worker.config.assets.runWorkerFirst = finalized.assets.run_worker_first;
901
+ writeFileAtomic(worker.configPath, JSON.stringify(worker.config));
902
+ }
903
+ if (worker.assetsDir && existsSync(client)) cpSync(client, worker.assetsDir, { recursive: true });
904
+ }
905
+ if (native.containers.length > 0) writeFileAtomic(join(dirname(getRootConfigPath(root)), "void-containers.json"), JSON.stringify({ workerDirectory: relative(root, destination) }));
906
+ const pointer = join(root, ".wrangler/deploy/config.json");
907
+ const pointerDestination = existsSync(join(root, "void.config.ts")) && process.env["VOID_CLOUDFLARE_DEPLOY_BUILD"] !== "1" ? join(root, ".void/preview-deploy-config.json") : pointer;
908
+ mkdirSync(dirname(pointerDestination), { recursive: true });
909
+ writeFileAtomic(pointerDestination, JSON.stringify({ configPath: relative(dirname(pointer), join(destination, "wrangler.json")) }));
910
+ for (const name of options.viteEnvironment.childEnvironments ?? []) {
911
+ const source = builder.environments[name]?.config.build.outDir;
912
+ const target = outputDirectories.get(name);
913
+ if (source && target && existsSync(source)) cpSync(source, target, { recursive: true });
914
+ }
915
+ }
916
+ }
917
+ };
918
+ return [
919
+ bridge,
920
+ directories,
921
+ ...withLocalPreviewBindings(cloudflare({
922
+ inspectorPort: options.inspectorPort,
923
+ persistState: options.persistState,
924
+ viteEnvironment: options.viteEnvironment,
925
+ auxiliaryWorkers: nativeAuxiliaryWorkers(options.auxiliaryWorkers, root),
926
+ types: { generate: false },
927
+ config() {
928
+ return pluginNative;
929
+ }
930
+ }), root),
931
+ output
932
+ ];
933
+ }
934
+ // src/plugin-dev-config.ts
682
935
  /** Run `fn` shortly after Vite prints "ready" so dev messages stay visible. */
683
936
  function afterServerReady(server, fn) {
684
937
  if (server.httpServer) server.httpServer.once("listening", () => setTimeout(fn, 100));
@@ -835,8 +1088,7 @@ function warnIfPackageJsonIsNotEsm(root) {
835
1088
  if (pkg.type === "module") return;
836
1089
  voidWarn("package.json is missing `\"type\": \"module\"`. Vite's default config loader will fail with ERR_REQUIRE_ASYNC_MODULE on transitive top-level await (e.g. @cloudflare/vite-plugin). Add `\"type\": \"module\"` to package.json, or run vite build with `--configLoader runner`.");
837
1090
  }
838
- //#endregion
839
- //#region src/plugin-dev-triggers-hint.ts
1091
+ // src/plugin-dev-triggers-hint.ts
840
1092
  /**
841
1093
  * Prints a one-shot hint on dev server start when the project has crons
842
1094
  * or queues, explaining how to trigger them locally. Both default Void mode
@@ -875,8 +1127,7 @@ function devTriggersHintPlugin(root, devTriggerToken) {
875
1127
  }
876
1128
  };
877
1129
  }
878
- //#endregion
879
- //#region src/plugin-email-dev-inbox.ts
1130
+ // src/plugin-email-dev-inbox.ts
880
1131
  const SECURITY_HEADERS = {
881
1132
  "Cache-Control": "no-store",
882
1133
  "X-Content-Type-Options": "nosniff",
@@ -1111,8 +1362,7 @@ function renderDetailHtml(m, href) {
1111
1362
  ${bodyHtml}
1112
1363
  </body></html>`;
1113
1364
  }
1114
- //#endregion
1115
- //#region src/plugin-env-client-guard.ts
1365
+ // src/plugin-env-client-guard.ts
1116
1366
  let cachedModule = null;
1117
1367
  async function loadEnvPublic() {
1118
1368
  if (cachedModule) return cachedModule;
@@ -1301,8 +1551,7 @@ function envClientGuardPlugin(root) {
1301
1551
  }
1302
1552
  };
1303
1553
  }
1304
- //#endregion
1305
- //#region src/plugin-env-client-fold.ts
1554
+ // src/plugin-env-client-fold.ts
1306
1555
  /**
1307
1556
  * Walk the AST and collect every static `env.FOO` / `env["FOO"]` (or
1308
1557
  * `<ns>.env.FOO`) read. Dynamic keys (`env[variable]`) are intentionally
@@ -1397,8 +1646,7 @@ function envClientFoldPlugin() {
1397
1646
  }
1398
1647
  };
1399
1648
  }
1400
- //#endregion
1401
- //#region src/plugin-env-schema.ts
1649
+ // src/plugin-env-schema.ts
1402
1650
  /**
1403
1651
  * Variables Vite's `loadEnv` copies from env files into `process.env` when
1404
1652
  * they are unset, as `[file key, process.env key]`.
@@ -1634,8 +1882,7 @@ function envSchemaPlugin(root, options = {}) {
1634
1882
  }
1635
1883
  };
1636
1884
  }
1637
- //#endregion
1638
- //#region src/plugin-framework-triggers.ts
1885
+ // src/plugin-framework-triggers.ts
1639
1886
  const DISPATCH_FILE_MODE = 384;
1640
1887
  /** Absolute path of the generated dispatch file. Stable across the dev process. */
1641
1888
  function frameworkTriggersDispatchPath(root) {
@@ -1825,18 +2072,6 @@ export async function handleDevTrigger(request, env, ctx) {
1825
2072
  }
1826
2073
  `;
1827
2074
  }
1828
- /** Append any missing `lines` to the project's `.gitignore` and return the appended ones. */
1829
- function ensureGitignoreLines(root, lines) {
1830
- const gitignorePath = join(root, ".gitignore");
1831
- let contents = "";
1832
- if (existsSync(gitignorePath)) contents = readFileSync(gitignorePath, "utf-8");
1833
- const existing = new Set(contents.split("\n").map((line) => line.trim()));
1834
- const missing = lines.filter((line) => !existing.has(line));
1835
- if (missing.length === 0) return [];
1836
- const sep = contents.length === 0 || contents.endsWith("\n") ? "" : "\n";
1837
- writeFileSync(gitignorePath, `${contents}${sep}${missing.join("\n")}\n`);
1838
- return missing;
1839
- }
1840
2075
  /** Remove `lines` from the project's `.gitignore`, if it still exists. */
1841
2076
  function removeGitignoreLines(root, lines) {
1842
2077
  const gitignorePath = join(root, ".gitignore");
@@ -2141,8 +2376,7 @@ function astroDevTriggerInjectPlugin(root) {
2141
2376
  }
2142
2377
  };
2143
2378
  }
2144
- //#endregion
2145
- //#region src/router/compile.ts
2379
+ // src/router/compile.ts
2146
2380
  const FETCH_SERVER_PATH = fileURLToPath(import.meta.resolve("#self/runtime/fetch-server"));
2147
2381
  const ROUTING_RUNTIME_PATH = fileURLToPath(import.meta.resolve("#self/runtime/routing"));
2148
2382
  function pushDefaultErrorPageHelpers(lines, options) {
@@ -2391,11 +2625,15 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
2391
2625
  const cloudflareNames = options.cloudflareQueueNames;
2392
2626
  lines.push(generateQueueResolverSource(queueNames, cloudflareNames && queueNames.map((name) => cloudflareQueueName(name, cloudflareNames))));
2393
2627
  lines.push("");
2628
+ const queueLabels = scan.queues.map((queue) => relative(options.projectRoot, `${queuesDir}/${queue.filePath}`));
2629
+ lines.push(`const __queueLabels = ${JSON.stringify(queueLabels)};`);
2394
2630
  lines.push("export async function __processQueue(payload, env) {");
2395
2631
  lines.push(" const queueSuffix = payload.queue;");
2396
2632
  lines.push(" const __queueIndex = __resolveQueueIndex(queueSuffix);");
2397
2633
  lines.push(" if (__queueIndex === -1) {");
2398
- lines.push(" return { ok: false, error: `No unambiguous queue handler matches \"${String(queueSuffix)}\"` };");
2634
+ lines.push(" const __error = `No unambiguous queue handler matches \"${String(queueSuffix)}\"`;");
2635
+ lines.push(" console.error(`[void] ${__error}`);");
2636
+ lines.push(" return { ok: false, error: __error };");
2399
2637
  lines.push(" }");
2400
2638
  lines.push(" const __decisions = new Map();");
2401
2639
  lines.push(" function __wrapMsg(m) {");
@@ -2425,7 +2663,10 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
2425
2663
  lines.push(" }");
2426
2664
  }
2427
2665
  lines.push(" }");
2428
- lines.push(" } catch { __ok = false; }");
2666
+ lines.push(" } catch (error) {");
2667
+ lines.push(" console.error(`[void] Queue handler ${__queueLabels[__queueIndex]} failed for queue \"${String(queueSuffix)}\":`, error);");
2668
+ lines.push(" __ok = false;");
2669
+ lines.push(" }");
2429
2670
  lines.push(" return { ok: __ok, ...(__decisions.size > 0 ? { decisions: Object.fromEntries(__decisions) } : {}) };");
2430
2671
  lines.push("}");
2431
2672
  lines.push("");
@@ -2954,8 +3195,7 @@ export const fetch = createServerFetch(
2954
3195
  );
2955
3196
  `;
2956
3197
  }
2957
- //#endregion
2958
- //#region src/plugin-framework-entry.ts
3198
+ // src/plugin-framework-entry.ts
2959
3199
  /**
2960
3200
  * Resolve the server entry module for a Class A framework. We always wrap
2961
3201
  * the framework's own entry with a tiny shim that intercepts
@@ -3099,8 +3339,7 @@ export default {
3099
3339
  `);
3100
3340
  return entryPath;
3101
3341
  }
3102
- //#endregion
3103
- //#region src/installed-packages.ts
3342
+ // src/installed-packages.ts
3104
3343
  function readManifest(dir) {
3105
3344
  try {
3106
3345
  return JSON.parse(readFileSync(join(dir, "package.json"), "utf8"));
@@ -3292,8 +3531,7 @@ function findDependencyClosure(name, fromDir) {
3292
3531
  visit(name, fromDir);
3293
3532
  return [...found].sort();
3294
3533
  }
3295
- //#endregion
3296
- //#region src/plugin-migration.ts
3534
+ // src/plugin-migration.ts
3297
3535
  function readDatabaseUrl(root) {
3298
3536
  return loadLocalEnv(root).DATABASE_URL;
3299
3537
  }
@@ -3319,7 +3557,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3319
3557
  const hasSqlMigrations = existsSync(migrationsDir);
3320
3558
  if (!hasSqlMigrations && !auth?.enabled) return;
3321
3559
  const migrateAuth = async (databaseUrl) => {
3322
- const { runLocalVoidAuthMigrations } = await import("./node-CDOPrGSl.mjs");
3560
+ const { runLocalVoidAuthMigrations } = await import("./node-BfAt2rz8.mjs");
3323
3561
  await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl, devAuthConfigImporter(server));
3324
3562
  };
3325
3563
  const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
@@ -3334,7 +3572,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3334
3572
  };
3335
3573
  try {
3336
3574
  if (dialect !== "sqlite") {
3337
- const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
3575
+ const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
3338
3576
  const allMigrations = collectMigrations(migrationsDir);
3339
3577
  const runFiles = dialect === "mysql" ? allMigrations.length > 0 : hasSqlMigrations;
3340
3578
  const url = runFiles ? readDatabaseUrl(root) : void 0;
@@ -3348,8 +3586,8 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3348
3586
  }
3349
3587
  const authWithFiles = authUrl !== void 0 && authUrl === url;
3350
3588
  if (url) {
3351
- const { validateMigrations } = await import("./validate-D7Wn8PUX.mjs");
3352
- const appliedNames = dialect === "mysql" ? await import("./runner-mysql-BcHnLUuM.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-Cgp-cr_p.mjs").then((runner) => runner.getPgAppliedMigrations(url));
3589
+ const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
3590
+ const appliedNames = dialect === "mysql" ? await import("./runner-mysql-0zVmB1JW.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.getPgAppliedMigrations(url));
3353
3591
  const appliedSet = new Set(appliedNames);
3354
3592
  const pending = allMigrations.filter((migration) => !appliedSet.has(migration.name));
3355
3593
  if (pending.length > 0) try {
@@ -3358,20 +3596,20 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3358
3596
  refuse(err);
3359
3597
  return;
3360
3598
  }
3361
- const applied = dialect === "mysql" ? await import("./runner-mysql-BcHnLUuM.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
3599
+ const applied = dialect === "mysql" ? await import("./runner-mysql-0zVmB1JW.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
3362
3600
  logApplied(names);
3363
3601
  await migrateAuth(url);
3364
- } : void 0)) : await import("./runner-pg-Cgp-cr_p.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
3602
+ } : void 0)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
3365
3603
  if (!authWithFiles) logApplied(applied);
3366
3604
  }
3367
3605
  if (authUrl && !authWithFiles) {
3368
- const { withMySqlMigrationLockAt } = await import("./runner-mysql-BcHnLUuM.mjs");
3606
+ const { withMySqlMigrationLockAt } = await import("./runner-mysql-0zVmB1JW.mjs");
3369
3607
  await withMySqlMigrationLockAt(authUrl, () => migrateAuth(authUrl));
3370
3608
  }
3371
3609
  } else if (hasSqlMigrations) {
3372
- const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-WCdfeI0q.mjs");
3373
- const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
3374
- const { validateMigrations } = await import("./validate-D7Wn8PUX.mjs");
3610
+ const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-QMeOpScZ.mjs");
3611
+ const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
3612
+ const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
3375
3613
  const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
3376
3614
  const allMigrations = collectMigrations(migrationsDir);
3377
3615
  const appliedRows = await getAppliedMigrations(dbPath);
@@ -3396,8 +3634,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3396
3634
  }
3397
3635
  };
3398
3636
  }
3399
- //#endregion
3400
- //#region src/plugin-worker-environment.ts
3637
+ // src/plugin-worker-environment.ts
3401
3638
  const CLOUDFLARE_BUILTIN_IMPORT = /^cloudflare:/;
3402
3639
  const SANDBOX_SDK_IMPORT = "@cloudflare/sandbox";
3403
3640
  const SANDBOX_SDK_IMPORT_FILTER = /^@cloudflare\/sandbox$/;
@@ -3559,8 +3796,7 @@ function createServerRuntimeOptimizerPlugin(dialect, readCompat) {
3559
3796
  }
3560
3797
  };
3561
3798
  }
3562
- //#endregion
3563
- //#region src/sveltekit-hooks-transform.ts
3799
+ // src/sveltekit-hooks-transform.ts
3564
3800
  /** Add Void's dev bindings to SvelteKit's generated get_hooks function. */
3565
3801
  function injectSvelteKitHooks(code, id, dispatchPath) {
3566
3802
  return editGetHooks(code, id, `\n const { withRuntimeEnv } = await import("void/_env");\n const { handleDevTrigger } = await import(${JSON.stringify(dispatchPath)});`, "const __origHandle = handle ?? (({ event, resolve }) => resolve(event));\n handle = async ({ event, resolve }) => {\n const __voidEnv = event.platform?.env ?? (await import('cloudflare:workers')).env;\n return withRuntimeEnv(__voidEnv, async () => {\n const __triggerResp = await handleDevTrigger(event.request, __voidEnv, undefined);\n if (__triggerResp) return __triggerResp;\n return __origHandle({ event, resolve });\n });\n };\n ");
@@ -3591,8 +3827,7 @@ function editGetHooks(code, id, prologue, handleWrapper) {
3591
3827
  map: ms.generateMap({ hires: true })
3592
3828
  };
3593
3829
  }
3594
- //#endregion
3595
- //#region src/plugin-framework.ts
3830
+ // src/plugin-framework.ts
3596
3831
  const handlerFile = fileURLToPath(import.meta.resolve("#self/handler"));
3597
3832
  const envModuleFile = fileURLToPath(import.meta.resolve("#self/_env"));
3598
3833
  const voidDir = dirname(fileURLToPath(import.meta.url));
@@ -3952,54 +4187,67 @@ function nodeTargetPlugin(target) {
3952
4187
  }
3953
4188
  }];
3954
4189
  }
3955
- //#endregion
3956
- //#region src/plugin-prerender.ts
4190
+ // src/plugin-prerender.ts
3957
4191
  /**
3958
4192
  * Vite plugin that prerenders pages at build time when `output: "static"`.
3959
4193
  *
3960
- * Runs in the `closeBundle` hook so prerender logs appear after Vite's
3961
- * asset summary. Gated on the "client" environment so it only runs once.
4194
+ * Cloudflare prerender runs after Build Output and the compatible dist artifacts
4195
+ * are complete. Other targets run once when the client bundle closes.
3962
4196
  */
3963
4197
  function prerenderPlugin(root, config) {
4198
+ const run = async () => {
4199
+ if (config.output !== "static") return;
4200
+ if (process.env.VOID_DEPLOY_BUILD === "1") return;
4201
+ setShowTimestamp(false);
4202
+ const distDir = resolveDistDir(root);
4203
+ const clientDir = join(distDir, "client");
4204
+ let result;
4205
+ if (isNodeTarget(config.target)) result = await prerenderPagesNode({
4206
+ root,
4207
+ ssrDir: join(distDir, "ssr"),
4208
+ clientDir
4209
+ });
4210
+ else {
4211
+ const persistDir = join(root, ".void");
4212
+ const workerDirName = resolveWorkerDirName(distDir);
4213
+ const workerDir = join(distDir, workerDirName);
4214
+ const remoteMode = resolveRemoteMode(config.remote);
4215
+ result = await prerenderPages({
4216
+ root,
4217
+ workerDir,
4218
+ clientDir,
4219
+ persistDir,
4220
+ remoteMode
4221
+ });
4222
+ }
4223
+ if (result.paths.length === 0) {
4224
+ voidLog("No pages to prerender");
4225
+ return;
4226
+ }
4227
+ assertNoPrerenderFailures(result.failed);
4228
+ };
3964
4229
  return {
3965
4230
  name: "void:prerender",
4231
+ enforce: "post",
3966
4232
  apply: "build",
3967
4233
  async closeBundle() {
3968
- if (config.output !== "static") return;
3969
- if (process.env.VOID_DEPLOY_BUILD === "1") return;
3970
- if (this.environment?.name !== "client") return;
3971
- setShowTimestamp(false);
3972
- const distDir = resolveDistDir(root);
3973
- const clientDir = join(distDir, "client");
3974
- let result;
3975
- if (isNodeTarget(config.target)) result = await prerenderPagesNode({
3976
- root,
3977
- ssrDir: join(distDir, "ssr"),
3978
- clientDir
3979
- });
3980
- else {
3981
- const persistDir = join(root, ".void");
3982
- const workerDirName = resolveWorkerDirName(distDir);
3983
- const workerDir = join(distDir, workerDirName);
3984
- const remoteMode = resolveRemoteMode(config.remote);
3985
- result = await prerenderPages({
3986
- root,
3987
- workerDir,
3988
- clientDir,
3989
- persistDir,
3990
- remoteMode
3991
- });
3992
- }
3993
- if (result.paths.length === 0) {
3994
- voidLog("No pages to prerender");
3995
- return;
4234
+ if (isNodeTarget(config.target) && this.environment?.name === "client") await run();
4235
+ },
4236
+ buildApp: {
4237
+ order: "post",
4238
+ async handler() {
4239
+ if (isNodeTarget(config.target)) return;
4240
+ await run();
4241
+ if (config.output === "static" && process.env.VOID_DEPLOY_BUILD !== "1") {
4242
+ const assets = getWorkerAssetsDir(root);
4243
+ mkdirSync(assets, { recursive: true });
4244
+ cpSync(join(resolveDistDir(root), "client"), assets, { recursive: true });
4245
+ }
3996
4246
  }
3997
- assertNoPrerenderFailures(result.failed);
3998
4247
  }
3999
4248
  };
4000
4249
  }
4001
- //#endregion
4002
- //#region src/plugin-restart.ts
4250
+ // src/plugin-restart.ts
4003
4251
  const BINDING_HINT_RESOLVED = "\0virtual:void/binding-hint";
4004
4252
  const RESTARTING_HTML_HEAD = `<!DOCTYPE html>
4005
4253
  <html lang="en">
@@ -4184,8 +4432,7 @@ function restartPlugin() {
4184
4432
  }
4185
4433
  };
4186
4434
  }
4187
- //#endregion
4188
- //#region src/client-asset-manifest.ts
4435
+ // src/client-asset-manifest.ts
4189
4436
  /**
4190
4437
  * Attach cache provenance to the existing manifest without changing its entry inventory.
4191
4438
  * Returns the stamped immutable files, sorted, relative to the client root.
@@ -4208,8 +4455,7 @@ function stampClientAssetCachePolicy(bundle, manifestPath, headerRules = []) {
4208
4455
  asset.source = JSON.stringify(manifest, null, 2);
4209
4456
  return [...stamped].sort();
4210
4457
  }
4211
- //#endregion
4212
- //#region src/plugin-routing.ts
4458
+ // src/plugin-routing.ts
4213
4459
  const VIRTUAL_ROUTES_ID = "virtual:void-routes";
4214
4460
  const VIRTUAL_CLIENT_WORKER_ID = "virtual:void-client-worker";
4215
4461
  const VIRTUAL_CLIENT_BROWSER_ID = "virtual:void-client-browser";
@@ -4412,7 +4658,7 @@ function routingPlugin(root, options) {
4412
4658
  if (removeAuthTypesIfPresent(outDir)) syncAuthTypesInProjectTsconfig(root);
4413
4659
  return;
4414
4660
  }
4415
- const { generateVoidAuthDatabaseModule, generateVoidAuthDrizzleSchema } = await import("./drizzle-9TubSZvI.mjs");
4661
+ const { generateVoidAuthDatabaseModule, generateVoidAuthDrizzleSchema } = await import("./drizzle-C8MPqt5m.mjs");
4416
4662
  const authRuntime = {
4417
4663
  dialect: compileOptions.auth.dialect,
4418
4664
  providers: compileOptions.auth.providers,
@@ -4542,6 +4788,24 @@ function routingPlugin(root, options) {
4542
4788
  })
4543
4789
  };
4544
4790
  }
4791
+ function finalizeCloudflareAssets(clientDir, assetsDir) {
4792
+ if (!options.assetWorkerBypass || options.target || resolvedConfig?.command !== "build") return;
4793
+ const headersPath = join(clientDir, "_headers");
4794
+ let generatedHeaders = false;
4795
+ let userHeaders = false;
4796
+ if (existsSync(headersPath)) {
4797
+ try {
4798
+ generatedHeaders = isGeneratedAssetHeaders(readFileSync(headersPath, "utf8"));
4799
+ } catch {
4800
+ return;
4801
+ }
4802
+ userHeaders = !generatedHeaders;
4803
+ }
4804
+ const plan = planAssetWorkerBypass(clientDir, assetsDir, userHeaders);
4805
+ if (plan?.headers) writeFileSync(headersPath, plan.headers);
4806
+ else if (generatedHeaders) rmSync(headersPath);
4807
+ if (plan?.wranglerText) writeFileSync(plan.wranglerPath, plan.wranglerText);
4808
+ }
4545
4809
  const sandboxEntry = options.hasSandbox ? {
4546
4810
  bindingName: options.sandboxBindingName,
4547
4811
  className: options.sandboxClassName,
@@ -4591,6 +4855,7 @@ function routingPlugin(root, options) {
4591
4855
  }));
4592
4856
  return {
4593
4857
  name: "void:routing",
4858
+ api: { finalizeCloudflareAssets },
4594
4859
  enforce: "pre",
4595
4860
  configResolved(config) {
4596
4861
  resolvedConfig = config;
@@ -4653,26 +4918,6 @@ function routingPlugin(root, options) {
4653
4918
  if (this.environment.name === "client") clientImmutableFiles = manifest ? stampClientAssetCachePolicy(bundle, typeof manifest === "string" ? manifest : ".vite/manifest.json", compileOptions.headerRules) : [];
4654
4919
  }
4655
4920
  },
4656
- writeBundle() {
4657
- if (!options.assetWorkerBypass || options.target || resolvedConfig?.command !== "build" || this.environment.name !== "client") return;
4658
- const { outDir, assetsDir } = this.environment.config.build;
4659
- const clientDir = resolve(resolvedConfig.root, outDir);
4660
- const headersPath = join(clientDir, "_headers");
4661
- let generatedHeaders = false;
4662
- let userHeaders = false;
4663
- if (existsSync(headersPath)) {
4664
- try {
4665
- generatedHeaders = isGeneratedAssetHeaders(readFileSync(headersPath, "utf8"));
4666
- } catch {
4667
- return;
4668
- }
4669
- userHeaders = !generatedHeaders;
4670
- }
4671
- const plan = planAssetWorkerBypass(clientDir, assetsDir, userHeaders);
4672
- if (plan?.headers) writeFileSync(headersPath, plan.headers);
4673
- else if (generatedHeaders) rmSync(headersPath);
4674
- if (plan?.wranglerText) writeFileSync(plan.wranglerPath, plan.wranglerText);
4675
- },
4676
4921
  buildStart() {
4677
4922
  return regenerateInOrder(async () => {
4678
4923
  generatedRouteInputs = void 0;
@@ -4686,8 +4931,8 @@ function routingPlugin(root, options) {
4686
4931
  if (!options.target) {
4687
4932
  const migrationsDir = paths.migrationsDir;
4688
4933
  if (existsSync(migrationsDir) || compileOptions.auth) {
4689
- const { collectMigrations } = await import("./collect-BWhkgtAn.mjs");
4690
- const { buildMigrationPlanBundle } = await import("./plan-CKX_jWnD.mjs");
4934
+ const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
4935
+ const { buildMigrationPlanBundle } = await import("./plan-CQ-N4gws.mjs");
4691
4936
  const migrations = existsSync(migrationsDir) ? collectMigrations(migrationsDir) : [];
4692
4937
  const dialect = getDatabaseDialect(readConfig(root));
4693
4938
  compileOptions.migrationHandlerPath = resolveFile(dialect === "postgresql" ? "#self/runtime/migration-handler-pg" : dialect === "mysql" ? "#self/runtime/migration-handler-mysql" : "#self/runtime/migration-handler");
@@ -4829,8 +5074,7 @@ function routingPlugin(root, options) {
4829
5074
  }
4830
5075
  };
4831
5076
  }
4832
- //#endregion
4833
- //#region src/cloudflare-durable-patch.ts
5077
+ // src/cloudflare-durable-patch.ts
4834
5078
  function entries(value, label) {
4835
5079
  if (value === void 0) return [];
4836
5080
  if (!Array.isArray(value) || value.some((entry) => !entry || typeof entry !== "object" || Array.isArray(entry))) throw new Error(`Cloudflare ${label} configuration must be an array of objects.`);
@@ -4884,8 +5128,7 @@ function finalizeDurableObjectPatch(resolved, patch, generatedLocalBindings) {
4884
5128
  resolved.migrations = [];
4885
5129
  }
4886
5130
  }
4887
- //#endregion
4888
- //#region src/plugin-binding-utils.ts
5131
+ // src/plugin-binding-utils.ts
4889
5132
  /** Check whether a binding name already exists in a resolved bindings array. */
4890
5133
  function hasBinding(list, name) {
4891
5134
  return Array.isArray(list) && list.some((b) => b.binding === name);
@@ -4914,8 +5157,7 @@ function hasBinding(list, name) {
4914
5157
  function shouldInjectEmailDevInboxVar(routeEnvironment, needsEmail, assetsBinding) {
4915
5158
  return routeEnvironment === "dev" && !!needsEmail && typeof assetsBinding === "string" && !!assetsBinding;
4916
5159
  }
4917
- //#endregion
4918
- //#region src/plugin-worker-bindings.ts
5160
+ // src/plugin-worker-bindings.ts
4919
5161
  /** Durable Object bindings already in the patch, else in the resolved config. */
4920
5162
  function currentDurableObjectBindings(result, resolved) {
4921
5163
  return (result.durable_objects ?? resolved.durable_objects)?.bindings ?? [];
@@ -5141,8 +5383,7 @@ function mergeWorkerBindings(resolved, input) {
5141
5383
  versionMetadataBinding
5142
5384
  };
5143
5385
  }
5144
- //#endregion
5145
- //#region src/index.ts
5386
+ // src/index.ts
5146
5387
  const scheduledPointerCleanups = /* @__PURE__ */ new Set();
5147
5388
  const scheduledPreviewPointerCleanups = /* @__PURE__ */ new Set();
5148
5389
  /** Returns the Vite plugins that build and serve a Void app for its configured target. */
@@ -5510,7 +5751,7 @@ function voidPlugin(options) {
5510
5751
  frameworkBuildWrapperPlugin,
5511
5752
  frameworkTriggersPlugin(root, { devTriggerToken }),
5512
5753
  devTriggersHintPlugin(root, devTriggerToken),
5513
- ...cloudflare({
5754
+ ...cloudflare$1({
5514
5755
  configPath: cloudflareConfigPath,
5515
5756
  ...inspectorPortOption,
5516
5757
  persistState: { path: localD1.persistRoot },
@@ -5603,6 +5844,30 @@ function voidPlugin(options) {
5603
5844
  return requiresRestart;
5604
5845
  }
5605
5846
  applyAssetRoutingPolicy(assetRouting);
5847
+ const routes = routingPlugin(root, {
5848
+ getApplicationAnalysis,
5849
+ isAuthEnabled: () => authEnabled,
5850
+ getVersionMetadataBinding: () => versionMetadataBinding,
5851
+ devTriggerToken,
5852
+ headConfig: config.head,
5853
+ prerenderPaths: config.routing?.prerender,
5854
+ remoteMode,
5855
+ routing: config.routing,
5856
+ bindingNames,
5857
+ get hasSandbox() {
5858
+ return bindings.needsSandbox;
5859
+ },
5860
+ sandboxBindingName: sandboxConfig?.binding,
5861
+ sandboxClassName: sandboxConfig?.className,
5862
+ sandboxInstanceType: sandboxConfig?.instanceType,
5863
+ get live() {
5864
+ return shouldEmitLive() ? liveConfig : void 0;
5865
+ },
5866
+ durableObjects,
5867
+ websocketTombstones,
5868
+ onDevAssetRoutingPolicyChange: updateDevAssetRoutingPolicy,
5869
+ assetWorkerBypass: true
5870
+ });
5606
5871
  return [
5607
5872
  createCloudflareBuiltinsExternalPlugin(),
5608
5873
  createDefaultWorkerEnvironmentPlugin(),
@@ -5621,30 +5886,7 @@ function voidPlugin(options) {
5621
5886
  bindingRuntimePlugin(bindingNames),
5622
5887
  ...bindings.needsSandbox ? [createSandboxSdkResolvePlugin()] : [],
5623
5888
  ...pagesDevCssAssetsPlugin(root, devTriggerToken),
5624
- routingPlugin(root, {
5625
- getApplicationAnalysis,
5626
- isAuthEnabled: () => authEnabled,
5627
- getVersionMetadataBinding: () => versionMetadataBinding,
5628
- devTriggerToken,
5629
- headConfig: config.head,
5630
- prerenderPaths: config.routing?.prerender,
5631
- remoteMode,
5632
- routing: config.routing,
5633
- bindingNames,
5634
- get hasSandbox() {
5635
- return bindings.needsSandbox;
5636
- },
5637
- sandboxBindingName: sandboxConfig?.binding,
5638
- sandboxClassName: sandboxConfig?.className,
5639
- sandboxInstanceType: sandboxConfig?.instanceType,
5640
- get live() {
5641
- return shouldEmitLive() ? liveConfig : void 0;
5642
- },
5643
- durableObjects,
5644
- websocketTombstones,
5645
- onDevAssetRoutingPolicyChange: updateDevAssetRoutingPolicy,
5646
- assetWorkerBypass: true
5647
- }),
5889
+ routes,
5648
5890
  drizzlePlugin(root, true, dialect, {
5649
5891
  d1BindingName: bindingNames?.d1,
5650
5892
  forceVirtualDb: authEnabled || bindingNames?.d1 !== void 0,
@@ -5656,18 +5898,20 @@ function voidPlugin(options) {
5656
5898
  enabled: authEnabled,
5657
5899
  configPath: authConfigPath
5658
5900
  }),
5659
- prerenderPlugin(root, config),
5660
5901
  devTriggersHintPlugin(root, devTriggerToken),
5661
- ...cloudflare({
5902
+ ...cloudflare$1({
5662
5903
  configPath: cloudflareConfigPath,
5663
5904
  ...inspectorPortOption,
5664
5905
  persistState: { path: localD1.persistRoot },
5665
5906
  auxiliaryWorkers: options?.auxiliaryWorkers,
5666
5907
  viteEnvironment: { name: DEFAULT_WORKER_ENVIRONMENT_NAME },
5667
- config: mergeBindings
5908
+ config: mergeBindings,
5909
+ finalizeAssets(clientDir, environment) {
5910
+ (environment?.config.plugins.find((plugin) => plugin.name === routes.name))?.api.finalizeCloudflareAssets(clientDir, environment.config.build.assetsDir);
5911
+ }
5668
5912
  }),
5913
+ prerenderPlugin(root, config),
5669
5914
  implicitDeployGuard
5670
5915
  ];
5671
5916
  }
5672
- //#endregion
5673
5917
  export { VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled, resolveWorkersAiBindingName, shouldBindWorkersAi, shouldInjectEmailDevInboxVar, voidPlugin };