void 1.6.2 → 1.7.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 (268) hide show
  1. package/dist/{account-cmd-D903EEWQ.mjs → account-cmd-BfkJ_1PC.mjs} +6 -6
  2. package/dist/{application-analysis-DlUG-XNT.mjs → application-analysis-OV0CBJ80.mjs} +8 -7
  3. package/dist/{application-routing-GCBSwXA9.mjs → application-routing-QpyC5G8z.mjs} +2 -1
  4. package/dist/{auth-CL-p_rqV.mjs → auth-BN0NU9dz.mjs} +1 -1
  5. package/dist/{auth-Dy8svcqQ.mjs → auth-CCk9Seol.mjs} +2 -2
  6. package/dist/{auth-CH4PLAX1.d.mts → auth-CZrthGxs.d.mts} +8 -1
  7. package/dist/{auth-YVjBX5NY.mjs → auth-DyWp-fSo.mjs} +7 -1
  8. package/dist/{auth-link-g9J7MSmP.mjs → auth-link-CW1Zh6FM.mjs} +6 -6
  9. package/dist/{auth-router-DMZbG9Qn.mjs → auth-router-CNBKnEZi.mjs} +3 -3
  10. package/dist/{better-auth-shared-BJyG2mH0.d.mts → better-auth-shared-C-0uZg8-.d.mts} +1 -1
  11. package/dist/{better-auth-shared-C958aM7W.mjs → better-auth-shared-CdVyCUou.mjs} +1 -1
  12. package/dist/{build-cmd-DmjbuT6d.mjs → build-cmd-C9qOKW9W.mjs} +5 -5
  13. package/dist/{cache-2khBO1MR.mjs → cache-DVBBbWQL.mjs} +5 -5
  14. package/dist/{cancel-deploy-_itbbvY3.mjs → cancel-deploy-COavnjud.mjs} +4 -4
  15. package/dist/{cf-build-output-B1C8U83u.mjs → cf-build-output-CWNOH-KA.mjs} +2 -1
  16. package/dist/cf-build-output-DUZnAeZ1.mjs +1 -0
  17. package/dist/{cf-config-migrate-Dy8MrKgF.mjs → cf-config-migrate-Bb-EdAQq.mjs} +5 -1
  18. package/dist/cli/cli.mjs +68 -1868
  19. package/dist/cli/cloudflare-operation-process.mjs +10 -8
  20. package/dist/cli/env-schema-probe.mjs +3 -3
  21. package/dist/cli-main-DFteHrJI.mjs +1889 -0
  22. package/dist/client-BAxLpSKv.mjs +1 -0
  23. package/dist/{client-CoxPEhJq.mjs → client-BEZmTP6p.mjs} +10 -4
  24. package/dist/{cloudflare-auth-CuS42-9A.mjs → cloudflare-auth-DGIivpTb.mjs} +1 -1
  25. package/dist/{cloudflare-cmd-DTF19-j-.mjs → cloudflare-cmd-DJaxC-bc.mjs} +5 -5
  26. package/dist/{cloudflare-config-Ce8j5S7V.mjs → cloudflare-config-DtOGAbeB.mjs} +2 -2
  27. package/dist/{cloudflare-connect-BN4dHp8i.mjs → cloudflare-connect-BjpWmglw.mjs} +3 -3
  28. package/dist/{cloudflare-operations-laxRA8HN.mjs → cloudflare-operations-CZkjFrzH.mjs} +1 -1
  29. package/dist/{cloudflare-operations-DrZGzQap.mjs → cloudflare-operations-k7wYUv56.mjs} +6 -6
  30. package/dist/{cloudflare-process-D9aC-jXr.mjs → cloudflare-process-BcPvlMFd.mjs} +2 -2
  31. package/dist/{config-hL-S-Y9D.mjs → config-5oSQhZNj.mjs} +3 -1
  32. package/dist/{config-CPxJmt4M.d.mts → config-CTlUaXWZ.d.mts} +3 -1
  33. package/dist/{config-CNDjO-15.mjs → config-DcqUBGCb.mjs} +1 -1
  34. package/dist/config-entry.d.mts +1 -1
  35. package/dist/{config-DMR0i3Z2.mjs → config-wo2EaH0X.mjs} +1 -1
  36. package/dist/{connect-DHepM7Xs.mjs → connect-j1F1C_rW.mjs} +7 -7
  37. package/dist/{create-project-Bq0M8MtO.mjs → create-project-CE3jOmd5.mjs} +5 -5
  38. package/dist/{create-project-BiMmR5wA.mjs → create-project-DZH3aYGQ.mjs} +1 -1
  39. package/dist/{db-CqfT6lhV.mjs → db-DyLzzxvM.mjs} +38 -38
  40. package/dist/{db-types-DRmxBJ2K.mjs → db-types-DdHHUVPy.mjs} +1 -1
  41. package/dist/{delete-CY4L8fi2.mjs → delete-Dey6YoMA.mjs} +5 -5
  42. package/dist/{deploy-La_Ly8g_.mjs → deploy-Ccw2D2lw.mjs} +491 -109
  43. package/dist/deploy-DEZkUS77.mjs +2 -0
  44. package/dist/{deploy-managed-static-CESLfKHN.mjs → deploy-managed-static-BBVtpuGv.mjs} +16 -16
  45. package/dist/{deploy-transport-DcI6LXhY.mjs → deploy-transport-Dt0IvSVW.mjs} +2 -2
  46. package/dist/deploy.mjs +8 -8
  47. package/dist/{dispatch-DM4Xdd2l.mjs → dispatch-pYaww76u.mjs} +4 -4
  48. package/dist/{dist-D23AAMxT.mjs → dist-BQdgCVQF.mjs} +1 -1
  49. package/dist/{dist-eV_Ep60B.mjs → dist-DeTdhbZc.mjs} +1 -1
  50. package/dist/{domain-BD1KOQL3.mjs → domain-Dh3mG8Vs.mjs} +6 -6
  51. package/dist/{email-XAspopcj.mjs → email-DKyMjOYM.mjs} +10 -10
  52. package/dist/{email-cloudflare-RxIQoPc9.mjs → email-cloudflare-CTt2n_W2.mjs} +13 -9
  53. package/dist/{env-DrYUh55t.mjs → env-DkZzh_Dd.mjs} +7 -7
  54. package/dist/env-mask-D31Qztl9.mjs +46 -0
  55. package/dist/{env-validation-Del3C8AY.mjs → env-validation-1snjKtDX.mjs} +4 -4
  56. package/dist/{env-validation-Bosj7EVg.mjs → env-validation-C8NL3lEH.mjs} +1 -1
  57. package/dist/{fetch-C8yhLoF3.mjs → fetch-CAIVkLvW.mjs} +1 -1
  58. package/dist/{fetch-B-gLGYVl.d.mts → fetch-CbI6lNnk.d.mts} +6 -4
  59. package/dist/{fetch-stream-DafNtVJC.mjs → fetch-stream-6Op0qlLd.mjs} +1 -1
  60. package/dist/{fetch-stream-DuwxWmBM.d.mts → fetch-stream-DoED9atq.d.mts} +1 -1
  61. package/dist/{gen-DSkScMIz.mjs → gen-BZmFOGDQ.mjs} +7 -7
  62. package/dist/gen-C6iknRdI.mjs +1 -0
  63. package/dist/{github-cmd-CA-lBdkn.mjs → github-cmd-7Oky9qgH.mjs} +6 -6
  64. package/dist/{handler-DnI_au0K.mjs → handler-C9SnmeW1.mjs} +5 -4
  65. package/dist/{handler-BR6Tvjkp.d.mts → handler-DjqciiDc.d.mts} +20 -7
  66. package/dist/{headers--cbz6iZ8.mjs → headers-CimYIfQI.mjs} +1 -1
  67. package/dist/{help-1OCFDsRr.mjs → help-CNuUb47C.mjs} +7 -3
  68. package/dist/help-C_cqTByy.mjs +1 -0
  69. package/dist/index.d.mts +4 -4
  70. package/dist/index.mjs +154 -109
  71. package/dist/{info-BpxpsX0B.mjs → info-DwB8IWIx.mjs} +4 -4
  72. package/dist/{init-DpVXO5S-.mjs → init-CUGSmcED.mjs} +33 -31
  73. package/dist/{link-DAXOT-G_.mjs → link-BlRTGHan.mjs} +6 -6
  74. package/dist/{list-BFQ0gcML.mjs → list-iCg7d5Pa.mjs} +7 -7
  75. package/dist/{live-DF4HUl2m.mjs → live-CYJ4KGoR.mjs} +2 -2
  76. package/dist/{live-0xrcVpyq.d.mts → live-zKGbRT4h.d.mts} +2 -2
  77. package/dist/{local-d1-CLVPP6v7.mjs → local-d1-CFcH9Bx3.mjs} +2 -2
  78. package/dist/login-C4q1S-5b.mjs +1 -0
  79. package/dist/{login-RIw7ffPe.mjs → login-TA51e5Fw.mjs} +5 -5
  80. package/dist/{logs-B2OeLS4X.mjs → logs-BlyAxlvx.mjs} +6 -6
  81. package/dist/{migrate-DiI50Chz.mjs → migrate-BH6LCr00.mjs} +5 -5
  82. package/dist/migrate-CVBsSFhC.mjs +1 -0
  83. package/dist/nitro.d.mts +5 -0
  84. package/dist/nitro.mjs +27 -8
  85. package/dist/{node-Bc-dBAGL.mjs → node-B0otYjDv.mjs} +4 -4
  86. package/dist/{operator-args-D79WQP70.mjs → operator-args-DuKAQ3Ks.mjs} +1 -1
  87. package/dist/{operator-auth-CfDcmzpo.mjs → operator-auth-CD3pap65.mjs} +1 -1
  88. package/dist/{operator-client-BIY4-N_6.mjs → operator-client-XvXTkea6.mjs} +2 -2
  89. package/dist/{operator-cmd-CEI5Aaza.mjs → operator-cmd-CoHlJjcT.mjs} +7 -7
  90. package/dist/operator-cmd-DnaCnCSP.mjs +1 -0
  91. package/dist/output-CNsMDEd2.mjs +1 -0
  92. package/dist/{output-BCdLioKP.mjs → output-CXJTIAtF.mjs} +1 -1
  93. package/dist/pages/client.d.mts +16 -13
  94. package/dist/pages/client.mjs +34 -66
  95. package/dist/pages/index.d.mts +4 -3
  96. package/dist/pages/index.mjs +6 -6
  97. package/dist/pages/islands-plugin.mjs +1 -1
  98. package/dist/pages/protocol.d.mts +2 -2
  99. package/dist/pages/protocol.mjs +1 -1
  100. package/dist/pages/serialize.d.mts +2 -2
  101. package/dist/pages/serialize.mjs +1 -1
  102. package/dist/platform-args-B7-wQ0_B.mjs +1 -0
  103. package/dist/{platform-args-Cx1M-7bq.mjs → platform-args-DfT8yQBF.mjs} +1 -1
  104. package/dist/{platform-auth-config-ZrYm8KVs.mjs → platform-auth-config-MO0VdVs9.mjs} +10 -10
  105. package/dist/{platform-auth-protection-t6mdY4nn.mjs → platform-auth-protection-Dv208eyL.mjs} +8 -8
  106. package/dist/{platform-auth-recovery-XeBmPTXx.mjs → platform-auth-recovery-DvAQ674F.mjs} +7 -7
  107. package/dist/{platform-cmd-C7BevP9b.mjs → platform-cmd-BpUA19r_.mjs} +1 -1
  108. package/dist/{platform-cmd-EXehmSYA.mjs → platform-cmd-dlSxrcQ7.mjs} +9 -9
  109. package/dist/{platform-domain-DR263ObA.mjs → platform-domain-DSO4eUEw.mjs} +5 -5
  110. package/dist/{platform-lifecycle-BvU_TNji.mjs → platform-lifecycle-BSvsyB_x.mjs} +17 -17
  111. package/dist/{platform-lifecycle-CN4aXldN.mjs → platform-lifecycle-CfcFygHb.mjs} +1 -1
  112. package/dist/{platform-management-yS2sve3V.mjs → platform-management-BMdyt667.mjs} +1 -1
  113. package/dist/{platform-management-_UE1_GM8.mjs → platform-management-CrP1XhVd.mjs} +4 -4
  114. package/dist/{platform-plans-config-Dx1agneU.mjs → platform-plans-config-CgDiwflR.mjs} +5 -5
  115. package/dist/{platform-recovery-CPVk9-Q4.mjs → platform-recovery-CHWwXVZ6.mjs} +3 -3
  116. package/dist/{platform-setup-Vw1AaUN8.mjs → platform-setup-BTQVbnTC.mjs} +3 -3
  117. package/dist/{plugin-inference-bQ1Be840.mjs → plugin-inference-g66Q1Mx9.mjs} +4 -4
  118. package/dist/prepare-Bx4a8cb1.mjs +1 -0
  119. package/dist/{prepare-BkRhDnxw.mjs → prepare-DJYHjpzq.mjs} +3 -3
  120. package/dist/{prepare-D8L9AQbw.mjs → prepare-DXduEwQp.mjs} +11 -8
  121. package/dist/{prerender-render-RlAj6hh8.mjs → prerender-render-BN9Lmebs.mjs} +29 -13
  122. package/dist/prerender-render.d.mts +10 -2
  123. package/dist/prerender-render.mjs +1 -1
  124. package/dist/{project-cmd-DH3CuFC6.mjs → project-cmd-Dfb1Sg8w.mjs} +18 -18
  125. package/dist/{project-team-MjT5K4rQ.mjs → project-team-BO2dyc7S.mjs} +5 -5
  126. package/dist/{project-token-BKHGwY3k.mjs → project-token-ByO2mEI2.mjs} +5 -5
  127. package/dist/{project-tsconfig-BMveFb4b.mjs → project-tsconfig-nhnTWO_Y.mjs} +3 -1
  128. package/dist/{project-zero-trust-Bzdd05-h.mjs → project-zero-trust-CoQfwRBR.mjs} +5 -5
  129. package/dist/{protocol-CkwjASep.d.mts → protocol-xZMvWsrg.d.mts} +5 -3
  130. package/dist/{protocol-COyySMki.mjs → protocol-yxdHxFLN.mjs} +47 -11
  131. package/dist/{provision-CYhZR_Mn.mjs → provision-CMH4-8ri.mjs} +1 -1
  132. package/dist/{provision-B0HqoRuI.mjs → provision-D5q-ptD3.mjs} +2 -2
  133. package/dist/{requests-daJmVpjk.mjs → requests-CPOiDkjh.mjs} +4 -4
  134. package/dist/resolve-project-BALVa9q0.mjs +1 -0
  135. package/dist/{resolve-project-D0YNnJfm.mjs → resolve-project-ClvLMTI9.mjs} +1 -1
  136. package/dist/{rollback-AVwiMAkk.mjs → rollback-BfCs2la4.mjs} +7 -7
  137. package/dist/{route-types-e69EqY88.mjs → route-types-Cl3x0Q8B.mjs} +265 -12
  138. package/dist/{route-url-C_YIH_zO.d.mts → route-url-C3JwYrER.d.mts} +8 -3
  139. package/dist/{route-url-CRDF-I0I.mjs → route-url-CfCR4oMj.mjs} +4 -3
  140. package/dist/routes-stub.d.mts +10 -1
  141. package/dist/routes-stub.mjs +1 -1
  142. package/dist/{runner-QMeOpScZ.mjs → runner-CTk21HrO.mjs} +1 -1
  143. package/dist/{runner-mysql-0zVmB1JW.mjs → runner-mysql-CHvEg_sy.mjs} +1 -1
  144. package/dist/runtime/ai.mjs +1 -1
  145. package/dist/runtime/auth.d.mts +2 -2
  146. package/dist/runtime/auth.mjs +1 -1
  147. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  148. package/dist/runtime/better-auth-mysql.mjs +1 -1
  149. package/dist/runtime/better-auth-pg.d.mts +1 -1
  150. package/dist/runtime/better-auth-pg.mjs +1 -1
  151. package/dist/runtime/better-auth.d.mts +1 -1
  152. package/dist/runtime/better-auth.mjs +1 -1
  153. package/dist/runtime/client-react.d.mts +3 -3
  154. package/dist/runtime/client-react.mjs +2 -2
  155. package/dist/runtime/client-solid.d.mts +3 -3
  156. package/dist/runtime/client-solid.mjs +2 -2
  157. package/dist/runtime/client-svelte.d.mts +3 -3
  158. package/dist/runtime/client-svelte.mjs +2 -2
  159. package/dist/runtime/client-vue.d.mts +3 -3
  160. package/dist/runtime/client-vue.mjs +2 -2
  161. package/dist/runtime/client.d.mts +3 -3
  162. package/dist/runtime/client.mjs +2 -2
  163. package/dist/runtime/email/testing.mjs +2 -2
  164. package/dist/runtime/email.mjs +3 -3
  165. package/dist/runtime/env-public.mjs +2 -46
  166. package/dist/runtime/fetch-server.d.mts +1 -1
  167. package/dist/runtime/fetch-server.mjs +1 -1
  168. package/dist/runtime/fetch-stream.d.mts +2 -2
  169. package/dist/runtime/fetch-stream.mjs +1 -1
  170. package/dist/runtime/fetch.d.mts +1 -1
  171. package/dist/runtime/fetch.mjs +1 -1
  172. package/dist/runtime/handler.d.mts +1 -1
  173. package/dist/runtime/handler.mjs +1 -1
  174. package/dist/runtime/isr.d.mts +3 -1
  175. package/dist/runtime/live-client.d.mts +11 -2
  176. package/dist/runtime/live-client.mjs +8 -0
  177. package/dist/runtime/live-server.mjs +1 -1
  178. package/dist/runtime/live.d.mts +1 -1
  179. package/dist/runtime/live.mjs +1 -1
  180. package/dist/runtime/log.mjs +1 -1
  181. package/dist/runtime/remote/index.mjs +1 -1
  182. package/dist/runtime/route-url.d.mts +2 -2
  183. package/dist/runtime/route-url.mjs +1 -1
  184. package/dist/runtime/routing.d.mts +15 -4
  185. package/dist/runtime/routing.mjs +93 -11
  186. package/dist/runtime/sandbox.mjs +1 -1
  187. package/dist/runtime/sse-client.d.mts +9 -1
  188. package/dist/runtime/sse-client.mjs +7 -0
  189. package/dist/runtime/validator.d.mts +1 -1
  190. package/dist/runtime/validator.mjs +1 -1
  191. package/dist/runtime/ws-server.d.mts +3 -3
  192. package/dist/runtime/ws-server.mjs +1 -1
  193. package/dist/runtime/ws.d.mts +1 -1
  194. package/dist/runtime/ws.mjs +1 -1
  195. package/dist/{scan-F0psanp7.mjs → scan-L8OSv1f7.mjs} +10 -7
  196. package/dist/{secret-szNdoeKa.mjs → secret-CuI6LTpD.mjs} +7 -7
  197. package/dist/serialize-DN-envGQ.d.mts +18 -0
  198. package/dist/serialize-Pf-CIQK_.mjs +39 -0
  199. package/dist/{skills-D393E4lB.mjs → skills-BBO9wMjB.mjs} +1 -1
  200. package/dist/{subcommand-prompt-CxJXporl.mjs → subcommand-prompt-BZMnCA8T.mjs} +2 -2
  201. package/dist/url-CuoEn0o3.mjs +43 -0
  202. package/dist/validator-8-NZs2Xr.mjs +168 -0
  203. package/dist/{version-metadata-BC3LK7Y-.mjs → version-metadata-eUd6Ar_U.mjs} +1 -1
  204. package/dist/wrangler-R3kMdJfw.mjs +1 -0
  205. package/dist/{wrangler-Gn4EoY4-.mjs → wrangler-k40T7XTQ.mjs} +2 -2
  206. package/dist/{wrapper-B9W9RE8z.mjs → wrapper-BGsi_uHs.mjs} +11 -8
  207. package/dist/{ws-Dmjg5NH2.d.mts → ws-DB8Feytg.d.mts} +2 -2
  208. package/docs/guide/ai.md +2 -0
  209. package/docs/guide/auth.md +62 -0
  210. package/docs/guide/database.md +33 -0
  211. package/docs/guide/deployment.md +8 -0
  212. package/docs/guide/edge/prerendering.md +9 -4
  213. package/docs/guide/edge/revalidation.md +3 -0
  214. package/docs/guide/live.md +2 -0
  215. package/docs/guide/pages-routing/actions-and-forms.md +15 -10
  216. package/docs/guide/pages-routing/head.md +3 -1
  217. package/docs/guide/pages-routing/islands.md +1 -1
  218. package/docs/guide/pages-routing/loaders.md +2 -0
  219. package/docs/guide/pages-routing/markdown.md +2 -2
  220. package/docs/guide/pages-routing/overview.md +139 -10
  221. package/docs/guide/quickstart.md +1 -0
  222. package/docs/guide/sse.md +2 -0
  223. package/docs/guide/ssg.md +23 -2
  224. package/docs/guide/storage.md +6 -2
  225. package/docs/guide/type-safety.md +307 -26
  226. package/docs/guide/typed-fetch.md +7 -3
  227. package/docs/guide/websockets.md +5 -5
  228. package/docs/integrations/cloudflare.md +10 -10
  229. package/docs/integrations/frameworks/nuxt.md +2 -0
  230. package/docs/integrations/frameworks/overview.md +2 -0
  231. package/docs/integrations/nodejs-bun-deno.md +65 -0
  232. package/docs/reference/api/auth.md +19 -0
  233. package/docs/reference/api/client.md +6 -4
  234. package/docs/reference/api/handlers.md +3 -1
  235. package/docs/reference/api/pages.md +8 -8
  236. package/docs/reference/api/resources.md +3 -1
  237. package/docs/reference/api/rewrites.md +16 -4
  238. package/docs/reference/api/types.md +9 -2
  239. package/docs/reference/cli/database.md +2 -0
  240. package/docs/reference/cli/deploy.md +17 -11
  241. package/docs/reference/cli.md +3 -0
  242. package/docs/reference/config.md +24 -2
  243. package/package.json +25 -23
  244. package/schema.json +4 -0
  245. package/skills/void/SKILL.md +5 -0
  246. package/dist/cf-build-output-CmDOcA7K.mjs +0 -1
  247. package/dist/client-CEtr5UOR.mjs +0 -1
  248. package/dist/deploy-DMhOyebt.mjs +0 -2
  249. package/dist/gen-BbT1Ku1P.mjs +0 -1
  250. package/dist/help-Ba8Dq5-r.mjs +0 -1
  251. package/dist/login-BX2gzHUt.mjs +0 -1
  252. package/dist/migrate-CUGMGaIM.mjs +0 -1
  253. package/dist/operator-cmd-oTT2MA9G.mjs +0 -1
  254. package/dist/output-E6gecbbV.mjs +0 -1
  255. package/dist/platform-args-C7XUw9mw.mjs +0 -1
  256. package/dist/prepare-CZRVGNld.mjs +0 -1
  257. package/dist/resolve-project-CgfjtOwz.mjs +0 -1
  258. package/dist/serialize-DUuYuaY3.mjs +0 -29
  259. package/dist/serialize-I4EmS-Wf.d.mts +0 -16
  260. package/dist/validator-CTfmzZYb.mjs +0 -69
  261. package/dist/wrangler-CQ5c-MtJ.mjs +0 -1
  262. package/dist/{cf-access-BmBT2h8_.mjs → cf-access-Dnyw8KFY.mjs} +1 -1
  263. package/dist/{config-s6TkpSat.mjs → config-eeDzKBS9.mjs} +1 -1
  264. package/dist/{entry-DFBca6aS.mjs → entry-Bw-G1VVx.mjs} +1 -1
  265. package/dist/{env-types-Bd8DkQhl.mjs → env-types-Dz9qkiOn.mjs} +1 -1
  266. package/dist/{inbound-CdO-qY0w.mjs → inbound-C2H6Dzz1.mjs} +2 -2
  267. package/dist/{runner-5MCSimKx.mjs → runner-CMZb7jNU.mjs} +1 -1
  268. package/dist/{runner-mysql-Bdmsp_x4.mjs → runner-mysql-BXfcQQj3.mjs} +1 -1
