void 0.20.3 → 0.21.1

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 (296) 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-CzwquNiP.mjs → auth-cmd-g_ymMkUe.mjs} +5 -5
  17. package/dist/{auth-link-ElDTgF7j.mjs → auth-link-DFvxIyZi.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-BpJe6boP.mjs → build-cmd-wJAv808h.mjs} +6 -4
  21. package/dist/{cache-D98YTqeE.mjs → cache-Be0Fu5Ka.mjs} +6 -4
  22. package/dist/{cancel-deploy-CPbEQLMG.mjs → cancel-deploy-BgmyOwhe.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 +944 -0
  27. package/dist/cli/cli.mjs +60 -38
  28. package/dist/cli/env-schema-probe.mjs +3 -3
  29. package/dist/client-DAAivdid.mjs +2 -0
  30. package/dist/{client-BQBrZoCX.mjs → client-PdAJ-F0t.mjs} +6 -12
  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-WCQZ_u3m.mjs → connect-LnvW4HKx.mjs} +8 -6
  49. package/dist/{create-project-D0oXA090.mjs → create-project-BZBl_gQ0.mjs} +8 -23
  50. package/dist/create-project-JV9-6ICF.mjs +2 -0
  51. package/dist/database-provider-Cx525bwX.mjs +6 -0
  52. package/dist/database-provider.mjs +1 -5
  53. package/dist/{db-DJ-9qs3S.mjs → db-Mzv88E1C.mjs} +48 -44
  54. package/dist/{delete-BZ4-WaGm.mjs → delete-Ri6JemSU.mjs} +6 -4
  55. package/dist/deploy-DAH2-m_-.mjs +2 -0
  56. package/dist/{deploy-BAhhcg5q.mjs → deploy-DEsMVrCY.mjs} +796 -198
  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-BxAyhxXN.mjs → domain-BA37Ye7T.mjs} +7 -5
  65. package/dist/{route-types-Da-DpyUp.mjs → drizzle-Beb2Am5S.mjs} +1 -280
  66. package/dist/{email-Bj7Cvdwp.mjs → email-C5NsxrQG.mjs} +14 -12
  67. package/dist/{email-Ce6SQq-i.mjs → email-C5kaZXzJ.mjs} +2 -2
  68. package/dist/{entry-DU3oDoQ3.mjs → entry-DdRFGK0y.mjs} +2 -2
  69. package/dist/{env-DBKmK4vc.mjs → env-DX_v-Q-v.mjs} +1 -1
  70. package/dist/{env-DP_EErve.mjs → env-U_ohASB0.mjs} +9 -7
  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-B87rlalt.mjs +2 -0
  81. package/dist/{gen-B_wPnVTK.mjs → gen-pg-Ojg8Y.mjs} +13 -11
  82. package/dist/{generate-RTK8_kK1.mjs → generate-C0VY6RVf.mjs} +2 -2
  83. package/dist/{github-cmd-C-z_xRrQ.mjs → github-cmd-DsrkweIl.mjs} +6 -4
  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-B403BLBB.mjs +2 -0
  90. package/dist/{help-CwOX-zmI.mjs → help-sBhFH6pi.mjs} +17 -12
  91. package/dist/index.d.mts +2 -20
  92. package/dist/index.mjs +116 -60
  93. package/dist/{init-BGktCXgA.mjs → init-C--Yyj1b.mjs} +49 -50
  94. package/dist/{link-D2kbqhWb.mjs → link-BC-mNG9-.mjs} +7 -5
  95. package/dist/{list-CvkK_G7k.mjs → list-DHU1Wj6c.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-BwiopVdg.mjs +2 -0
  100. package/dist/{login-WIjNc77c.mjs → login-jKe_0QZL.mjs} +6 -11
  101. package/dist/{logs-dLUFCapG.mjs → logs-BG11f5PR.mjs} +6 -4
  102. package/dist/migrate-BV8qHiCb.mjs +285 -0
  103. package/dist/migrate-BXY3B3m7.mjs +2 -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-CKJ7xIRs.mjs → operator-cmd-BwAS2XZt.mjs} +6 -6
  110. package/dist/output-CCH48AMM.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-CdVWRRJr.mjs → platform-auth-config-C-hv-_Ok.mjs} +6 -6
  128. package/dist/{platform-auth-protection-Drl0qhrn.mjs → platform-auth-protection-DjTE5Hj-.mjs} +7 -5
  129. package/dist/{platform-auth-recovery-CmKEWpDo.mjs → platform-auth-recovery-Cr0r8TEb.mjs} +6 -5
  130. package/dist/{platform-cmd-5q_k56xS.mjs → platform-cmd-0tEh2ZtA.mjs} +8 -5
  131. package/dist/platform-cmd-DE6dw45v.mjs +2 -0
  132. package/dist/{platform-domain-4GiDlcqx.mjs → platform-domain-B_7x6Iqx.mjs} +4 -3
  133. package/dist/platform-lifecycle-Dhx9Pnub.mjs +2 -0
  134. package/dist/{platform-lifecycle-R9xAxvtG.mjs → platform-lifecycle-Di0LbhPM.mjs} +208 -37
  135. package/dist/platform-management-B9LUtMt9.mjs +2 -0
  136. package/dist/{platform-management-BfWsXHEW.mjs → platform-management-eaiaU3uM.mjs} +8 -5
  137. package/dist/{platform-recovery-CbK-I1FB.mjs → platform-recovery-BxfA8E5C.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-D4CkM3_v.mjs +2 -0
  143. package/dist/{prepare-blNRQvQl.mjs → prepare-_T-Haxrr.mjs} +3 -2
  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-CTdmnzvc.mjs → project-cmd-DrnRJdep.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-CGxsQe3_.mjs → project-team-CzRbO_kA.mjs} +6 -4
  155. package/dist/{project-token-Cirx7uwZ.mjs → project-token-Bwxjf4y6.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-4Nq59hOr.mjs → requests-DwrqUQZ8.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-Dr7u0Ljx.mjs → rollback-B4tFWmkN.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/response.mjs +1 -29
  227. package/dist/runtime/sandbox.mjs +1 -1
  228. package/dist/runtime/sse.mjs +1 -171
  229. package/dist/runtime/storage.mjs +1 -1
  230. package/dist/runtime/validator.d.mts +1 -1
  231. package/dist/runtime/validator.mjs +1 -71
  232. package/dist/runtime/ws-server.d.mts +2 -2
  233. package/dist/runtime/ws-server.mjs +2 -2
  234. package/dist/runtime/ws.d.mts +2 -121
  235. package/dist/{scan-CpK-57ug.mjs → scan-DJbooZm2.mjs} +3 -3
  236. package/dist/{scan-BMH4rzlv.mjs → scan-DdDvRCU1.mjs} +8 -26
  237. package/dist/{secret-AcPi-FoA.mjs → secret-UtrRjhEO.mjs} +8 -6
  238. package/dist/serialize-BPvnNQuA.mjs +14 -0
  239. package/dist/serialize-CfSwWfF2.d.mts +10 -0
  240. package/dist/{skills-C0RvGjeE.mjs → skills-B-690E7h.mjs} +3 -2
  241. package/dist/sse-BaC1jXko.mjs +172 -0
  242. package/dist/{subcommand-prompt-Bmyn5Rlc.mjs → subcommand-prompt-BuGYkAkC.mjs} +2 -1
  243. package/dist/sveltekit.d.mts +2 -1
  244. package/dist/sveltekit.mjs +3 -2
  245. package/dist/validate-DqJ33oHj.mjs +2 -0
  246. package/dist/validate-qNhV00PD.mjs +180 -0
  247. package/dist/validator-BTOu0fB0.mjs +72 -0
  248. package/dist/{wrangler--imS8n0d.mjs → wrangler-D01qs6VB.mjs} +259 -71
  249. package/dist/ws-BwcqizuH.d.mts +122 -0
  250. package/dist/{yarn-pnp-DxSInkzL.mjs → yarn-pnp-CVEc3gE7.mjs} +1 -1
  251. package/package.json +19 -8
  252. package/skills/void/SKILL.md +6 -4
  253. package/skills/void/docs/guide/ai.md +3 -3
  254. package/skills/void/docs/guide/app-types.md +12 -11
  255. package/skills/void/docs/guide/auth.md +2 -2
  256. package/skills/void/docs/guide/database/d1.md +1 -1
  257. package/skills/void/docs/guide/database/mysql.md +1 -1
  258. package/skills/void/docs/guide/database/postgresql.md +3 -3
  259. package/skills/void/docs/guide/deployment.md +8 -15
  260. package/skills/void/docs/guide/durable-state.md +2 -2
  261. package/skills/void/docs/guide/edge/headers.md +3 -3
  262. package/skills/void/docs/guide/edge/prerendering.md +1 -1
  263. package/skills/void/docs/guide/edge/redirects.md +4 -4
  264. package/skills/void/docs/guide/edge/revalidation.md +6 -6
  265. package/skills/void/docs/guide/edge/rewrites.md +28 -27
  266. package/skills/void/docs/guide/edge/static-assets.md +1 -1
  267. package/skills/void/docs/guide/email.md +60 -66
  268. package/skills/void/docs/guide/env-migration.md +1 -1
  269. package/skills/void/docs/guide/index.md +15 -41
  270. package/skills/void/docs/guide/pages-routing/head.md +1 -1
  271. package/skills/void/docs/guide/platform/administration/access.md +13 -5
  272. package/skills/void/docs/guide/platform/administration/projects.md +3 -1
  273. package/skills/void/docs/guide/platform/installation/ci.md +3 -0
  274. package/skills/void/docs/guide/platform/installation/credentials.md +15 -5
  275. package/skills/void/docs/guide/platform/installation/prerequisites.md +2 -0
  276. package/skills/void/docs/guide/platform/installation/setup.md +1 -1
  277. package/skills/void/docs/guide/quickstart.md +11 -78
  278. package/skills/void/docs/guide/remote-dev.md +2 -2
  279. package/skills/void/docs/guide/sandboxes.md +1 -1
  280. package/skills/void/docs/guide/ssg.md +1 -1
  281. package/skills/void/docs/guide/websockets.md +1 -1
  282. package/skills/void/docs/index.md +17 -17
  283. package/skills/void/docs/integrations/cloudflare.md +91 -96
  284. package/skills/void/docs/integrations/frameworks/analog.md +14 -9
  285. package/skills/void/docs/integrations/frameworks/astro.md +14 -10
  286. package/skills/void/docs/integrations/frameworks/nuxt.md +14 -9
  287. package/skills/void/docs/integrations/frameworks/overview.md +35 -29
  288. package/skills/void/docs/integrations/frameworks/react-router.md +1 -1
  289. package/skills/void/docs/integrations/frameworks/sveltekit.md +33 -30
  290. package/skills/void/docs/integrations/frameworks/tanstack-start.md +1 -1
  291. package/skills/void/docs/integrations/nodejs-bun-deno.md +5 -5
  292. package/skills/void/docs/reference/api.md +21 -4
  293. package/skills/void/docs/reference/cli.md +40 -25
  294. package/skills/void/docs/reference/config.md +58 -35
  295. package/skills/void/docs/reference/structure.md +2 -2
  296. package/dist/validate-tBBN_dXH.mjs +0 -505
@@ -0,0 +1,172 @@
1
+ //#region src/runtime/sse.ts
2
+ const DEFAULT_KEEP_ALIVE_INTERVAL_MS = 15e3;
3
+ const DEFAULT_KEEP_ALIVE_COMMENT = "keep-alive";
4
+ var SseStreamClosedError = class extends Error {
5
+ constructor(message = "sse: stream is closed.") {
6
+ super(message);
7
+ this.name = "SseStreamClosedError";
8
+ }
9
+ };
10
+ function formatSse(message) {
11
+ const textMessage = {
12
+ event: message.event,
13
+ id: message.id,
14
+ retry: message.retry
15
+ };
16
+ if ("data" in message) textMessage.data = serializeData(message.data);
17
+ return formatSseText(textMessage);
18
+ }
19
+ function formatSseText(message) {
20
+ const lines = [];
21
+ if (message.id != null) {
22
+ assertControlField("id", message.id);
23
+ lines.push(`id: ${message.id}`);
24
+ }
25
+ if (message.event != null) {
26
+ assertControlField("event", message.event);
27
+ lines.push(`event: ${message.event}`);
28
+ }
29
+ if (message.retry != null) {
30
+ assertRetry(message.retry);
31
+ lines.push(`retry: ${message.retry}`);
32
+ }
33
+ if ("data" in message) {
34
+ if (typeof message.data !== "string") throw new Error("sse: data must be a string.");
35
+ for (const line of splitLines(message.data)) lines.push(`data: ${line}`);
36
+ }
37
+ return `${lines.join("\n")}\n\n`;
38
+ }
39
+ function getLastEventId(request) {
40
+ return request.headers.get("Last-Event-ID");
41
+ }
42
+ function eventStream(start, options = {}) {
43
+ const encoder = new TextEncoder();
44
+ const { readable, writable } = new TransformStream();
45
+ const writer = writable.getWriter();
46
+ const signalController = new AbortController();
47
+ const headers = buildSseHeaders(options.headers);
48
+ const keepAlive = normalizeKeepAlive(options.keepAlive);
49
+ let keepAliveTimer;
50
+ let closedOnce = false;
51
+ let closeResolve;
52
+ const closed = new Promise((resolve) => {
53
+ closeResolve = resolve;
54
+ });
55
+ const markClosed = () => {
56
+ if (closedOnce) return;
57
+ closedOnce = true;
58
+ if (!signalController.signal.aborted) signalController.abort();
59
+ if (keepAliveTimer != null) {
60
+ clearInterval(keepAliveTimer);
61
+ keepAliveTimer = void 0;
62
+ }
63
+ closeResolve();
64
+ };
65
+ async function close() {
66
+ if (closedOnce) return;
67
+ markClosed();
68
+ await writer.close().catch(() => {});
69
+ }
70
+ async function fail(error) {
71
+ if (closedOnce) return;
72
+ markClosed();
73
+ await writer.abort(error).catch(() => {});
74
+ }
75
+ async function write(text) {
76
+ if (closedOnce) throw new SseStreamClosedError();
77
+ try {
78
+ await writer.write(encoder.encode(text));
79
+ } catch {
80
+ await close();
81
+ throw new SseStreamClosedError();
82
+ }
83
+ }
84
+ const stream = {
85
+ signal: signalController.signal,
86
+ closed,
87
+ send(message) {
88
+ return write(formatSse(message));
89
+ },
90
+ comment(text = "") {
91
+ return write(formatComment(text));
92
+ },
93
+ close
94
+ };
95
+ writer.closed.catch(() => {
96
+ close();
97
+ });
98
+ if (options.signal?.aborted) close();
99
+ else options.signal?.addEventListener("abort", () => void close(), { once: true });
100
+ if (keepAlive) keepAliveTimer = setInterval(() => {
101
+ stream.comment(keepAlive.comment).catch(() => close());
102
+ }, keepAlive.intervalMs);
103
+ queueMicrotask(() => {
104
+ (async () => {
105
+ try {
106
+ await start(stream);
107
+ await close();
108
+ } catch (error) {
109
+ await fail(error);
110
+ }
111
+ })();
112
+ });
113
+ return new Response(readable, { headers });
114
+ }
115
+ function buildSseHeaders(headers) {
116
+ const result = new Headers(headers);
117
+ if (!result.has("Content-Type")) result.set("Content-Type", "text/event-stream; charset=utf-8");
118
+ if (!result.has("Cache-Control")) result.set("Cache-Control", "no-cache, no-transform");
119
+ if (!result.has("X-Accel-Buffering")) result.set("X-Accel-Buffering", "no");
120
+ return result;
121
+ }
122
+ function normalizeKeepAlive(keepAlive) {
123
+ if (keepAlive === false) return null;
124
+ if (keepAlive === true || keepAlive == null) return {
125
+ intervalMs: DEFAULT_KEEP_ALIVE_INTERVAL_MS,
126
+ comment: DEFAULT_KEEP_ALIVE_COMMENT
127
+ };
128
+ const intervalMs = keepAlive.intervalMs ?? DEFAULT_KEEP_ALIVE_INTERVAL_MS;
129
+ if (!Number.isFinite(intervalMs) || intervalMs <= 0) throw new Error("sse: keepAlive.intervalMs must be a positive finite number.");
130
+ return {
131
+ intervalMs,
132
+ comment: keepAlive.comment ?? DEFAULT_KEEP_ALIVE_COMMENT
133
+ };
134
+ }
135
+ function formatComment(text) {
136
+ if (typeof text !== "string") throw new Error("sse: comment text must be a string.");
137
+ return `${splitLines(text).map((line) => `: ${line}`).join("\n")}\n\n`;
138
+ }
139
+ function assertControlField(name, value) {
140
+ if (typeof value !== "string") throw new Error(`sse: ${name} must be a string.`);
141
+ if (hasControlFieldSeparator(value)) throw new Error(`sse: ${name} must not contain CR, LF, or NUL characters.`);
142
+ }
143
+ function hasControlFieldSeparator(value) {
144
+ return value.includes("\r") || value.includes("\n") || value.includes("\0");
145
+ }
146
+ function assertRetry(value) {
147
+ if (!Number.isInteger(value) || value < 0) throw new Error("sse: retry must be a non-negative integer.");
148
+ }
149
+ function isBinaryData(data) {
150
+ return data instanceof ArrayBuffer || ArrayBuffer.isView(data) || typeof Blob !== "undefined" && data instanceof Blob || typeof File !== "undefined" && data instanceof File;
151
+ }
152
+ function serializeData(data) {
153
+ if (typeof data === "string") return data;
154
+ if (data == null) return data === null ? "null" : throwDataSerializationError(data);
155
+ if (typeof data === "function" || typeof data === "symbol") return throwDataSerializationError(data);
156
+ if (isBinaryData(data)) throw new Error("sse: binary data is not supported.");
157
+ try {
158
+ const serialized = JSON.stringify(data);
159
+ if (typeof serialized !== "string") return throwDataSerializationError(data);
160
+ return serialized;
161
+ } catch (error) {
162
+ throw new Error(`sse: data must be JSON-serializable. ${error instanceof Error ? error.message : String(error)}`);
163
+ }
164
+ }
165
+ function throwDataSerializationError(data) {
166
+ throw new Error(`sse: unsupported data value ${String(data)}.`);
167
+ }
168
+ function splitLines(value) {
169
+ return value.split(/\r\n|\r|\n/);
170
+ }
171
+ //#endregion
172
+ export { getLastEventId as a, formatSseText as i, eventStream as n, formatSse as r, SseStreamClosedError as t };
@@ -1,4 +1,5 @@
1
- import { S as S_STEP_SUBMIT, _ as S_CHECKBOX_INACTIVE, b as S_RADIO_INACTIVE, c as import_picocolors, g as S_CHECKBOX_ACTIVE, h as S_BAR_END, m as S_BAR, x as S_STEP_ACTIVE, y as S_RADIO_ACTIVE, z as wrapAnsi } from "./output-B0cfNSx5.mjs";
1
+ import { c as import_picocolors } from "./output-CCH48AMM.mjs";
2
+ import { S as S_STEP_SUBMIT, _ as S_RADIO_ACTIVE, c as S_CHECKBOX_INACTIVE, i as S_BAR_END, q as wrapAnsi, r as S_BAR, s as S_CHECKBOX_ACTIVE, v as S_RADIO_INACTIVE, y as S_STEP_ACTIVE } from "./dist-Dn6nn2IU.mjs";
2
3
  //#region src/cli/subcommand-prompt.ts
3
4
  function promptSubcommand(command, subcommands) {
4
5
  return new Promise((resolve) => {
@@ -9,7 +9,8 @@ export type VoidSvelteKitTsconfigOptions = {
9
9
  };
10
10
  /**
11
11
  * Merge Void's generated tsconfig fragment into SvelteKit's generated
12
- * tsconfig. Use from `kit.typescript.config` in `svelte.config.js`.
12
+ * tsconfig. Use from `typescript.config` in `sveltekit()` or from
13
+ * `kit.typescript.config` in `svelte.config.js`.
13
14
  */
14
15
  export declare function mergeVoidSvelteKitTsconfig(config: Tsconfig, options?: VoidSvelteKitTsconfigOptions): Tsconfig;
15
16
  /**
@@ -1,9 +1,10 @@
1
- import { a as isAbsolute, c as relative, l as resolve, o as join } from "./dist-BrsS7cai.mjs";
1
+ import { a as join, i as isAbsolute, l as relative, u as resolve } from "./dist-4WkAWhWx.mjs";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  //#region src/sveltekit.ts
4
4
  /**
5
5
  * Merge Void's generated tsconfig fragment into SvelteKit's generated
6
- * tsconfig. Use from `kit.typescript.config` in `svelte.config.js`.
6
+ * tsconfig. Use from `typescript.config` in `sveltekit()` or from
7
+ * `kit.typescript.config` in `svelte.config.js`.
7
8
  */
8
9
  function mergeVoidSvelteKitTsconfig(config, options = {}) {
9
10
  const root = options.root ?? process.cwd();
@@ -0,0 +1,2 @@
1
+ import { i as validateMigrations } from "./validate-qNhV00PD.mjs";
2
+ export { validateMigrations };
@@ -0,0 +1,180 @@
1
+ import { a as join } from "./dist-4WkAWhWx.mjs";
2
+ import { n as readJournal, r as stripSqlExt } from "./collect-DXHNWHcT.mjs";
3
+ import { t as DESTRUCTIVE_PRAGMA, u as tokenizeSql } from "./plan-BEZ8VJW0.mjs";
4
+ import { existsSync, readdirSync } from "node:fs";
5
+ //#region src/migrations/validate.ts
6
+ /**
7
+ * Destructive SQL patterns that are rejected unless the migration
8
+ * contains the `-- void:allow-destructive` pragma comment.
9
+ */
10
+ const DESTRUCTIVE_PATTERNS = [
11
+ /\bDROP\s+TABLE\b/i,
12
+ /\bDROP\s+VIEW\b/i,
13
+ /\bDROP\s+INDEX\b/i,
14
+ /\bDROP\s+TRIGGER\b/i,
15
+ /\bALTER\s+TABLE\b[\s\S]*\bDROP\s+COLUMN\b/i,
16
+ /\bALTER\s+TABLE\b[\s\S]*\bRENAME\s+TO\b/i,
17
+ /\bALTER\s+TABLE\b[\s\S]*\bRENAME\s+COLUMN\b/i,
18
+ /\bALTER\s+TABLE\b[\s\S]*\bRENAME\b[\s\S]*\bTO\b/i,
19
+ /\bTRUNCATE\b/i,
20
+ /\bINSERT\s+OR\s+REPLACE\b/i
21
+ ];
22
+ function splitExecutableStatements(sql) {
23
+ return sql.split(";").map((statement) => statement.trim()).filter(Boolean);
24
+ }
25
+ function hasTopLevelKeyword(statement, keyword) {
26
+ let depth = 0;
27
+ for (let index = 0; index < statement.length; index++) {
28
+ const character = statement[index];
29
+ if (character === "(") {
30
+ depth++;
31
+ continue;
32
+ }
33
+ if (character === ")") {
34
+ depth = Math.max(0, depth - 1);
35
+ continue;
36
+ }
37
+ if (depth !== 0) continue;
38
+ if (statement.slice(index, index + keyword.length).toUpperCase() === keyword && !/[A-Z0-9_]/i.test(statement[index - 1] ?? "") && !/[A-Z0-9_]/i.test(statement[index + keyword.length] ?? "")) return true;
39
+ }
40
+ return false;
41
+ }
42
+ function hasUnboundedWrite(statement) {
43
+ if (/^(?:CREATE\s+(?:(?:TEMP|TEMPORARY|UNLOGGED)\s+)?|ALTER\s+)TABLE\b/i.test(statement)) return false;
44
+ if (/\bDELETE\s+FROM\b/i.test(statement)) return !hasTopLevelKeyword(statement, "WHERE");
45
+ if (/\bUPDATE\b[\s\S]*\bSET\b/i.test(statement)) return !hasTopLevelKeyword(statement, "WHERE");
46
+ return false;
47
+ }
48
+ /**
49
+ * Check if a SQL migration contains destructive operations.
50
+ */
51
+ function isDestructive(sql) {
52
+ const normalized = sql.replace(/\r\n?/g, "\n");
53
+ let executable = "";
54
+ for (const segment of tokenizeSql(normalized)) if (segment.kind === "sql") executable += normalized.slice(segment.start, segment.end);
55
+ else executable += " ".repeat(segment.end - segment.start);
56
+ return splitExecutableStatements(executable).some((statement) => {
57
+ return DESTRUCTIVE_PATTERNS.some((pattern) => pattern.test(statement)) || hasUnboundedWrite(statement);
58
+ });
59
+ }
60
+ function hasDestructivePragma(sql) {
61
+ return sql.replace(/\r\n?/g, "\n").split("\n").some((line) => line.trim() === DESTRUCTIVE_PRAGMA);
62
+ }
63
+ /**
64
+ * Validate migration files. Returns the validated list with destructive flags.
65
+ * Throws if any destructive migration lacks the allow-destructive pragma.
66
+ */
67
+ function validateMigrations(files) {
68
+ const results = [];
69
+ const errors = [];
70
+ for (const file of files) {
71
+ const destructive = isDestructive(file.sql);
72
+ if (destructive && !hasDestructivePragma(file.sql)) errors.push(file.name);
73
+ results.push({
74
+ name: file.name,
75
+ sql: file.sql,
76
+ destructive
77
+ });
78
+ }
79
+ if (errors.length > 0) throw new Error(`Destructive migrations detected without pragma:\n` + errors.map((f) => ` - ${f}`).join("\n") + `\n\nAdd "${DESTRUCTIVE_PRAGMA}" to each file to allow the migration locally and on deploy.`);
80
+ return results;
81
+ }
82
+ /**
83
+ * Enumerate drizzle-kit metadata artifacts in a migrations directory.
84
+ * Returns repo-relative paths like `db/migrations/meta/0000_snapshot.json`
85
+ * and `db/migrations/migrations.js`. Empty when none are present.
86
+ *
87
+ * Shared across `assertJournalCoherence`, `void gen migration`, and
88
+ * `void db rename-migrations` so all three agree on what counts as a
89
+ * "partial drizzle-kit state" (journal gone but other metadata lingering).
90
+ */
91
+ function listDrizzleArtifacts(migrationsDir) {
92
+ const metaDir = join(migrationsDir, "meta");
93
+ const snapshotFiles = existsSync(metaDir) ? readdirSync(metaDir).filter((f) => f.endsWith("_snapshot.json")) : [];
94
+ const bundledPath = join(migrationsDir, "migrations.js");
95
+ const out = [];
96
+ for (const f of snapshotFiles) out.push(`db/migrations/meta/${f}`);
97
+ if (existsSync(bundledPath)) out.push("db/migrations/migrations.js");
98
+ return out;
99
+ }
100
+ /**
101
+ * Assert that every `.sql` file under `migrationsDir` has a matching entry
102
+ * in `meta/_journal.json`, and vice versa.
103
+ *
104
+ * Drift is a silent footgun: the local/remote runners apply files directly
105
+ * from disk, but `drizzle-kit generate` only sees what's in the journal.
106
+ * An orphan file created by hand (or by a botched scaffold/merge) gets
107
+ * applied to D1 without Drizzle ever acknowledging it, and a failed
108
+ * deploy can leave the database in a state that is impossible to recover
109
+ * from without manual SQL edits.
110
+ *
111
+ * A missing journal is NOT a drift error. The drift check is a diff
112
+ * between disk and `meta/_journal.json`; with no journal, there is nothing
113
+ * to diff against. Bare-legacy projects — hand-written `.sql` files with no
114
+ * `db/schema.ts`, no drizzle-kit, no `meta/` directory — worked long
115
+ * before this check existed, and the local/remote runners still track
116
+ * applied migrations by filename via `_void_migrations`. Gating those
117
+ * projects here would break `void deploy`, `void db migrate`, `void db
118
+ * reset`, and `void db status` for a valid path with no migration path
119
+ * forward (they cannot run `void db generate` because it requires
120
+ * `db/schema.ts`). We skip the check silently and let the filename-based
121
+ * runners take over.
122
+ *
123
+ * Throws a user-facing error when any mismatch is detected between the
124
+ * journal and disk. Returns silently otherwise.
125
+ */
126
+ function assertJournalCoherence(migrationsDir, collected) {
127
+ const journal = readJournal(migrationsDir);
128
+ const drizzleArtifacts = listDrizzleArtifacts(migrationsDir);
129
+ if (journal === void 0) {
130
+ if (drizzleArtifacts.length > 0) throw new Error([
131
+ "db/migrations/meta/_journal.json is missing, but other drizzle-kit metadata is still present:",
132
+ ...drizzleArtifacts.map((p) => ` - ${p}`),
133
+ "",
134
+ "This is a partial drizzle-kit state. Restore _journal.json from version control, or delete the orphaned metadata files above if you intended to revert to hand-written migrations."
135
+ ].join("\n"));
136
+ return;
137
+ }
138
+ if (journal === null || typeof journal !== "object" || Array.isArray(journal) || typeof journal.version !== "string" || typeof journal.dialect !== "string" || !Array.isArray(journal.entries)) throw new Error("db/migrations/meta/_journal.json is malformed: expected an object with string `version`, string `dialect`, and an `entries` array. Restore the file from version control, or delete it if you intended to revert to hand-written migrations.");
139
+ for (let i = 0; i < journal.entries.length; i++) {
140
+ const entry = journal.entries[i];
141
+ if (entry === null || typeof entry !== "object" || typeof entry.idx !== "number" || typeof entry.version !== "string" || typeof entry.tag !== "string" || typeof entry.breakpoints !== "boolean") throw new Error(`db/migrations/meta/_journal.json is malformed: entry at index ${i} is missing required fields (\`idx\`, \`version\`, \`tag\`, \`breakpoints\`). Restore the file from version control, or delete it if you intended to revert to hand-written migrations.`);
142
+ }
143
+ if (journal.entries.length === 0) {
144
+ if (drizzleArtifacts.length === 0) return;
145
+ throw new Error([
146
+ "db/migrations/meta/_journal.json has no entries, but drizzle-kit metadata is still present:",
147
+ ...drizzleArtifacts.map((p) => ` - ${p}`),
148
+ "",
149
+ "This is a partial drizzle-kit state. Restore _journal.json from version control (or run `void db generate`), or delete the orphaned metadata files above if you intended to revert to hand-written migrations."
150
+ ].join("\n"));
151
+ }
152
+ const tagCounts = /* @__PURE__ */ new Map();
153
+ for (const entry of journal.entries) tagCounts.set(entry.tag, (tagCounts.get(entry.tag) ?? 0) + 1);
154
+ const duplicateTags = [...tagCounts.entries()].filter(([, n]) => n > 1).map(([tag]) => tag);
155
+ if (duplicateTags.length > 0) throw new Error([
156
+ "db/migrations/meta/_journal.json has duplicate migration entries:",
157
+ ...duplicateTags.map((t) => ` - ${t} (appears ${tagCounts.get(t)} times)`),
158
+ "",
159
+ "Each migration must have a unique tag. Restore _journal.json from version control, or hand-edit to remove the duplicates."
160
+ ].join("\n"));
161
+ const journalTags = new Set(journal.entries.map((e) => e.tag));
162
+ const collectedTags = new Set(collected.map((m) => stripSqlExt(m.name)));
163
+ const orphans = collected.map((m) => m.name).filter((name) => !journalTags.has(stripSqlExt(name)));
164
+ const missing = journal.entries.map((e) => `${e.tag}.sql`).filter((file) => !collectedTags.has(stripSqlExt(file)));
165
+ if (orphans.length === 0 && missing.length === 0) return;
166
+ const lines = ["Migration drift detected between db/migrations/ and db/migrations/meta/_journal.json."];
167
+ if (orphans.length > 0) {
168
+ lines.push("", "These files exist on disk but are not tracked in _journal.json:");
169
+ for (const f of orphans) lines.push(` - db/migrations/${f}`);
170
+ lines.push("", "Delete the orphan file(s), or move their contents into `db/schema.ts` and re-run `void db generate`.");
171
+ }
172
+ if (missing.length > 0) {
173
+ lines.push("", "These entries are in _journal.json but the matching file is missing:");
174
+ for (const f of missing) lines.push(` - db/migrations/${f}`);
175
+ lines.push("", "Restore the missing file(s) from version control, or regenerate migrations.");
176
+ }
177
+ throw new Error(lines.join("\n"));
178
+ }
179
+ //#endregion
180
+ export { validateMigrations as i, isDestructive as n, listDrizzleArtifacts as r, assertJournalCoherence as t };
@@ -0,0 +1,72 @@
1
+ //#region src/runtime/validator.ts
2
+ function flattenIssues(issues) {
3
+ return Array.from(issues, (issue) => ({
4
+ message: issue.message,
5
+ path: issue.path?.map((p) => typeof p === "object" ? p.key : p).join(".")
6
+ }));
7
+ }
8
+ async function validateSlot(schema, value) {
9
+ const result = await schema["~standard"].validate(value);
10
+ if (result.issues) return {
11
+ ok: false,
12
+ issues: result.issues
13
+ };
14
+ return {
15
+ ok: true,
16
+ value: result.value
17
+ };
18
+ }
19
+ async function runValidation(validators, c) {
20
+ const input = {};
21
+ const allIssues = [];
22
+ if (validators.params) {
23
+ const raw = c.req.param();
24
+ const result = await validateSlot(validators.params, raw);
25
+ if (result.ok) input.params = result.value;
26
+ else allIssues.push({
27
+ slot: "params",
28
+ issues: flattenIssues(result.issues)
29
+ });
30
+ }
31
+ if (validators.query) {
32
+ const url = new URL(c.req.url);
33
+ const raw = {};
34
+ for (const [key, value] of url.searchParams) raw[key] = value;
35
+ const result = await validateSlot(validators.query, raw);
36
+ if (result.ok) input.query = result.value;
37
+ else allIssues.push({
38
+ slot: "query",
39
+ issues: flattenIssues(result.issues)
40
+ });
41
+ }
42
+ if (validators.body) {
43
+ let raw;
44
+ try {
45
+ raw = await c.req.json();
46
+ } catch {
47
+ return {
48
+ ok: false,
49
+ response: Response.json({ error: "Invalid JSON body" }, { status: 400 })
50
+ };
51
+ }
52
+ const result = await validateSlot(validators.body, raw);
53
+ if (result.ok) input.body = result.value;
54
+ else allIssues.push({
55
+ slot: "body",
56
+ issues: flattenIssues(result.issues)
57
+ });
58
+ }
59
+ if (allIssues.length > 0) return {
60
+ ok: false,
61
+ response: Response.json({
62
+ error: "Validation failed",
63
+ issues: allIssues
64
+ }, { status: 400 })
65
+ };
66
+ return {
67
+ ok: true,
68
+ input
69
+ };
70
+ }
71
+ //#endregion
72
+ export { runValidation as t };