void 0.27.0 → 1.0.3

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 (337) hide show
  1. package/README.md +3 -1
  2. package/dist/{account-cmd-l-FM7Ioq.mjs → account-cmd-BTcUzv9L.mjs} +6 -6
  3. package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
  4. package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-AB_YYWgH.mjs} +118 -135
  5. package/dist/{application-routing-DQyUh_5S.mjs → application-routing-L7V-TFhZ.mjs} +1 -2
  6. package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
  7. package/dist/{auth-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
  8. package/dist/auth-Cbqi1iVX.mjs +1 -0
  9. package/dist/{auth-link-vz9Z2kmG.mjs → auth-link-DUJuvRx5.mjs} +11 -11
  10. package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
  11. package/dist/{auth-router-DvsCUVw4.mjs → auth-router-CIxiMG7i.mjs} +5 -5
  12. package/dist/base64-DVrOndmI.mjs +16 -0
  13. package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
  14. package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
  15. package/dist/{build-cmd-D6we0VjO.mjs → build-cmd-BkIv25PA.mjs} +6 -6
  16. package/dist/{cache-CZRdzKx1.mjs → cache-Ctzfig-W.mjs} +6 -6
  17. package/dist/{cancel-deploy-CQ3NnMvf.mjs → cancel-deploy-CD9o-SsC.mjs} +5 -5
  18. package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
  19. package/dist/{cf-access-BcIBSKqG.mjs → cf-access-CWP4avfP.mjs} +3 -7
  20. package/dist/cf-build-output-BU3hqdHu.mjs +1 -0
  21. package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
  22. package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
  23. package/dist/cli/cli.mjs +199 -312
  24. package/dist/cli/cloudflare-operation-process.mjs +41 -15
  25. package/dist/cli/env-schema-probe.d.mts +7 -44
  26. package/dist/cli/env-schema-probe.mjs +14 -80
  27. package/dist/client-B60PwCC4.mjs +1 -0
  28. package/dist/{client-DlDJuY0s.mjs → client-DM9Kcf4e.mjs} +161 -415
  29. package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
  30. package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-BIAF_BIY.mjs} +7 -6
  31. package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
  32. package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-WjwnVOJA.mjs} +4 -4
  33. package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-B42EZeJy.mjs} +26 -34
  34. package/dist/cloudflare-operations-CrSUFRzJ.mjs +1 -0
  35. package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
  36. package/dist/collect-Cae8A7Zr.mjs +1 -0
  37. package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
  38. package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
  39. package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
  40. package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
  41. package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
  42. package/dist/config-QrJWu0IX.mjs +1 -0
  43. package/dist/config-entry.d.mts +1 -1
  44. package/dist/{connect-BfPBHHm-.mjs → connect-CKtk-EZe.mjs} +9 -9
  45. package/dist/create-project-B-ewF_Af.mjs +1 -0
  46. package/dist/{create-project-BdXEFKal.mjs → create-project-yInGo72M.mjs} +8 -8
  47. package/dist/database-provider.mjs +1 -2
  48. package/dist/{db-Xs80hcaA.mjs → db-7I_gfdVq.mjs} +177 -268
  49. package/dist/db-types-Bb4WBWIs.mjs +49 -0
  50. package/dist/{delete-d2vuou3j.mjs → delete-Cy-M1u-r.mjs} +6 -6
  51. package/dist/deploy-9lgfhrXS.mjs +2 -0
  52. package/dist/deploy-BYYlnsiy.mjs +6164 -0
  53. package/dist/deploy-managed-static-Ca4TFdmx.mjs +1595 -0
  54. package/dist/deploy-transport-DWlWBe6M.mjs +180 -0
  55. package/dist/deploy.d.mts +10 -0
  56. package/dist/deploy.mjs +82 -0
  57. package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
  58. package/dist/discover-ClzFSwns.mjs +1 -0
  59. package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
  60. package/dist/dispatch-DrTTk8Xg.mjs +431 -0
  61. package/dist/{dist-D3m88sjf.mjs → dist-BVdsO7Py.mjs} +5 -6
  62. package/dist/dist-CfgIkieS.mjs +1 -0
  63. package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
  64. package/dist/{domain-BsDUBAvt.mjs → domain-CZGxPv9u.mjs} +8 -23
  65. package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
  66. package/dist/edge.mjs +1 -2
  67. package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
  68. package/dist/{email-_lGAHOhp.mjs → email-DzyNVuoU.mjs} +100 -192
  69. package/dist/email-cloudflare-DfG6UEMm.mjs +1096 -0
  70. package/dist/email-protocol-D9nTvhCp.mjs +82 -0
  71. package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
  72. package/dist/{env-DMA3cXZt.mjs → env-0jrMQJI_.mjs} +6 -14
  73. package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
  74. package/dist/{env-C74QepDE.mjs → env-Nx3yf50r.mjs} +9 -9
  75. package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
  76. package/dist/{env-raw-jZpP5n47.mjs → env-raw-D74P4ebM.mjs} +15 -21
  77. package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
  78. package/dist/env-validation-BT7z-qpQ.mjs +1 -0
  79. package/dist/env-validation-DYxjz_Wo.mjs +488 -0
  80. package/dist/{gen-DtkQhvQg.mjs → gen-CufHEf42.mjs} +132 -254
  81. package/dist/gen-sXyp5DFO.mjs +1 -0
  82. package/dist/generate-ClI89brV.mjs +1 -0
  83. package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
  84. package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
  85. package/dist/{github-cmd-DaDdBbSS.mjs → github-cmd-FU8EjFyU.mjs} +28 -72
  86. package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
  87. package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
  88. package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
  89. package/dist/{help-0bTe_lID.mjs → help-BT2hovNI.mjs} +26 -14
  90. package/dist/help-i2YGGnTH.mjs +1 -0
  91. package/dist/{inbound-PfQDLXc5.mjs → inbound-BuTfm11U.mjs} +71 -222
  92. package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
  93. package/dist/index.d.mts +2 -18
  94. package/dist/index.mjs +714 -762
  95. package/dist/{info-PYWwkWyt.mjs → info-l249eUdH.mjs} +5 -5
  96. package/dist/{init-DaBGmaXC.mjs → init-D0A6M64Q.mjs} +229 -392
  97. package/dist/isr-config-fZaJJ8t7.mjs +165 -0
  98. package/dist/{link-C6fjafep.mjs → link-WMoJFf4i.mjs} +9 -9
  99. package/dist/{list-BTFBlqKl.mjs → list-CQ2EQEHL.mjs} +7 -18
  100. package/dist/{live-CgQuTpqD.mjs → live-BcHoTDFe.mjs} +19 -17
  101. package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
  102. package/dist/load-user-env-DD5qveNU.mjs +49 -0
  103. package/dist/{local-d1-ga5O_idV.mjs → local-d1-BxvQYEFi.mjs} +6 -6
  104. package/dist/{login-GKcNUmtI.mjs → login-C2T1oVG-.mjs} +12 -12
  105. package/dist/login-XD844Xs-.mjs +1 -0
  106. package/dist/{logs-BiMSULmc.mjs → logs-DnC1d7xB.mjs} +6 -6
  107. package/dist/{migrate-NLsjBbuM.mjs → migrate-BDIprOYd.mjs} +70 -22
  108. package/dist/migrate-BRwU-blY.mjs +1 -0
  109. package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
  110. package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
  111. package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
  112. package/dist/mysql-migration-sql-BIS5vbNk.mjs +241 -0
  113. package/dist/nitro.d.mts +30 -0
  114. package/dist/nitro.mjs +88 -0
  115. package/dist/{node-DJicPvPj.mjs → node-cPadMgUO.mjs} +9 -25
  116. package/dist/{operator-args-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
  117. package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
  118. package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
  119. package/dist/operator-cmd-D6gnZsnK.mjs +1 -0
  120. package/dist/{operator-cmd-BT4hgavL.mjs → operator-cmd-DHieWtFp.mjs} +8 -8
  121. package/dist/{output-C50ag2r3.mjs → output-Ba6ZbrzY.mjs} +37 -6
  122. package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
  123. package/dist/pages/client.d.mts +1 -1
  124. package/dist/pages/client.mjs +91 -5
  125. package/dist/pages/head.mjs +1 -2
  126. package/dist/pages/index.d.mts +1 -2
  127. package/dist/pages/index.mjs +6 -6
  128. package/dist/pages/islands-plugin.mjs +5 -83
  129. package/dist/pages/prefetch.mjs +1 -2
  130. package/dist/pages/protocol.d.mts +2 -2
  131. package/dist/pages/protocol.mjs +1 -1
  132. package/dist/pages/serialize.mjs +1 -2
  133. package/dist/plan-CKX_jWnD.mjs +1 -0
  134. package/dist/platform-args-B0HeTh0C.mjs +1 -0
  135. package/dist/{platform-args-DUeXY9Om.mjs → platform-args-CaCL_1Ch.mjs} +43 -60
  136. package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-Z16-I8nT.mjs} +11 -12
  137. package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-BXwZiJSF.mjs} +37 -27
  138. package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-CXjfqyOv.mjs} +9 -10
  139. package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DaAOiWTl.mjs} +16 -16
  140. package/dist/platform-cmd-PT4YwMLM.mjs +1 -0
  141. package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
  142. package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-CxpvUeo0.mjs} +6 -6
  143. package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DBiS0cJd.mjs} +1693 -2120
  144. package/dist/platform-lifecycle-u9pMOvxC.mjs +1 -0
  145. package/dist/{platform-management-CuuVDhyt.mjs → platform-management-DhEFdQAf.mjs} +696 -130
  146. package/dist/platform-management-DvBS83rC.mjs +1 -0
  147. package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-BWn1S2Rv.mjs} +16 -12
  148. package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-BUGOB4RC.mjs} +6 -9
  149. package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
  150. package/dist/{platform-setup-BBxRxmFC.mjs → platform-setup-YvN9VQXV.mjs} +21 -28
  151. package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
  152. package/dist/prepare-CYT6tAzD.mjs +1 -0
  153. package/dist/{prepare-Do96654b.mjs → prepare-DEB5SeVJ.mjs} +12 -13
  154. package/dist/{prepare-Dq9hTIbo.mjs → prepare-PQCgsny0.mjs} +4 -4
  155. package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
  156. package/dist/prerender-render.d.mts +2 -0
  157. package/dist/prerender-render.mjs +1 -2
  158. package/dist/{project-cmd-DaoRrn-8.mjs → project-cmd-DVatD8Ev.mjs} +20 -20
  159. package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
  160. package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
  161. package/dist/project-slug-6cyz8E7k.mjs +1 -0
  162. package/dist/{project-team-Q_lCA7Io.mjs → project-team-DJrWEAG1.mjs} +7 -7
  163. package/dist/{project-token-BArgK9o1.mjs → project-token-CBgLBuL6.mjs} +6 -6
  164. package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
  165. package/dist/project-zdB3fs9G.mjs +1 -0
  166. package/dist/{project-zero-trust-KO9Hu2Pq.mjs → project-zero-trust-92gLtZ25.mjs} +6 -6
  167. package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
  168. package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
  169. package/dist/{provision-BfaLiWbj.mjs → provision-BnSSkiED.mjs} +119 -866
  170. package/dist/{requests-C7Oeoh5u.mjs → requests-7W1Pygt2.mjs} +5 -5
  171. package/dist/resolve-project-PnhzMtY6.mjs +1 -0
  172. package/dist/resolve-project-WpwkCB_c.mjs +48 -0
  173. package/dist/{rollback-DVAtrLAl.mjs → rollback-BcASVnwP.mjs} +8 -18
  174. package/dist/{route-types-CbtsIeFn.mjs → route-types-BZi26DVS.mjs} +9 -91
  175. package/dist/routing-assets-VkrKIbxE.mjs +139 -0
  176. package/dist/{runner-DMBKSrRk.mjs → runner-CabsQ-iM.mjs} +22 -34
  177. package/dist/runner-So9mYfcm.mjs +1 -0
  178. package/dist/runner-mysql-BhRaONkO.mjs +146 -0
  179. package/dist/runner-mysql-DWwE8jKi.mjs +1 -0
  180. package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-BRemq_GX.mjs} +3 -3
  181. package/dist/runner-pg-_Xncr3H5.mjs +1 -0
  182. package/dist/runtime/ai.mjs +23 -25
  183. package/dist/runtime/auth-client-react.mjs +1 -2
  184. package/dist/runtime/auth-client-solid.mjs +1 -2
  185. package/dist/runtime/auth-client-svelte.mjs +1 -2
  186. package/dist/runtime/auth-client-vue.mjs +1 -2
  187. package/dist/runtime/auth-client.mjs +1 -2
  188. package/dist/runtime/auth.mjs +1 -2
  189. package/dist/runtime/better-auth-mysql.d.mts +2 -5
  190. package/dist/runtime/better-auth-mysql.mjs +9 -31
  191. package/dist/runtime/better-auth-pg.d.mts +2 -5
  192. package/dist/runtime/better-auth-pg.mjs +6 -32
  193. package/dist/runtime/better-auth.d.mts +2 -4
  194. package/dist/runtime/better-auth.mjs +9 -19
  195. package/dist/runtime/db.mjs +6 -2
  196. package/dist/runtime/durable.d.mts +18 -1
  197. package/dist/runtime/durable.mjs +26 -2
  198. package/dist/runtime/email/testing.d.mts +1 -1
  199. package/dist/runtime/email/testing.mjs +9 -23
  200. package/dist/runtime/email-protocol.d.mts +12 -0
  201. package/dist/runtime/email-protocol.mjs +1 -70
  202. package/dist/runtime/email.d.mts +1 -1
  203. package/dist/runtime/email.mjs +79 -221
  204. package/dist/runtime/env-public.d.mts +1 -1
  205. package/dist/runtime/env-public.mjs +12 -38
  206. package/dist/runtime/env.d.mts +1 -12
  207. package/dist/runtime/env.mjs +1 -2
  208. package/dist/runtime/handler.d.mts +1 -1
  209. package/dist/runtime/handler.mjs +1 -1
  210. package/dist/runtime/isr.mjs +1 -1
  211. package/dist/runtime/kv.mjs +1 -1
  212. package/dist/runtime/limits.mjs +1 -2
  213. package/dist/runtime/live-client.d.mts +3 -2
  214. package/dist/runtime/live-server.d.mts +2 -1
  215. package/dist/runtime/live-server.mjs +1 -16
  216. package/dist/runtime/live.d.mts +1 -1
  217. package/dist/runtime/live.mjs +1 -2
  218. package/dist/runtime/log.d.mts +2 -1
  219. package/dist/runtime/migration-handler-mysql.d.mts +2 -2
  220. package/dist/runtime/migration-handler-mysql.mjs +39 -8
  221. package/dist/runtime/migration-handler-pg.d.mts +2 -2
  222. package/dist/runtime/migration-handler-pg.mjs +1 -1
  223. package/dist/runtime/migration-handler.d.mts +2 -2
  224. package/dist/runtime/migration-handler.mjs +1 -470
  225. package/dist/runtime/queues.mjs +1 -1
  226. package/dist/runtime/remote/binding-handler.mjs +62 -62
  227. package/dist/runtime/remote/index.mjs +16 -77
  228. package/dist/runtime/response.mjs +1 -2
  229. package/dist/runtime/route-url.mjs +1 -2
  230. package/dist/runtime/routing.d.mts +3 -5
  231. package/dist/runtime/routing.mjs +82 -218
  232. package/dist/runtime/sandbox-container.d.mts +2 -2
  233. package/dist/runtime/sandbox-container.mjs +1 -2
  234. package/dist/runtime/sandbox.d.mts +2 -2
  235. package/dist/runtime/sandbox.mjs +13 -6
  236. package/dist/runtime/seed.d.mts +2 -1
  237. package/dist/runtime/sse.mjs +1 -2
  238. package/dist/runtime/storage.mjs +1 -1
  239. package/dist/runtime/validator.d.mts +1 -1
  240. package/dist/runtime/validator.mjs +1 -2
  241. package/dist/runtime/ws-server.d.mts +4 -4
  242. package/dist/runtime/ws-server.mjs +6 -28
  243. package/dist/runtime/ws.d.mts +1 -1
  244. package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
  245. package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-a9LRUtii.mjs} +13 -2
  246. package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
  247. package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
  248. package/dist/{secret-BvtB7IjY.mjs → secret-bg73f1Ge.mjs} +63 -81
  249. package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
  250. package/dist/{skills-BgVMvQdy.mjs → skills-C_yRTg0g.mjs} +3 -3
  251. package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-Bm3ZlYgA.mjs} +39 -44
  252. package/dist/sveltekit.d.mts +2 -1
  253. package/dist/sveltekit.mjs +1 -1
  254. package/dist/validate-BQFdf0Pi.mjs +1 -0
  255. package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
  256. package/dist/version-metadata-DIrqEHQo.mjs +73 -0
  257. package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
  258. package/dist/wrapper-CwhpNWtH.mjs +663 -0
  259. package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
  260. package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
  261. package/docs/guide/ai.md +8 -2
  262. package/docs/guide/auth.md +2 -0
  263. package/docs/guide/database/mysql.md +14 -3
  264. package/docs/guide/database/postgresql.md +2 -0
  265. package/docs/guide/database.md +3 -5
  266. package/docs/guide/durable-state.md +32 -4
  267. package/docs/guide/platform/administration/access.md +4 -0
  268. package/docs/guide/platform/administration/connected-apps.md +55 -0
  269. package/docs/guide/platform/installation/credentials.md +21 -3
  270. package/docs/guide/platform/installation/domains.md +1 -1
  271. package/docs/guide/platform/installation/maintenance.md +38 -1
  272. package/docs/guide/platform/installation/prerequisites.md +6 -2
  273. package/docs/guide/platform/installation/setup.md +23 -1
  274. package/docs/guide/platform/installation/uninstall.md +6 -1
  275. package/docs/guide/quickstart.md +2 -0
  276. package/docs/guide/sandboxes.md +3 -1
  277. package/docs/guide/self-hosted-platform.md +1 -1
  278. package/docs/integrations/cloudflare.md +2 -2
  279. package/docs/integrations/frameworks/analog.md +3 -11
  280. package/docs/integrations/frameworks/nuxt.md +7 -10
  281. package/docs/integrations/nodejs-bun-deno.md +2 -0
  282. package/docs/reference/api/deploy.md +23 -0
  283. package/docs/reference/api/pages.md +2 -0
  284. package/docs/reference/api.md +3 -1
  285. package/docs/reference/cli/database.md +9 -3
  286. package/docs/reference/cli/platform-installation.md +19 -7
  287. package/docs/reference/cli/setup.md +2 -0
  288. package/docs/reference/config.md +2 -0
  289. package/package.json +39 -36
  290. package/sandbox.Dockerfile +1 -1
  291. package/skills/void/SKILL.md +2 -1
  292. package/dist/auth-LMJcNESe.mjs +0 -2
  293. package/dist/cf-build-output-H9a97vME.mjs +0 -2
  294. package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
  295. package/dist/client-tso2OfcG.mjs +0 -2
  296. package/dist/cloudflare-operations-BlYLlowZ.mjs +0 -2
  297. package/dist/collect-DLyFDiKW.mjs +0 -2
  298. package/dist/config-5r-YpMC-.mjs +0 -2
  299. package/dist/config-B_ggY-IO.mjs +0 -89
  300. package/dist/config-BtSFvXZx.mjs +0 -2
  301. package/dist/config-write-AHGesphx.mjs +0 -61
  302. package/dist/create-project-qFDC45zg.mjs +0 -2
  303. package/dist/deploy-Bqe1PYBw.mjs +0 -10458
  304. package/dist/deploy-VsWsVQkw.mjs +0 -2
  305. package/dist/dev-inbox-CK-UuPob.mjs +0 -297
  306. package/dist/discover-EDUf6JJw.mjs +0 -2
  307. package/dist/dist-Bx1z6Eva.mjs +0 -2
  308. package/dist/dist-_UUlL6bg.mjs +0 -2
  309. package/dist/env-validation-CrVNjsPm.mjs +0 -2
  310. package/dist/env-validation-Dxdx_5wo.mjs +0 -951
  311. package/dist/gen-dA9hW7AV.mjs +0 -2
  312. package/dist/head-client-DzmJGN4C.mjs +0 -90
  313. package/dist/help-DfQYVfGY.mjs +0 -2
  314. package/dist/login-mx_ydhmp.mjs +0 -2
  315. package/dist/migrate-BHp07yJE.mjs +0 -2
  316. package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
  317. package/dist/pages/head-client.d.mts +0 -13
  318. package/dist/pages/head-client.mjs +0 -2
  319. package/dist/plan-CH2G51je.mjs +0 -2
  320. package/dist/platform-args-D4E1PjVw.mjs +0 -2
  321. package/dist/platform-cmd-BbmJiq5O.mjs +0 -2
  322. package/dist/platform-lifecycle-ByAlpkhV.mjs +0 -2
  323. package/dist/platform-management-CBOT4BSM.mjs +0 -2
  324. package/dist/prepare-DRUV-g3X.mjs +0 -2
  325. package/dist/project-DedqCp59.mjs +0 -2
  326. package/dist/project-slug-DofjTFd-.mjs +0 -2
  327. package/dist/provision-Wu9ZBk9L.mjs +0 -2
  328. package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
  329. package/dist/resolve-project-CP8rZs_p.mjs +0 -28
  330. package/dist/runner-9wjsSZx-.mjs +0 -2
  331. package/dist/runner-mysql-CEzKtmFb.mjs +0 -54
  332. package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
  333. package/dist/runner-pg-BGYRFdRp.mjs +0 -2
  334. package/dist/runtime/env-helpers.d.mts +0 -2
  335. package/dist/runtime/env-helpers.mjs +0 -2
  336. package/dist/validate-BJr9LfXy.mjs +0 -2
  337. package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
