void 1.1.11 → 1.2.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 (233) hide show
  1. package/dist/{account-cmd-R35a4Oa8.mjs → account-cmd-CdUll_35.mjs} +5 -5
  2. package/dist/action-key-XZ9HkWAO.mjs +26 -0
  3. package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
  4. package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
  5. package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
  6. package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
  7. package/dist/{auth-link-VHmiKZmP.mjs → auth-link-C87vGXM-.mjs} +5 -5
  8. package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-6I81r-ix.mjs} +3 -3
  9. package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
  10. package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
  11. package/dist/{cache-TZ5Ab3d7.mjs → cache-oHzrnY3z.mjs} +4 -4
  12. package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
  13. package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
  14. package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-BhVxldCw.mjs} +75 -10
  15. package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-ByHk0xg4.mjs} +6 -16
  16. package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
  17. package/dist/cli/cli.mjs +139 -35
  18. package/dist/cli/cloudflare-operation-process.mjs +65 -18
  19. package/dist/cli/env-schema-probe.d.mts +1 -1
  20. package/dist/cli/env-schema-probe.mjs +3 -3
  21. package/dist/{client-GuSO3v_x.mjs → client-BEkdj1kx.mjs} +58 -13
  22. package/dist/client-BiRDZTSd.mjs +1 -0
  23. package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
  24. package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
  25. package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
  26. package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
  27. package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-Dh9dEHJj.mjs} +17 -7
  28. package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
  29. package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
  30. package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
  31. package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
  32. package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
  33. package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
  34. package/dist/config-entry.d.mts +1 -1
  35. package/dist/{connect-yQuLbuiJ.mjs → connect-k7R2rPVA.mjs} +6 -6
  36. package/dist/{create-project-CGOo_OL_.mjs → create-project-DTuy-l0z.mjs} +1 -1
  37. package/dist/{create-project-DEEWJX_M.mjs → create-project-DV71ol5d.mjs} +4 -4
  38. package/dist/{db-COI-yTJE.mjs → db-DVOkLH5X.mjs} +79 -23
  39. package/dist/{delete-PgN6L_9N.mjs → delete-BbP5eopu.mjs} +4 -4
  40. package/dist/{deploy-DsW-PrRQ.mjs → deploy-7H32EnUs.mjs} +220 -95
  41. package/dist/deploy-CE0Ev0Ob.mjs +2 -0
  42. package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-DlvcvnQT.mjs} +74 -28
  43. package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
  44. package/dist/deploy.d.mts +22 -1
  45. package/dist/deploy.mjs +49 -8
  46. package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
  47. package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
  48. package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
  49. package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
  50. package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
  51. package/dist/{domain-DKlNI0SR.mjs → domain-CA2wBgra.mjs} +5 -5
  52. package/dist/drizzle-9TubSZvI.mjs +1 -0
  53. package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
  54. package/dist/{email-C0s3OvJk.mjs → email-DXpCc77w.mjs} +10 -10
  55. package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
  56. package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
  57. package/dist/{env-BX2JFsgF.mjs → env-DgOQ9_8S.mjs} +6 -6
  58. package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
  59. package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
  60. package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
  61. package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
  62. package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
  63. package/dist/fetch-CtESUYWd.mjs +26 -0
  64. package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
  65. package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
  66. package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
  67. package/dist/{gen-Bj6ZkOcI.mjs → gen-BfmcIi2g.mjs} +5 -5
  68. package/dist/gen-NrOlWZaG.mjs +1 -0
  69. package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
  70. package/dist/{handler-_PqY82xe.d.mts → handler-BbkSPzGF.d.mts} +91 -9
  71. package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
  72. package/dist/help-BeAFFE5C.mjs +1 -0
  73. package/dist/{help-D49SL_lN.mjs → help-CxSlPpzJ.mjs} +83 -12
  74. package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
  75. package/dist/index.d.mts +1 -1
  76. package/dist/index.mjs +125 -124
  77. package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
  78. package/dist/{init-DyTEY04s.mjs → init-DxYyOs4-.mjs} +103 -43
  79. package/dist/{link-CgOVn9EC.mjs → link-Ddmod1dZ.mjs} +5 -5
  80. package/dist/{list-CUfD9RSb.mjs → list-MogaugiO.mjs} +5 -5
  81. package/dist/{live-DJONVlQK.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
  82. package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
  83. package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
  84. package/dist/{login-BJvGW5Eu.mjs → login-Cttnagmm.mjs} +4 -4
  85. package/dist/login-DgDwlKc_.mjs +1 -0
  86. package/dist/{logs-DeizBI4j.mjs → logs-CAszUWZI.mjs} +4 -4
  87. package/dist/{migrate-8rk56vV8.mjs → migrate-DyT2jJ8y.mjs} +5 -5
  88. package/dist/migrate-n49ZeS1X.mjs +1 -0
  89. package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
  90. package/dist/nitro.mjs +3 -3
  91. package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
  92. package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
  93. package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-skshjMGl.mjs} +4 -4
  94. package/dist/output-BW9uK099.mjs +1 -0
  95. package/dist/{output-Ba6ZbrzY.mjs → output-BpgYODYx.mjs} +16 -4
  96. package/dist/pages/client.d.mts +2 -2
  97. package/dist/pages/client.mjs +48 -25
  98. package/dist/pages/index.d.mts +2 -2
  99. package/dist/pages/index.mjs +4 -4
  100. package/dist/pages/islands-plugin.d.mts +43 -5
  101. package/dist/pages/islands-plugin.mjs +100 -28
  102. package/dist/pages/protocol.d.mts +2 -2
  103. package/dist/pages/protocol.mjs +1 -1
  104. package/dist/pages/serialize.d.mts +2 -2
  105. package/dist/pages/serialize.mjs +1 -1
  106. package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
  107. package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
  108. package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
  109. package/dist/platform-args-kQrgxScY.mjs +1 -0
  110. package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
  111. package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
  112. package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
  113. package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
  114. package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
  115. package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
  116. package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
  117. package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-DyKmuNY6.mjs} +405 -44
  118. package/dist/{platform-management-CnXhgxTM.mjs → platform-management--vDwSn35.mjs} +49 -5
  119. package/dist/{platform-management-BvgbusqL.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
  120. package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
  121. package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
  122. package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
  123. package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
  124. package/dist/{prepare-2XD6kh77.mjs → prepare-BcAE5Sdj.mjs} +3 -3
  125. package/dist/prepare-C4I0f--h.mjs +1 -0
  126. package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
  127. package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
  128. package/dist/prerender-render.mjs +1 -1
  129. package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-DA4K5faU.mjs} +18 -18
  130. package/dist/{project-team-CTSY7W7Q.mjs → project-team-CQBNveX3.mjs} +4 -4
  131. package/dist/{project-token-Cybtlfbl.mjs → project-token-CCalFyQf.mjs} +4 -4
  132. package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
  133. package/dist/{protocol-B8sI8dRD.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
  134. package/dist/{protocol-RNP0u7UY.mjs → protocol-DimNxVRr.mjs} +42 -17
  135. package/dist/{provision-UcYjpTRh.mjs → provision-BFLCrnUp.mjs} +1 -1
  136. package/dist/{provision-BuifYvLc.mjs → provision-DtROpNNI.mjs} +6 -5
  137. package/dist/{requests-Ryiazz9i.mjs → requests-BpH0kImL.mjs} +3 -3
  138. package/dist/resolve-project-DD1vu8s9.mjs +1 -0
  139. package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
  140. package/dist/{rollback-Or0EV3rP.mjs → rollback-CXS1tAa-.mjs} +10 -9
  141. package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
  142. package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
  143. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  144. package/dist/runtime/better-auth-pg.d.mts +1 -1
  145. package/dist/runtime/better-auth.d.mts +1 -1
  146. package/dist/runtime/client-react.d.mts +2 -2
  147. package/dist/runtime/client-react.mjs +3 -3
  148. package/dist/runtime/client-solid.d.mts +2 -2
  149. package/dist/runtime/client-solid.mjs +3 -3
  150. package/dist/runtime/client-svelte.d.mts +2 -2
  151. package/dist/runtime/client-svelte.mjs +3 -3
  152. package/dist/runtime/client-vue.d.mts +2 -2
  153. package/dist/runtime/client-vue.mjs +3 -3
  154. package/dist/runtime/client.d.mts +2 -2
  155. package/dist/runtime/client.mjs +3 -3
  156. package/dist/runtime/email/testing.mjs +4 -4
  157. package/dist/runtime/email.mjs +3 -3
  158. package/dist/runtime/env-public.d.mts +1 -1
  159. package/dist/runtime/fetch-server.d.mts +8 -0
  160. package/dist/runtime/fetch-server.mjs +30 -0
  161. package/dist/runtime/fetch-stream.d.mts +2 -2
  162. package/dist/runtime/fetch-stream.mjs +2 -2
  163. package/dist/runtime/fetch.d.mts +2 -2
  164. package/dist/runtime/fetch.mjs +3 -3
  165. package/dist/runtime/handler.d.mts +1 -1
  166. package/dist/runtime/live-client.d.mts +1 -1
  167. package/dist/runtime/live.d.mts +1 -1
  168. package/dist/runtime/routing.d.mts +17 -76
  169. package/dist/runtime/routing.mjs +277 -216
  170. package/dist/runtime/validator.d.mts +1 -1
  171. package/dist/runtime/ws-server.d.mts +2 -2
  172. package/dist/runtime/ws.d.mts +1 -1
  173. package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
  174. package/dist/{secret-CClHaFxm.mjs → secret-BbXHfLAt.mjs} +6 -6
  175. package/dist/serialize-DtR8Vwa_.d.mts +18 -0
  176. package/dist/serialize-YHvlcG3Q.mjs +31 -0
  177. package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
  178. package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
  179. package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
  180. package/dist/wrangler-BLb3_luP.mjs +1 -0
  181. package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
  182. package/dist/{wrapper-BOigE1xJ.mjs → wrapper-D3sZyh2C.mjs} +5 -3
  183. package/dist/{ws-CsBNxv86.d.mts → ws-BH-im_tX.d.mts} +1 -1
  184. package/docs/guide/ai.md +1 -1
  185. package/docs/guide/database/postgresql.md +1 -1
  186. package/docs/guide/database.md +26 -0
  187. package/docs/guide/deployment.md +2 -0
  188. package/docs/guide/edge/headers.md +1 -1
  189. package/docs/guide/email/domains.md +1 -1
  190. package/docs/guide/email/receiving.md +1 -1
  191. package/docs/guide/email/sending.md +3 -3
  192. package/docs/guide/pages-routing/actions-and-forms.md +1 -1
  193. package/docs/guide/pages-routing/markdown.md +3 -1
  194. package/docs/guide/platform/administration/email.md +7 -1
  195. package/docs/guide/platform/installation/ci.md +2 -0
  196. package/docs/guide/platform/installation/credentials.md +24 -6
  197. package/docs/guide/platform/installation/domains.md +16 -0
  198. package/docs/guide/platform/installation/maintenance.md +32 -2
  199. package/docs/guide/platform/installation/setup.md +1 -1
  200. package/docs/guide/self-hosted-platform.md +1 -1
  201. package/docs/guide/server-routing.md +1 -1
  202. package/docs/guide/typed-fetch.md +1 -1
  203. package/docs/integrations/cloudflare.md +2 -1
  204. package/docs/integrations/frameworks/tanstack-start.md +25 -0
  205. package/docs/reference/api/deploy.md +35 -3
  206. package/docs/reference/api/env.md +1 -1
  207. package/docs/reference/api/rewrites.md +1 -1
  208. package/docs/reference/api/types.md +1 -0
  209. package/docs/reference/cli/database.md +15 -0
  210. package/docs/reference/cli/platform-installation.md +5 -2
  211. package/docs/reference/cli/project.md +4 -2
  212. package/docs/reference/cli/setup.md +17 -0
  213. package/docs/reference/cli.md +1 -0
  214. package/docs/reference/config.md +14 -1
  215. package/docs/reference/resource-inference.md +4 -0
  216. package/package.json +23 -22
  217. package/sandbox.Dockerfile +1 -1
  218. package/schema.json +23 -3
  219. package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
  220. package/dist/client-DrdeJgHR.mjs +0 -1
  221. package/dist/deploy-CxNgEYr4.mjs +0 -2
  222. package/dist/fetch-sAcwjzLO.mjs +0 -18
  223. package/dist/gen-DsCukhuw.mjs +0 -1
  224. package/dist/help-DOFygYi4.mjs +0 -1
  225. package/dist/login-alAlxw4S.mjs +0 -1
  226. package/dist/migrate-D2odrAmh.mjs +0 -1
  227. package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
  228. package/dist/platform-args-B_LrqEZB.mjs +0 -1
  229. package/dist/prepare-EVEbQ9n2.mjs +0 -1
  230. package/dist/resolve-project-PnhzMtY6.mjs +0 -1
  231. package/dist/serialize-BtQyaYoC.mjs +0 -20
  232. package/dist/serialize-CfSwWfF2.d.mts +0 -10
  233. package/dist/wrangler-DAdxHEzh.mjs +0 -1
@@ -1,6 +1,7 @@
1
1
  import { a as join, s as relative } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
3
- import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
3
+ import { n as isIdentifier, o as moduleExportName } from "./ast-CsZ_q_gc.mjs";
4
+ import { n as bindingResolver, o as unwrapStaticExpression, t as bindingNames } from "./ast-bindings-C3yaPs1y.mjs";
4
5
  import { existsSync, readFileSync } from "node:fs";
5
6
  import { parseSync } from "vite";
6
7
  //#region src/ssr/entry.ts
@@ -35,16 +36,43 @@ function validateServerRenderExport(entry) {
35
36
  } catch (err) {
36
37
  throw new Error(`ssr: Invalid entry '${relativePath}'. Could not parse source: '${err instanceof Error ? err.message : String(err)}'.`);
37
38
  }
38
- if (!(parsed.program.body ?? []).some((node) => {
39
- if (node.type === "ExportDefaultDeclaration") {
40
- const declaration = node.declaration;
41
- if (declaration?.type === "FunctionDeclaration" || declaration?.type === "FunctionExpression" || declaration?.type === "ArrowFunctionExpression") return true;
42
- if (declaration?.type === "CallExpression") {
43
- const call = declaration;
44
- return isIdentifier(call.callee) && call.callee.name === "defineRender";
39
+ const program = parsed.program;
40
+ const body = program.body ?? [];
41
+ let resolve;
42
+ const binding = (node, name) => (resolve ??= bindingResolver(program))(node, name);
43
+ function isRenderer(node) {
44
+ const seen = /* @__PURE__ */ new Set();
45
+ while (node = unwrapStaticExpression(node)) {
46
+ if (seen.has(node)) return false;
47
+ seen.add(node);
48
+ if (isIdentifier(node)) {
49
+ node = binding(node, node.name);
50
+ continue;
45
51
  }
46
- return false;
52
+ if (node.type === "VariableDeclarator") {
53
+ if (!isIdentifier(node.id)) return true;
54
+ node = node.init;
55
+ continue;
56
+ }
57
+ if (node.type === "CallExpression") {
58
+ const call = node;
59
+ if (!isIdentifier(call.callee)) return false;
60
+ if (call.callee.name === "defineRender") return true;
61
+ const imported = binding(call, call.callee.name)?.imported;
62
+ return isIdentifier(imported) && imported.name === "defineRender";
63
+ }
64
+ return [
65
+ "FunctionDeclaration",
66
+ "FunctionExpression",
67
+ "ArrowFunctionExpression",
68
+ "ImportSpecifier",
69
+ "ImportDefaultSpecifier"
70
+ ].includes(node.type);
47
71
  }
72
+ return false;
73
+ }
74
+ if (!body.some((node) => {
75
+ if (node.type === "ExportDefaultDeclaration") return isRenderer(node.declaration);
48
76
  if (node.type !== "ExportNamedDeclaration") return false;
49
77
  if (node.exportKind === "type") return false;
50
78
  const declaration = node.declaration;
@@ -52,11 +80,11 @@ function validateServerRenderExport(entry) {
52
80
  const fn = declaration;
53
81
  return isIdentifier(fn.id) && fn.id.name === "render";
54
82
  }
55
- if (declaration?.type === "VariableDeclaration") return (declaration.declarations ?? []).some((decl) => isIdentifier(decl.id) && decl.id.name === "render");
83
+ if (declaration?.type === "VariableDeclaration") return (declaration.declarations ?? []).some((decl) => bindingNames(decl.id).includes("render"));
56
84
  return (node.specifiers ?? []).some((specifier) => {
57
85
  if (specifier.exportKind === "type") return false;
58
- const exported = specifier.exported;
59
- return isIdentifier(exported) && exported.name === "render";
86
+ const exported = moduleExportName(specifier.exported);
87
+ return exported === "render" || exported === "default" && (!!node.source || isRenderer(specifier.local));
60
88
  });
61
89
  })) throw new Error(`ssr: Invalid entry '${relativePath}'. Export \`render(c, assetTags)\` or \`export default defineRender(...)\`.`);
62
90
  }
@@ -1,11 +1,11 @@
1
1
  import { a as join } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
3
3
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
4
- import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
5
- import { m as printSuccess, p as note } from "./output-Ba6ZbrzY.mjs";
6
- import { r as generateEnvTypes, t as findEnvFile } from "./env-types-GRchm5dw.mjs";
7
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
8
- import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-D_KyMdab.mjs";
4
+ import { r as generateEnvTypes, t as findEnvFile } from "./env-types-BicfKBhV.mjs";
5
+ import { H as outro, L as log } from "./dist-Cor9XGoz.mjs";
6
+ import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
7
+ import { m as printSuccess, p as note } from "./output-BpgYODYx.mjs";
8
+ import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-Dwq3PJzK.mjs";
9
9
  import { mkdirSync, writeFileSync } from "node:fs";
10
10
  //#region src/cli/env.ts
11
11
  async function runEnvCommand(root, args) {
@@ -25,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
25
25
  const platform = readDeploymentPlatform(root);
26
26
  if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
27
27
  if (platform === "cloudflare") {
28
- const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-Cm8lVx7W.mjs");
28
+ const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DsSaw2BT.mjs");
29
29
  remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
30
30
  } else {
31
31
  const token = getToken(root);
@@ -97,6 +97,7 @@ declare global {
97
97
  STORAGE: R2Bucket;
98
98
  AI: Ai;
99
99
  SANDBOX: DurableObjectNamespace<VoidPlatformSandbox>;
100
+ ASSETS: Fetcher;
100
101
  /** @internal Service binding to proxy worker (AI, revalidation, future features) */
101
102
  __VOID_PROXY?: Fetcher;
102
103
  /** @internal Custom proxy URL override */
@@ -1,6 +1,6 @@
1
1
  import { s as relative } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
3
- import { i as voidWarn } from "./log-vqY3pqwI.mjs";
3
+ import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
4
4
  import { existsSync } from "node:fs";
5
5
  //#region src/codegen/env-types.ts
6
6
  /** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
@@ -1 +1 @@
1
- export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-D_KyMdab.mjs";
1
+ export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-Dwq3PJzK.mjs";
@@ -1,11 +1,11 @@
1
1
  import { a as join, c as resolve, n as dirname } from "./dist-ipQi0Q8y.mjs";
2
- import { i as voidWarn } from "./log-vqY3pqwI.mjs";
2
+ import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
3
3
  import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-DeWj5F9Y.mjs";
4
4
  import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
5
5
  import { a as isClientEnvKey, i as findReservedEnvKeys, n as LOCAL_ENV_FILE, o as loadLocalEnv, r as findLegacyEnvFiles, s as reservedEnvKeysMessage } from "./env-BJjULvL0.mjs";
6
- import { t as findEnvFile } from "./env-types-GRchm5dw.mjs";
6
+ import { t as findEnvFile } from "./env-types-BicfKBhV.mjs";
7
7
  import { t as loadUserEnvFile } from "./load-user-env-DD5qveNU.mjs";
8
- import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-CZJ4viYl.mjs";
8
+ import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-8jEYIeim.mjs";
9
9
  import { existsSync, readFileSync } from "node:fs";
10
10
  import { spawn } from "node:child_process";
11
11
  import { parseRootWranglerConfig, readWranglerTopLevelString } from "@void/deploy-cloudflare";
@@ -57,6 +57,17 @@ type FetchOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption
57
57
  retry?: number;
58
58
  timeout?: number;
59
59
  };
60
+ type UntypedFetchOptions = {
61
+ method?: string;
62
+ params?: Record<string, string>;
63
+ body?: unknown;
64
+ query?: Record<string, string>;
65
+ headers?: HeadersInit;
66
+ signal?: AbortSignal;
67
+ baseURL?: string;
68
+ retry?: number;
69
+ timeout?: number;
70
+ };
60
71
  /**
61
72
  * Typed fetch client for Void API routes.
62
73
  *
@@ -72,5 +83,7 @@ type FetchOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption
72
83
  */
73
84
  declare function fetch<P extends keyof RouteMap & string>(path: HasRequiredInput<P, DefaultMethod<P>> extends false ? P : never): Promise<OutputOf<P, DefaultMethod<P>>>;
74
85
  declare function fetch<P extends keyof RouteMap & string, M extends MethodsOf<P> = DefaultMethod<P>>(path: P, options: FetchOptions<P, M>): Promise<OutputOf<P, M>>;
86
+ /** Apply the same route interpolation and request options to browser and server transports. */
87
+ declare function createRouteFetch(transport: typeof globalThis.fetch): (path: string, options?: UntypedFetchOptions) => Promise<unknown>;
75
88
  //#endregion
76
- export { fetch as a, QueryOption as i, MethodsOf as n, FetchError as o, ParamsOption as r, BodyOption as t };
89
+ export { UntypedFetchOptions as a, FetchError as c, QueryOption as i, MethodsOf as n, createRouteFetch as o, ParamsOption as r, fetch as s, BodyOption as t };
@@ -0,0 +1,26 @@
1
+ import { n as createFetch } from "./fetch-error-Bw0n-IY-.mjs";
2
+ import { t as interpolateRouteParams } from "./route-url-BjGv_KKY.mjs";
3
+ //#region src/runtime/fetch.ts
4
+ const browserFetch = createRouteFetch((...args) => globalThis.fetch(...args));
5
+ async function fetch(path, options) {
6
+ return browserFetch(path, options);
7
+ }
8
+ /** Apply the same route interpolation and request options to browser and server transports. */
9
+ function createRouteFetch(transport) {
10
+ const client = createFetch({ fetch: transport });
11
+ return async (path, options) => {
12
+ const url = interpolateRouteParams(path, options?.params);
13
+ return client(url, {
14
+ method: options?.method ?? "GET",
15
+ body: options?.body,
16
+ query: options?.query,
17
+ headers: options?.headers,
18
+ signal: options?.signal,
19
+ baseURL: options?.baseURL,
20
+ retry: options?.retry,
21
+ timeout: options?.timeout
22
+ });
23
+ };
24
+ }
25
+ //#endregion
26
+ export { fetch as n, createRouteFetch as t };
@@ -263,4 +263,4 @@ const ofetch = createFetch({ fetch: globalThis.fetch ? (...args) => globalThis.f
263
263
  //#region src/runtime/fetch-error.ts
264
264
  const FetchError = FetchError$1;
265
265
  //#endregion
266
- export { ofetch as n, FetchError as t };
266
+ export { createFetch as n, ofetch as r, FetchError as t };
@@ -1,4 +1,4 @@
1
- import { n as ofetch, t as FetchError } from "./fetch-error-Dj3crt0e.mjs";
1
+ import { r as ofetch, t as FetchError } from "./fetch-error-Bw0n-IY-.mjs";
2
2
  import { t as interpolateRouteParams } from "./route-url-BjGv_KKY.mjs";
3
3
  import { n as asUsageLimit, r as limitFromResponse } from "./limits-D0vD1M9A.mjs";
4
4
  //#region src/runtime/fetch-stream.ts
@@ -1,4 +1,4 @@
1
- import { i as QueryOption, n as MethodsOf, r as ParamsOption, t as BodyOption } from "./fetch-DHLOuPyk.mjs";
1
+ import { i as QueryOption, n as MethodsOf, r as ParamsOption, t as BodyOption } from "./fetch-CUX0tB78.mjs";
2
2
  import { RouteMap } from "void/routes";
3
3
  //#region src/runtime/fetch-stream.d.ts
4
4
  type InputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteMap[P][M] extends {
@@ -1,11 +1,11 @@
1
1
  import { a as join, n as dirname, s as relative } from "./dist-ipQi0Q8y.mjs";
2
2
  import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
3
- import { d as readConfig, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
3
+ import { l as getDatabaseDialect, p as readConfig } from "./config-DHgSEWT7.mjs";
4
4
  import { n as readJournal, t as collectMigrations } from "./collect-Dew86qce.mjs";
5
- import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-BVdsO7Py.mjs";
6
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
7
- import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-DC5llZaI.mjs";
5
+ import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-BIaXIkkv.mjs";
8
6
  import { t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
7
+ import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-Cor9XGoz.mjs";
8
+ import { m as printSuccess } from "./output-BpgYODYx.mjs";
9
9
  import { n as drizzleKitBin, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DLbEFMT0.mjs";
10
10
  import { n as snapshotDrizzleOutputs } from "./generate-B1m4Cm4n.mjs";
11
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
@@ -329,7 +329,7 @@ async function runModel(root, name, columns) {
329
329
  const existing = readFileSync(barrelPath, "utf-8");
330
330
  if (!existing.includes(exportLine)) writeFileSync(barrelPath, existing.trimEnd() + "\n" + exportLine + "\n");
331
331
  } else writeFileSync(barrelPath, exportLine + "\n");
332
- const { prepareProject } = await import("./prepare-EVEbQ9n2.mjs");
332
+ const { prepareProject } = await import("./prepare-C4I0f--h.mjs");
333
333
  await prepareProject(root);
334
334
  log.step(`Created ${relative(root, modelPath)}`);
335
335
  log.step(`Updated ${relative(root, barrelPath)}`);
@@ -0,0 +1 @@
1
+ export { r as runGenCommand } from "./gen-BfmcIi2g.mjs";
@@ -1,9 +1,9 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-B6iOCjKI.mjs";
3
- import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
5
- import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-GuSO3v_x.mjs";
6
- import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
3
+ import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
+ import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEkdj1kx.mjs";
5
+ import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-BpgYODYx.mjs";
6
+ import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xoi6eTWY.mjs";
7
7
  import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
8
8
  import { randomBytes } from "node:crypto";
9
9
  //#region src/cli/github-cmd.ts
@@ -2,8 +2,81 @@ import { l as VoidPlatformSandbox } from "./sandbox-q3waMc2T.mjs";
2
2
  import { t as StandardSchemaV1 } from "./standard-schema-Fo_vCAZh.mjs";
3
3
  import { n as HeadDescriptor } from "./head-C8K_iGe6.mjs";
4
4
  import { r as AuthUser, t as AuthSession } from "./auth-DkcFflXV.mjs";
5
- import { Context, Env, MiddlewareHandler } from "hono";
5
+ import { t as DevCssAsset } from "./types-7AIz0OZu.mjs";
6
+ import { Context, Env, ExecutionContext as ExecutionContext$1, MiddlewareHandler } from "hono";
6
7
  import { RewriteDestination } from "void/routes";
8
+ //#region src/runtime/routing-assets.d.ts
9
+ type ClientAssetTags = {
10
+ css: string;
11
+ preloads: string;
12
+ body: string;
13
+ devCss?: Array<DevCssAsset>;
14
+ };
15
+ type ClientManifest = Record<string, {
16
+ file?: string;
17
+ imports?: Array<string>;
18
+ css?: Array<string>;
19
+ /** Build-proven fingerprinted outputs; absent in older/third-party manifests. */
20
+ immutableFiles?: Array<string>;
21
+ }>;
22
+ type ManifestLoader = (request: Request, env: RuntimeEnvironment) => Promise<ClientManifest | null>;
23
+ declare function createManifestLoader(): ManifestLoader;
24
+ type ClientAssetOptions = {
25
+ entryId: string;
26
+ entryUrl: string;
27
+ extraEntryId?: string;
28
+ extraEntryUrl?: string;
29
+ pageCssKeys?: Record<string, Array<string>>;
30
+ devRootPhases?: Record<string, Array<Array<string>>>;
31
+ kind: "ssr" | "pages" | "islands";
32
+ dev?: boolean;
33
+ reactRefresh?: boolean;
34
+ devCss?: (request: Request, env: RuntimeEnvironment, options: {
35
+ kind: "pages" | "islands";
36
+ componentId: string;
37
+ rootPhases: Array<Array<string>>;
38
+ }) => Promise<unknown>;
39
+ };
40
+ /** Frameworks supply only client entry IDs and active layout/page roots. */
41
+ declare function createClientAssetTags(options: ClientAssetOptions, loadManifest?: ManifestLoader): (request: Request, env: RuntimeEnvironment, componentId?: string) => Promise<ClientAssetTags>;
42
+ //#endregion
43
+ //#region src/runtime/routing-worker.d.ts
44
+ type AssetBinding = {
45
+ fetch: (request: Request) => Promise<Response>;
46
+ };
47
+ type RuntimeEnvironment = Record<string, unknown> & {
48
+ ASSETS?: AssetBinding;
49
+ };
50
+ type AssetFallbackOptions = {
51
+ assetsDir?: string;
52
+ serveSpaFallback?: boolean;
53
+ notFound?: "none" | "404-page" | "single-page-application";
54
+ };
55
+ declare function createAssetFallback(options?: AssetFallbackOptions): (request: Request, env: RuntimeEnvironment, response: Response) => Promise<Response>;
56
+ /** Hide platform capabilities without copying bindings or changing application bindings. */
57
+ declare function filterInternalBindings<E extends Record<string, unknown>>(env: E, prefixes: Array<string>, exactNames?: Array<string>): E;
58
+ type WorkerFetchOptions = {
59
+ app: {
60
+ fetch: (request: Request, env: RuntimeEnvironment, context: ExecutionContext$1) => Response | Promise<Response>;
61
+ };
62
+ assets: ReturnType<typeof createAssetFallback>;
63
+ withRawEnv: (env: RuntimeEnvironment, fn: () => Promise<Response>) => Promise<Response>;
64
+ withRuntimeEnv: (env: RuntimeEnvironment, fn: () => Promise<Response>) => Promise<Response>;
65
+ filterBindings: (env: RuntimeEnvironment) => RuntimeEnvironment;
66
+ validateEnv?: (env: RuntimeEnvironment) => Promise<void>;
67
+ /** Authored/generated version metadata binding used to prove the served native version. */
68
+ versionMetadataBinding?: string;
69
+ remoteEnv?: (env: RuntimeEnvironment) => RuntimeEnvironment;
70
+ internalRoute: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Response | null>;
71
+ collectPrerenderPaths: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Array<string>>;
72
+ emailReceipt?: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Response>;
73
+ isr?: {
74
+ deploymentId: string;
75
+ handle: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1, render: (request: Request) => Promise<Response>) => Promise<Response | null>;
76
+ };
77
+ };
78
+ declare function createWorkerFetch(options: WorkerFetchOptions): (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Response>;
79
+ //#endregion
7
80
  //#region src/runtime/validator.d.ts
8
81
  type ValidatorSlots = {
9
82
  body?: StandardSchemaV1;
@@ -95,6 +168,8 @@ interface CloudBindings extends VoidGeneratedEnvBindings {
95
168
  STORAGE: R2Bucket;
96
169
  AI: Ai;
97
170
  SANDBOX: DurableObjectNamespace<VoidPlatformSandbox>;
171
+ /** Node, Bun and Deno targets serve static files through a provider that takes only a `Request`. */
172
+ ASSETS: AssetBinding;
98
173
  [key: string]: unknown;
99
174
  }
100
175
  type CloudEnv = Env & {
@@ -160,6 +235,8 @@ declare module "hono" {
160
235
  */
161
236
  type CloudContext = Context<CloudEnv>;
162
237
  type HandlerFn = (c: CloudContext) => unknown | Promise<unknown>;
238
+ type LoaderFn<R> = (c: CloudContext) => R | Response | Promise<R | Response>;
239
+ type LoaderOutput<F extends HandlerFn> = Exclude<Awaited<ReturnType<F>>, Response>;
163
240
  type MiddlewareFn = MiddlewareHandler<CloudEnv>;
164
241
  type BasicAuthOptionValue = string | (() => string);
165
242
  interface BasicAuthOptions {
@@ -228,12 +305,17 @@ type TypedHandler<V extends ValidatorSlots = {}, R = unknown> = {
228
305
  * Single argument: identity wrapper.
229
306
  * Multiple arguments: middleware chain + final handler, composed at runtime.
230
307
  */
231
- declare function defineHandler<R>(handler: (c: CloudContext) => R | Response | Promise<R | Response>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
232
- declare function defineHandler(firstMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
233
- declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
234
- declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
235
- declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
236
- declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, fifthMiddleware: MiddlewareFn, handler: HandlerFn): TypedHandler;
308
+ declare function defineHandler<R>(handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
309
+ declare function defineHandler<R>(firstMiddleware: MiddlewareFn, handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
310
+ declare function defineHandler<F extends HandlerFn>(firstMiddleware: MiddlewareFn, handler: F): TypedHandler<{}, LoaderOutput<F>>;
311
+ declare function defineHandler<R>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
312
+ declare function defineHandler<F extends HandlerFn>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, handler: F): TypedHandler<{}, LoaderOutput<F>>;
313
+ declare function defineHandler<R>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
314
+ declare function defineHandler<F extends HandlerFn>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, handler: F): TypedHandler<{}, LoaderOutput<F>>;
315
+ declare function defineHandler<R>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
316
+ declare function defineHandler<F extends HandlerFn>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, handler: F): TypedHandler<{}, LoaderOutput<F>>;
317
+ declare function defineHandler<R>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, fifthMiddleware: MiddlewareFn, handler: LoaderFn<R>): TypedHandler<{}, Exclude<Awaited<R>, Response>>;
318
+ declare function defineHandler<F extends HandlerFn>(firstMiddleware: MiddlewareFn, secondMiddleware: MiddlewareFn, thirdMiddleware: MiddlewareFn, fourthMiddleware: MiddlewareFn, fifthMiddleware: MiddlewareFn, handler: F): TypedHandler<{}, LoaderOutput<F>>;
237
319
  /**
238
320
  * Create a handler with input validation using Standard Schema validators.
239
321
  *
@@ -246,7 +328,7 @@ declare function defineHandler(firstMiddleware: MiddlewareFn, secondMiddleware:
246
328
  * ```
247
329
  */
248
330
  declare namespace defineHandler {
249
- function withValidator<V extends ValidatorSlots>(validators: V): <R>(handler: (c: CloudContext, input: HandlerInput<V>) => R) => TypedHandler<V, R>;
331
+ function withValidator<V extends ValidatorSlots>(validators: V): <R>(handler: (c: CloudContext, input: HandlerInput<V>) => R) => TypedHandler<V, Exclude<Awaited<R>, Response>>;
250
332
  }
251
333
  /**
252
334
  * Identity function that provides type inference for middleware.
@@ -283,4 +365,4 @@ declare function defineHead<P = Record<string, unknown>>(handler: (c: CloudConte
283
365
  */
284
366
  declare function defineQueue<T = unknown>(handler: QueueFn<T>): TypedQueueHandler<T>;
285
367
  //#endregion
286
- export { defer as C, runValidation as D, ValidatorSlots as E, InferProps as S, HandlerInput as T, defineQueue as _, CloudEnv as a, Deferred as b, QueueRetryOptions as c, TypedQueueHandler as d, VoidAssetRewriteError as f, defineMiddleware as g, defineHead as h, CloudContextVariables as i, RenderAssetTags as l, defineHandler as m, CloudBindings as n, QueueBatch as o, basicAuth as p, CloudContext as r, QueueMessage as s, BasicAuthOptions as t, TypedHandler as u, defineRender as v, ValidationError as w, DeferredState as x, defineScheduled as y };
368
+ export { filterInternalBindings as A, defer as C, runValidation as D, ValidatorSlots as E, createClientAssetTags as M, createManifestLoader as N, createAssetFallback as O, InferProps as S, HandlerInput as T, defineQueue as _, CloudEnv as a, Deferred as b, QueueRetryOptions as c, TypedQueueHandler as d, VoidAssetRewriteError as f, defineMiddleware as g, defineHead as h, CloudContextVariables as i, ClientAssetTags as j, createWorkerFetch as k, RenderAssetTags as l, defineHandler as m, CloudBindings as n, QueueBatch as o, basicAuth as p, CloudContext as r, QueueMessage as s, BasicAuthOptions as t, TypedHandler as u, defineRender as v, ValidationError as w, DeferredState as x, defineScheduled as y };
@@ -1,6 +1,6 @@
1
1
  import { a as join } from "./dist-ipQi0Q8y.mjs";
2
- import { a as convertRewritesConfig, i as convertRedirectsConfig, l as isProtocolRelative, n as convertFallbacksConfig, o as countSplats, r as convertHeadersConfig, t as VALID_REDIRECT_STATUSES, u as parseHostPrefixedSource } from "./config-D26zcdKy.mjs";
3
- import { i as voidWarn } from "./log-vqY3pqwI.mjs";
2
+ import { a as convertRewritesConfig, d as isProtocolRelative, f as parseHostPrefixedSource, i as convertRedirectsConfig, n as convertFallbacksConfig, o as countSplats, r as convertHeadersConfig, t as VALID_REDIRECT_STATUSES } from "./config-DHgSEWT7.mjs";
3
+ import { i as voidWarn } from "./log-BMwmN5Ae.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  //#region src/cli/headers.ts
6
6
  /**
@@ -0,0 +1 @@
1
+ export { r as printHelpPage } from "./help-CxSlPpzJ.mjs";
@@ -1,6 +1,6 @@
1
- import { H as outro } from "./dist-BVdsO7Py.mjs";
2
- import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-Ba6ZbrzY.mjs";
1
+ import { H as outro } from "./dist-Cor9XGoz.mjs";
3
2
  import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
3
+ import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-BpgYODYx.mjs";
4
4
  import { n as operatorGroups, t as operatorCommands } from "./operator-args-UnE8Y2eK.mjs";
5
5
  //#region src/cli/ascii.ts
6
6
  const asciiArts = [
@@ -129,18 +129,41 @@ const HELP_TREE = {
129
129
  command: "--no-git",
130
130
  description: "Skip Git repository initialization"
131
131
  },
132
+ {
133
+ command: "--toolchain <name>",
134
+ description: "Scaffold with vite-plus or vite"
135
+ },
136
+ {
137
+ command: "--framework <name>",
138
+ description: "Scaffold with react, vue, svelte, or solid"
139
+ },
140
+ {
141
+ command: "--starter <name>",
142
+ description: "Scaffold the sqlite, postgresql, mysql, or static starter"
143
+ },
144
+ {
145
+ command: "--deploy <target>",
146
+ description: "Deploy to cloudflare, void, or none"
147
+ },
132
148
  {
133
149
  command: "--github",
134
150
  description: "Create the GitHub Actions deploy workflow and set up coding agents"
135
151
  }
136
152
  ],
137
- examples: [{
138
- command: "void init",
139
- description: "Scaffold or configure the current project"
140
- }, {
141
- command: "void init --github",
142
- description: "Scaffold the GitHub Actions deploy workflow"
143
- }]
153
+ examples: [
154
+ {
155
+ command: "void init",
156
+ description: "Scaffold or configure the current project"
157
+ },
158
+ {
159
+ command: "void init --toolchain vite-plus --framework react --starter sqlite --deploy none",
160
+ description: "Scaffold without prompts"
161
+ },
162
+ {
163
+ command: "void init --github",
164
+ description: "Scaffold the GitHub Actions deploy workflow"
165
+ }
166
+ ]
144
167
  },
145
168
  migrate: {
146
169
  summary: "Move legacy Void project settings into void.config.ts.",
@@ -638,6 +661,10 @@ const HELP_TREE = {
638
661
  command: "--no-dedicated-zone",
639
662
  description: "Skip zone-wide application catch-all routes"
640
663
  },
664
+ {
665
+ command: "--custom-domains",
666
+ description: "Let projects add their own domains (requires --dedicated-zone)"
667
+ },
641
668
  {
642
669
  command: "--control-plane-domain <domain>",
643
670
  description: "Optional API hostname"
@@ -962,7 +989,14 @@ const HELP_TREE = {
962
989
  description: "Show all request traffic in the last day"
963
990
  }]
964
991
  },
965
- rollback: basicSubcommand("Roll back to a previous deployment.", "void project rollback [deployId]"),
992
+ rollback: {
993
+ summary: "Roll back to a previous deployment.",
994
+ usage: ["void project rollback [deployId] [--platform cloudflare]"],
995
+ options: [{
996
+ command: "--platform cloudflare",
997
+ description: "Roll back the Cloudflare Worker after a one-off Cloudflare deploy"
998
+ }]
999
+ },
966
1000
  cancel: basicSubcommand("Cancel an active deployment.", "void project cancel [deployId]"),
967
1001
  delete: {
968
1002
  summary: "Delete a project and all its resources.",
@@ -1410,6 +1444,10 @@ const HELP_TREE = {
1410
1444
  command: "set-url",
1411
1445
  description: "Update the external database URL"
1412
1446
  },
1447
+ {
1448
+ command: "restore",
1449
+ description: "Restore the deployed D1 database to an earlier point (direct Cloudflare)"
1450
+ },
1413
1451
  {
1414
1452
  command: "rename-migrations",
1415
1453
  description: "Rename migrations to timestamp format"
@@ -1538,6 +1576,35 @@ const HELP_TREE = {
1538
1576
  }]
1539
1577
  },
1540
1578
  "set-url": basicSubcommand("Update the external database connection string for deployment.", "void db set-url"),
1579
+ restore: {
1580
+ summary: "Restore the deployed D1 database of a direct Cloudflare deploy to an earlier point. Discards every later write.",
1581
+ usage: ["void db restore --bookmark <bookmark> [--platform cloudflare] [--yes]", "void db restore --timestamp <iso-time> [--platform cloudflare] [--yes]"],
1582
+ options: [
1583
+ {
1584
+ command: "--bookmark <bookmark>",
1585
+ description: "Restore point printed by deploy"
1586
+ },
1587
+ {
1588
+ command: "--timestamp <iso-time>",
1589
+ description: "Time with Z or an offset (7 days back on Workers Free, 30 on Paid)"
1590
+ },
1591
+ {
1592
+ command: "--platform cloudflare",
1593
+ description: "Restore after a one-off deploy with --platform cloudflare"
1594
+ },
1595
+ {
1596
+ command: "--yes",
1597
+ description: "Skip the confirmation prompt (required without a TTY)"
1598
+ }
1599
+ ],
1600
+ examples: [{
1601
+ command: "void db restore --bookmark 00000085-0000024c-00004ef2-0a83ea2f",
1602
+ description: "Undo the migrations of a deploy"
1603
+ }, {
1604
+ command: "void db restore --timestamp 2026-10-16T09:30:00Z",
1605
+ description: "Restore the database to a time"
1606
+ }]
1607
+ },
1541
1608
  "rename-migrations": basicSubcommand("Rename migrations to timestamp-based format.", "void db rename-migrations")
1542
1609
  }
1543
1610
  },
@@ -1689,7 +1756,7 @@ function withProjectOption(summary, usage) {
1689
1756
  function lifecycleHelp(command, summary) {
1690
1757
  return {
1691
1758
  summary,
1692
- usage: [`void platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"}${command === "upgrade" || command === "repair" ? " [--dashboard-url <origin>]" : ""}${command === "repair" ? " [--auth-config <path>]" : ""} [--yes]`],
1759
+ usage: [`void platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"}${command === "upgrade" || command === "repair" ? " [--dashboard-url <origin>] [--custom-domains]" : ""}${command === "repair" ? " [--auth-config <path>]" : ""} [--yes]`],
1693
1760
  options: [
1694
1761
  {
1695
1762
  command: "--plan",
@@ -1702,6 +1769,9 @@ function lifecycleHelp(command, summary) {
1702
1769
  ...command === "upgrade" || command === "repair" ? [{
1703
1770
  command: "--dashboard-url <origin>",
1704
1771
  description: "Configure a separately deployed dashboard; omission keeps its saved origin"
1772
+ }, {
1773
+ command: "--custom-domains",
1774
+ description: "Turn on project custom domains; omission keeps the saved setting"
1705
1775
  }] : [],
1706
1776
  ...command === "repair" ? [{
1707
1777
  command: "--auth-config <path>",
@@ -1755,7 +1825,8 @@ function printGlobalHelp() {
1755
1825
  ...globalCommandLines("db", {
1756
1826
  execute: "execute <sql>",
1757
1827
  export: "export [--output <path>]",
1758
- seed: "seed [--file <path>]"
1828
+ seed: "seed [--file <path>]",
1829
+ restore: "restore --bookmark <b>"
1759
1830
  }),
1760
1831
  ...globalOptionLines(["db", "execute"]),
1761
1832
  ...globalOptionLines(["db", "export"]),
@@ -1,5 +1,5 @@
1
1
  import { t as base64ToBytes } from "./base64-DVrOndmI.mjs";
2
- import { c as validateAddressParts, i as indexOfControl, n as MimeError, o as normalizeEmail, r as buildMime } from "./mime-srOklVVv.mjs";
2
+ import { c as validateAddressParts, i as indexOfControl, n as MimeError, o as normalizeEmail, r as buildMime } from "./mime-BAyHPskU.mjs";
3
3
  import { a as getRawRuntimeEnv } from "./env-raw-D74P4ebM.mjs";
4
4
  import { o as withTimeout } from "./email-protocol-D9nTvhCp.mjs";
5
5
  import { EMAIL_MAX_ACTIONS, EMAIL_MAX_INBOUND_BYTES, EMAIL_MAX_INBOUND_HEADERS, EMAIL_MAX_METADATA_BYTES, EMAIL_MAX_REPLY_BYTES, EMAIL_MAX_RESPONSE_BYTES } from "@void/platform/email-protocol";
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { n as HeadDescriptor } from "./head-C8K_iGe6.mjs";
2
2
  import { r as AuthUser } from "./auth-DkcFflXV.mjs";
3
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-_PqY82xe.mjs";
3
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-BbkSPzGF.mjs";
4
4
  import { t as QueueMap } from "./queues-BWKt1Xo4.mjs";
5
5
  import { PluginConfig } from "@cloudflare/vite-plugin";
6
6
  import { Plugin } from "vite";