void 0.20.2 → 0.21.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 (310) hide show
  1. package/README.md +2 -2
  2. package/dist/agents-gni4eqBu.mjs +111 -0
  3. package/dist/auth-3sGB0zJ1.mjs +22 -0
  4. package/dist/{auth-DPl6kck4.mjs → auth-B9_D6ygs.mjs} +6 -241
  5. package/dist/auth-CAw7zHqj.mjs +2 -0
  6. package/dist/auth-client-BWBT8HLp.mjs +6 -0
  7. package/dist/auth-client-Bawdj38n.d.mts +7 -0
  8. package/dist/auth-client-react-7GFffu8R.d.mts +7 -0
  9. package/dist/auth-client-react-CMLwT2xI.mjs +6 -0
  10. package/dist/auth-client-solid-DyTFL4cq.d.mts +7 -0
  11. package/dist/auth-client-solid-UoreJWZG.mjs +6 -0
  12. package/dist/auth-client-svelte-Cv_WvrRk.mjs +6 -0
  13. package/dist/auth-client-svelte-zetW0KIH.d.mts +7 -0
  14. package/dist/auth-client-vue-CFk7Xbv3.mjs +6 -0
  15. package/dist/auth-client-vue-bChShbQP.d.mts +7 -0
  16. package/dist/{auth-cmd-gniL2fNt.mjs → auth-cmd-MkBG2u1f.mjs} +5 -5
  17. package/dist/{auth-link-NZdjCmSc.mjs → auth-link-Devmv96E.mjs} +5 -5
  18. package/dist/{better-auth-shared-DSCeohOK.d.mts → better-auth-shared-BoVwA5Vm.d.mts} +1 -6
  19. package/dist/{better-auth-shared-CYw1T3k4.mjs → better-auth-shared-syGYYmnY.mjs} +1 -1
  20. package/dist/{build-cmd-sI18tX_O.mjs → build-cmd-DsBGwtfs.mjs} +6 -4
  21. package/dist/{cache-IHn5MwBC.mjs → cache-BMw8eMyF.mjs} +6 -4
  22. package/dist/{cancel-deploy-C5qTOdLi.mjs → cancel-deploy-B3_s9NIN.mjs} +5 -3
  23. package/dist/cf-access-rAZxzMkL.mjs +181 -0
  24. package/dist/cf-build-output-CTdlo6Rt.mjs +520 -0
  25. package/dist/cli/cf-compat.d.mts +1 -0
  26. package/dist/cli/cf-compat.mjs +934 -0
  27. package/dist/cli/cli.mjs +61 -38
  28. package/dist/cli/env-schema-probe.mjs +3 -3
  29. package/dist/client-DAAivdid.mjs +2 -0
  30. package/dist/{client-dHfSJvAN.mjs → client-PdAJ-F0t.mjs} +148 -89
  31. package/dist/{cloudflare-auth-6M5llVPC.mjs → cloudflare-auth-BCmTc1X_.mjs} +13 -44
  32. package/dist/{cloudflare-cmd-4RPGN3KB.mjs → cloudflare-cmd-D6PrKn7o.mjs} +4 -7
  33. package/dist/{cloudflare-connect-t1UU5svD.mjs → cloudflare-connect-DloREDlc.mjs} +6 -6
  34. package/dist/cloudflare-operations-BHNJVDbN.mjs +2 -0
  35. package/dist/{cloudflare-operations-BzWnlC1_.mjs → cloudflare-operations-CPEdHYhM.mjs} +37 -39
  36. package/dist/cloudflare-user-output-Q-k0QoNQ.mjs +20 -0
  37. package/dist/collect-DAUItMDS.mjs +2 -0
  38. package/dist/collect-DXHNWHcT.mjs +48 -0
  39. package/dist/config--T87TD8T.mjs +2 -0
  40. package/dist/{config-NOG_U1aK.mjs → config-BSe70f4T.mjs} +4 -6
  41. package/dist/config-DDIFxQYx.mjs +2 -0
  42. package/dist/{config-uNGuFsI2.mjs → config-Dxr6cTXn.mjs} +22 -37
  43. package/dist/config-DywxBLQC.d.mts +185 -0
  44. package/dist/config-entry.d.mts +6 -0
  45. package/dist/config-entry.mjs +7 -0
  46. package/dist/config-uP7ZDtVZ.mjs +21 -0
  47. package/dist/config-write-y3CBI_ux.mjs +60 -0
  48. package/dist/{connect-Bfk31O_8.mjs → connect-BvC9kolB.mjs} +8 -6
  49. package/dist/{create-project-Bk9Z0-Jg.mjs → create-project-C9lQhRzj.mjs} +9 -25
  50. package/dist/create-project-CI-17RVJ.mjs +2 -0
  51. package/dist/database-provider-Cx525bwX.mjs +6 -0
  52. package/dist/database-provider.mjs +1 -5
  53. package/dist/{db-BkRoptAt.mjs → db-R7IQgOv5.mjs} +48 -44
  54. package/dist/{delete-DouASY9P.mjs → delete-CghI_NXn.mjs} +6 -4
  55. package/dist/deploy-CYPymbtG.mjs +2 -0
  56. package/dist/{deploy-DTaWUS1S.mjs → deploy-H968Lo4T.mjs} +765 -197
  57. package/dist/discover-BBzDZe_o.mjs +2 -0
  58. package/dist/{discover-xvfrgJeo.mjs → discover-C4O6YxVS.mjs} +3 -8
  59. package/dist/{dist-BrsS7cai.mjs → dist-4WkAWhWx.mjs} +1 -15
  60. package/dist/{dist-m40_XgNh.mjs → dist-Bn8Kodjp.mjs} +1 -1
  61. package/dist/dist-C5fND3R0.mjs +2 -0
  62. package/dist/dist-D7-nEOXi.mjs +2 -0
  63. package/dist/{output-B0cfNSx5.mjs → dist-Dn6nn2IU.mjs} +3 -926
  64. package/dist/{domain-1RhhOVrC.mjs → domain-CITt8lC-.mjs} +7 -5
  65. package/dist/{route-types-Da-DpyUp.mjs → drizzle-Beb2Am5S.mjs} +1 -280
  66. package/dist/{email-Ce6SQq-i.mjs → email-C5kaZXzJ.mjs} +2 -2
  67. package/dist/{email-C-lGh51B.mjs → email-_8VmyX7V.mjs} +14 -12
  68. package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
  69. package/dist/{env-DJHsPE7Z.mjs → env-DV4r3nHz.mjs} +9 -7
  70. package/dist/{env-DBKmK4vc.mjs → env-DX_v-Q-v.mjs} +1 -1
  71. package/dist/env-Yz4HcvHs.mjs +78 -0
  72. package/dist/env-helpers--wFmQ_5Q.mjs +136 -0
  73. package/dist/{env-types-BNPhro-M.mjs → env-types-CWDtqHgw.mjs} +6 -2
  74. package/dist/{env-validation-CF6KvTRf.mjs → env-validation-BsFEXps5.mjs} +19 -28
  75. package/dist/env-validation-DIDGM7h4.mjs +2 -0
  76. package/dist/fetch-CXDChK7B.mjs +18 -0
  77. package/dist/fetch-_SeGZao9.d.mts +57 -0
  78. package/dist/fetch-stream-AOByI7Ki.mjs +81 -0
  79. package/dist/fetch-stream-Bjf0hoZb.d.mts +49 -0
  80. package/dist/gen-BBiIZw6g.mjs +2 -0
  81. package/dist/{gen-B_wPnVTK.mjs → gen-CFOEEc-t.mjs} +13 -11
  82. package/dist/{generate-RTK8_kK1.mjs → generate-C0VY6RVf.mjs} +2 -2
  83. package/dist/{github-cmd-PW7ZnWTp.mjs → github-cmd-jYjha2LO.mjs} +18 -22
  84. package/dist/{handler-D1hLsObx.d.mts → handler-BXJTXd02.d.mts} +6 -1
  85. package/dist/handler-DghKr6dU.mjs +150 -0
  86. package/dist/head-D_QRR5Yd.mjs +112 -0
  87. package/dist/head-client-DzmJGN4C.mjs +90 -0
  88. package/dist/{headers-BAHwgHdW.mjs → headers-B_HBMgi0.mjs} +2 -2
  89. package/dist/{help-CwOX-zmI.mjs → help-C46mnlUS.mjs} +17 -12
  90. package/dist/help-CS_nAsWu.mjs +2 -0
  91. package/dist/index.d.mts +2 -20
  92. package/dist/index.mjs +116 -60
  93. package/dist/{init-BWZ7q5Z4.mjs → init-CSXmvxKu.mjs} +49 -50
  94. package/dist/{link-Rmvu2Wl_.mjs → link-DxMOALXk.mjs} +7 -5
  95. package/dist/{list-DEE2S6mY.mjs → list-0wQs0oYg.mjs} +7 -5
  96. package/dist/live-CB1y5IuC.mjs +411 -0
  97. package/dist/live-CKiJilLr.d.mts +105 -0
  98. package/dist/local-d1-DzykTWY8.mjs +104 -0
  99. package/dist/{login-Uvferzmm.mjs → login-CKk5NX4d.mjs} +6 -11
  100. package/dist/login-Ch9cgWRF.mjs +2 -0
  101. package/dist/{logs-27FenuiC.mjs → logs-hxWBSoej.mjs} +6 -4
  102. package/dist/migrate-CLty4mZR.mjs +2 -0
  103. package/dist/migrate-DcW8F2W8.mjs +285 -0
  104. package/dist/migration-handler-DM4clYj5.d.mts +51 -0
  105. package/dist/{neon-DHwd2zvC.mjs → neon-n74ta1Pr.mjs} +1 -1
  106. package/dist/{node-Ez5KW5rn.mjs → node-Cupyf7-s.mjs} +6 -6
  107. package/dist/{operator-auth-B3e08unv.mjs → operator-auth-BkVgJqv-.mjs} +2 -2
  108. package/dist/{operator-client-LUZnlnYk.mjs → operator-client-A0iex2yi.mjs} +2 -1
  109. package/dist/{operator-cmd-CjOTmAYE.mjs → operator-cmd-BEUYhaHB.mjs} +6 -6
  110. package/dist/output-urU86XeT.mjs +146 -0
  111. package/dist/{package-json-CPoWX79C.mjs → package-json-iCbMg5XF.mjs} +1 -1
  112. package/dist/pages/client.d.mts +5 -2
  113. package/dist/pages/client.mjs +5 -3
  114. package/dist/pages/head-client.mjs +1 -89
  115. package/dist/pages/head.mjs +1 -111
  116. package/dist/pages/index.d.mts +2 -3
  117. package/dist/pages/index.mjs +7 -7
  118. package/dist/pages/islands-plugin.mjs +2 -2
  119. package/dist/pages/prefetch.d.mts +2 -30
  120. package/dist/pages/prefetch.mjs +1 -89
  121. package/dist/pages/protocol.d.mts +2 -2
  122. package/dist/pages/protocol.mjs +3 -3
  123. package/dist/pages/serialize.d.mts +2 -9
  124. package/dist/pages/serialize.mjs +1 -13
  125. package/dist/plan-BEZ8VJW0.mjs +256 -0
  126. package/dist/plan-DpuOr14e.mjs +2 -0
  127. package/dist/{platform-auth-config-DrbQXXiW.mjs → platform-auth-config-Df6yVw-e.mjs} +6 -6
  128. package/dist/{platform-auth-protection-Bhtvp0B_.mjs → platform-auth-protection-Jb0yftay.mjs} +7 -5
  129. package/dist/{platform-auth-recovery-CeOKGVeJ.mjs → platform-auth-recovery-DmRyIfW0.mjs} +6 -5
  130. package/dist/platform-cmd-C9Vt7m-d.mjs +2 -0
  131. package/dist/{platform-cmd-BFhieCdV.mjs → platform-cmd-DRxCOTwy.mjs} +8 -5
  132. package/dist/{platform-domain-C74PULqV.mjs → platform-domain-IjiXgrXJ.mjs} +4 -3
  133. package/dist/{platform-lifecycle-BwAIgz-t.mjs → platform-lifecycle-BquAaU-5.mjs} +263 -56
  134. package/dist/platform-lifecycle-CuJIZNvA.mjs +2 -0
  135. package/dist/{platform-management-COogu_Se.mjs → platform-management-CCQKGsq4.mjs} +12 -7
  136. package/dist/platform-management-Cgyed0WY.mjs +2 -0
  137. package/dist/{platform-recovery-ewqLefp1.mjs → platform-recovery-DS8ih1SW.mjs} +3 -3
  138. package/dist/platform-registry-BJbgZLS1.mjs +431 -0
  139. package/dist/{plugin-inference-BDRfZngg.mjs → plugin-inference-DsvtJLll.mjs} +4 -4
  140. package/dist/prefetch-Bsc_Pb6c.mjs +90 -0
  141. package/dist/prefetch-Ce6la4EI.d.mts +31 -0
  142. package/dist/{prepare-blNRQvQl.mjs → prepare-CaUxODOU.mjs} +3 -2
  143. package/dist/prepare-D4CkM3_v.mjs +2 -0
  144. package/dist/{prepare-CtDJjoOj.mjs → prepare-pcWcxSCh.mjs} +13 -11
  145. package/dist/prerender-render-Cf_WDE9W.mjs +111 -0
  146. package/dist/prerender-render.mjs +1 -110
  147. package/dist/{preset-lAy0B0BQ.mjs → preset-Dowh9tTt.mjs} +16 -118
  148. package/dist/project-BEBFDFLz.mjs +2 -0
  149. package/dist/project-CWNIPoXc.mjs +209 -0
  150. package/dist/{project-cmd-DmZK9Hxf.mjs → project-cmd-2lN--YAX.mjs} +18 -16
  151. package/dist/{project-paths-SK8nMHPp.mjs → project-paths-CKQ-Q5JS.mjs} +47 -14
  152. package/dist/project-slug-23TpquG4.mjs +8 -0
  153. package/dist/project-slug-DofjTFd-.mjs +2 -0
  154. package/dist/{project-team-D8jOJMUJ.mjs → project-team-Dapn9HZn.mjs} +9 -5
  155. package/dist/{project-token-DA34bf-C.mjs → project-token-C90v9SJK.mjs} +6 -4
  156. package/dist/{project-tsconfig-Ql2XsSQp.mjs → project-tsconfig-CwfqUnVp.mjs} +2 -2
  157. package/dist/{protocol-C-pqYJjE.d.mts → protocol-ZH3jP4a7.d.mts} +1 -1
  158. package/dist/providers-BNKRacMr.d.mts +7 -0
  159. package/dist/provision-CNgEBkVA.mjs +3 -0
  160. package/dist/{provision-CSJOjjQk.mjs → provision-Cck2m3jJ.mjs} +11 -25
  161. package/dist/queues-BWKt1Xo4.d.mts +7 -0
  162. package/dist/{requests-CUExwGQQ.mjs → requests-CzX46I0i.mjs} +5 -3
  163. package/dist/resolve-project-BTotl8Nn.mjs +2 -0
  164. package/dist/{resolve-project--Vxawf7z.mjs → resolve-project-Xvis70DG.mjs} +2 -8
  165. package/dist/response-Tn7rU0MV.mjs +30 -0
  166. package/dist/{rollback-CDNGU1gr.mjs → rollback-BEeyc73H.mjs} +6 -4
  167. package/dist/{rolldown-runtime-rQ84J-ij.mjs → rolldown-runtime-DXIUcv95.mjs} +1 -10
  168. package/dist/route-types-Id82-veQ.mjs +280 -0
  169. package/dist/{local-d1-D2I6Ox5F.mjs → runner-BGVsGgkb.mjs} +6 -114
  170. package/dist/runner-CQs_cDSG.mjs +2 -0
  171. package/dist/runner-mysql-1o47achK.mjs +2 -0
  172. package/dist/{runner-mysql-7BPUNGmL.mjs → runner-mysql-BhwMk2Bm.mjs} +2 -9
  173. package/dist/{runner-pg-BkEza-dX.mjs → runner-pg-CJ_JeGF6.mjs} +2 -9
  174. package/dist/runner-pg-D7z01mQS.mjs +2 -0
  175. package/dist/runtime/ai.mjs +1 -1
  176. package/dist/runtime/auth-client-react.d.mts +2 -6
  177. package/dist/runtime/auth-client-react.mjs +1 -5
  178. package/dist/runtime/auth-client-solid.d.mts +2 -6
  179. package/dist/runtime/auth-client-solid.mjs +1 -5
  180. package/dist/runtime/auth-client-svelte.d.mts +2 -6
  181. package/dist/runtime/auth-client-svelte.mjs +1 -5
  182. package/dist/runtime/auth-client-vue.d.mts +2 -6
  183. package/dist/runtime/auth-client-vue.mjs +1 -5
  184. package/dist/runtime/auth-client.d.mts +2 -6
  185. package/dist/runtime/auth-client.mjs +1 -5
  186. package/dist/runtime/auth.mjs +1 -21
  187. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  188. package/dist/runtime/better-auth-mysql.mjs +1 -1
  189. package/dist/runtime/better-auth-pg.d.mts +1 -1
  190. package/dist/runtime/better-auth-pg.mjs +1 -1
  191. package/dist/runtime/better-auth.d.mts +1 -1
  192. package/dist/runtime/better-auth.mjs +1 -1
  193. package/dist/runtime/client-react.d.mts +3 -3
  194. package/dist/runtime/client-react.mjs +3 -3
  195. package/dist/runtime/client-solid.d.mts +3 -3
  196. package/dist/runtime/client-solid.mjs +3 -3
  197. package/dist/runtime/client-svelte.d.mts +3 -3
  198. package/dist/runtime/client-svelte.mjs +3 -3
  199. package/dist/runtime/client-vue.d.mts +3 -3
  200. package/dist/runtime/client-vue.mjs +3 -3
  201. package/dist/runtime/client.d.mts +3 -3
  202. package/dist/runtime/client.mjs +3 -3
  203. package/dist/runtime/db.mjs +1 -1
  204. package/dist/runtime/durable.mjs +1 -1
  205. package/dist/runtime/email/testing.mjs +1 -1
  206. package/dist/runtime/env-helpers.mjs +1 -135
  207. package/dist/runtime/env-public-client.mjs +1 -1
  208. package/dist/runtime/env-public.mjs +2 -2
  209. package/dist/runtime/env.mjs +1 -77
  210. package/dist/runtime/fetch-stream.d.mts +2 -49
  211. package/dist/runtime/fetch-stream.mjs +2 -80
  212. package/dist/runtime/fetch.d.mts +2 -57
  213. package/dist/runtime/fetch.mjs +2 -17
  214. package/dist/runtime/handler.d.mts +1 -1
  215. package/dist/runtime/handler.mjs +1 -149
  216. package/dist/runtime/kv.mjs +1 -1
  217. package/dist/runtime/live-client.d.mts +1 -1
  218. package/dist/runtime/live-server.mjs +2 -2
  219. package/dist/runtime/live.d.mts +2 -104
  220. package/dist/runtime/live.mjs +1 -410
  221. package/dist/runtime/migration-handler-mysql.d.mts +1 -1
  222. package/dist/runtime/migration-handler-pg.d.mts +1 -1
  223. package/dist/runtime/migration-handler.d.mts +2 -50
  224. package/dist/runtime/queues.d.mts +2 -6
  225. package/dist/runtime/queues.mjs +1 -1
  226. package/dist/runtime/remote/index.mjs +49 -8
  227. package/dist/runtime/response.mjs +1 -29
  228. package/dist/runtime/sandbox.d.mts +4 -56
  229. package/dist/runtime/sandbox.mjs +82 -221
  230. package/dist/runtime/sse.mjs +1 -171
  231. package/dist/runtime/storage.mjs +1 -1
  232. package/dist/runtime/validator.d.mts +1 -1
  233. package/dist/runtime/validator.mjs +1 -71
  234. package/dist/runtime/ws-server.d.mts +2 -2
  235. package/dist/runtime/ws-server.mjs +2 -2
  236. package/dist/runtime/ws.d.mts +2 -121
  237. package/dist/{scan-CpK-57ug.mjs → scan-DJbooZm2.mjs} +3 -3
  238. package/dist/{scan-BMH4rzlv.mjs → scan-DdDvRCU1.mjs} +8 -26
  239. package/dist/{secret-Bzzi2e9E.mjs → secret-wnTel5Yw.mjs} +8 -6
  240. package/dist/serialize-BPvnNQuA.mjs +14 -0
  241. package/dist/serialize-CfSwWfF2.d.mts +10 -0
  242. package/dist/{skills-C0RvGjeE.mjs → skills-B-690E7h.mjs} +3 -2
  243. package/dist/sse-BaC1jXko.mjs +172 -0
  244. package/dist/{subcommand-prompt-Bmyn5Rlc.mjs → subcommand-prompt-Gj3VzLIh.mjs} +2 -1
  245. package/dist/sveltekit.d.mts +2 -1
  246. package/dist/sveltekit.mjs +3 -2
  247. package/dist/validate-DqJ33oHj.mjs +2 -0
  248. package/dist/validate-qNhV00PD.mjs +180 -0
  249. package/dist/validator-BTOu0fB0.mjs +72 -0
  250. package/dist/{wrangler--imS8n0d.mjs → wrangler-D01qs6VB.mjs} +259 -71
  251. package/dist/ws-BwcqizuH.d.mts +122 -0
  252. package/dist/{yarn-pnp-DxSInkzL.mjs → yarn-pnp-CVEc3gE7.mjs} +1 -1
  253. package/package.json +19 -8
  254. package/skills/void/SKILL.md +7 -5
  255. package/skills/void/docs/guide/ai.md +3 -3
  256. package/skills/void/docs/guide/app-types.md +12 -11
  257. package/skills/void/docs/guide/auth.md +2 -2
  258. package/skills/void/docs/guide/database/d1.md +1 -1
  259. package/skills/void/docs/guide/database/mysql.md +1 -1
  260. package/skills/void/docs/guide/database/postgresql.md +3 -3
  261. package/skills/void/docs/guide/deployment.md +16 -16
  262. package/skills/void/docs/guide/durable-state.md +2 -2
  263. package/skills/void/docs/guide/edge/headers.md +3 -3
  264. package/skills/void/docs/guide/edge/prerendering.md +1 -1
  265. package/skills/void/docs/guide/edge/redirects.md +4 -4
  266. package/skills/void/docs/guide/edge/revalidation.md +6 -6
  267. package/skills/void/docs/guide/edge/rewrites.md +28 -27
  268. package/skills/void/docs/guide/edge/static-assets.md +1 -1
  269. package/skills/void/docs/guide/email.md +27 -25
  270. package/skills/void/docs/guide/env-migration.md +1 -1
  271. package/skills/void/docs/guide/index.md +1 -1
  272. package/skills/void/docs/guide/pages-routing/head.md +1 -1
  273. package/skills/void/docs/guide/platform/administration/access.md +171 -0
  274. package/skills/void/docs/guide/platform/administration/email.md +121 -0
  275. package/skills/void/docs/guide/platform/administration/operations.md +97 -0
  276. package/skills/void/docs/guide/platform/administration/projects.md +56 -0
  277. package/skills/void/docs/guide/platform/development/local.md +119 -0
  278. package/skills/void/docs/guide/platform/development/runtime.md +124 -0
  279. package/skills/void/docs/guide/platform/development/schema-ci.md +95 -0
  280. package/skills/void/docs/guide/platform/installation/ci.md +58 -0
  281. package/skills/void/docs/guide/platform/installation/credentials.md +90 -0
  282. package/skills/void/docs/guide/platform/installation/domains.md +68 -0
  283. package/skills/void/docs/guide/platform/installation/first-deployment.md +82 -0
  284. package/skills/void/docs/guide/platform/installation/maintenance.md +137 -0
  285. package/skills/void/docs/guide/platform/installation/prerequisites.md +88 -0
  286. package/skills/void/docs/guide/platform/installation/setup.md +169 -0
  287. package/skills/void/docs/guide/platform/installation/uninstall.md +54 -0
  288. package/skills/void/docs/guide/platform-administration.md +6 -414
  289. package/skills/void/docs/guide/platform-development.md +5 -316
  290. package/skills/void/docs/guide/project-collaboration.md +1 -1
  291. package/skills/void/docs/guide/remote-dev.md +2 -2
  292. package/skills/void/docs/guide/sandboxes.md +10 -25
  293. package/skills/void/docs/guide/self-hosted-platform.md +11 -694
  294. package/skills/void/docs/guide/ssg.md +1 -1
  295. package/skills/void/docs/guide/websockets.md +1 -1
  296. package/skills/void/docs/integrations/cloudflare.md +86 -84
  297. package/skills/void/docs/integrations/frameworks/analog.md +14 -9
  298. package/skills/void/docs/integrations/frameworks/astro.md +14 -10
  299. package/skills/void/docs/integrations/frameworks/nuxt.md +14 -9
  300. package/skills/void/docs/integrations/frameworks/overview.md +35 -29
  301. package/skills/void/docs/integrations/frameworks/react-router.md +1 -1
  302. package/skills/void/docs/integrations/frameworks/sveltekit.md +33 -30
  303. package/skills/void/docs/integrations/frameworks/tanstack-start.md +1 -1
  304. package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -5
  305. package/skills/void/docs/reference/api.md +55 -38
  306. package/skills/void/docs/reference/cli.md +60 -34
  307. package/skills/void/docs/reference/config.md +57 -34
  308. package/skills/void/docs/reference/resource-inference.md +10 -10
  309. package/skills/void/docs/reference/structure.md +2 -2
  310. package/dist/validate-tBBN_dXH.mjs +0 -505