package/dist/index.mjs CHANGED
@@ -1,50 +1,50 @@
1
1
  import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
2
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
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-bQ1Be840.mjs";
5
- import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-G0yut6Zz.mjs";
6
- import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-s6TkpSat.mjs";
7
- import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-hL-S-Y9D.mjs";
8
- import { f as invalidateSourceAnalysis, m as isRouteEnabledForEnvironment, o as resolveLayoutIds } from "./scan-F0psanp7.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-DlUG-XNT.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-DFBca6aS.mjs";
15
- import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
16
- import { a as isAssetBypassRule, d as hasDocumentRoutes, l as edgeRulesNeedWorker, n as mergeRoutingRules, o as isGeneratedAssetHeaders, p as resolveAssetRoutingPolicy, s as resolveAssetWorkerBypass, t as lintRoutingPhases, u as hasApiRoutes } from "./headers--cbz6iZ8.mjs";
17
- import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
4
+ 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-OV0CBJ80.mjs";
5
+ import { l as inferBindingsFromSource, m as applyBindingOverrides, n as FRAMEWORK_SCAN_DIRS, t as DEFAULT_SCAN_DIRS, u as staticModuleReferences } from "./plugin-inference-g66Q1Mx9.mjs";
6
+ import { a as isAssetBypassRule, d as hasDocumentRoutes, l as edgeRulesNeedWorker, n as mergeRoutingRules, o as isGeneratedAssetHeaders, p as resolveAssetRoutingPolicy, s as resolveAssetWorkerBypass, t as lintRoutingPhases, u as hasApiRoutes } from "./headers-CimYIfQI.mjs";
18
7
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
19
- import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
20
- import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-Ce8j5S7V.mjs";
21
- 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-Gn4EoY4-.mjs";
22
- import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CLVPP6v7.mjs";
8
+ 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-k40T7XTQ.mjs";
9
+ import { c as stashCloudflareDeployPointer, i as materializeCloudflareConfig, l as ensureGitignoreLines, o as restoreCloudflarePreviewPointer } from "./cloudflare-config-DtOGAbeB.mjs";
10
+ import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, s as syncBindingTypes, t as generateRouteTypes } from "./route-types-Cl3x0Q8B.mjs";
11
+ import { c as getDatabaseCasing, l as getDatabaseDialect, p as readConfig, u as isNodeTarget } from "./config-5oSQhZNj.mjs";
12
+ import { n as writeLocalD1PersistState, t as resolveLocalD1Target } from "./local-d1-CFcH9Bx3.mjs";
13
+ import { i as voidWarn, n as voidError, r as voidLog, t as setShowTimestamp } from "./log-D9hwSySP.mjs";
14
+ import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-CCk9Seol.mjs";
15
+ import { n as ensurePlatformProxyAccess } from "./cf-access-Dnyw8KFY.mjs";
23
16
  import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
