void 1.7.0 → 1.8.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 (277) hide show
  1. package/dist/{account-cmd-BfkJ_1PC.mjs → account-cmd-CZKntRH2.mjs} +5 -5
  2. package/dist/action-key-ByZ6DDld.mjs +64 -0
  3. package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-CyTagJQM.mjs} +25 -5
  4. package/dist/{application-routing-QpyC5G8z.mjs → application-routing-BLrMVpqi.mjs} +1 -1
  5. package/dist/{auth-CZrthGxs.d.mts → auth-Bk9VGtQW.d.mts} +1 -1
  6. package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-BOaQWMKw.mjs} +5 -5
  7. package/dist/{auth-router-CNBKnEZi.mjs → auth-router-D0-VcmDs.mjs} +3 -3
  8. package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
  9. package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
  10. package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-JTsXXf2F.mjs} +4 -4
  11. package/dist/{cache-DVBBbWQL.mjs → cache-D0m3Z_Xf.mjs} +4 -4
  12. package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-Ce6Os4fa.mjs} +3 -3
  13. package/dist/cli/cli.mjs +1 -1
  14. package/dist/cli/cloudflare-operation-process.mjs +92 -19
  15. package/dist/cli/env-schema-probe.d.mts +1 -1
  16. package/dist/cli/env-schema-probe.mjs +2 -2
  17. package/dist/{cli-main-DFteHrJI.mjs → cli-main-rkrJy2Ge.mjs} +32 -32
  18. package/dist/client-D1Vz1Zep.mjs +1 -0
  19. package/dist/{client-BEZmTP6p.mjs → client-SZPyj4X_.mjs} +1 -1
  20. package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
  21. package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-ChPLQcTP.mjs} +4 -4
  22. package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-Co93VYTo.mjs} +2 -2
  23. package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-CXaDKYj2.mjs} +4 -4
  24. package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
  25. package/dist/{cloudflare-process-BcPvlMFd.mjs → cloudflare-process-DmTxZR-N.mjs} +1 -1
  26. package/dist/{connect-j1F1C_rW.mjs → connect-DlvXt1JR.mjs} +6 -6
  27. package/dist/{create-project-CE3jOmd5.mjs → create-project-CC_7hmYJ.mjs} +4 -4
  28. package/dist/{create-project-DZH3aYGQ.mjs → create-project-DzY05xqC.mjs} +1 -1
  29. package/dist/{db-DyLzzxvM.mjs → db-FhyYGcJJ.mjs} +13 -13
  30. package/dist/{db-types-DdHHUVPy.mjs → db-types-sVwEpyPR.mjs} +3 -1
  31. package/dist/{delete-Dey6YoMA.mjs → delete-CModjyOC.mjs} +4 -4
  32. package/dist/{deploy-Ccw2D2lw.mjs → deploy-Cz9TEzZy.mjs} +34 -24
  33. package/dist/deploy-DMieisRu.mjs +2 -0
  34. package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-DlxxXkAM.mjs} +10 -10
  35. package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-DUvm6-CR.mjs} +2 -2
  36. package/dist/deploy.mjs +5 -5
  37. package/dist/{dispatch-pYaww76u.mjs → dispatch-CCiaAnSK.mjs} +4 -4
  38. package/dist/{dist-DeTdhbZc.mjs → dist-Cp4b1_T9.mjs} +1 -1
  39. package/dist/{dist-BQdgCVQF.mjs → dist-STQXl8ck.mjs} +86 -138
  40. package/dist/{domain-Dh3mG8Vs.mjs → domain-DvdZPA50.mjs} +5 -5
  41. package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
  42. package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
  43. package/dist/{email-DKyMjOYM.mjs → email-ASpNrfLd.mjs} +7 -7
  44. package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-kqoN9jst.mjs} +13 -8
  45. package/dist/{entry-Bw-G1VVx.mjs → entry-BweGTCgj.mjs} +1 -1
  46. package/dist/{env-DkZzh_Dd.mjs → env-Bpkg3G5i.mjs} +5 -5
  47. package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
  48. package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
  49. package/dist/{env-validation-1snjKtDX.mjs → env-validation-BpCCQE_6.mjs} +3 -3
  50. package/dist/{env-validation-C8NL3lEH.mjs → env-validation-CN386Utu.mjs} +1 -1
  51. package/dist/gen-M5fNQKfH.mjs +1 -0
  52. package/dist/{gen-BZmFOGDQ.mjs → gen-upKJChvd.mjs} +3 -3
  53. package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-BvMOlb8Z.mjs} +4 -4
  54. package/dist/{handler-DjqciiDc.d.mts → handler-BO7Od-z9.d.mts} +3 -2
  55. package/dist/{headers-CimYIfQI.mjs → headers-COGEDoMN.mjs} +10 -1
  56. package/dist/help-CItQVDL4.mjs +1 -0
  57. package/dist/{help-CNuUb47C.mjs → help-TPCjTu6e.mjs} +3 -3
  58. package/dist/index.d.mts +3 -3
  59. package/dist/index.mjs +247 -178
  60. package/dist/{info-DwB8IWIx.mjs → info-EsDyihwf.mjs} +2 -2
  61. package/dist/{init-CUGSmcED.mjs → init-a4lVagrb.mjs} +13 -14
  62. package/dist/{link-BlRTGHan.mjs → link-CE55DDzS.mjs} +5 -5
  63. package/dist/{list-iCg7d5Pa.mjs → list-CxRthQks.mjs} +5 -5
  64. package/dist/{live-zKGbRT4h.d.mts → live-Kc55iuOQ.d.mts} +2 -2
  65. package/dist/{login-TA51e5Fw.mjs → login-AfcSGSmE.mjs} +4 -4
  66. package/dist/login-ZHsAm-I6.mjs +1 -0
  67. package/dist/{logs-BlyAxlvx.mjs → logs-BgRJuvb1.mjs} +4 -4
  68. package/dist/{migrate-BH6LCr00.mjs → migrate-BNAh6m_C.mjs} +2 -2
  69. package/dist/migrate-BflbbZQK.mjs +1 -0
  70. package/dist/nitro.mjs +2 -2
  71. package/dist/{node-B0otYjDv.mjs → node-CXFUw0Uz.mjs} +2 -2
  72. package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-DGTuCdSE.mjs} +8 -0
  73. package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-C-viB7Si.mjs} +4 -4
  74. package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
  75. package/dist/output-BsdnNpxa.mjs +1 -0
  76. package/dist/{output-CXJTIAtF.mjs → output-DNVILSz2.mjs} +1 -1
  77. package/dist/pages/client.d.mts +28 -3
  78. package/dist/pages/client.mjs +132 -15
  79. package/dist/pages/index.d.mts +3 -2
  80. package/dist/pages/index.mjs +2 -2
  81. package/dist/pages/islands-plugin.d.mts +1 -1
  82. package/dist/pages/islands-plugin.mjs +13 -2
  83. package/dist/pages/protocol.d.mts +2 -2
  84. package/dist/pages/protocol.mjs +1 -1
  85. package/dist/{platform-args-DfT8yQBF.mjs → platform-args-CiYeZmc5.mjs} +1 -1
  86. package/dist/platform-args-DJvF1-kl.mjs +1 -0
  87. package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-Dt2qEc2w.mjs} +6 -6
  88. package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-B7TaF-PZ.mjs} +4 -4
  89. package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-suXSteJ6.mjs} +4 -4
  90. package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-9rvYBBtr.mjs} +7 -7
  91. package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
  92. package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-DhH_vDr6.mjs} +4 -4
  93. package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
  94. package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-CXmXe2xt.mjs} +13 -13
  95. package/dist/{platform-management-CrP1XhVd.mjs → platform-management-BBCHfwji.mjs} +3 -3
  96. package/dist/{platform-management-BMdyt667.mjs → platform-management-PdrgDQTe.mjs} +1 -1
  97. package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-BGwkXYDM.mjs} +2 -2
  98. package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-C8NxXGRR.mjs} +2 -2
  99. package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
  100. package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-CErfTgEx.mjs} +3 -3
  101. package/dist/{prepare-DXduEwQp.mjs → prepare-BDKWZgfL.mjs} +5 -5
  102. package/dist/{prepare-DJYHjpzq.mjs → prepare-BLrzXjIl.mjs} +3 -3
  103. package/dist/prepare-a1_5usAn.mjs +1 -0
  104. package/dist/{prerender-render-BN9Lmebs.mjs → prerender-render-BAdYhivW.mjs} +15 -2
  105. package/dist/prerender-render.d.mts +2 -0
  106. package/dist/prerender-render.mjs +1 -1
  107. package/dist/{project-cmd-Dfb1Sg8w.mjs → project-cmd-DzGvxXKH.mjs} +17 -17
  108. package/dist/{project-team-BO2dyc7S.mjs → project-team-C5XtHbZk.mjs} +4 -4
  109. package/dist/{project-token-ByO2mEI2.mjs → project-token-B4D5yhHQ.mjs} +4 -4
  110. package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust--0LvktDg.mjs} +4 -4
  111. package/dist/{protocol-yxdHxFLN.mjs → protocol-B1Tvc9-x.mjs} +191 -69
  112. package/dist/{protocol-xZMvWsrg.d.mts → protocol-Cg2I81NA.d.mts} +9 -2
  113. package/dist/{provision-D5q-ptD3.mjs → provision-C3yiHdld.mjs} +1 -1
  114. package/dist/{provision-CMH4-8ri.mjs → provision-CAcrauvr.mjs} +1 -1
  115. package/dist/{requests-CPOiDkjh.mjs → requests-CrRiTgQA.mjs} +3 -3
  116. package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
  117. package/dist/{resolve-project-ClvLMTI9.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
  118. package/dist/{rollback-BfCs2la4.mjs → rollback-BsmQyj-Q.mjs} +4 -4
  119. package/dist/{route-types-Cl3x0Q8B.mjs → route-types-CgtlFCDz.mjs} +3 -2
  120. package/dist/routes-stub.d.mts +4 -3
  121. package/dist/runtime/auth.d.mts +1 -1
  122. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  123. package/dist/runtime/better-auth-pg.d.mts +1 -1
  124. package/dist/runtime/better-auth.d.mts +1 -1
  125. package/dist/runtime/client-react.d.mts +1 -1
  126. package/dist/runtime/client-solid.d.mts +1 -1
  127. package/dist/runtime/client-svelte.d.mts +1 -1
  128. package/dist/runtime/client-vue.d.mts +1 -1
  129. package/dist/runtime/client.d.mts +1 -1
  130. package/dist/runtime/db.d.mts +6 -3
  131. package/dist/runtime/db.mjs +2 -2
  132. package/dist/runtime/env-public.d.mts +1 -1
  133. package/dist/runtime/env-public.mjs +53 -39
  134. package/dist/runtime/handler.d.mts +1 -1
  135. package/dist/runtime/live-client.d.mts +1 -1
  136. package/dist/runtime/live.d.mts +1 -1
  137. package/dist/runtime/routing.d.mts +8 -3
  138. package/dist/runtime/routing.mjs +161 -21
  139. package/dist/runtime/validator.d.mts +1 -1
  140. package/dist/runtime/ws-server.d.mts +3 -3
  141. package/dist/runtime/ws.d.mts +1 -1
  142. package/dist/{scan-L8OSv1f7.mjs → scan-BJ3bj6aP.mjs} +228 -27
  143. package/dist/{secret-CuI6LTpD.mjs → secret-D0g5oBsP.mjs} +6 -6
  144. package/dist/{skills-BBO9wMjB.mjs → skills-CoBB9_Ao.mjs} +1 -1
  145. package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
  146. package/dist/{subcommand-prompt-BZMnCA8T.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
  147. package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
  148. package/dist/{wrapper-BGsi_uHs.mjs → wrapper-CVMZarxf.mjs} +1 -1
  149. package/dist/{ws-DB8Feytg.d.mts → ws--U7QicYy.d.mts} +2 -2
  150. package/docs/guide/ai.md +1 -0
  151. package/docs/guide/app-types.md +1 -0
  152. package/docs/guide/auth.md +1 -0
  153. package/docs/guide/database/d1.md +16 -1
  154. package/docs/guide/database/mysql.md +1 -0
  155. package/docs/guide/database/postgresql.md +1 -0
  156. package/docs/guide/database.md +1 -0
  157. package/docs/guide/deployment.md +1 -0
  158. package/docs/guide/durable-state.md +1 -0
  159. package/docs/guide/edge/headers.md +1 -0
  160. package/docs/guide/edge/prerendering.md +1 -0
  161. package/docs/guide/edge/redirects.md +1 -0
  162. package/docs/guide/edge/revalidation.md +3 -0
  163. package/docs/guide/edge/rewrites.md +1 -0
  164. package/docs/guide/edge/static-assets.md +1 -0
  165. package/docs/guide/email/domains.md +1 -0
  166. package/docs/guide/email/receiving.md +3 -2
  167. package/docs/guide/email/sending.md +3 -2
  168. package/docs/guide/email.md +1 -0
  169. package/docs/guide/env-vars.md +4 -0
  170. package/docs/guide/index.md +1 -0
  171. package/docs/guide/jobs.md +1 -0
  172. package/docs/guide/kv.md +1 -0
  173. package/docs/guide/live.md +1 -0
  174. package/docs/guide/pages-routing/actions-and-forms.md +36 -18
  175. package/docs/guide/pages-routing/errors.md +101 -0
  176. package/docs/guide/pages-routing/head.md +1 -0
  177. package/docs/guide/pages-routing/islands.md +1 -0
  178. package/docs/guide/pages-routing/layouts.md +3 -0
  179. package/docs/guide/pages-routing/loaders.md +1 -0
  180. package/docs/guide/pages-routing/markdown.md +1 -1
  181. package/docs/guide/pages-routing/overview.md +3 -0
  182. package/docs/guide/pages-routing/view-transitions.md +1 -0
  183. package/docs/guide/platform/administration/access.md +1 -0
  184. package/docs/guide/platform/administration/connected-apps.md +4 -0
  185. package/docs/guide/platform/administration/email.md +1 -0
  186. package/docs/guide/platform/administration/operations.md +1 -0
  187. package/docs/guide/platform/administration/plans.md +1 -0
  188. package/docs/guide/platform/administration/projects.md +11 -0
  189. package/docs/guide/platform/administration/zero-trust.md +1 -0
  190. package/docs/guide/platform/development/local.md +1 -0
  191. package/docs/guide/platform/development/runtime.md +1 -0
  192. package/docs/guide/platform/development/schema-ci.md +1 -0
  193. package/docs/guide/platform/installation/ci.md +1 -0
  194. package/docs/guide/platform/installation/credentials.md +1 -0
  195. package/docs/guide/platform/installation/domains.md +1 -0
  196. package/docs/guide/platform/installation/first-deployment.md +1 -0
  197. package/docs/guide/platform/installation/maintenance.md +1 -0
  198. package/docs/guide/platform/installation/prerequisites.md +1 -0
  199. package/docs/guide/platform/installation/setup.md +1 -0
  200. package/docs/guide/platform/installation/uninstall.md +1 -0
  201. package/docs/guide/platform-administration.md +1 -0
  202. package/docs/guide/platform-development.md +1 -0
  203. package/docs/guide/project-collaboration.md +1 -0
  204. package/docs/guide/queues.md +3 -0
  205. package/docs/guide/quickstart.md +3 -2
  206. package/docs/guide/remote-dev.md +1 -0
  207. package/docs/guide/sandboxes.md +1 -0
  208. package/docs/guide/self-hosted-platform.md +1 -0
  209. package/docs/guide/server-routing.md +1 -0
  210. package/docs/guide/sse.md +1 -0
  211. package/docs/guide/ssg.md +1 -0
  212. package/docs/guide/ssr.md +1 -0
  213. package/docs/guide/storage.md +1 -0
  214. package/docs/guide/testing.md +62 -0
  215. package/docs/guide/type-safety.md +1 -0
  216. package/docs/guide/typed-fetch.md +1 -0
  217. package/docs/guide/websockets.md +1 -0
  218. package/docs/index.md +1 -0
  219. package/docs/integrations/agents.md +1 -0
  220. package/docs/integrations/cloudflare.md +1 -0
  221. package/docs/integrations/frameworks/analog.md +1 -0
  222. package/docs/integrations/frameworks/astro.md +1 -0
  223. package/docs/integrations/frameworks/nuxt.md +1 -0
  224. package/docs/integrations/frameworks/overview.md +1 -0
  225. package/docs/integrations/frameworks/react-router.md +1 -0
  226. package/docs/integrations/frameworks/sveltekit.md +1 -0
  227. package/docs/integrations/frameworks/tanstack-start.md +1 -0
  228. package/docs/integrations/hono.md +1 -0
  229. package/docs/integrations/nodejs-bun-deno.md +1 -0
  230. package/docs/reference/api/auth.md +1 -0
  231. package/docs/reference/api/client.md +1 -0
  232. package/docs/reference/api/database.md +24 -1
  233. package/docs/reference/api/deploy.md +4 -0
  234. package/docs/reference/api/durable.md +1 -0
  235. package/docs/reference/api/env.md +1 -0
  236. package/docs/reference/api/handlers.md +1 -0
  237. package/docs/reference/api/pages.md +22 -4
  238. package/docs/reference/api/plugin.md +1 -0
  239. package/docs/reference/api/resources.md +1 -0
  240. package/docs/reference/api/rewrites.md +2 -1
  241. package/docs/reference/api/types.md +1 -0
  242. package/docs/reference/api.md +1 -0
  243. package/docs/reference/cli/auth.md +1 -0
  244. package/docs/reference/cli/database.md +1 -0
  245. package/docs/reference/cli/deploy.md +1 -0
  246. package/docs/reference/cli/domains.md +1 -0
  247. package/docs/reference/cli/email.md +1 -0
  248. package/docs/reference/cli/generate.md +1 -0
  249. package/docs/reference/cli/github.md +1 -0
  250. package/docs/reference/cli/platform-config.md +1 -0
  251. package/docs/reference/cli/platform-email.md +1 -0
  252. package/docs/reference/cli/platform-installation.md +1 -0
  253. package/docs/reference/cli/platform-operations.md +1 -0
  254. package/docs/reference/cli/platform-users.md +23 -0
  255. package/docs/reference/cli/platform-zero-trust.md +1 -0
  256. package/docs/reference/cli/platform.md +1 -0
  257. package/docs/reference/cli/project.md +1 -0
  258. package/docs/reference/cli/secrets.md +1 -0
  259. package/docs/reference/cli/setup.md +1 -0
  260. package/docs/reference/cli.md +3 -0
  261. package/docs/reference/config.md +1 -0
  262. package/docs/reference/resource-inference.md +1 -0
  263. package/docs/reference/structure.md +1 -0
  264. package/package.json +25 -25
  265. package/skills/void/SKILL.md +2 -0
  266. package/dist/action-key-XtKKbbsi.mjs +0 -25
  267. package/dist/client-BAxLpSKv.mjs +0 -1
  268. package/dist/deploy-DEZkUS77.mjs +0 -2
  269. package/dist/gen-C6iknRdI.mjs +0 -1
  270. package/dist/help-C_cqTByy.mjs +0 -1
  271. package/dist/login-C4q1S-5b.mjs +0 -1
  272. package/dist/migrate-CVBsSFhC.mjs +0 -1
  273. package/dist/operator-cmd-DnaCnCSP.mjs +0 -1
  274. package/dist/output-CNsMDEd2.mjs +0 -1
  275. package/dist/platform-args-B7-wQ0_B.mjs +0 -1
  276. package/dist/prepare-Bx4a8cb1.mjs +0 -1
  277. package/dist/resolve-project-BALVa9q0.mjs +0 -1
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Invite readers, collaborators, and project administrators to a hosted project. Direct Cloudflare deploys stay single-user.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Process work asynchronously with a consumer in queues/, then send it typed messages from your app.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -110,6 +111,8 @@ export default defineQueue<Message>(async (batch, env) => {
110
111
  - `maxRetries`: maximum number of retries before delivery is exhausted (default `3`)
111
112
  - `retryDelay`: seconds to wait between retries (default `0`)
112
113
 
114
+ Declare each option in the queue file with `export const` and a whole-number literal. Void reads these values without running the file, so computed values and options re-exported from another module are not supported. To use the same value in several queues, repeat it in each queue file.
115
+
113
116
  Void-managed queues do not configure a dead-letter queue. Cloudflare permanently
114
117
  deletes messages that exhaust their retries without one; see
115
118
  [Cloudflare's dead-letter queue guide](https://developers.cloudflare.com/queues/configuration/dead-letter-queues/).
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Create a Void app, run it locally, and deploy it. You can also add Void to an existing Vite app.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -33,7 +34,7 @@ bun add -D void
33
34
  bunx void init
34
35
  ```
35
36
 
36
- ```sh [vite+]
37
+ ```sh [vp]
37
38
  vp add -D void
38
39
  vpx void init
39
40
  ```
@@ -66,7 +67,7 @@ yarn run dev
66
67
  bun run dev
67
68
  ```
68
69
 
69
- ```sh [vite+]
70
+ ```sh [vp]
70
71
  vpr dev
71
72
  ```
72
73
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Run local code against a project already deployed to your Void platform, including its database and storage.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Run commands, work with files, and connect to servers inside an isolated Cloudflare Sandbox.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Install a shared deployment environment in your Cloudflare account so your team can deploy without account credentials.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add an endpoint by creating a file in routes/ and exporting a handler for each HTTP method.'
2
3
  outline: deep
3
4
  ---
4
5
 
package/docs/guide/sse.md CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Stream events from a route handler to the browser. Void formats the messages, sends keepalives, and closes the stream.'
2
3
  outline: deep
3
4
  ---
4
5
 
package/docs/guide/ssg.md CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Prerender every page at build time by setting the static output mode in void.config.ts.'
2
3
  outline: deep
3
4
  ---
4
5
 
package/docs/guide/ssr.md CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Bring your own router, data loading, HTML shell, and hydration, or use Pages Routing to have Void handle them.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Store files in Cloudflare R2, and upload, download, and read metadata through void/storage.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -0,0 +1,62 @@
1
+ ---
2
+ description: 'Test a Void app with Vitest. With Vite+, run the tests through vp test.'
3
+ outline: deep
4
+ ---
5
+
6
+ # Testing
7
+
8
+ Test your app with [Vitest](https://vitest.dev/). With Vite+, the default toolchain, run it with `vp test`:
9
+
10
+ ```sh
11
+ vp test
12
+ ```
13
+
14
+ Import test APIs from `vite-plus/test`. With the Vite toolchain, add `vitest` to your dev dependencies, run `vitest`, and import from `vitest` instead.
15
+
16
+ Vitest reads your `vite.config.ts`, so `void/*` imports, `@schema`, and the other modules Void provides resolve in tests as they do in your app. Tests need no separate configuration.
17
+
18
+ Keep test files out of the [convention directories](../reference/structure.md) such as `routes/` and `pages/`. Void reads the files there as part of your app, so a test file in `routes/` becomes a route. Put tests in `tests/`, or next to the code they test in `src/`.
19
+
20
+ ## Bindings {#bindings}
21
+
22
+ Tests run in Node.js, not in the Workers runtime. Void doesn't start your Worker for a test run, so D1, KV, R2, and other bindings are unavailable, and it doesn't apply migrations to your local database. You can import modules that use bindings, but a call that reaches one throws `env: Cloudflare env is unavailable`.
23
+
24
+ To test code that uses a binding, replace its module with [`vi.mock()`](https://vitest.dev/api/vi#vi-mock):
25
+
26
+ ```ts
27
+ // src/visits.ts
28
+ import { kv } from 'void/kv';
29
+
30
+ export async function countVisit(): Promise<number> {
31
+ const visits = ((await kv.get<number>('visits')) ?? 0) + 1;
32
+ await kv.put('visits', visits);
33
+ return visits;
34
+ }
35
+ ```
36
+
37
+ ```ts
38
+ // src/visits.test.ts
39
+ import { expect, it, vi } from 'vite-plus/test';
40
+ import { countVisit } from './visits';
41
+
42
+ vi.mock('void/kv', () => {
43
+ const values = new Map<string, unknown>();
44
+ return {
45
+ kv: {
46
+ get: async (key: string) => values.get(key) ?? null,
47
+ put: async (key: string, value: unknown) => {
48
+ values.set(key, value);
49
+ },
50
+ },
51
+ };
52
+ });
53
+
54
+ it('counts visits', async () => {
55
+ await countVisit();
56
+ expect(await countVisit()).toBe(2);
57
+ });
58
+ ```
59
+
60
+ ## Email {#email}
61
+
62
+ `void/email/testing` captures sent and received email in tests. See [Testing](./email/sending.md#testing) in Sending Email and [Testing inbound handlers](./email/receiving.md#testing-inbound-handlers) in Receiving Email.
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Carry types from your database schema through route handlers and page loaders to the UI.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Call your API from the client with a typed fetch that checks paths, request bodies, and response types.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Send typed messages between the server and connected clients. Each route keeps its state in a Durable Object.'
2
3
  outline: deep
3
4
  ---
4
5
 
package/docs/index.md CHANGED
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Build with Vite and deploy with Void: a CLI, platform, and full-stack SDK for apps on Cloudflare.'
2
3
  layout: home
3
4
  theme: dark
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: "Set up coding agents with void init, including project instructions and links to Void's docs and skills."
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Deploy to Cloudflare Workers. Void detects the resources your app uses, creates bindings, and publishes the Worker.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void to an Analog app for resource detection, typed database queries, migrations, and deployment.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void to an Astro app for resource detection, typed database queries, migrations, and deployment.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void to a Nuxt app for resource detection, typed database queries, migrations, and deployment.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: "Keep your framework's routes and rendering, and use Void for databases, storage, jobs, and deployment."
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void beside the React Router Vite plugin for databases, storage, and deployment, without a separate Cloudflare adapter.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void to a SvelteKit app for resource detection, typed database queries, migrations, and deployment.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void beside the TanStack Start Vite plugin for databases, storage, and deployment, without a separate Cloudflare adapter.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Void route handlers run on Hono. Add hono to your app when your code imports from it directly.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Build a Void server for Node.js, Bun, or Deno, and run it on your own machine, in a container, or with another host.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Sessions, users, and auth clients from void/auth, plus the browser helpers in void/client.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Call your routes from client code with a typed fetch. Paths and response types come from the generated route map.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Query D1, PostgreSQL, or MySQL with the Drizzle client from void/db, and seed data from a script.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -36,6 +37,8 @@ import { createDb } from 'void/db';
36
37
  const db = createDb(env.MY_OTHER_DB);
37
38
  ```
38
39
 
40
+ Pass `{ session: 'first-primary' }` to start the D1 session with a query on the primary, keeping your app's schema and query types. Create this client inside the request that needs a fresh read. The default is `'first-unconstrained'`, which allows the first query to use a replica. See [read replication](../../guide/database/d1.md#read-replication).
41
+
39
42
  For PostgreSQL and MySQL projects, pass a connection string.
40
43
 
41
44
  ```ts
@@ -48,7 +51,10 @@ const db = createDb('postgres://user:password@host:5432/app');
48
51
 
49
52
  ```ts
50
53
  // D1
51
- function createDb(d1: D1Database): DrizzleD1Database<Schema>;
54
+ function createDb(
55
+ d1: D1Database,
56
+ options?: { session?: D1SessionConstraint },
57
+ ): DrizzleD1Database<Schema>;
52
58
 
53
59
  // PostgreSQL
54
60
  function createDb(connectionString: string): NodePgDatabase<Schema>;
@@ -67,6 +73,23 @@ import { db, eq, and, or, desc, like, inArray, sql } from 'void/db';
67
73
 
68
74
  **Full list:** `sql`, `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `and`, `or`, `not`, `desc`, `asc`, `like`, `ilike`, `notLike`, `inArray`, `notInArray`, `isNull`, `isNotNull`, `between`, `notBetween`, `exists`, `notExists`, `count`, `sum`, `avg`, `min`, `max`.
69
75
 
76
+ It also exports the Drizzle types `SQL`, `SQLWrapper`, `AnyColumn`, and `BatchItem` for helpers that take part of a query:
77
+
78
+ ```ts
79
+ import { posts } from '@schema';
80
+ import { db, sql, type BatchItem, type SQL, type SQLWrapper } from 'void/db';
81
+
82
+ function contains(column: SQLWrapper, text: string): SQL {
83
+ return sql`instr(${column}, ${text}) > 0`;
84
+ }
85
+
86
+ // D1 only: `db.batch()` takes at least one query.
87
+ const writes: [BatchItem<'sqlite'>, ...Array<BatchItem<'sqlite'>>] = [
88
+ db.update(posts).set({ published: true }).where(contains(posts.title, 'void')),
89
+ ];
90
+ await db.batch(writes);
91
+ ```
92
+
70
93
  ## Seeding {#seeding}
71
94
 
72
95
  Imported from `"void/seed"`.
@@ -1,3 +1,7 @@
1
+ ---
2
+ description: 'Prepare a built app, SPA, or static site for a managed platform deployment without platform credentials.'
3
+ ---
4
+
1
5
  # Deployment artifacts
2
6
 
3
7
  Use `void/deploy` from Node.js to prepare a built Void app, SPA, or static site for a managed platform deployment without platform credentials.
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Persistent objects and typed WebSocket connections from void/durable.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Read validated environment values and binding types from void/env.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Define HTTP handlers, middleware, validation, scheduled jobs, queues, and rendering.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Vite plugins and client runtimes for React, Vue, Svelte, and Solid pages.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -6,6 +7,17 @@ outline: deep
6
7
 
7
8
  Framework adaptors for [Pages Routing](../../guide/pages-routing/overview). Each adaptor provides a Vite plugin and client-side runtime.
8
9
 
10
+ ## Error components
11
+
12
+ All four adapters export `PageError` and `ErrorPageProps` for [`_not-found` and `_error` components](../../guide/pages-routing/errors):
13
+
14
+ ```ts
15
+ // Also exported by @void/react, @void/vue, @void/svelte, and @void/solid.
16
+ import type { ErrorPageProps, PageError } from 'void/pages';
17
+ ```
18
+
19
+ `PageError` has a numeric `status` and a string `message`. `ErrorPageProps` contains `{ error: PageError }`.
20
+
9
21
  ## Navigation destinations {#navigation-destinations}
10
22
 
11
23
  All four adapters support typed URLs through [`routeUrl()`](./types.md#routeurl-path-options). Pass the returned string to `Link`'s `href`, which has the type [`Href`](./types.md#route-types).
@@ -90,9 +102,10 @@ Imported from `"@void/vue"`.
90
102
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
91
103
  | `useForm(url, defaults, options?)` | Typed reactive form helper bound to a page action URL. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
92
104
  | `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
93
- | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
105
+ | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an [`ActionResult`](../../guide/pages-routing/actions-and-forms.md#action-helper). |
94
106
  | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
95
107
  | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
108
+ | `getValidationErrors(body)` | Returns the field-error map from a failed action's `error.body`, or `null` when the body has no field errors. Use it to show validation errors from `action()`. |
96
109
  | `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
97
110
 
98
111
  Vue `Link` GET `data` is merged into the rendered `href` query string. Primitive values are serialized with `String(value)`, arrays become repeated keys, `null` and `undefined` are omitted, and nested objects throw. `prefetch` and `reloadDocument` are GET-only and throw for mutation links.
@@ -145,9 +158,10 @@ Imported from `"@void/react"`.
145
158
  | `useNavigation()` | Returns pending navigation state: `{ state, location, method }`, where `state` is `"idle"`, `"loading"`, or `"submitting"` and `location` is the pending destination. |
146
159
  | `useForm(url, defaults, options?)` | Form helper hook. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
147
160
  | `useIslandForm(defaults)` | Form helper hook for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
148
- | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
161
+ | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an [`ActionResult`](../../guide/pages-routing/actions-and-forms.md#action-helper). |
149
162
  | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
150
163
  | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
164
+ | `getValidationErrors(body)` | Returns the field-error map from a failed action's `error.body`, or `null` when the body has no field errors. Use it to show validation errors from `action()`. |
151
165
  | `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
152
166
  | `Deferred<T>` | React-only prop type for `defer()` results. It is `Promise<T>` and is consumed with React `use()`. |
153
167
 
@@ -224,9 +238,10 @@ Imported from `"@void/svelte"`.
224
238
  | `Link` | Svelte component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
225
239
  | `useForm(url, defaults, options?)` | Form helper using Svelte 5 runes. Returns `{ data, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
226
240
  | `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`, plus `submit(url, method)`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
227
- | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
241
+ | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an [`ActionResult`](../../guide/pages-routing/actions-and-forms.md#action-helper). |
228
242
  | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
229
243
  | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
244
+ | `getValidationErrors(body)` | Returns the field-error map from a failed action's `error.body`, or `null` when the body has no field errors. Use it to show validation errors from `action()`. |
230
245
  | `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
231
246
  | `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. |
232
247
  | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
@@ -277,9 +292,10 @@ Imported from `"@void/solid"`.
277
292
  | `Link` | Solid component for SPA navigation. Renders `<a>` for GET, `<button>` for non-GET methods. Props: `href`, `method`, `data`, `prefetch`, `cacheFor`, `preserveScroll`, `preserveState`, `replace`, `reloadDocument`, `viewTransition`, `activeMatch`, `onNavigate`. Adds `aria-current="page"` and `data-void-active` to the link to the current page ([active links](../../guide/pages-routing/overview.md#active-links)), and `data-void-pending` to links to a page while it loads ([pending links](../../guide/pages-routing/overview.md#pending-links)). |
278
293
  | `useForm(url, defaults, options?)` | Form helper using Solid stores. Returns `{ data, setData, post, put, patch, delete, pending, errors, error, hasChanges, wasSuccessful, recentlySuccessful, reset, setError, clearErrors, clearError }`. |
279
294
  | `useIslandForm(defaults)` | Form helper for island components. Same form state as `useForm()`. `post(url)`, `put(url)`, `patch(url)`, and `delete(url)` take the action URL and submit with `fetch()`. With [`routing.typedRoutes`](../config.md#routing-typedroutes), the URL is a [`RouteUrl`](./types.md#route-types). |
280
- | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an `ActionResult`. |
295
+ | `action(url, options?)` | Awaitable one-shot page action helper. Uses `POST` by default and accepts `{ data, method, params, preserveScroll }`, where `method` can be `"PUT"`, `"PATCH"`, or `"DELETE"`. Returns an [`ActionResult`](../../guide/pages-routing/actions-and-forms.md#action-helper). |
281
296
  | `isVoidActionError(error)` | Returns `true` when `error` is a `VoidActionError` at any status, such as a thrown `401`, `403`, or `500`. Narrows `error` to `VoidActionError`. See [handling thrown errors](../../guide/pages-routing/actions-and-forms.md#validation-errors). |
282
297
  | `isCallSiteActionError(error)` | Returns `true` only for the expected `VoidActionError` statuses that `action()` returns, such as `409` or `422`. |
298
+ | `getValidationErrors(body)` | Returns the field-error map from a failed action's `error.body`, or `null` when the body has no field errors. Use it to show validation errors from `action()`. |
283
299
  | `useShared()` | Returns shared data. Middleware sets it with `c.set("shared", {...})`; a loader or action can update it. See [Shared data](../../guide/pages-routing/layouts.md#shared-data). |
284
300
  | `useRouter()` | Returns the Void Router with current route state (`url`, `path`, `query`, `params`) and navigation methods: `visit`, `refresh`, awaitable `prefetch`, `flush`, `flushAll`. |
285
301
  | `useParams()` | Returns dynamic route params for the page currently being rendered. Pass the page's pattern as the type argument, such as `useParams<'/users/[id]'>()`, to type them. |
@@ -316,3 +332,5 @@ See [Markdown Pages](../../guide/pages-routing/markdown.md) for setup and framew
316
332
  ## Form
317
333
 
318
334
  Each Pages adapter exports `Form`. Pass the object returned by `useForm()` as `form`; `method` defaults to `post`. It renders validation and action errors, preserves controlled input, and respects known quota retry deadlines without submitting automatically. `renderError` customizes action-error presentation; Svelte uses a snippet. See [Actions and Forms](../../guide/pages-routing/actions-and-forms.md).
335
+
336
+ All four adapters accept `{ throwOnError: false }` in the third argument to `useForm()`. Authentication and server HTTP failures then populate `form.error` instead of throwing; validation failures still populate `form.errors`. React also calls `onError`. Unexpected failures still throw, and cancelled submissions do not set a form error. The default HTTP error handling is unchanged. See [handling action errors](../../guide/pages-routing/actions-and-forms.md#validation-errors).
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add Void to Vite. The plugin sets up routing, migrations, and the Cloudflare Workers runtime.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Clients for KV, object storage, AI, cache revalidation, and logs.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Serve another route without changing the browser URL, and read the URL that was originally requested.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -44,7 +45,7 @@ return c.redirect(requested.origin === new URL(c.req.url).origin ? requested : '
44
45
 
45
46
  `c.redirect()` sends the location it is given. The request query is not added to an internal path, a protocol-relative URL, or an absolute URL, so `c.redirect('/notes')` from `/sign-in?redirectTo=/notes` goes to `/notes`. [`routing.redirects`](../../guide/edge/redirects.md) still merge the request query into the destination.
46
47
 
47
- A [named action](../../guide/pages-routing/actions-and-forms.md#named-actions) is the exception. Redirecting it to a GET page drops the action key and keeps the page's other query parameters: `POST /users/42?delete&tab=profile` with `c.redirect('/users/42')` goes to `/users/42?tab=profile`. Redirects that preserve the request method keep the action key: `307` and `308`, or `301` and `302` after a `PUT`, `PATCH`, or `DELETE`.
48
+ A [named action](../../guide/pages-routing/actions-and-forms.md#named-actions) is the exception. Redirecting it to a GET page drops the action key and keeps the page's other query parameters: `POST /users/42?delete&tab=profile` with `c.redirect('/users/42')` goes to `/users/42?tab=profile`. Redirects that preserve the request method keep the action key: `307` and `308`, or `301` and `302` after a `PUT`, `PATCH`, or `DELETE`. Only the action URL's own parameters are kept: the [current page's query](../../guide/pages-routing/actions-and-forms.md#query-parameters-after-submission) that `action()` and forms add is left out.
48
49
 
49
50
  ```ts
50
51
  import { defineHandler } from 'void';
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Shared types for handler context, routes, URLs, and head metadata.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Look up public imports, signatures, and return types. The guides cover setup and examples.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Connect the CLI to Cloudflare or a Void platform, and sign in to the account that receives deploys.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Generate migrations, apply them, and update the local database from your Drizzle schema.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Build an app, provision its resources, apply migrations, and publish it.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Add, remove, and check custom domains for a hosted project or a direct Cloudflare deploy.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Inspect email usage and choose the recipients a project is allowed to send to.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Scaffold a Drizzle table and the routes that list, create, and fetch a row.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Connect GitHub so pushes build and deploy, whichever way you signed in to Void.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Create and edit platform plans and their limits from an administrator session.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Administer platform email, including the shared sender and project recipient rules.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Install a Void platform from the CLI, set its domain, and run its lifecycle commands.'
2
3
  outline: deep
3
4
  ---
4
5
 
@@ -1,4 +1,5 @@
1
1
  ---
2
+ description: 'Inspect deployments, logs, and platform health, and preview changes before applying them.'
2
3
  outline: deep
3
4
  ---
4
5