@@ -1,9 +1,8 @@
1
- import { n as __exportAll } from "./rolldown-runtime-rQ84J-ij.mjs";
2
- import { l as resolve, n as dirname, o as join } from "./dist-BrsS7cai.mjs";
1
+ import { a as join, n as dirname, u as resolve } from "./dist-4WkAWhWx.mjs";
3
2
  import { i as voidWarn } from "./log-ChfPKsVd.mjs";
4
- import { t as findEnvFile } from "./env-types-BNPhro-M.mjs";
5
- import { a as loadLocalEnv, i as isClientEnvKey, r as findLegacyEnvFiles } from "./env-DBKmK4vc.mjs";
6
- import { o as resolveWranglerArgv } from "./preset-lAy0B0BQ.mjs";
3
+ import { t as findEnvFile } from "./env-types-CWDtqHgw.mjs";
4
+ import { a as loadLocalEnv, i as isClientEnvKey, r as findLegacyEnvFiles } from "./env-DX_v-Q-v.mjs";
5
+ import { o as resolveWranglerArgv } from "./preset-Dowh9tTt.mjs";
7
6
  import { existsSync, readFileSync } from "node:fs";
8
7
  import { pathToFileURL } from "node:url";
9
8
  import { spawn } from "node:child_process";
@@ -71,6 +70,17 @@ async function loadUserEnvFile(envFile) {
71
70
  }