24
- import { n as ensurePlatformProxyAccess } from "./cf-access-BmBT2h8_.mjs";
25
- import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-Dy8svcqQ.mjs";
26
- import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Dy8MrKgF.mjs";
27
- import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
17
+ import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
18
+ import { t as migrateBuiltWranglerConfig } from "./cf-config-migrate-Bb-EdAQq.mjs";
19
+ import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
28
20
  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";
29
- import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-BMveFb4b.mjs";
30
- import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-DM4Xdd2l.mjs";
21
+ import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-G0yut6Zz.mjs";
22
+ import { a as readDeployBuildQueueNames, r as cloudflareQueueName, s as drizzlePlugin, t as generateQueueResolverSource } from "./dispatch-pYaww76u.mjs";
31
23
  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-CUUS6iUg.mjs";
32
- import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-Bd8DkQhl.mjs";
24
+ import { t as MagicString } from "./dist-B6eN80gc.mjs";
25
+ import { n as bindingResolver } from "./ast-bindings-BkivMJIo.mjs";
26
+ import { i as isMemberExpression, n as isIdentifier, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
27
+ import { n as findEnvFileForPaths, r as generateEnvTypes, t as findEnvFile } from "./env-types-Dz9qkiOn.mjs";
28
+ import { i as writeFileIfChanged, r as syncAuthTypesInProjectTsconfig } from "./project-tsconfig-nhnTWO_Y.mjs";
33
29
  import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
30
+ import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
31
+ import { h as isRouteEnabledForEnvironment, i as patternToRegex, p as invalidateSourceAnalysis, s as resolveLayoutIds } from "./scan-L8OSv1f7.mjs";
34
32
  import { n as INTERNAL_BINDING_PREFIXES, t as INTERNAL_BINDING_EXACT_NAMES } from "./env-raw-e8qgqAzQ.mjs";
35
33
  import { t as ASSET_EXTENSIONS } from "./routing-assets-DJIVOrCh.mjs";
34
+ import { i as loadVoidAuthConfig, n as devAuthConfigImporter, o as viteAuthConfigImporter, t as AUTH_CONFIG_ENVIRONMENT } from "./config-eeDzKBS9.mjs";
36
35
  import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate, t as collectPages } from "./isr-config-Czzb4mIq.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-BC3LK7Y-.mjs";