@@ -1,6 +1,7 @@
1
- import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-GgcMozYz.mjs";
1
+ import { a as validateSourceDir, c as loadVoidConfig } from "./project-paths-DMvEeSau.mjs";
2
2
  import { i as isVoidAuthProvider, t as VOID_AUTH_PROVIDERS } from "./providers-BXuhmuub.mjs";
3
- import { a as parseAddress, n as MimeError } from "./mime-DxCznlJq.mjs";
3
+ import { n as MimeError, s as parseAddress } from "./mime-srOklVVv.mjs";
4
+ import { isRecord } from "@void/deploy-core";
4
5
  //#region src/config.ts
5
6
  const CONFIG_FILE = "void.json";
6
7
  const VALID_TARGETS = /* @__PURE__ */ new Set([
@@ -48,17 +49,18 @@ const VALID_SANDBOX_INSTANCE_TYPES = /* @__PURE__ */ new Set([
48
49
  "standard-3",
49
50
  "standard-4"
50
51
  ]);
52
+ const SANDBOX_STRING_KEYS = [
53
+ "binding",
54
+ "className",
55
+ "containerName",
56
+ "image",
57
+ "imageBuildContext",
58
+ "platformImage"
59
+ ];
60
+ const SANDBOX_KEYS = [...SANDBOX_STRING_KEYS, "instanceType"];
51
61
  /**
52
- * Count anonymous `*` wildcards in a pattern, ignoring the `*` that
53
- * terminates a `:name*` multi-segment named capture.
54
- *
55
- * The shared `compilePattern` (`@void/edge`) emits a distinct `(?<name>.*)`
56
- * group for `:name*` and a `(?<splat>.*)` group for the first bare `*` —
57
- * those don't clash, so a pattern with both a named multi-segment capture and
58
- * a bare splat is legitimate and must validate. Walking raw chars would
59
- * over-count and cause `assertSingleSplat` to reject such patterns.
60
- *
61
- * The identifier character class matches `compilePattern`'s `[A-Za-z0-9_]+`.
62
+ * Count anonymous `*` wildcards, ignoring the `*` that ends a `:name*` capture:
63
+ * `compilePattern` (`@void/edge`) gives `:name*` its own group, so it never clashes with a splat.
62
64
  */
63
65
  function countSplats(source) {
64
66
  return source.replace(/:[A-Za-z0-9_]+\*/g, "").match(/\*/g)?.length ?? 0;
@@ -74,19 +76,8 @@ function assertSingleSplat(source, kind) {
74
76
  if (count > 1) throw new Error(`${kind} source "${source}" in ${CONFIG_FILE} must contain at most one "*" wildcard (got ${count}); the matched portion is captured once as :splat`);
75
77
  }
76
78
  /**
77
- * Reject patterns whose compilation would produce duplicate named-capture
78
- * groups, which makes `new RegExp()` throw `SyntaxError: Duplicate capture
79
- * group name` at request time. Two cases:
80
- *
81
- * 1. Two `:name` (or `:name` + trailing `*`) tokens with the same
82
- * identifier — e.g. `/:id/:id`, or two named-multi-segment captures
83
- * sharing a name.
84
- * 2. A `:splat` (named) token alongside a bare `*` — both compile to a
85
- * `(?<splat>...)` group.
86
- *
87
- * The runtime skips a rule whose pattern fails to compile
88
- * (`runtime/routing.ts`), but failing at config-read with a precise message
89
- * is friendlier than a log warning.
79
+ * Reject patterns that compile to duplicate named groups (`/:id/:id`, or `:splat`
80
+ * with a bare `*`). The runtime would only skip such a rule with a log warning.
90
81
  */
91
82
  function assertUniqueCaptureNames(source, kind) {
92
83
  const seen = /* @__PURE__ */ new Set();
@@ -104,15 +95,7 @@ function assertUniqueCaptureNames(source, kind) {
104
95
  throw new Error(`${kind} source "${source}" in ${CONFIG_FILE} has duplicate capture group name(s) (${names}); each :name token must be unique within a pattern, and :splat collides with a bare "*"`);
105
96
  }
106
97
  }
107
- /**
108
- * Predicate for the "protocol-relative" shape: a leading `//` parses as
109
- * `//host/path` → `https://host/path`, which silently turns an intended
110
- * in-worker rewrite/redirect into a cross-origin proxy.
111
- *
112
- * Shared by the config validators below and the `_redirects` parser
113
- * (`cli/headers.ts`). `c.rewrite()` in `runtime/routing.ts` has an equivalent
114
- * check for runtime input; it runs in the Worker and cannot import this module.
115
- */
98
+ /** A leading `//` parses as `https://host/path`, so an internal rule would proxy cross-origin. */
116
99
  function isProtocolRelative(dest) {
117
100
  return dest.startsWith("//");
118
101
  }
@@ -120,35 +103,12 @@ function assertNotProtocolRelative(dest, source, kind) {
120
103
  if (!isProtocolRelative(dest)) return;
121
104
  throw new Error(`${kind} destination for "${source}" in ${CONFIG_FILE} must not start with "//" (protocol-relative URLs parse as cross-origin; ${kind === "Redirect" ? "use a single-slash path for internal redirects or an explicit \"https://...\" URL for external" : "only internal paths are supported"})`);
122
105
  }
123
- /**
124
- * Strict literal-hostname regex used by `parseHostPrefixedSource` to validate
125
- * the host portion of an `https://host/path` rule source. Mirrors
126
- * `LITERAL_HOSTNAME_REGEX` in `packages/deploy-core/src/validate.ts` and the
127
- * regex in `platform/packages/api/src/routes/domains.ts`. Rejects scheme
128
- * prefixes, ports, paths, whitespace, control chars, wildcards, single-label
129
- * hosts, IPv4 literals, and userinfo. The host is lowercased before testing so the
130
- * same byte-exact form reaches dispatch (which compares against the
131
- * lowercase `url.hostname`).
132
- */
133
106
  const LITERAL_HOSTNAME_REGEX = /^([a-z0-9]([a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/;
134
107
  /**
135
- * Split an optional `https://host/path` prefix from a rule source.
136
- *
137
- * Path-only sources (no scheme) are returned as `{ host: undefined, path }`.
138
- * Sources starting with `https://` have the host portion extracted and
139
- * lowercase-normalized; the remaining path becomes `path` (including the
140
- * leading `/`, which the caller may further validate).
141
- *
142
- * Rejected (returns `{ error }`):
143
- * - `http://...` — TLS terminates upstream of the dispatch worker; only
144
- * `https://` requests ever reach the runtime, so an `http://`-scoped rule
145
- * physically cannot fire.
146
- * - `//host/path` — protocol-relative; ambiguous and rejected by the same
147
- * reasoning.
148
- * - `https://` with a wildcarded, ported, or otherwise non-literal host
149
- * (v1 only supports literal hosts).
150
- * - `https://` with no path (`https://host`) — accepted and normalized to
151
- * `https://host/` so the path is always non-empty.
108
+ * Split an optional `https://host` prefix from a rule source. The host is
109
+ * lowercased (dispatch compares `url.hostname`), and a bare `https://host` gets
110
+ * path `/`. Returns `{ error }` for `//` and `http://` sources (only HTTPS
111
+ * requests reach the runtime) and for non-literal hosts.
152
112
  */
153
113
  function parseHostPrefixedSource(raw) {
154
114
  if (raw.startsWith("//")) return { error: `must not start with "//" (protocol-relative URLs are ambiguous; use "/path" for path-only or "https://host/path")` };
@@ -177,6 +137,20 @@ function assertNoQueryString(dest, source, kind) {
177
137
  if (!dest.includes("?")) return;
178
138
  throw new Error(`${kind} destination for "${source}" in ${CONFIG_FILE} must not contain "?" (query strings are not supported in ${kind.toLowerCase()} destinations; the incoming request's query is preserved automatically)`);
179
139
  }
140
+ function validateRewriteMap(value, kind) {
141
+ if (!isRecord(value)) throw new Error(`"routing.${kind.toLowerCase()}s" in ${CONFIG_FILE} must be an object`);
142
+ for (const [source, dest] of Object.entries(value)) {
143
+ const parsed = parseHostPrefixedSource(source);
144
+ if ("error" in parsed) throw new Error(`${kind} source "${source}" in ${CONFIG_FILE}: ${parsed.error}`);
145
+ if (!parsed.path.startsWith("/")) throw new Error(`${kind} source "${source}" in ${CONFIG_FILE} must start with "/" (or be "https://host/path" with a path-absolute path)`);
146
+ assertSingleSplat(parsed.path, kind);
147
+ assertUniqueCaptureNames(parsed.path, kind);
148
+ if (typeof dest !== "string") throw new Error(`${kind} destination for "${source}" in ${CONFIG_FILE} must be a string`);
149
+ if (!dest.startsWith("/")) throw new Error(`${kind} destination for "${source}" in ${CONFIG_FILE} must start with "/" (only internal paths are supported)`);
150
+ assertNotProtocolRelative(dest, source, kind);
151
+ assertNoQueryString(dest, source, kind);
152
+ }
153
+ }
180
154
  /** Old flat keys that have moved into namespaces. */
181
155
  const MIGRATION_ERRORS = {
182
156
  bindings: "\"bindings\" has moved to \"inference.bindings\"",
@@ -205,9 +179,8 @@ function validateConfig(config, source = CONFIG_FILE) {
205
179
  throw error;
206
180
  }
207
181
  }
208
- function validateConfigObject(config) {
209
- if (typeof config !== "object" || config === null || Array.isArray(config)) throw new Error(`config: ${CONFIG_FILE} must be a JSON object.`);
210
- const obj = config;
182
+ function validateConfigObject(obj) {
183
+ if (!isRecord(obj)) throw new Error(`config: ${CONFIG_FILE} must be a JSON object.`);
211
184
  for (const [key, message] of Object.entries(MIGRATION_ERRORS)) if (obj[key] !== void 0) throw new Error(`config: ${message} in ${CONFIG_FILE}.`);
212
185
  if (obj.sourceDir !== void 0) {
213
186
  if (typeof obj.sourceDir !== "string") throw new Error(`config: "sourceDir" in ${CONFIG_FILE} must be a string.`);
@@ -220,7 +193,7 @@ function validateConfigObject(config) {
220
193
  if (typeof obj.output !== "string" || !VALID_OUTPUTS.has(obj.output)) throw new Error(`config: "output" in ${CONFIG_FILE} must be one of: server, static.`);
221
194
  }
222
195
  if (obj.auth !== void 0) {
223
- if (typeof obj.auth !== "object" || obj.auth === null || Array.isArray(obj.auth)) throw new Error(`config: "auth" in ${CONFIG_FILE} must be an object.`);
196
+ if (!isRecord(obj.auth)) throw new Error(`config: "auth" in ${CONFIG_FILE} must be an object.`);
224
197
  const auth = obj.auth;
225
198
  for (const key of Object.keys(auth)) if (key !== "providers") throw new Error(`config: Unknown key 'auth.${key}' in ${CONFIG_FILE}. Valid: providers.`);
226
199
  if (auth.providers !== void 0) {
@@ -236,13 +209,13 @@ function validateConfigObject(config) {
236
209
  }
237
210
  }
238
211
  if (obj.head !== void 0) {
239
- if (typeof obj.head !== "object" || obj.head === null || Array.isArray(obj.head)) throw new Error(`config: "head" in ${CONFIG_FILE} must be an object.`);
212
+ if (!isRecord(obj.head)) throw new Error(`config: "head" in ${CONFIG_FILE} must be an object.`);
240
213
  const h = obj.head;
241
214
  if (h.title !== void 0 && typeof h.title !== "string") throw new Error(`config: "head.title" in ${CONFIG_FILE} must be a string.`);
242
215
  if (h.titleTemplate !== void 0 && typeof h.titleTemplate !== "string") throw new Error(`config: "head.titleTemplate" in ${CONFIG_FILE} must be a string.`);
243
216
  if (h.meta !== void 0) {
244
217
  if (!Array.isArray(h.meta)) throw new Error(`config: "head.meta" in ${CONFIG_FILE} must be an array.`);
245
- for (const entry of h.meta) if (typeof entry !== "object" || entry === null || Array.isArray(entry)) throw new Error(`config: "head.meta" entries in ${CONFIG_FILE} must be objects.`);
218
+ for (const entry of h.meta) if (!isRecord(entry)) throw new Error(`config: "head.meta" entries in ${CONFIG_FILE} must be objects.`);
246
219
  }
247
220
  if (h.link !== void 0) {
248
221
  if (!Array.isArray(h.link)) throw new Error(`config: "head.link" in ${CONFIG_FILE} must be an array.`);
@@ -251,14 +224,14 @@ function validateConfigObject(config) {
251
224
  if (!Array.isArray(h.script)) throw new Error(`config: "head.script" in ${CONFIG_FILE} must be an array.`);
252
225
  }
253
226
  if (h.htmlAttrs !== void 0) {
254
- if (typeof h.htmlAttrs !== "object" || h.htmlAttrs === null || Array.isArray(h.htmlAttrs)) throw new Error(`config: "head.htmlAttrs" in ${CONFIG_FILE} must be an object.`);
227
+ if (!isRecord(h.htmlAttrs)) throw new Error(`config: "head.htmlAttrs" in ${CONFIG_FILE} must be an object.`);
255
228
  }
256
229
  if (h.bodyAttrs !== void 0) {
257
- if (typeof h.bodyAttrs !== "object" || h.bodyAttrs === null || Array.isArray(h.bodyAttrs)) throw new Error(`config: "head.bodyAttrs" in ${CONFIG_FILE} must be an object.`);
230
+ if (!isRecord(h.bodyAttrs)) throw new Error(`config: "head.bodyAttrs" in ${CONFIG_FILE} must be an object.`);
258
231
  }
259
232
  }
260
233
  if (obj.routing !== void 0) {
261
- if (typeof obj.routing !== "object" || obj.routing === null || Array.isArray(obj.routing)) throw new Error(`config: "routing" in ${CONFIG_FILE} must be an object.`);
234
+ if (!isRecord(obj.routing)) throw new Error(`config: "routing" in ${CONFIG_FILE} must be an object.`);
262
235
  const routing = obj.routing;
263
236
  if (routing.notFound !== void 0) {
264
237
  if (typeof routing.notFound !== "string" || !VALID_NOT_FOUND_HANDLING.has(routing.notFound)) throw new Error(`config: "routing.notFound" in ${CONFIG_FILE} must be one of: ${[...VALID_NOT_FOUND_HANDLING].join(", ")}.`);
@@ -267,91 +240,57 @@ function validateConfigObject(config) {
267
240
  if (routing.revalidate !== void 0) {
268
241
  if (typeof routing.revalidate === "number") {
269
242
  if (!Number.isFinite(routing.revalidate) || routing.revalidate < 0) throw new Error(`config: "routing.revalidate" in ${CONFIG_FILE} must be a non-negative finite number.`);
270
- } else if (typeof routing.revalidate === "object" && routing.revalidate !== null && !Array.isArray(routing.revalidate)) {
271
- const r = routing.revalidate;
272
- for (const [pattern, value] of Object.entries(r)) {
273
- if (pattern !== "*" && !pattern.startsWith("/")) throw new Error(`config: "routing.revalidate" key '${pattern}' in ${CONFIG_FILE} must start with "/" or be "*".`);
274
- if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new Error(`config: "routing.revalidate" value for '${pattern}' in ${CONFIG_FILE} must be a non-negative finite number.`);
275
- }
276
- } else throw new Error(`config: "routing.revalidate" in ${CONFIG_FILE} must be a number or an object of path patterns to numbers.`);
243
+ } else if (isRecord(routing.revalidate)) for (const [pattern, value] of Object.entries(routing.revalidate)) {
244
+ if (pattern !== "*" && !pattern.startsWith("/")) throw new Error(`config: "routing.revalidate" key '${pattern}' in ${CONFIG_FILE} must start with "/" or be "*".`);
245
+ if (typeof value !== "number" || !Number.isFinite(value) || value < 0) throw new Error(`config: "routing.revalidate" value for '${pattern}' in ${CONFIG_FILE} must be a non-negative finite number.`);
246
+ }
247
+ else throw new Error(`config: "routing.revalidate" in ${CONFIG_FILE} must be a number or an object of path patterns to numbers.`);
277
248
  }
278
249
  if (routing.prerender !== void 0) {
279
250
  if (!Array.isArray(routing.prerender) || !routing.prerender.every((p) => typeof p === "string")) throw new Error(`config: "routing.prerender" in ${CONFIG_FILE} must be an array of strings.`);
280
251
  for (const p of routing.prerender) if (!p.startsWith("/")) throw new Error(`config: "routing.prerender" path '${p}' in ${CONFIG_FILE} must start with "/".`);
281
252
  }
282
253
  if (routing.headers !== void 0) {
283
- if (typeof routing.headers !== "object" || routing.headers === null || Array.isArray(routing.headers)) throw new Error(`config: "routing.headers" in ${CONFIG_FILE} must be an object.`);
284
- const h = routing.headers;
285
- for (const [pattern, values] of Object.entries(h)) {
254
+ if (!isRecord(routing.headers)) throw new Error(`config: "routing.headers" in ${CONFIG_FILE} must be an object.`);
255
+ for (const [pattern, values] of Object.entries(routing.headers)) {
286
256
  if (!pattern.startsWith("/")) throw new Error(`config: Header pattern '${pattern}' in ${CONFIG_FILE} must start with "/".`);
287
257
  assertSingleSplat(pattern, "Header");
288
258
  if (!Array.isArray(values) || !values.every((v) => typeof v === "string")) throw new Error(`config: Headers for '${pattern}' in ${CONFIG_FILE} must be an array of strings.`);
289
259
  }
290
260
  }
291
261
  if (routing.redirects !== void 0) {
292
- if (typeof routing.redirects !== "object" || routing.redirects === null || Array.isArray(routing.redirects)) throw new Error(`config: "routing.redirects" in ${CONFIG_FILE} must be an object.`);
293
- const r = routing.redirects;
294
- for (const [source, dest] of Object.entries(r)) {
262
+ if (!isRecord(routing.redirects)) throw new Error(`config: "routing.redirects" in ${CONFIG_FILE} must be an object.`);
263
+ for (const [source, dest] of Object.entries(routing.redirects)) {
295
264
  const parsed = parseHostPrefixedSource(source);
296
265
  if ("error" in parsed) throw new Error(`config: Redirect source '${source}' in ${CONFIG_FILE}: ${parsed.error}.`);
297
266
  if (!parsed.path.startsWith("/")) throw new Error(`config: Redirect source '${source}' in ${CONFIG_FILE} must start with "/" (or be "https://host/path" with a path-absolute path).`);
298
267
  assertSingleSplat(parsed.path, "Redirect");
299
268
  assertUniqueCaptureNames(parsed.path, "Redirect");
300
- if (typeof dest === "string") {
301
- if (dest.startsWith("/")) assertNotProtocolRelative(dest, source, "Redirect");
302
- } else if (typeof dest === "object" && dest !== null && !Array.isArray(dest)) {
303
- const d = dest;
304
- if (typeof d.to !== "string") throw new Error(`config: Redirect for '${source}' in ${CONFIG_FILE} must have a "to" string.`);
305
- if (d.to.startsWith("/")) assertNotProtocolRelative(d.to, source, "Redirect");
306
- if (d.status !== void 0 && !VALID_REDIRECT_STATUSES.has(d.status)) throw new Error(`config: Redirect status for '${source}' in ${CONFIG_FILE} must be 301, 302, 303, 307, or 308.`);
269
+ if (typeof dest === "string") assertNotProtocolRelative(dest, source, "Redirect");
270
+ else if (isRecord(dest)) {
271
+ if (typeof dest.to !== "string") throw new Error(`config: Redirect for '${source}' in ${CONFIG_FILE} must have a "to" string.`);
272
+ assertNotProtocolRelative(dest.to, source, "Redirect");
273
+ if (dest.status !== void 0 && !VALID_REDIRECT_STATUSES.has(dest.status)) throw new Error(`config: Redirect status for '${source}' in ${CONFIG_FILE} must be 301, 302, 303, 307, or 308.`);
307
274
  } else throw new Error(`config: Redirect for '${source}' in ${CONFIG_FILE} must be a string or an object with "to" and optional "status".`);
308
275
  }
309
276
  }
310
277
  if (routing.revalidateQueryAllowlist !== void 0) {
311
- if (typeof routing.revalidateQueryAllowlist !== "object" || routing.revalidateQueryAllowlist === null || Array.isArray(routing.revalidateQueryAllowlist)) throw new Error(`"routing.revalidateQueryAllowlist" in ${CONFIG_FILE} must be an object`);
278
+ if (!isRecord(routing.revalidateQueryAllowlist)) throw new Error(`"routing.revalidateQueryAllowlist" in ${CONFIG_FILE} must be an object`);
312
279
  for (const [pattern, params] of Object.entries(routing.revalidateQueryAllowlist)) {
313
280
  if (pattern !== "*" && !pattern.startsWith("/")) throw new Error(`config: revalidateQueryAllowlist pattern '${pattern}' in ${CONFIG_FILE} must start with "/" or be "*".`);
314
281
  if (pattern !== "*") assertSingleSplat(pattern, "revalidateQueryAllowlist");
315
282
  if (!Array.isArray(params) || !params.every((v) => typeof v === "string")) throw new Error(`config: revalidateQueryAllowlist for '${pattern}' in ${CONFIG_FILE} must be an array of strings.`);
316
283
  }
317
284
  }
318
- if (routing.rewrites !== void 0) {
319
- if (typeof routing.rewrites !== "object" || routing.rewrites === null || Array.isArray(routing.rewrites)) throw new Error(`"routing.rewrites" in ${CONFIG_FILE} must be an object`);
320
- const rw = routing.rewrites;
321
- for (const [source, dest] of Object.entries(rw)) {
322
- const parsed = parseHostPrefixedSource(source);
323
- if ("error" in parsed) throw new Error(`Rewrite source "${source}" in ${CONFIG_FILE}: ${parsed.error}`);
324
- if (!parsed.path.startsWith("/")) throw new Error(`Rewrite source "${source}" in ${CONFIG_FILE} must start with "/" (or be "https://host/path" with a path-absolute path)`);
325
- assertSingleSplat(parsed.path, "Rewrite");
326
- assertUniqueCaptureNames(parsed.path, "Rewrite");
327
- if (typeof dest !== "string") throw new Error(`Rewrite destination for "${source}" in ${CONFIG_FILE} must be a string`);
328
- if (!dest.startsWith("/")) throw new Error(`Rewrite destination for "${source}" in ${CONFIG_FILE} must start with "/" (only internal paths are supported)`);
329
- assertNotProtocolRelative(dest, source, "Rewrite");
330
- assertNoQueryString(dest, source, "Rewrite");
331
- }
332
- }
333
- if (routing.fallbacks !== void 0) {
334
- if (typeof routing.fallbacks !== "object" || routing.fallbacks === null || Array.isArray(routing.fallbacks)) throw new Error(`"routing.fallbacks" in ${CONFIG_FILE} must be an object`);
335
- const fb = routing.fallbacks;
336
- for (const [source, dest] of Object.entries(fb)) {
337
- const parsed = parseHostPrefixedSource(source);
338
- if ("error" in parsed) throw new Error(`Fallback source "${source}" in ${CONFIG_FILE}: ${parsed.error}`);
339
- if (!parsed.path.startsWith("/")) throw new Error(`Fallback source "${source}" in ${CONFIG_FILE} must start with "/" (or be "https://host/path" with a path-absolute path)`);
340
- assertSingleSplat(parsed.path, "Fallback");
341
- assertUniqueCaptureNames(parsed.path, "Fallback");
342
- if (typeof dest !== "string") throw new Error(`Fallback destination for "${source}" in ${CONFIG_FILE} must be a string`);
343
- if (!dest.startsWith("/")) throw new Error(`Fallback destination for "${source}" in ${CONFIG_FILE} must start with "/" (only internal paths are supported)`);
344
- assertNotProtocolRelative(dest, source, "Fallback");
345
- assertNoQueryString(dest, source, "Fallback");
346
- }
347
- }
285
+ if (routing.rewrites !== void 0) validateRewriteMap(routing.rewrites, "Rewrite");
286
+ if (routing.fallbacks !== void 0) validateRewriteMap(routing.fallbacks, "Fallback");
348
287
  }
349
288
  if (obj.inference !== void 0) {
350
- if (typeof obj.inference !== "object" || obj.inference === null || Array.isArray(obj.inference)) throw new Error(`config: "inference" in ${CONFIG_FILE} must be an object.`);
289
+ if (!isRecord(obj.inference)) throw new Error(`config: "inference" in ${CONFIG_FILE} must be an object.`);
351
290
  const inf = obj.inference;
352
291
  if (inf.auth !== void 0) throw new Error(`config: "inference.auth" in ${CONFIG_FILE} is no longer supported. Use auth.ts or import from "void/auth"/"void/client" instead.`);
353
292
  if (inf.bindings !== void 0) {
354
- if (typeof inf.bindings !== "object" || inf.bindings === null || Array.isArray(inf.bindings)) throw new Error(`config: "inference.bindings" in ${CONFIG_FILE} must be an object.`);
293
+ if (!isRecord(inf.bindings)) throw new Error(`config: "inference.bindings" in ${CONFIG_FILE} must be an object.`);
355
294
  const b = inf.bindings;
356
295
  for (const key of Object.keys(b)) {
357
296
  if (![
@@ -377,31 +316,15 @@ function validateConfigObject(config) {
377
316
  if (inf.outputDir !== void 0 && typeof inf.outputDir !== "string") throw new Error(`config: "inference.outputDir" in ${CONFIG_FILE} must be a string.`);
378
317
  }
379
318
  if (obj.remote !== void 0 && typeof obj.remote !== "boolean") throw new Error(`config: "remote" in ${CONFIG_FILE} must be a boolean.`);
380
- if (obj.sandbox !== void 0) {
381
- if (typeof obj.sandbox === "boolean") {} else if (typeof obj.sandbox === "object" && obj.sandbox !== null && !Array.isArray(obj.sandbox)) {
382
- const sandbox = obj.sandbox;
383
- for (const key of Object.keys(sandbox)) if (![
384
- "binding",
385
- "className",
386
- "containerName",
387
- "image",
388
- "imageBuildContext",
389
- "platformImage",
390
- "instanceType"
391
- ].includes(key)) throw new Error(`config: Unknown key 'sandbox.${key}' in ${CONFIG_FILE}. Valid: binding, className, containerName, image, imageBuildContext, platformImage, instanceType.`);
392
- for (const key of [
393
- "binding",
394
- "className",
395
- "containerName",
396
- "image",
397
- "imageBuildContext",
398
- "platformImage"
399
- ]) if (sandbox[key] !== void 0 && typeof sandbox[key] !== "string") throw new Error(`config: "sandbox.${key}" in ${CONFIG_FILE} must be a string.`);
400
- if (sandbox.instanceType !== void 0 && (typeof sandbox.instanceType !== "string" || !VALID_SANDBOX_INSTANCE_TYPES.has(sandbox.instanceType))) throw new Error(`config: "sandbox.instanceType" in ${CONFIG_FILE} must be one of: ${[...VALID_SANDBOX_INSTANCE_TYPES].join(", ")}.`);
401
- } else throw new Error(`config: "sandbox" in ${CONFIG_FILE} must be a boolean or an object.`);
319
+ if (obj.sandbox !== void 0 && typeof obj.sandbox !== "boolean") {
320
+ if (!isRecord(obj.sandbox)) throw new Error(`config: "sandbox" in ${CONFIG_FILE} must be a boolean or an object.`);
321
+ const sandbox = obj.sandbox;
322
+ for (const key of Object.keys(sandbox)) if (!SANDBOX_KEYS.includes(key)) throw new Error(`config: Unknown key 'sandbox.${key}' in ${CONFIG_FILE}. Valid: ${SANDBOX_KEYS.join(", ")}.`);
323
+ for (const key of SANDBOX_STRING_KEYS) if (sandbox[key] !== void 0 && typeof sandbox[key] !== "string") throw new Error(`config: "sandbox.${key}" in ${CONFIG_FILE} must be a string.`);
324
+ if (sandbox.instanceType !== void 0 && (typeof sandbox.instanceType !== "string" || !VALID_SANDBOX_INSTANCE_TYPES.has(sandbox.instanceType))) throw new Error(`config: "sandbox.instanceType" in ${CONFIG_FILE} must be one of: ${[...VALID_SANDBOX_INSTANCE_TYPES].join(", ")}.`);
402
325
  }
403
326
  if (obj.worker !== void 0) {
404
- if (typeof obj.worker !== "object" || obj.worker === null || Array.isArray(obj.worker)) throw new Error(`config: "worker" in ${CONFIG_FILE} must be an object.`);
327
+ if (!isRecord(obj.worker)) throw new Error(`config: "worker" in ${CONFIG_FILE} must be an object.`);
405
328
  const w = obj.worker;
406
329
  if (w.compatibility_date !== void 0) {
407
330
  if (typeof w.compatibility_date !== "string") throw new Error(`config: "worker.compatibility_date" in ${CONFIG_FILE} must be a string.`);
@@ -411,11 +334,11 @@ function validateConfigObject(config) {
411
334
  if (!Array.isArray(w.compatibility_flags) || !w.compatibility_flags.every((f) => typeof f === "string")) throw new Error(`config: "worker.compatibility_flags" in ${CONFIG_FILE} must be an array of strings.`);
412
335
  }
413
336
  if (w.vars !== void 0) {
414
- if (typeof w.vars !== "object" || w.vars === null || Array.isArray(w.vars)) throw new Error(`config: "worker.vars" in ${CONFIG_FILE} must be an object.`);
337
+ if (!isRecord(w.vars)) throw new Error(`config: "worker.vars" in ${CONFIG_FILE} must be an object.`);
415
338
  for (const [key, value] of Object.entries(w.vars)) if (typeof value !== "string") throw new Error(`config: "worker.vars.${key}" in ${CONFIG_FILE} must be a string.`);
416
339
  }
417
340
  if (w.limits !== void 0) {
418
- if (typeof w.limits !== "object" || w.limits === null || Array.isArray(w.limits)) throw new Error(`config: "worker.limits" in ${CONFIG_FILE} must be an object.`);
341
+ if (!isRecord(w.limits)) throw new Error(`config: "worker.limits" in ${CONFIG_FILE} must be an object.`);
419
342
  const limits = w.limits;
420
343
  for (const key of Object.keys(limits)) if (key !== "cpu_ms") throw new Error(`config: Unknown key 'worker.limits.${key}' in ${CONFIG_FILE}. Valid: cpu_ms.`);
421
344
  if (limits.cpu_ms !== void 0) {
@@ -424,14 +347,14 @@ function validateConfigObject(config) {
424
347
  }
425
348
  }
426
349
  if (obj.cloudflare !== void 0) {
427
- if (typeof obj.cloudflare !== "object" || obj.cloudflare === null || Array.isArray(obj.cloudflare)) throw new Error(`config: "cloudflare" in ${CONFIG_FILE} must be an object.`);
350
+ if (!isRecord(obj.cloudflare)) throw new Error(`config: "cloudflare" in ${CONFIG_FILE} must be an object.`);
428
351
  }
429
352
  if (obj.deploy !== void 0) {
430
- if (typeof obj.deploy !== "object" || obj.deploy === null || Array.isArray(obj.deploy)) throw new Error(`config: "deploy" in ${CONFIG_FILE} must be an object.`);
353
+ if (!isRecord(obj.deploy)) throw new Error(`config: "deploy" in ${CONFIG_FILE} must be an object.`);
431
354
  const deploy = obj.deploy;
432
355
  for (const key of Object.keys(deploy)) if (key !== "cloudflare") throw new Error(`config: Unknown key 'deploy.${key}' in ${CONFIG_FILE}. Valid: cloudflare.`);
433
356
  if (deploy.cloudflare !== void 0) {
434
- if (typeof deploy.cloudflare !== "object" || deploy.cloudflare === null || Array.isArray(deploy.cloudflare)) throw new Error(`config: "deploy.cloudflare" in ${CONFIG_FILE} must be an object.`);
357
+ if (!isRecord(deploy.cloudflare)) throw new Error(`config: "deploy.cloudflare" in ${CONFIG_FILE} must be an object.`);
435
358
  const cloudflareDeploy = deploy.cloudflare;
436
359
  for (const key of Object.keys(cloudflareDeploy)) if (key !== "mode") throw new Error(`config: Unknown key 'deploy.cloudflare.${key}' in ${CONFIG_FILE}. Valid: mode.`);
437
360
  if (cloudflareDeploy.mode !== void 0 && cloudflareDeploy.mode !== "staged" && cloudflareDeploy.mode !== "atomic") throw new Error(`config: "deploy.cloudflare.mode" in ${CONFIG_FILE} must be "staged" or "atomic".`);
@@ -441,13 +364,13 @@ function validateConfigObject(config) {
441
364
  if (typeof obj.database !== "string" || !VALID_DATABASE_VALUES.has(obj.database)) throw new Error(`config: "database" in ${CONFIG_FILE} must be "pg" or "mysql".`);
442
365
  }
443
366
  if (obj.ai !== void 0) {
444
- if (typeof obj.ai !== "object" || obj.ai === null || Array.isArray(obj.ai)) throw new Error(`config: "ai" in ${CONFIG_FILE} must be an object.`);
367
+ if (!isRecord(obj.ai)) throw new Error(`config: "ai" in ${CONFIG_FILE} must be an object.`);
445
368
  const aiCfg = obj.ai;
446
369
  for (const key of Object.keys(aiCfg)) if (key !== "gateway") throw new Error(`config: Unknown key 'ai.${key}' in ${CONFIG_FILE}. Valid: gateway.`);
447
370
  if (aiCfg.gateway !== void 0 && (typeof aiCfg.gateway !== "string" || aiCfg.gateway.length === 0)) throw new Error(`config: "ai.gateway" in ${CONFIG_FILE} must be a non-empty string.`);
448
371
  }
449
372
  if (obj.email !== void 0) {
450
- if (typeof obj.email !== "object" || obj.email === null || Array.isArray(obj.email)) throw new Error(`config: "email" in ${CONFIG_FILE} must be an object.`);
373
+ if (!isRecord(obj.email)) throw new Error(`config: "email" in ${CONFIG_FILE} must be an object.`);
451
374
  const emailCfg = obj.email;
452
375
  for (const key of Object.keys(emailCfg)) if (key !== "from") throw new Error(`config: Unknown key 'email.${key}' in ${CONFIG_FILE}. Valid: from.`);
453
376
  if (emailCfg.from !== void 0) parseEmailFrom(emailCfg.from);
@@ -468,7 +391,7 @@ function validateConfigObject(config) {
468
391
  function parseEmailFrom(value) {
469
392
  if (typeof value !== "string" || value.length === 0) throw new Error(`config: "email.from" in ${CONFIG_FILE} must be a non-empty string.`);
470
393
  try {
471
- return parseAddress(value, "email.from");
394
+ parseAddress(value, "email.from");
472
395
  } catch (error) {
473
396
  const detail = error instanceof MimeError ? ` ${error.message}` : "";
474
397
  throw new Error(`config: "email.from" in ${CONFIG_FILE} must be a single email address, optionally with a display name (e.g. "Acme <noreply@mail.acme.com>").${detail}`);
@@ -580,23 +503,7 @@ function convertRedirectsConfig(redirects) {
580
503
  * if the input is empty or undefined.
581
504
  */
582
505
  function convertRewritesConfig(rewrites) {
583
- if (!rewrites) return;
584
- const origin = "void.json#routing.rewrites";
585
- const rules = [];
586
- for (const [rawSource, destination] of Object.entries(rewrites)) {
587
- const parsed = parseHostPrefixedSource(rawSource);
588
- if ("error" in parsed) throw new Error(`convertRewritesConfig: source "${rawSource}": ${parsed.error}`);
589
- const { host, path } = parsed;
590
- rules.push({
591
- source: path,
592
- destination,
593
- status: 200,
594
- force: true,
595
- origin,
596
- ...host && { host }
597
- });
598
- }
599
- return rules.length > 0 ? rules : void 0;
506
+ return convertRewriteRules("convertRewritesConfig", rewrites, "rewrites", true);
600
507
  }
601
508
  /**
602
509
  * Convert the `fallbacks` config field into `DevRedirectRule[]` with status 200.
@@ -608,18 +515,21 @@ function convertRewritesConfig(rewrites) {
608
515
  * Returns undefined if the input is empty or undefined.
609
516
  */
610
517
  function convertFallbacksConfig(fallbacks) {
611
- if (!fallbacks) return;
612
- const origin = "void.json#routing.fallbacks";
518
+ return convertRewriteRules("convertFallbacksConfig", fallbacks, "fallbacks", false);
519
+ }
520
+ function convertRewriteRules(caller, entries, field, force) {
521
+ if (!entries) return;
522
+ const origin = `void.json#routing.${field}`;
613
523
  const rules = [];
614
- for (const [rawSource, destination] of Object.entries(fallbacks)) {
524
+ for (const [rawSource, destination] of Object.entries(entries)) {
615
525
  const parsed = parseHostPrefixedSource(rawSource);
616
- if ("error" in parsed) throw new Error(`convertFallbacksConfig: source "${rawSource}": ${parsed.error}`);
526
+ if ("error" in parsed) throw new Error(`${caller}: source "${rawSource}": ${parsed.error}`);
617
527
  const { host, path } = parsed;
618
528
  rules.push({
619
529
  source: path,
620
530
  destination,
621
531
  status: 200,
622
- force: false,
532
+ force,
623
533
  origin,
624
534
  ...host && { host }
625
535
  });
@@ -627,4 +537,4 @@ function convertFallbacksConfig(fallbacks) {
627
537
  return rules.length > 0 ? rules : void 0;
628
538
  }
629
539
  //#endregion
630
- export { convertFallbacksConfig as a, convertRewritesConfig as c, isNodeTarget as d, isProtocolRelative as f, validateConfig as g, resolveBindingNames as h, assertUniqueCaptureNames as i, countSplats as l, readConfig as m, VALID_REDIRECT_STATUSES as n, convertHeadersConfig as o, parseHostPrefixedSource as p, assertSingleSplat as r, convertRedirectsConfig as s, VALID_NOT_FOUND_HANDLING as t, getDatabaseDialect as u };
540
+ export { convertRewritesConfig as a, isNodeTarget as c, readConfig as d, resolveBindingNames as f, convertRedirectsConfig as i, isProtocolRelative as l, convertFallbacksConfig as n, countSplats as o, validateConfig as p, convertHeadersConfig as r, getDatabaseDialect as s, VALID_REDIRECT_STATUSES as t, parseHostPrefixedSource as u };
@@ -1,4 +1,4 @@
1
- import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
1
+ import { n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { pathToFileURL } from "node:url";
4
4
  import { parseSync } from "vite";
@@ -0,0 +1 @@
1
+ export { t as PLACEHOLDER_DB_URL, n as withPrivateDrizzleConfig, r as writeDrizzleConfig } from "./config-BEm9vRvS.mjs";
@@ -1,4 +1,4 @@
1
- import { t as VoidConfig } from "./config-CSa15FvD.mjs";
1
+ import { t as VoidConfig } from "./config-7qoq2p9v.mjs";
2
2
  //#region src/config-entry.d.ts
3
3
  /** Define a typed Void project configuration without loading the Vite plugin. */
4
4
  export declare function defineConfig<const T extends VoidConfig>(config: T): T;
@@ -1,12 +1,12 @@
1
- import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-Cjv2Qf0r.mjs";
2
- import { c as writePlatformSelection, n as readDeploymentPlatform, s as writeDeploymentPlatform } from "./project-BAm2aB6Q.mjs";
3
- import { d as readPlatformToken } from "./auth-Dn2vw-SG.mjs";
4
- import { K as select, L as log, tt as isCancel } from "./dist-D3m88sjf.mjs";
5
- import { d as printSuccess } from "./output-C50ag2r3.mjs";
6
- import { a as isExpiredTokenError, r as PlatformClient } from "./client-DlDJuY0s.mjs";
7
- import { t as promptForLoginToken } from "./login-GKcNUmtI.mjs";
8
- import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-BbY1dWiM.mjs";
9
- import { t as connectCloudflare } from "./cloudflare-connect-2G3rL2rP.mjs";
1
+ import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-B9mWX9LO.mjs";
2
+ import { c as writeDeploymentPlatform, l as writePlatformSelection, n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
3
+ import { d as readPlatformToken } from "./auth-B6iOCjKI.mjs";
4
+ import { K as select, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
5
+ import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
6
+ import { a as isExpiredTokenError, r as PlatformClient } from "./client-DM9Kcf4e.mjs";
7
+ import { t as promptForLoginToken } from "./login-C2T1oVG-.mjs";
8
+ import { i as saveDiscoveredPlatform, n as promptPlatformUrl, t as discoverPlatform } from "./platform-cmd-DaAOiWTl.mjs";
9
+ import { t as connectCloudflare } from "./cloudflare-connect-WjwnVOJA.mjs";
10
10
  //#region src/cli/connect.ts
11
11
  async function selectVoidPlatform(interactive) {
12
12
  if (!interactive) throw new Error("connect: Supply a Void platform URL in non-interactive mode.");
@@ -0,0 +1 @@
1
+ export { t as createProjectWithSlugRetry } from "./create-project-yInGo72M.mjs";
@@ -1,10 +1,10 @@
1
- import { l as writeProjectConfig, t as attachSelectedPlatform } from "./project-BAm2aB6Q.mjs";
2
- import { s as getSiteDomain } from "./auth-Dn2vw-SG.mjs";
3
- import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-D3m88sjf.mjs";
4
- import { f as sanitizeTerminalText, l as import_picocolors } from "./output-C50ag2r3.mjs";
5
- import { n as PlatformApiError } from "./client-DlDJuY0s.mjs";
1
+ import { t as attachSelectedPlatform, u as writeProjectConfig } from "./project-rqDnVsJN.mjs";
2
+ import { s as getSiteDomain } from "./auth-B6iOCjKI.mjs";
3
+ import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
+ import { f as import_picocolors, h as sanitizeTerminalText } from "./output-Ba6ZbrzY.mjs";
5
+ import { n as PlatformApiError } from "./client-DM9Kcf4e.mjs";
6
6
  import { t as validateProjectSlug } from "./project-slug-23TpquG4.mjs";
7
- import { n as inferDefaultSlug } from "./resolve-project-CP8rZs_p.mjs";
7
+ import { n as inferDefaultSlug } from "./resolve-project-WpwkCB_c.mjs";
8
8
  //#region src/cli/prompt.ts
9
9
  async function promptProjectSetupAction(message = "Set up a Void project:", options = {}) {
10
10
  const result = await select({
@@ -76,7 +76,7 @@ async function promptProjectSlug(defaultSlug) {
76
76
  * caller's prompt callback returns `undefined` (cancel).
77
77
  *
78
78
  * The shared retry loop keeps `promptAndCreateProject` (deploy/link paths)
79
- * and the AI-setup path in `index.ts` in sync.
79
+ * and the AI-setup path in `plugin-ai-setup.ts` in sync.
80
80
  */
81
81
  async function createProjectWithSlugRetry(client, initialDefaultSlug, promptSlug) {
82
82
  let defaultSlug = initialDefaultSlug;
@@ -109,7 +109,7 @@ async function promptAndCreateProject(root, client, options = {}) {
109
109
  projectId: project.id,
110
110
  slug: project.slug
111
111
  };
112
- if (options.link !== false) writeProjectConfig(root, attachSelectedPlatform(root, config, client.apiUrl));
112
+ if (options.link !== false) writeProjectConfig(root, attachSelectedPlatform(config, client.apiUrl));
113
113
  if (project.owner_email_destination) {
114
114
  const { address } = project.owner_email_destination;
115
115
  log.info(`Registering ${address} as a recipient for this project. Cloudflare emails it a verification link unless it is already verified — \`void email destinations\` shows the state.`);
@@ -1,2 +1 @@
1
- import { t as defineDatabaseProvider } from "./database-provider-Cx525bwX.mjs";
2
- export { defineDatabaseProvider };
1
+ export { t as defineDatabaseProvider } from "./database-provider-Cx525bwX.mjs";