72
71
  }
73
72
  //#endregion
73
+ //#region src/cli/generated-wrangler-config.ts
74
+ /** Parse a generated Wrangler JSON/JSONC config without accepting a partial parse. */
75
+ function readGeneratedWranglerConfigFile(path) {
76
+ const raw = readFileSync(path, "utf8");
77
+ const content = raw.startsWith("") ? raw.slice(1) : raw;
78
+ const errors = [];
79
+ const parsed = parse(content, errors, { allowTrailingComma: true });
80
+ if (errors.length > 0 || parsed === null || typeof parsed !== "object" || Array.isArray(parsed)) throw new Error("Invalid Wrangler JSON/JSONC config.");
81
+ return parsed;
82
+ }
83
+ //#endregion
74
84
  //#region src/cli/env-validation.ts
75
85
  /**
76
86
  * Shared env-schema validation for CLI commands.
@@ -82,25 +92,6 @@ async function loadUserEnvFile(envFile) {
82
92
  * Used by both `void deploy` (hard error on missing prod env) and
83
93
  * `void env check` (CI/pre-push validation).
84
94
  */
85
- var env_validation_exports = /* @__PURE__ */ __exportAll({
86
- SelfHostEnvValidationError: () => SelfHostEnvValidationError,
87
- SelfHostFirstDeployError: () => SelfHostFirstDeployError,
88
- SelfHostSchemaError: () => SelfHostSchemaError,
89
- SelfHostSecretListError: () => SelfHostSecretListError,
90
- computeInvalidEmittedKeys: () => computeInvalidEmittedKeys,
91
- createDefaultSecretListRunner: () => createDefaultSecretListRunner,
92
- deriveSelfHostEnvContextFromVars: () => deriveSelfHostEnvContextFromVars,
93
- deriveSelfHostSchemaFacts: () => deriveSelfHostSchemaFacts,
94
- dischargeSelfHostEnvContext: () => dischargeSelfHostEnvContext,
95
- fetchRemoteSecretNames: () => fetchRemoteSecretNames,
96
- formatEnvReport: () => formatEnvReport,
97
- listSelfHostSecretNames: () => listSelfHostSecretNames,
98
- readEmittedWorkerVars: () => readEmittedWorkerVars,
99
- secretListEnv: () => secretListEnv,
100
- selfHostSchemaFailureMessage: () => selfHostSchemaFailureMessage,
101
- validateProdEnv: () => validateProdEnv,
102
- validateSecretValues: () => validateSecretValues
103
- });
104
95
  /**
105
96
  * Validate plaintext while it is still available to `void secret put/sync`.
106
97
  * Existing remote values remain unreadable and are validated again at worker boot.
@@ -430,12 +421,12 @@ function readGeneratedWranglerConfig(root) {
430
421
  try {
431
422
  return {
432
423
  ok: true,
433
- config: JSON.parse(readFileSync(redirectedPath, "utf-8"))
424
+ config: readGeneratedWranglerConfigFile(redirectedPath)
434
425
  };
435
426
  } catch {
436
427
  return {
437
428
  ok: false,
438
- reason: `generated wrangler config ${redirectedPath} is not valid JSON.`
429
+ reason: `generated wrangler config ${redirectedPath} is not valid JSON/JSONC.`
439
430
  };
440
431
  }
441
432
  }
@@ -794,7 +785,7 @@ function secretListArgs(configPath) {
794
785
  */