39
- import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-RxIQoPc9.mjs";
36
+ import { t as assertNoPrerenderFailures } from "./prerender-render-BN9Lmebs.mjs";
37
+ import { f as prerenderPages, n as SEND_EMAIL_BINDING, p as prerenderPagesNode } from "./email-cloudflare-CTt2n_W2.mjs";
38
+ import { i as safeJsonStringify } from "./protocol-yxdHxFLN.mjs";
39
+ import { n as completeApplicationAnalysis } from "./application-routing-QpyC5G8z.mjs";
40
+ import { a as validateSsrEntries, n as SSR_SERVER_ENTRY_RELATIVE_PATHS, o as validateSsrEntry, t as SSR_CLIENT_ENTRY_RELATIVE_PATHS } from "./entry-Bw-G1VVx.mjs";
41
+ import { r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-eUd6Ar_U.mjs";
42
+ import { r as hasEmailHandlers } from "./email-BHY72ixO.mjs";
43
+ 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-C9SnmeW1.mjs";
40
44
  import { r as defer } from "./validation-error-uAAjlsiW.mjs";
41
- import { i as safeJsonStringify } from "./protocol-COyySMki.mjs";
42
- import { n as completeApplicationAnalysis } from "./application-routing-GCBSwXA9.mjs";
43
- import { a as syncAuthTypesFile, i as removeAuthTypesIfPresent, n as generateQueueTypes, t as generateRouteTypes } from "./route-types-e69EqY88.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-DnI_au0K.mjs";
45
45
  import module, { builtinModules, createRequire } from "node:module";
46
- import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
47
- import { createRunnableDevEnvironment, defaultServerConditions, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
46
+ import { chmodSync, closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, realpathSync, rmSync, statSync, writeFileSync, writeSync } from "node:fs";
47
+ import { createRunnableDevEnvironment, defaultServerConditions, isFileServingAllowed, isRunnableDevEnvironment, loadEnv, normalizePath, parseSync, resolveEnvPrefix } from "vite";
48
48
  import { fileURLToPath, pathToFileURL } from "node:url";
49
49
  import { appendSqliteClassMigration } from "@void/deploy-core";
50
50
  import { randomBytes, timingSafeEqual } from "node:crypto";
@@ -54,6 +54,8 @@ import { getRootConfigPath, getWorkerAssetsDir, getWorkerConfigPath, readBuildOu
54
54
  import { convertToWranglerConfig } from "@cloudflare/config";
55
55
  import { cloudflare } from "@cloudflare/vite-plugin";
56
56
  import { parse } from "smol-toml";
57
+ import { readFile, stat } from "node:fs/promises";
58
+ import mime from "mime";
57
59
  import { compilePattern, matchPattern } from "@void/edge";
58
60
  // src/pages/dev-css-assets.ts
59
61
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
@@ -493,11 +495,11 @@ function readVoidDevCredentials(root) {
493
495
  * block the server. On completion, writes project.json and restarts the server.
494
496
  */
495
497
  async function runAiSetupPrompt(root, token, apiUrl, server) {
496
- const { select, text, isCancel, log } = await import("./dist-eV_Ep60B.mjs");
497
- const { PlatformClient } = await import("./client-CEtr5UOR.mjs");
498
+ const { select, text, isCancel, log } = await import("./dist-DeTdhbZc.mjs");
499
+ const { PlatformClient } = await import("./client-BAxLpSKv.mjs");
498
500
  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");
501
+ const { inferDefaultSlug } = await import("./resolve-project-BALVa9q0.mjs");
502
+ const { printSuccess } = await import("./output-CNsMDEd2.mjs");
501
503
  const client = new PlatformClient(token, { apiUrl });
502
504
  let projects;
503
505
  try {
@@ -524,7 +526,7 @@ async function runAiSetupPrompt(root, token, apiUrl, server) {
524
526
  let slug;
525
527
  if (result === "__create__") {
526
528
  const { validateProjectSlug } = await import("./project-slug-BUy0lmyR.mjs");
527
- const { createProjectWithSlugRetry } = await import("./create-project-BiMmR5wA.mjs");
529
+ const { createProjectWithSlugRetry } = await import("./create-project-DZH3aYGQ.mjs");
528
530
  let created;
529
531
  try {
530
532
  created = await createProjectWithSlugRetry(client, inferDefaultSlug(root), async (defaultSlug) => {
@@ -1695,7 +1697,7 @@ function readProcessEnvCopies() {
1695
1697
  * once per environment) see only the shell.
1696
1698
  */
1697
1699
  function stripLocalClientEnv(root, config, before) {
1698
- if (config.envDir === false || realDir(config.envDir) !== realDir(root)) return;
1700
+ if (config.envDir === false || realPath(config.envDir) !== realPath(root)) return;
1699
1701
  const file = join(root, LOCAL_ENV_FILE);
1700
1702
  if (!existsSync(file)) return;
1701
1703
  const parsed = parseEnv(readFileSync(file, "utf8"));
@@ -1716,13 +1718,21 @@ function stripLocalClientEnv(root, config, before) {
1716
1718
  }
1717
1719
  }
1718
1720
  /** Match Vite's canonical paths, including Windows short names and filesystem casing. */
1719
- function realDir(dir) {
1721
+ function realPath(path) {
1720
1722
  try {
1721
- return realpathSync.native(dir);
1723
+ return realpathSync.native(path);
1722
1724
  } catch {
1723
- return resolve(dir);
1725
+ return resolve(path);
1724
1726
  }
1725
1727
  }
1728
+ /** Module ids that name an env file: its path as found, and as Vite resolves it. */
1729
+ function envFileIdsFor(envFile) {
1730
+ return new Set(envFile ? [normalizePath(envFile), normalizePath(realPath(envFile))] : []);
1731
+ }
1732
+ /** A hook filter pattern that matches exactly `id`. */
1733
+ function exactId(id) {
1734
+ return new RegExp(`^${id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}$`);
1735
+ }
1726
1736
  /** Patterns Vite's `define` typically uses for env-shaped constants. */
1727
1737
  const DEFINE_ENV_PATTERN = /^(?:globalThis\.)?(?:process\.env|import\.meta\.env)\.([A-Z_][A-Z0-9_]*)$/;
1728
1738
  /**
@@ -1739,6 +1749,18 @@ const DEFINE_ENV_PATTERN = /^(?:globalThis\.)?(?:process\.env|import\.meta\.env)
1739
1749
  function envSchemaPlugin(root, options = {}) {
1740
1750
  const outDir = join(root, ".void");
1741
1751
  let envFile = null;
1752
+ let envFileIds = envFileIdsFor(findEnvFile(root));
1753
+ const keepEnvFileImport = {
1754
+ filter: { id: [...envFileIds].map(exactId) },
1755
+ handler(code, id) {
1756
+ if (this.environment.config.consumer === "client" || !envFileIds.has(id)) return;
1757
+ return {
1758
+ code,
1759
+ map: null,
1760
+ moduleSideEffects: true
1761
+ };
1762
+ }
1763
+ };
1742
1764
  let command = "serve";
1743
1765
  let processEnvCopiesBefore;
1744
1766
  const appliedClientDefaults = /* @__PURE__ */ new Map();
@@ -1851,6 +1873,7 @@ function envSchemaPlugin(root, options = {}) {
1851
1873
  const reservedInDotenv = findReservedEnvKeys(scanWranglerDotenvKeys(join(root, LOCAL_ENV_FILE)));
1852
1874
  if (reservedInDotenv.length > 0) throw new Error(reservedEnvKeysMessage(".env", reservedInDotenv));
1853
1875
  envFile = findEnvFile(root);
1876
+ envFileIds = envFileIdsFor(envFile);
1854
1877
  if (!envFile) return;
1855
1878
  regenerateTypes();
1856
1879
  await importUserEnv(environment.command === "build");
@@ -1898,7 +1921,8 @@ function envSchemaPlugin(root, options = {}) {
1898
1921
  },
1899
1922
  async buildStart() {
1900
1923
  if (envFile) await importUserEnv();
1901
- }
1924
+ },
1925
+ ...envFileIds.size > 0 && { transform: keepEnvFileImport }
1902
1926
  };
1903
1927
  }
1904
1928
  // src/plugin-framework-triggers.ts
@@ -2440,7 +2464,7 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
2440
2464
  const managedDispatch = options.nodeTarget !== true && options.dev !== true && options.managedDispatch === true;
2441
2465
  lines.push(`import { AsyncLocalStorage } from "node:async_hooks";`);
2442
2466
  lines.push(`import { Hono } from ${JSON.stringify(options.honoPath)};`);
2443
- lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createNamedActionMarker as __createNamedActionMarker, markRouteHandler as __markRouteHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
2467
+ lines.push(`import { createRoutingRuntime as __createRoutingRuntime, createHttpRouteHandler as __createHttpRouteHandler, createErrorRenderer as __createErrorRenderer, createPageGetHandler as __createPageGetHandler, createPageMutationHandler as __createPageMutationHandler, createNamedActionMarker as __createNamedActionMarker, markRouteHandler as __markRouteHandler, createPagesFallback as __createPagesFallback, createModuleLoader as __createModuleLoader, createClientAssetTags as __createClientAssetTags, createManifestLoader as __createManifestLoader, createSsrFallback as __createSsrFallback, createAssetNotFound as __createAssetNotFound, buildPrerenderPath as __buildPrerenderPath } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};`);
2444
2468
  if (options.nodeTarget) lines.push(`const withRuntimeEnv = (_env, fn) => fn();`);
2445
2469
  else lines.push(`import { withRuntimeEnv } from ${JSON.stringify(options.runtimeEnvPath)};`);
2446
2470
  if (auth) {
@@ -2577,8 +2601,11 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
2577
2601
  if (pages && scan.pages.pages.length > 0) compilePageRoutes(lines, scan, pages, options, pageNames);
2578
2602
  for (let i = 0; i < webSockets.length; i++) lines.push(`app.all(${JSON.stringify(webSockets[i].pattern)}, __markRouteHandler((c) => __forwardWebSocketRequest(c.req.raw, c.env, __voidWebSocketRoutes[${i}])));`);
2579
2603
  if (webSockets.length > 0) lines.push("");
2580
- if (pages && scan.pages.pages.length > 0) lines.push(`app.notFound(__createPagesFallback({ routing: __routingRuntime, errors: __errorRenderer, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson} }));`);
2581
- compilePrerenderCollector(lines, scan, ssr, options, pageNames);
2604
+ if (pages && scan.pages.pages.length > 0) {
2605
+ const pagePatterns = options.trailingSlash ? `[${scan.pages.pages.map((page) => patternToRegex(page.pattern)).join(", ")}]` : "undefined";
2606
+ lines.push(`app.notFound(__createPagesFallback({ routing: __routingRuntime, errors: __errorRenderer, assetsDir: ${JSON.stringify(options.assetsDir)}, fallbackRules: ${fallbackRulesJson}, trailingSlash: ${options.trailingSlash === true}, pagePatterns: ${pagePatterns} }));`);
2607
+ }
2608
+ compilePrerenderCollector(lines, scan, ssr, options, pageNames, pages?.pagesDirRelative);
2582
2609
  if (ssr) {
2583
2610
  lines.push(`const getClientAssetTags = __createClientAssetTags(${JSON.stringify({
2584
2611
  entryId: ssr.clientEntryRelativePath,
@@ -2834,19 +2861,10 @@ function compileRouteTable(scan, routesDir, middlewareDir, jobsDir, queuesDir, s
2834
2861
  lines.push(`export default app;`);
2835
2862
  return lines.join("\n");
2836
2863
  }
2837
- function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
2864
+ function compilePrerenderCollector(lines, scan, ssr, options, pageNames, pagesDirRelative) {
2838
2865
  const staticPaths = scan.pages.pages.filter((page) => page.shouldPrerender && page.params.length === 0 && !page.catchAll).map((page) => page.pattern);
2839
2866
  const dynamicPages = scan.pages.pages.filter((page) => page.shouldPrerender && page.hasGetPrerenderPaths && (page.params.length > 0 || page.catchAll));
2840
2867
  const explicitPaths = options.explicitPrerenderPaths ?? [];
2841
- lines.push(`function __voidBuildPrerenderPath(pattern, params) {`);
2842
- lines.push(` let path = pattern;`);
2843
- lines.push(` for (const [key, value] of Object.entries(params)) {`);
2844
- lines.push(` path = path.replace(":" + key + "{.+}", value);`);
2845
- lines.push(` path = path.replace(":" + key, value);`);
2846
- lines.push(` }`);
2847
- lines.push(` return path;`);
2848
- lines.push(`}`);
2849
- lines.push("");
2850
2868
  lines.push(`export async function __voidCollectPrerenderPaths(request, env, ctx) {`);
2851
2869
  lines.push(` return withRuntimeEnv(env, async () => {`);
2852
2870
  if (options.nodeTarget) lines.push(` return requestContext.run({ request }, async () => {`);
@@ -2860,8 +2878,9 @@ function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
2860
2878
  lines.push(` if (typeof mod.getPrerenderPaths === "function") {`);
2861
2879
  lines.push(` const paramSets = await mod.getPrerenderPaths();`);
2862
2880
  lines.push(` if (Array.isArray(paramSets)) {`);
2863
- lines.push(` for (const params of paramSets) {`);
2864
- lines.push(` paths.push(__voidBuildPrerenderPath(${JSON.stringify(page.pattern)}, params));`);
2881
+ const file = [pagesDirRelative, page.serverPath ?? page.componentPath].filter(Boolean).join("/");
2882
+ lines.push(` for (let index = 0; index < paramSets.length; index++) {`);
2883
+ lines.push(` paths.push(__buildPrerenderPath(${JSON.stringify(page.pattern)}, paramSets[index], ${JSON.stringify(file)}, index));`);
2865
2884
  lines.push(` }`);
2866
2885
  lines.push(` }`);
2867
2886
  lines.push(` }`);
@@ -2881,7 +2900,7 @@ function compilePrerenderCollector(lines, scan, ssr, options, pageNames) {
2881
2900
  lines.push(` }`);
2882
2901
  }
2883
2902
  for (const path of explicitPaths) lines.push(` paths.push(${JSON.stringify(path)});`);
2884
- lines.push(` return [...new Set(paths)];`);
2903
+ lines.push(options.trailingSlash ? ` return [...new Set(paths.map((path) => path.endsWith("/") ? path : path + "/"))];` : ` return [...new Set(paths)];`);
2885
2904
  lines.push(` });`);
2886
2905
  lines.push(` });`);
2887
2906
  lines.push(`}`);
@@ -2974,12 +2993,15 @@ function compilePageRoutes(lines, scan, pages, options, pageNames) {
2974
2993
  }
2975
2994
  const renderer = page.renderMode === "island" ? "renderIslandPage" : "renderPage";
2976
2995
  const assetTags = page.renderMode === "island" && pages.islandClientEntryId ? "getIslandsAssetTags" : "getPagesAssetTags";
2977
- const routeOptions = `{ ${serverImportPath ? "load: _pload_" + safeId + ", " : ""}${mdHeadRef ? "head: " + mdHeadRef + ", " : ""}componentId: ${JSON.stringify(page.componentId)}, render: ${renderer}, assets: ${assetTags}, headConfig: __voidHeadConfig, renderOptions: ${JSON.stringify({
2996
+ const trailingCatchAll = options.trailingSlash && page.catchAll;
2997
+ const pattern = trailingCatchAll ? page.pattern.slice(0, -1) : page.pattern;
2998
+ const catchAllParam = page.pattern.match(/:([^/{}]+)\{\.\+\}\/$/)?.[1];
2999
+ const routeOptions = `{ ${serverImportPath ? "load: _pload_" + safeId + ", " : ""}${mdHeadRef ? "head: " + mdHeadRef + ", " : ""}${trailingCatchAll ? `trailingSlash: true, catchAllParam: ${JSON.stringify(catchAllParam)}, ` : ""}componentId: ${JSON.stringify(page.componentId)}, render: ${renderer}, assets: ${assetTags}, headConfig: __voidHeadConfig, renderOptions: ${JSON.stringify({
2978
3000
  renderMode: page.renderMode,
2979
3001
  ...options.dev === true ? { dev: true } : {}
2980
3002
  })} }`;
2981
- lines.push(`app.get(${JSON.stringify(page.pattern)}, __createPageGetHandler(${routeOptions}));`);
2982
- if (page.methods.includes("action") || page.methods.includes("actions")) lines.push(`app.on(["POST", "PUT", "PATCH", "DELETE"], ${JSON.stringify(page.pattern)}, __createPageMutationHandler({ ...${routeOptions}, namedActions: ${JSON.stringify(page.methods.includes("actions"))} }));`);
3003
+ lines.push(`app.get(${JSON.stringify(pattern)}, __createPageGetHandler(${routeOptions}));`);
3004
+ if (page.methods.includes("action") || page.methods.includes("actions")) lines.push(`app.on(["POST", "PUT", "PATCH", "DELETE"], ${JSON.stringify(pattern)}, __createPageMutationHandler({ ...${routeOptions}, namedActions: ${JSON.stringify(page.methods.includes("actions"))} }));`);
2983
3005
  }
2984
3006
  lines.push("");
2985
3007
  }
@@ -3144,20 +3166,35 @@ function compileNodeApp(target, honoPath, envSchemaModule) {
3144
3166
  import { fileURLToPath } from "node:url";
3145
3167
  import { Hono } from ${JSON.stringify(honoPath)};
3146
3168
  import innerApp, { __voidCollectPrerenderPaths } from "virtual:void-routes";
3169
+ import { prerenderPathsResponse as __prerenderPathsResponse } from ${JSON.stringify(ROUTING_RUNTIME_PATH)};
3147
3170
  ${envSchemaImport}
3148
- // Resolved by nodeTargetPlugin for this emitted chunk, including shared chunks.
3149
- const clientRoot = fileURLToPath(import.meta.voidClientDirectory);
3150
- const assetApp = new Hono();
3151
- assetApp.get("*", serveStatic({ root: clientRoot }));
3152
- const assets = { fetch: (request) => assetApp.fetch(request) };
3171
+ // dist/client, created on first use so a server that supplies its own ASSETS
3172
+ // (a single executable, for one) never looks for a directory it doesn't have.
3173
+ let fileAssets;
3174
+ const clientAssets = () => {
3175
+ if (!fileAssets) {
3176
+ // Resolved by nodeTargetPlugin for this emitted chunk, including shared chunks.
3177
+ const clientRoot = fileURLToPath(import.meta.voidClientDirectory);
3178
+ const assetApp = new Hono();
3179
+ assetApp.get("*", serveStatic({
3180
+ root: clientRoot,
3181
+ allowPercentInPath: true,
3182
+ // Windows permits a trailing separator when opening a regular file.
3183
+ // Directory URLs must look up an index so they cannot alias those files.
3184
+ rewriteRequestPath: (path) => path.endsWith("/") ? path + "index.html" : path,
3185
+ }));
3186
+ fileAssets = { fetch: (request) => assetApp.fetch(request) };
3187
+ }
3188
+ return fileAssets;
3189
+ };
3190
+ const assetsFor = (c) => (typeof c.env?.ASSETS?.fetch === "function" ? c.env.ASSETS : clientAssets());
3153
3191
  const app = new Hono();
3154
3192
  ${envMiddleware}app.post("/__void/prerender-paths", async (c) => {
3155
3193
  if (c.env?.__VOID_PRERENDER !== "1") return c.notFound();
3156
- const paths = await __voidCollectPrerenderPaths(c.req.raw);
3157
- return c.json({ paths });
3194
+ return __prerenderPathsResponse(() => __voidCollectPrerenderPaths(c.req.raw));
3158
3195
  });
3159
- app.get("/assets/*", (c) => assets.fetch(c.req.raw));
3160
- app.all("*", (c) => innerApp.fetch(c.req.raw, { ...c.env, ASSETS: assets }));
3196
+ app.get("/assets/*", (c) => assetsFor(c).fetch(c.req.raw));
3197
+ app.all("*", (c) => innerApp.fetch(c.req.raw, { ...c.env, ASSETS: assetsFor(c) }));
3161
3198
  export default app;`;
3162
3199
  }
3163
3200
  /**
@@ -3227,6 +3264,10 @@ function getFrameworkEntry(framework, root, devTriggerToken, dialect, notFound,
3227
3264
  return generateClassATriggerWrapper(root, framework, getOriginalFrameworkEntry(framework, root, configuredMain), isBuild, dialect, void 0, notFound);
3228
3265
  }
3229
3266
  const TANSTACK_SERVER_ENTRY = "@tanstack/react-start/server-entry";
3267
+ /** Include proxy.ts and custom page extensions; vinext selects the actual convention file. */
3268
+ function hasVinextMiddleware(root) {
3269
+ return [root, join(root, "src")].some((dir) => statSync(dir, { throwIfNoEntry: false })?.isDirectory() && readdirSync(dir).some((file) => /^(?:middleware|proxy)\./i.test(file)));
3270
+ }
3230
3271
  /**
3231
3272
  * Whether `main` names a file in the app rather than a package. A migrated TanStack config keeps
3232
3273
  * `main: "@tanstack/react-start/server-entry"`, and a package subpath may end in `.js`, so a
@@ -3249,7 +3290,7 @@ function getOriginalFrameworkEntry(framework, root, configuredMain) {
3249
3290
  }
3250
3291
  case "react-router": return generateReactRouterEntry(root);
3251
3292
  case "vinext-app": return "vinext/server/app-router-entry";
3252
- case "vinext-pages": return generateVinextPagesEntry(root);
3293
+ case "vinext-pages": return "vinext/server/pages-router-entry";
3253
3294
  }
3254
3295
  }
3255
3296
  /**
@@ -3279,7 +3320,8 @@ function generateClassATriggerWrapper(root, framework, original, isBuild, dialec
3279
3320
  const outDir = join(root, ".void");
3280
3321
  mkdirSync(outDir, { recursive: true });
3281
3322
  const wrapperPath = join(outDir, `${framework}-trigger-wrapper.ts`);
3282
- const fetchBody = isBuild ? ` return serveWithAssets(request, env, await original.fetch(request, env, ctx));` : ` if (request.method === "POST") {
3323
+ const assetFallback = framework !== "vinext-app" && framework !== "vinext-pages";
3324
+ const fetchBody = isBuild ? assetFallback ? ` return serveWithAssets(request, env, await original.fetch(request, env, ctx));` : ` return original.fetch(request, env, ctx);` : ` if (request.method === "POST") {
3283
3325
  const pathname = new URL(request.url).pathname;
3284
3326
  if (pathname === "/__void/scheduled" || pathname === "/__void/queue") {
3285
3327
  const { handleDevTrigger } = await import(${JSON.stringify(frameworkTriggersDispatchPath(root))});
@@ -3304,36 +3346,10 @@ export default {
3304
3346
  ...original,
3305
3347
  ${fetchMethod}
3306
3348
  };
3307
- ${isBuild ? `${compileAssetFallbackHelper(assetsDir, false, notFound)}\n` : ""}`;
3349
+ ${isBuild && assetFallback ? `${compileAssetFallbackHelper(assetsDir, false, notFound)}\n` : ""}`;
3308
3350
  writeFileIfChanged(wrapperPath, body);
3309
3351
  return wrapperPath;
3310
3352
  }
3311
- /** Generate a worker entry for vinext Pages Router projects. */
3312
- function generateVinextPagesEntry(root) {
3313
- const outDir = join(root, ".void");
3314
- mkdirSync(outDir, { recursive: true });
3315
- const entryPath = join(outDir, "vinext-pages-entry.ts");
3316
- writeFileIfChanged(entryPath, `// Auto-generated by Void — vinext Pages Router worker entry
3317
- // @ts-expect-error virtual module resolved by vinext at build time
3318
- import { renderPage, handleApiRoute } from "virtual:vinext-server-entry";
3319
-
3320
- export default {
3321
- async fetch(request: Request): Promise<Response> {
3322
- const url = new URL(request.url);
3323
- const pathname = url.pathname;
3324
- if (pathname.replaceAll("\\\\", "/").startsWith("//")) {
3325
- return new Response("404 Not Found", { status: 404 });
3326
- }
3327
- const urlWithQuery = pathname + url.search;
3328
- if (pathname.startsWith("/api/") || pathname === "/api") {
3329
- return await handleApiRoute(request, urlWithQuery);
3330
- }
3331
- return await renderPage(request, urlWithQuery, null);
3332
- },
3333
- };
3334
- `);
3335
- return entryPath;
3336
- }
3337
3353
  /** Generate a worker entry for React Router v7 projects. */
3338
3354
  function generateReactRouterEntry(root) {
3339
3355
  const outDir = join(root, ".void");
@@ -3574,7 +3590,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3574
3590
  const hasSqlMigrations = existsSync(migrationsDir);
3575
3591
  if (!hasSqlMigrations && !auth?.enabled) return;
3576
3592
  const migrateAuth = async (databaseUrl) => {
3577
- const { runLocalVoidAuthMigrations } = await import("./node-Bc-dBAGL.mjs");
3593
+ const { runLocalVoidAuthMigrations } = await import("./node-B0otYjDv.mjs");
3578
3594
  await runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, auth?.configPath, databaseUrl, devAuthConfigImporter(server));
3579
3595
  };
3580
3596
  const mysqlAuth = dialect === "mysql" && auth?.enabled === true;
@@ -3604,7 +3620,7 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3604
3620
  const authWithFiles = authUrl !== void 0 && authUrl === url;
3605
3621
  if (url) {
3606
3622
  const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
3607
- 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));
3623
+ const appliedNames = dialect === "mysql" ? await import("./runner-mysql-CHvEg_sy.mjs").then((runner) => runner.getMySqlAppliedMigrations(url)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.getPgAppliedMigrations(url));
3608
3624
  const appliedSet = new Set(appliedNames);
3609
3625
  const pending = allMigrations.filter((migration) => !appliedSet.has(migration.name));
3610
3626
  if (pending.length > 0) try {
@@ -3613,18 +3629,18 @@ function migrationPlugin(root, dialect, databaseId = "local", persistRoot = join
3613
3629
  refuse(err);
3614
3630
  return;
3615
3631
  }
3616
- const applied = dialect === "mysql" ? await import("./runner-mysql-0zVmB1JW.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
3632
+ const applied = dialect === "mysql" ? await import("./runner-mysql-CHvEg_sy.mjs").then((runner) => runner.runMySqlMigrations(migrationsDir, url, authWithFiles ? async (names) => {
3617
3633
  logApplied(names);
3618
3634
  await migrateAuth(url);
3619
3635
  } : void 0)) : await import("./runner-pg-2pjltt0t.mjs").then((runner) => runner.runPgMigrations(migrationsDir, url));
3620
3636
  if (!authWithFiles) logApplied(applied);
3621
3637
  }
3622
3638
  if (authUrl && !authWithFiles) {
3623
- const { withMySqlMigrationLockAt } = await import("./runner-mysql-0zVmB1JW.mjs");
3639
+ const { withMySqlMigrationLockAt } = await import("./runner-mysql-CHvEg_sy.mjs");
3624
3640
  await withMySqlMigrationLockAt(authUrl, () => migrateAuth(authUrl));
3625
3641
  }
3626
3642
  } else if (hasSqlMigrations) {
3627
- const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-QMeOpScZ.mjs");
3643
+ const { runMigrations, getMiniflareDatabasePath, getAppliedMigrations } = await import("./runner-CTk21HrO.mjs");
3628
3644
  const { collectMigrations } = await import("./collect-8i0wU63d.mjs");
3629
3645
  const { validateMigrations } = await import("./validate-DY1U9rET.mjs");
3630
3646
  const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
@@ -4109,7 +4125,7 @@ function honoMiddleware(getApp) {
4109
4125
  * 4. Build — dual-environment build (client + SSR) for pages apps,
4110
4126
  * single SSR build for API-only apps
4111
4127
  */
4112
- function nodeTargetPlugin(target) {
4128
+ function nodeTargetPlugin(target, options = {}) {
4113
4129
  const unavailable = (id, root, importer) => {
4114
4130
  const source = importer ? ` Imported by ${relative(root, importer)}.` : "";
4115
4131
  return /* @__PURE__ */ new Error(`target: '${id}' is not available with target '${target}'. CF bindings require target: "cloudflare".${source}`);
@@ -4173,8 +4189,30 @@ function nodeTargetPlugin(target) {
4173
4189
  if (builder.environments.client) await builder.build(builder.environments.client);
4174
4190
  },
4175
4191
  configureServer(server) {
4192
+ const assets = { async fetch(request) {
4193
+ try {
4194
+ const root = server.config.publicDir;
4195
+ if (!root) return new Response(null, { status: 404 });
4196
+ const pathname = new URL(request.url).pathname;
4197
+ let file = resolve(root, "." + decodeURIComponent(pathname));
4198
+ const rel = relative(root, file);
4199
+ if (rel === ".." || rel.startsWith("../") || isAbsolute(rel)) return new Response(null, { status: 404 });
4200
+ let entry = await stat(file);
4201
+ if (pathname.endsWith("/") && !entry.isDirectory()) return new Response(null, { status: 404 });
4202
+ if (entry.isDirectory()) {
4203
+ file = join(file, "index.html");
4204
+ entry = await stat(file);
4205
+ }
4206
+ if (!entry.isFile() || !isFileServingAllowed(server.config, file)) return new Response(null, { status: 404 });
4207
+ return new Response(request.method === "HEAD" ? null : new Uint8Array(await readFile(file)), { headers: { "Content-Type": mime.getType(file) ?? "application/octet-stream" } });
4208
+ } catch {
4209
+ return new Response(null, { status: 404 });
4210
+ }
4211
+ } };
4176
4212
  server.middlewares.use(honoMiddleware(async () => {
4177
- return (await server.ssrLoadModule("virtual:void-routes")).default;
4213
+ const mod = await server.ssrLoadModule("virtual:void-routes");
4214
+ if (!options.trailingSlash) return mod.default;
4215
+ return { fetch: (request) => mod.default.fetch(request, { ASSETS: assets }) };
4178
4216
  }));
4179
4217
  },
4180
4218
  configurePreviewServer(server) {
@@ -4589,6 +4627,7 @@ function routingPlugin(root, options) {
4589
4627
  }
4590
4628
  const runtimeEmailPath = resolveFile("#self/email");
4591
4629
  const compileOptions = {
4630
+ trailingSlash: options.routing?.trailingSlash,
4592
4631
  honoPath: resolveFile("hono"),
4593
4632
  honoRoutePath: resolveFile("hono/route"),
4594
4633
  runtimeEnvPath: resolveFile("#self/_env"),
@@ -5419,6 +5458,7 @@ function voidPlugin(options) {
5419
5458
  warnIfPackageJsonIsNotEsm(root);
5420
5459
  const devTriggerToken = isViteBuildOrPreview() ? crypto.randomUUID() : getOrCreateDevTriggerToken(root);
5421
5460
  const config = readConfig(root);
5461
+ syncBindingTypes(root, config);
5422
5462
  const projectCloudflareConfigPath = !isNodeTarget(config.target) ? materializeCloudflareConfig(root) : void 0;
5423
5463
  const cloudflareConfigPath = projectCloudflareConfigPath && existsSync(projectCloudflareConfigPath) ? projectCloudflareConfigPath : void 0;
5424
5464
  let previewing = false;
@@ -5703,6 +5743,11 @@ function voidPlugin(options) {
5703
5743
  }
5704
5744
  };
5705
5745
  if (framework) {
5746
+ if ((framework === "vinext-app" || framework === "vinext-pages") && hasVinextMiddleware(root)) workerConfig.assets = {
5747
+ binding: "ASSETS",
5748
+ not_found_handling: "none",
5749
+ run_worker_first: ["/*"]
5750
+ };
5706
5751
  workerConfig.main = getFrameworkEntry(framework, root, devTriggerToken, dialect, config.routing?.notFound, config.cloudflare?.main);
5707
5752
  let notFoundIgnoredWarned = false;
5708
5753
  const frameworkBuildWrapperPlugin = {
@@ -5815,7 +5860,7 @@ function voidPlugin(options) {
5815
5860
  hasSandbox: false
5816
5861
  }),
5817
5862
  prerenderPlugin(root, config),
5818
- ...nodeTargetPlugin(config.target)
5863
+ ...nodeTargetPlugin(config.target, { trailingSlash: config.routing?.trailingSlash })
5819
5864
  ];
5820
5865
  }
5821
5866
  const existingFlags = workerConfig.compatibility_flags ?? [];
@@ -1,8 +1,8 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-bQ1Be840.mjs";
3
- import { p as readConfig } from "./config-hL-S-Y9D.mjs";
4
- import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-DlUG-XNT.mjs";
5
- import { n as VOID_LOCK_FILE } from "./cloudflare-config-Ce8j5S7V.mjs";
2
+ import { d as deriveDurableResourceIdentity, f as inferDurableResourceName, t as analyzeApplicationSync } from "./application-analysis-OV0CBJ80.mjs";
3
+ import { n as VOID_LOCK_FILE } from "./cloudflare-config-DtOGAbeB.mjs";
4
+ import { p as readConfig } from "./config-5oSQhZNj.mjs";
5
+ import { a as deriveWebSocketClassNameFromName, o as inferWebSocketResourceName } from "./plugin-inference-g66Q1Mx9.mjs";
6
6
  import { existsSync, readFileSync } from "node:fs";
7
7
  import { isRecord } from "@void/deploy-core";
8
8
  // src/cli/info.ts