795
786
  function isWorkerNotFoundOutput(output) {
796
787
  const normalized = output.replace(/\s+/g, " ");
797
- return /Worker ".*?"(?: \(env: [^)]*\))? not found\./.test(normalized) && normalized.includes("If this is a new Worker, run `wrangler deploy` first to create it.") && normalized.includes("Otherwise, check that the Worker name is correct and you're logged into the right account.");
788
+ return /Worker ".*?"(?: \(env: [^)]*\))? not found\./.test(normalized) && (normalized.includes("[code: 10007]") || normalized.includes("[code: 10090]") || normalized.includes("If this is a new Worker, run `wrangler deploy` first to create it.") && normalized.includes("Otherwise, check that the Worker name is correct and you're logged into the right account."));
798
789
  }
799
790
  /**
800
791
  * Build the THROWN message for a wrangler-run failure from the structural
@@ -1014,4 +1005,4 @@ function secretListEnv(accountId, platform) {
1014
1005
  return env;
1015
1006
  }
1016
1007
  //#endregion
1017
- export { deriveSelfHostEnvContextFromVars as a, fetchRemoteSecretNames as c, readEmittedWorkerVars as d, selfHostSchemaFailureMessage as f, loadUserEnvFile as h, SelfHostSecretListError as i, formatEnvReport as l, validateSecretValues as m, SelfHostFirstDeployError as n, dischargeSelfHostEnvContext as o, validateProdEnv as p, SelfHostSchemaError as r, env_validation_exports as s, SelfHostEnvValidationError as t, listSelfHostSecretNames as u };
1008
+ export { validateSecretValues as _, computeInvalidEmittedKeys as a, deriveSelfHostSchemaFacts as c, formatEnvReport as d, listSelfHostSecretNames as f, validateProdEnv as g, selfHostSchemaFailureMessage as h, SelfHostSecretListError as i, dischargeSelfHostEnvContext as l, secretListEnv as m, SelfHostFirstDeployError as n, createDefaultSecretListRunner as o, readEmittedWorkerVars as p, SelfHostSchemaError as r, deriveSelfHostEnvContextFromVars as s, SelfHostEnvValidationError as t, fetchRemoteSecretNames as u, readGeneratedWranglerConfigFile as v, loadUserEnvFile as y };
@@ -0,0 +1,2 @@
1
+ import { a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars, r as SelfHostSchemaError } from "./env-validation-BsFEXps5.mjs";
2
+ export { SelfHostSchemaError, computeInvalidEmittedKeys, deriveSelfHostSchemaFacts, readEmittedWorkerVars };
@@ -0,0 +1,18 @@
1
+ import { n as ofetch } from "./fetch-error-Dj3crt0e.mjs";
2
+ //#region src/runtime/fetch.ts
3
+ async function fetch(path, options) {
4
+ let url = path;
5
+ if (options?.params) for (const [key, value] of Object.entries(options.params)) url = url.replace(`:${key}`, encodeURIComponent(value));
6
+ return ofetch(url, {
7
+ method: options?.method ?? "GET",
8
+ body: options?.body,
9
+ query: options?.query,
10
+ headers: options?.headers,
11
+ signal: options?.signal,
12
+ baseURL: options?.baseURL,
13
+ retry: options?.retry,
14
+ timeout: options?.timeout
15
+ });
16
+ }
17
+ //#endregion
18
+ export { fetch as t };
@@ -0,0 +1,57 @@
1
+ import { RouteMap } from "void/routes";
2
+ //#region src/runtime/fetch.d.ts
3
+ type MethodsOf<P extends keyof RouteMap> = keyof RouteMap[P] & string;
4
+ type DefaultMethod<P extends keyof RouteMap> = "GET" extends MethodsOf<P> ? "GET" : never;
5
+ type RouteEntry<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteMap[P][M] extends {
6
+ input: infer I;
7
+ output: infer O;
8
+ } ? {
9
+ input: I;
10
+ output: O;
11
+ } : {
12
+ input: {};
13
+ output: unknown;
14
+ };
15
+ type OutputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteEntry<P, M>["output"];
16
+ type InputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteEntry<P, M>["input"];
17
+ type BodyOption<I> = "body" extends keyof I ? {
18
+ body: I["body" & keyof I];
19
+ } : {
20
+ body?: Record<string, unknown> | BodyInit | null;
21
+ };
22
+ type QueryOption<I> = "query" extends keyof I ? {
23
+ query: I["query" & keyof I];
24
+ } : {
25
+ query?: Record<string, string>;
26
+ };
27
+ type ParamsOption<I> = "params" extends keyof I ? {
28
+ params: I["params" & keyof I];
29
+ } : {
30
+ params?: Record<string, string>;
31
+ };
32
+ type HasRequiredInput<P extends keyof RouteMap, M extends MethodsOf<P>> = "body" extends keyof InputOf<P, M> ? true : "query" extends keyof InputOf<P, M> ? true : "params" extends keyof InputOf<P, M> ? true : false;
33
+ type FetchOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption<InputOf<P, M>> & QueryOption<InputOf<P, M>> & ParamsOption<InputOf<P, M>> & {
34
+ method?: M;
35
+ headers?: HeadersInit;
36
+ signal?: AbortSignal;
37
+ baseURL?: string;
38
+ retry?: number;
39
+ timeout?: number;
40
+ };
41
+ /**
42
+ * Typed fetch client for Void API routes.
43
+ *
44
+ * Built on top of ofetch. Supports baseURL, retry, timeout, and all
45
+ * ofetch features while providing full route type safety.
46
+ *
47
+ * ```ts
48
+ * import { fetch } from "void/client";
49
+ *
50
+ * const users = await fetch("/api/users"); // typed!
51
+ * const user = await fetch("/api/users/:id", { params: { id: "1" } });
52
+ * ```
53
+ */
54
+ declare function fetch<P extends keyof RouteMap & string>(path: HasRequiredInput<P, DefaultMethod<P>> extends false ? P : never): Promise<OutputOf<P, DefaultMethod<P>>>;
55
+ declare function fetch<P extends keyof RouteMap & string, M extends MethodsOf<P> = DefaultMethod<P>>(path: P, options: FetchOptions<P, M>): Promise<OutputOf<P, M>>;
56
+ //#endregion
57
+ export { fetch as t };
@@ -0,0 +1,81 @@
1
+ import { n as ofetch } from "./fetch-error-Dj3crt0e.mjs";
2
+ //#region src/runtime/fetch-stream.ts
3
+ /**
4
+ * Consume an SSE endpoint as an async generator of text chunks.
5
+ *
6
+ * Parses Workers AI SSE format (`data: {"response":"chunk"}` + `data: [DONE]`)
7
+ * and plain text SSE (`data: some text`).
8
+ *
9
+ * ```ts
10
+ * import { fetchStream } from "void/client";
11
+ *
12
+ * for await (const chunk of fetchStream("/api/ai/chat", {
13
+ * method: "POST",
14
+ * body: { messages: [{ role: "user", content: "Hello" }] },
15
+ * })) {
16
+ * output += chunk;
17
+ * }
18
+ * ```
19
+ *
20
+ * @yields {string} Text chunks from SSE data frames.
21
+ */
22
+ async function* fetchStream(path, options) {
23
+ let url = path;
24
+ if (options?.params) for (const [key, value] of Object.entries(options.params)) url = url.replace(`:${key}`, encodeURIComponent(value));
25
+ const body = (await ofetch.raw(url, {
26
+ method: options?.method ?? "POST",
27
+ body: options?.body,
28
+ query: options?.query,
29
+ headers: options?.headers,
30
+ signal: options?.signal,
31
+ baseURL: options?.baseURL,
32
+ responseType: "stream"
33
+ }))._data;
34
+ if (!body) return;
35
+ const reader = body.getReader();
36
+ const decoder = new TextDecoder();
37
+ let buffer = "";
38
+ try {
39
+ while (true) {
40
+ const { done, value } = await reader.read();
41
+ if (done) break;
42
+ buffer += decoder.decode(value, { stream: true });
43
+ const lines = buffer.split("\n");
44
+ buffer = lines.pop();
45
+ for (const line of lines) {
46
+ const trimmed = line.trim();
47
+ if (!trimmed || trimmed.startsWith(":")) continue;
48
+ if (trimmed.startsWith("data: ")) {
49
+ const data = trimmed.slice(6);
50
+ if (data === "[DONE]") return;
51
+ try {
52
+ const parsed = JSON.parse(data);
53
+ if (typeof parsed.response === "string") {
54
+ yield parsed.response;
55
+ continue;
56
+ }
57
+ if ("response" in parsed) continue;
58
+ } catch {}
59
+ yield data;
60
+ }
61
+ }
62
+ }
63
+ if (buffer.trim()) {
64
+ const trimmed = buffer.trim();
65
+ if (trimmed.startsWith("data: ")) {
66
+ const data = trimmed.slice(6);
67
+ if (data !== "[DONE]") try {
68
+ const parsed = JSON.parse(data);
69
+ if (typeof parsed.response === "string") yield parsed.response;
70
+ else if (!("response" in parsed)) yield data;
71
+ } catch {
72
+ yield data;
73
+ }
74
+ }
75
+ }
76
+ } finally {
77
+ reader.releaseLock();
78
+ }
79
+ }
80
+ //#endregion
81
+ export { fetchStream as t };
@@ -0,0 +1,49 @@
1
+ import { RouteMap } from "void/routes";
2
+ //#region src/runtime/fetch-stream.d.ts
3
+ type MethodsOf<P extends keyof RouteMap> = keyof RouteMap[P] & string;
4
+ type InputOf<P extends keyof RouteMap, M extends MethodsOf<P>> = RouteMap[P][M] extends {
5
+ input: infer I;
6
+ } ? I : {};
7
+ type BodyOption<I> = "body" extends keyof I ? {
8
+ body: I["body" & keyof I];
9
+ } : {
10
+ body?: Record<string, unknown> | BodyInit | null;
11
+ };
12
+ type QueryOption<I> = "query" extends keyof I ? {
13
+ query: I["query" & keyof I];
14
+ } : {
15
+ query?: Record<string, string>;
16
+ };
17
+ type ParamsOption<I> = "params" extends keyof I ? {
18
+ params: I["params" & keyof I];
19
+ } : {
20
+ params?: Record<string, string>;
21
+ };
22
+ type StreamOptions<P extends keyof RouteMap, M extends MethodsOf<P>> = BodyOption<InputOf<P, M>> & QueryOption<InputOf<P, M>> & ParamsOption<InputOf<P, M>> & {
23
+ method?: M;
24
+ headers?: HeadersInit;
25
+ signal?: AbortSignal;
26
+ baseURL?: string;
27
+ };
28
+ /**
29
+ * Consume an SSE endpoint as an async generator of text chunks.
30
+ *
31
+ * Parses Workers AI SSE format (`data: {"response":"chunk"}` + `data: [DONE]`)
32
+ * and plain text SSE (`data: some text`).
33
+ *
34
+ * ```ts
35
+ * import { fetchStream } from "void/client";
36
+ *
37
+ * for await (const chunk of fetchStream("/api/ai/chat", {
38
+ * method: "POST",
39
+ * body: { messages: [{ role: "user", content: "Hello" }] },
40
+ * })) {
41
+ * output += chunk;
42
+ * }
43
+ * ```
44
+ *
45
+ * @yields {string} Text chunks from SSE data frames.
46
+ */
47
+ declare function fetchStream<P extends keyof RouteMap & string, M extends MethodsOf<P> = "POST" extends MethodsOf<P> ? "POST" : MethodsOf<P>>(path: P, options?: StreamOptions<P, M>): AsyncGenerator<string, void, undefined>;
48
+ //#endregion
49
+ export { fetchStream as t };
@@ -0,0 +1,2 @@
1
+ import { r as runGenCommand } from "./gen-CFOEEc-t.mjs";
2
+ export { runGenCommand };
@@ -1,11 +1,13 @@
1
- import { c as relative, n as dirname, o as join } from "./dist-BrsS7cai.mjs";
2
- import { A as outro, C as cancel, D as log, E as intro, I as isCancel, M as select, r as cliTitle } from "./output-B0cfNSx5.mjs";
3
- import { n as readProjectPaths } from "./project-paths-SK8nMHPp.mjs";
4
- import { c as getDatabaseDialect, f as readConfig } from "./config-uNGuFsI2.mjs";
5
- import { n as ensureProjectTsconfig } from "./project-tsconfig-Ql2XsSQp.mjs";
6
- import { c as collectMigrations, n as listDrizzleArtifacts, t as assertJournalCoherence, u as readJournal } from "./validate-tBBN_dXH.mjs";
7
- import { n as writeDrizzleConfig } from "./config-NOG_U1aK.mjs";
8
- import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DxSInkzL.mjs";
1
+ import { a as join, l as relative, n as dirname } from "./dist-4WkAWhWx.mjs";
2
+ import { r as cliTitle } from "./output-urU86XeT.mjs";
3
+ import { n as readProjectPaths } from "./project-paths-CKQ-Q5JS.mjs";
4
+ import { m as readConfig, u as getDatabaseDialect } from "./config-Dxr6cTXn.mjs";
5
+ import { n as ensureProjectTsconfig } from "./project-tsconfig-CwfqUnVp.mjs";
6
+ import { n as readJournal, t as collectMigrations } from "./collect-DXHNWHcT.mjs";
7
+ import { I as select, O as intro, P as outro, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
8
+ import { t as writeDrizzleConfig } from "./config-BSe70f4T.mjs";
9
+ import { r as listDrizzleArtifacts, t as assertJournalCoherence } from "./validate-qNhV00PD.mjs";
10
+ import { t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-CVEc3gE7.mjs";
9
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, unlinkSync, writeFileSync } from "node:fs";
10
12
  import { fileURLToPath } from "node:url";
11
13
  import { spawnSync } from "node:child_process";
@@ -491,8 +493,8 @@ function runMigration(root, name) {
491
493
  }
492
494
  const configDialect = getDatabaseDialect(readConfig(root));
493
495
  if (configDialect !== journalDialect) {
494
- log.error(`db/migrations/meta/_journal.json was generated for ${journalDialect}, but void.json is configured for ${configDialect}.`);
495
- log.error(`Generating a new custom migration now would append a snapshot in the wrong dialect. Revert void.json's \`database\` field to ${journalDialect}, or drop db/migrations/ and regenerate from scratch.`);
496
+ log.error(`db/migrations/meta/_journal.json was generated for ${journalDialect}, but void.config.ts is configured for ${configDialect}.`);
497
+ log.error(`Generating a new custom migration now would append a snapshot in the wrong dialect. Revert void.config.ts's \`database\` field to ${journalDialect}, or drop db/migrations/ and regenerate from scratch.`);
496
498
  process.exit(1);
497
499
  }
498
500
  const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
@@ -817,4 +819,4 @@ export default function App() {
817
819
  `);
818
820
  }
819
821
  //#endregion
820
- export { formatTimestamp, runGenCommand };
822
+ export { formatTimestamp as n, runGenCommand as r, detectValidator as t };
@@ -1,5 +1,5 @@
1
- import { n as dirname, o as join } from "./dist-BrsS7cai.mjs";
2
- import { c as collectMigrations } from "./validate-tBBN_dXH.mjs";
1
+ import { a as join, n as dirname } from "./dist-4WkAWhWx.mjs";
2
+ import { t as collectMigrations } from "./collect-DXHNWHcT.mjs";
3
3
  import { n as openMigrationValidationDatabase } from "./sqlite-validation-BzKMWnO4.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
5
5
  //#region src/drizzle/generate.ts
@@ -1,7 +1,9 @@
1
- import { C as cancel, D as log, I as isCancel, M as select, P as text, c as import_picocolors, w as confirm } from "./output-B0cfNSx5.mjs";
2
- import { S as readProjectConfig, f as openBrowser, i as createCodeVerifier, l as getToken, n as awaitBrowserCallback, r as createCodeChallenge } from "./auth-DPl6kck4.mjs";
3
- import { n as PlatformClient, o as parsePlatformErrorBody, t as PlatformApiError } from "./client-dHfSJvAN.mjs";
4
- import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project--Vxawf7z.mjs";
1
+ import { c as import_picocolors } from "./output-urU86XeT.mjs";
2
+ import { c as getToken, d as openBrowser, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback } from "./auth-B9_D6ygs.mjs";
3
+ import { o as readProjectConfig } from "./project-CWNIPoXc.mjs";
4
+ import { B as text, E as confirm, I as select, T as cancel, W as isCancel, j as log } from "./dist-Dn6nn2IU.mjs";
5
+ import { n as PlatformClient, o as parsePlatformErrorBody, s as platformErrorMessage, t as PlatformApiError } from "./client-PdAJ-F0t.mjs";
6
+ import { r as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Xvis70DG.mjs";
5
7
  import { t as collectGitDeployMetadata } from "./git-metadata-D-gurjzG.mjs";
6
8
  import { randomBytes } from "node:crypto";
7
9
  //#region src/cli/github-cmd.ts
@@ -30,7 +32,6 @@ function describeConnectError(status, errorCode) {
30
32
  if (code.includes("not active")) return "Installation is not active. Re-install the GitHub App and try again.";
31
33
  }
32
34
  if (status === 400 && code.includes("not accessible")) return "Repository not accessible by this installation. Check the App has access to it.";
33
- if (status === 403) return "You don't have access to this project.";
34
35
  if (status === 404) return "Project or installation not found.";
35
36
  return null;
36
37
  }
@@ -46,6 +47,11 @@ function describeUpdateError(status, errorCode) {
46
47
  if (status === 404 && code.includes("connection not found")) return "This project is not connected to a GitHub repository. Run `void github connect` first.";
47
48
  return describeConnectError(status, code);
48
49
  }
50
+ function describeGithubClientError(error, describe) {
51
+ const body = parsePlatformErrorBody(error.body);
52
+ if (platformErrorMessage(body) || error.status === 403) return error.message;
53
+ return describe(error.status, error.code);
54
+ }
49
55
  /**
50
56
  * Extract `owner/repo` from a `https://github.com/owner/repo(.git)?` URL.
51
57
  * Returns null for non-GitHub URLs or null input.
@@ -518,16 +524,14 @@ async function runConnect(root, client, args) {
518
524
  codeVerifier: grant.codeVerifier
519
525
  });
520
526
  } catch (retryErr) {
521
- if (retryErr instanceof PlatformApiError && retryErr.status === 403) {
527
+ if (retryErr instanceof PlatformApiError && retryErr.status === 403 && retryErr.code === "invalid connect grant") {
522
528
  log.error("connect: GitHub authorization failed or expired. Run `void github connect` again.");
523
529
  process.exit(1);
524
530
  }
525
531
  throw retryErr;
526
532
  }
527
533
  } else {
528
- const body = parsePlatformErrorBody(err.body);
529
- const code = body?.error ?? body?.message ?? "";
530
- const message = describeConnectError(err.status, code);
534
+ const message = describeGithubClientError(err, describeConnectError);
531
535
  if (message !== null) {
532
536
  log.error(`connect: ${message}`);
533
537
  process.exit(1);
@@ -588,9 +592,7 @@ async function runGithubUpdate(root, client, args) {
588
592
  current = await client.getGithubConnection(projectId);
589
593
  } catch (err) {
590
594
  if (err instanceof PlatformApiError) {
591
- const body = parsePlatformErrorBody(err.body);
592
- const code = body?.error ?? body?.message ?? "";
593
- const message = describeUpdateError(err.status, code);
595
+ const message = describeGithubClientError(err, describeUpdateError);
594
596
  if (message !== null) {
595
597
  log.error(`update: ${message}`);
596
598
  process.exit(1);
@@ -668,9 +670,7 @@ async function runGithubUpdate(root, client, args) {
668
670
  updated = await client.updateGithubConnection(projectId, patch);
669
671
  } catch (err) {
670
672
  if (err instanceof PlatformApiError) {
671
- const body = parsePlatformErrorBody(err.body);
672
- const code = body?.error ?? body?.message ?? "";
673
- const message = describeUpdateError(err.status, code);
673
+ const message = describeGithubClientError(err, describeUpdateError);
674
674
  if (message !== null) {
675
675
  log.error(`update: ${message}`);
676
676
  process.exit(1);
@@ -734,9 +734,7 @@ async function runStatus(root, client, args) {
734
734
  connection = await client.getGithubConnection(projectId);
735
735
  } catch (err) {
736
736
  if (err instanceof PlatformApiError) {
737
- const body = parsePlatformErrorBody(err.body);
738
- const code = body?.error ?? body?.message ?? "";
739
- const message = describeUpdateError(err.status, code);
737
+ const message = describeGithubClientError(err, describeUpdateError);
740
738
  if (message !== null) {
741
739
  log.error(`status: ${message}`);
742
740
  process.exit(1);
@@ -803,7 +801,7 @@ async function runGithubDisconnect(root, client, args) {
803
801
  log.info("This project is not connected to a GitHub repository. Nothing to disconnect.");
804
802
  return;
805
803
  }
806
- const message = describeConnectError(err.status, code);
804
+ const message = describeGithubClientError(err, describeConnectError);
807
805
  if (message !== null) {
808
806
  log.error(`disconnect: ${message}`);
809
807
  process.exit(1);
@@ -833,9 +831,7 @@ async function runGithubDisconnect(root, client, args) {
833
831
  await client.deleteGithubConnection(projectId);
834
832
  } catch (err) {
835
833
  if (err instanceof PlatformApiError) {
836
- const body = parsePlatformErrorBody(err.body);
837
- const code = body?.error ?? body?.message ?? "";
838
- const message = describeConnectError(err.status, code);
834
+ const message = describeGithubClientError(err, describeConnectError);
839
835
  if (message !== null) {
840
836
  log.error(`disconnect: ${message}`);
841
837
  process.exit(1);
@@ -80,6 +80,11 @@ interface CloudContextVariables {
80
80
  headDefaults?: HeadDescriptor;
81
81
  [key: string]: unknown;
82
82
  }
83
+ declare global {
84
+ interface VoidGeneratedEnvBindings {
85
+ readonly [key: string]: unknown;
86
+ }
87
+ }
83
88
  /**
84
89
  * Hono `Bindings` shape for Void workers.
85
90
  *
@@ -88,7 +93,7 @@ interface CloudContextVariables {
88
93
  * working for bindings that aren't in the schema (queues, custom
89
94
  * bindings, etc.).
90
95
  */
91
- interface CloudBindings {
96
+ interface CloudBindings extends VoidGeneratedEnvBindings {
92
97
  DB: D1Database;
93
98
  KV: KVNamespace;
94
99
  STORAGE: R2Bucket;
@@ -0,0 +1,150 @@
1
+ import { t as convertReturnValue } from "./response-Tn7rU0MV.mjs";
2
+ import { t as runValidation } from "./validator-BTOu0fB0.mjs";
3
+ //#region src/runtime/handler.ts
4
+ /**
5
+ * Thrown when `c.rewrite()` is called with a destination whose final path
6
+ * segment ends in a known static-asset extension (e.g. `/hero.png`,
7
+ * `/app.css`). Runtime rewrites only reach routes and SSR entries inside
8
+ * the worker — static asset handlers run in front of the worker, so a
9
+ * `c.rewrite()` into an asset path re-enters the Hono router, matches
10
+ * nothing, and returns a 404. Fail at the call site so users reach for
11
+ * static `routing.rewrites` instead of debugging a mystery 404.
12
+ */
13
+ var VoidAssetRewriteError = class extends Error {
14
+ name = "VoidAssetRewriteError";
15
+ constructor(destination) {
16
+ super(`c.rewrite() cannot re-dispatch to a static asset path (${JSON.stringify(destination)}). Runtime rewrites only reach routes and SSR entries inside the worker — static asset handlers run in front of the worker. To rewrite into an asset, use a static \`routing.rewrites\` rule in void.json or a \`200!\` entry in _redirects. See https://void.dev/guide/edge/rewrites#runtime-rewrites-cannot-reach-static-assets`);
17
+ }
18
+ };
19
+ function defineHandler(...args) {
20
+ if (args.length === 1) return args[0];
21
+ const middlewares = args.slice(0, -1);
22
+ const handler = args[args.length - 1];
23
+ return (async (c) => {
24
+ let index = 0;
25
+ const dispatch = async () => {
26
+ if (index < middlewares.length) {
27
+ const middleware = middlewares[index++];
28
+ const middlewareResponse = await middleware(c, dispatch);
29
+ if (middlewareResponse instanceof Response) c.res = middlewareResponse;
30
+ } else c.res = convertReturnValue(await handler(c));
31
+ };
32
+ await dispatch();
33
+ return c.res;
34
+ });
35
+ }
36
+ (function(_defineHandler) {
37
+ function withValidator(validators) {
38
+ return (handler) => {
39
+ return (async (c) => {
40
+ const result = await runValidation(validators, c);
41
+ if (!result.ok) return result.response;
42
+ return convertReturnValue(await handler(c, result.input));
43
+ });
44
+ };
45
+ }
46
+ _defineHandler.withValidator = withValidator;
47
+ })(defineHandler || (defineHandler = {}));
48
+ /**
49
+ * Identity function that provides type inference for middleware.
50
+ * At runtime it simply returns the function passed to it.
51
+ */
52
+ function defineMiddleware(handler) {
53
+ return handler;
54
+ }
55
+ const basicAuthEncoder = new TextEncoder();
56
+ const basicAuthDecoder = new TextDecoder("utf-8", { fatal: true });
57
+ function parseBasicAuthHeader(authorization) {
58
+ if (!authorization?.toLowerCase().startsWith("basic ")) return null;
59
+ try {
60
+ const encoded = authorization.slice(6).trim();
61
+ const binary = atob(encoded);
62
+ const bytes = Uint8Array.from(binary, (char) => char.charCodeAt(0));
63
+ const decoded = basicAuthDecoder.decode(bytes);
64
+ const separator = decoded.indexOf(":");
65
+ if (separator === -1) return null;
66
+ return {
67
+ username: decoded.slice(0, separator),
68
+ password: decoded.slice(separator + 1)
69
+ };
70
+ } catch {
71
+ return null;
72
+ }
73
+ }
74
+ function timingSafeStringEqual(actual, expected) {
75
+ const actualBytes = basicAuthEncoder.encode(actual);
76
+ const expectedBytes = basicAuthEncoder.encode(expected);
77
+ let difference = actualBytes.length ^ expectedBytes.length;
78
+ for (let i = 0; i < expectedBytes.length; i++) difference |= (actualBytes[i] ?? 0) ^ expectedBytes[i];
79
+ return difference === 0;
80
+ }
81
+ function isVoidInternalPath(pathname) {
82
+ return pathname === "/__void" || pathname.startsWith("/__void/");
83
+ }
84
+ function basicAuthChallenge(realm, message) {
85
+ const escapedRealm = realm.replace(/["\\]/g, "\\$&");
86
+ return new Response(message, {
87
+ status: 401,
88
+ headers: {
89
+ "Cache-Control": "no-store",
90
+ "WWW-Authenticate": `Basic realm="${escapedRealm}", charset="UTF-8"`
91
+ }
92
+ });
93
+ }
94
+ function resolveBasicAuthOption(value, fallback) {
95
+ if (value === void 0) return fallback;
96
+ return typeof value === "function" ? value() : value;
97
+ }
98
+ /**
99
+ * Create Basic authentication middleware for temporary site gates and
100
+ * pre-launch protection.
101
+ *
102
+ * Void internal endpoints under `/__void` are always excluded so deploy-time
103
+ * migrations, prerendering, cron/queue dispatch, and remote binding helpers
104
+ * continue to reach Void's own internal-token checks.
105
+ */
106
+ function basicAuth(options) {
107
+ return defineMiddleware(async (c, next) => {
108
+ if (isVoidInternalPath(c.req.path)) {
109
+ await next();
110
+ return;
111
+ }
112
+ const username = resolveBasicAuthOption(options.username, "");
113
+ const password = resolveBasicAuthOption(options.password, "");
114
+ const credentials = parseBasicAuthHeader(c.req.raw.headers.get("Authorization"));
115
+ const usernameMatches = credentials && timingSafeStringEqual(credentials.username, username);
116
+ const passwordMatches = credentials && timingSafeStringEqual(credentials.password, password);
117
+ if (!usernameMatches || !passwordMatches) return basicAuthChallenge(resolveBasicAuthOption(options.realm, "Restricted"), resolveBasicAuthOption(options.message, "Authentication required"));
118
+ await next();
119
+ });
120
+ }
121
+ /**
122
+ * Identity function that provides type inference for scheduled jobs.
123
+ * At runtime it simply returns the function passed to it.
124
+ */
125
+ function defineScheduled(handler) {
126
+ return handler;
127
+ }
128
+ /**
129
+ * Identity function that provides type inference for SSR render entry.
130
+ * The second argument includes asset tags for client scripts/styles.
131
+ */
132
+ function defineRender(handler) {
133
+ return handler;
134
+ }
135
+ /**
136
+ * Identity function that provides type inference for page `head()` exports.
137
+ * At runtime it simply returns the function passed to it.
138
+ */
139
+ function defineHead(handler) {
140
+ return handler;
141
+ }
142
+ /**
143
+ * Identity function that provides type inference for queue consumers.
144
+ * At runtime it simply returns the function passed to it.
145
+ */
146
+ function defineQueue(handler) {
147
+ return handler;
148
+ }
149
+ //#endregion
150
+ export { defineMiddleware as a, defineScheduled as c, defineHead as i, basicAuth as n, defineQueue as o, defineHandler as r, defineRender as s, VoidAssetRewriteError as t };