void 0.26.1 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/README.md +3 -1
  2. package/dist/{account-cmd-CfUXh_nU.mjs → account-cmd-Ci00cncT.mjs} +5 -5
  3. package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
  4. package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-D72ZQfMZ.mjs} +118 -135
  5. package/dist/{application-routing-DQyUh_5S.mjs → application-routing-Dy589Vgn.mjs} +1 -2
  6. package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
  7. package/dist/{auth-B5_tZLxT.mjs → auth-B6iOCjKI.mjs} +23 -56
  8. package/dist/{auth-link-D5RmKnzh.mjs → auth-link-DWr6Afao.mjs} +10 -10
  9. package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
  10. package/dist/{auth-router-Bap-pvbn.mjs → auth-router-DP14wVkZ.mjs} +4 -4
  11. package/dist/auth-wn6F8dB8.mjs +2 -0
  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-B58c8iS8.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
  16. package/dist/{cache-Bo52trKF.mjs → cache-D0Tt28cn.mjs} +5 -5
  17. package/dist/{cancel-deploy-BZNz3Q26.mjs → cancel-deploy-CJKvk7AN.mjs} +4 -4
  18. package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
  19. package/dist/{cf-access-ngGqZpHZ.mjs → cf-access-CWP4avfP.mjs} +3 -7
  20. package/dist/cf-build-output-2u583yJK.mjs +2 -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 +198 -311
  24. package/dist/cli/cloudflare-operation-process.mjs +46 -14
  25. package/dist/cli/env-schema-probe.d.mts +5 -43
  26. package/dist/cli/env-schema-probe.mjs +14 -80
  27. package/dist/client-C1BjRn3g.mjs +2 -0
  28. package/dist/{client-C2Prx_Bi.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-CTrn-lXJ.mjs} +6 -5
  31. package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
  32. package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-BosmCNlq.mjs} +3 -3
  33. package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-BKdSfNBN.mjs} +26 -34
  34. package/dist/{cloudflare-operations-BlYLlowZ.mjs → cloudflare-operations-Ds-lX3Ts.mjs} +1 -1
  35. package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
  36. package/dist/collect-NUlJMpLY.mjs +2 -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-CNnrSMYm.mjs +2 -0
  42. package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
  43. package/dist/config-entry.d.mts +1 -1
  44. package/dist/{connect-X0MUA1gk.mjs → connect-nukQSoEO.mjs} +8 -8
  45. package/dist/{create-project-DxiyW6iX.mjs → create-project-D4APeBwX.mjs} +7 -7
  46. package/dist/{create-project-iwkbqiBU.mjs → create-project-DL7YXpjj.mjs} +1 -1
  47. package/dist/{db-XnVMHzoV.mjs → db-27RztQLy.mjs} +173 -263
  48. package/dist/{delete-esYlMiSJ.mjs → delete-BbsZFZIw.mjs} +5 -5
  49. package/dist/deploy-B06EQq4t.mjs +6009 -0
  50. package/dist/deploy-Db2ALnQP.mjs +3 -0
  51. package/dist/deploy-managed-static-CGswbcay.mjs +2277 -0
  52. package/dist/deploy-transport-BiicfoQW.mjs +180 -0
  53. package/dist/deploy.d.mts +10 -0
  54. package/dist/deploy.mjs +82 -0
  55. package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
  56. package/dist/discover-CTUiSsfG.mjs +2 -0
  57. package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
  58. package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
  59. package/dist/{domain-CbbBWhWE.mjs → domain-Bfq9n03H.mjs} +7 -22
  60. package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
  61. package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
  62. package/dist/{email-CpuT42g7.mjs → email-DIwaQU4P.mjs} +99 -191
  63. package/dist/email-cloudflare-CH053RxK.mjs +1096 -0
  64. package/dist/email-protocol-D9nTvhCp.mjs +82 -0
  65. package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
  66. package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
  67. package/dist/{env-DMA3cXZt.mjs → env-BhdWMrNy.mjs} +2 -13
  68. package/dist/{env-w9jOyGZn.mjs → env-C6ipBLp3.mjs} +8 -8
  69. package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
  70. package/dist/{env-raw-jZpP5n47.mjs → env-raw-Cklzcde3.mjs} +3 -20
  71. package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
  72. package/dist/{env-validation-CrVNjsPm.mjs → env-validation-CTn-HhG1.mjs} +1 -1
  73. package/dist/env-validation-cE0zcmzO.mjs +486 -0
  74. package/dist/{gen-DtkQhvQg.mjs → gen-CnN1Xidx.mjs} +131 -253
  75. package/dist/gen-F8pSZnhc.mjs +2 -0
  76. package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
  77. package/dist/generate-Rii9klHB.mjs +2 -0
  78. package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
  79. package/dist/{github-cmd-D_FsOFxq.mjs → github-cmd-BdkU4Nhe.mjs} +27 -71
  80. package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
  81. package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
  82. package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
  83. package/dist/{help-CVFBTmBx.mjs → help-Bug7pyK_.mjs} +18 -10
  84. package/dist/help-s9q7LTcu.mjs +2 -0
  85. package/dist/{inbound-PfQDLXc5.mjs → inbound-DmkTQeWp.mjs} +71 -222
  86. package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
  87. package/dist/index.d.mts +2 -18
  88. package/dist/index.mjs +200 -496
  89. package/dist/{info-PYWwkWyt.mjs → info-CujPwtMe.mjs} +5 -5
  90. package/dist/{init-Bw-fRKGp.mjs → init-ZWOJvc-Z.mjs} +179 -388
  91. package/dist/isr-config-DPjXM8J2.mjs +194 -0
  92. package/dist/{link-DlPG8iX3.mjs → link-UEc7bnF4.mjs} +8 -8
  93. package/dist/{list-2GN7_ueV.mjs → list-CuWeOnzk.mjs} +6 -17
  94. package/dist/{live-CgQuTpqD.mjs → live-BxLX-JqJ.mjs} +19 -17
  95. package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
  96. package/dist/load-user-env-DD5qveNU.mjs +49 -0
  97. package/dist/{local-d1-ga5O_idV.mjs → local-d1-BM3p74mm.mjs} +6 -6
  98. package/dist/{login-D-Q4xw3Q.mjs → login-CZ2Cqa-D.mjs} +11 -11
  99. package/dist/login-DhK7o1oJ.mjs +2 -0
  100. package/dist/{logs-rd8J-OFh.mjs → logs-TihRcLTk.mjs} +5 -5
  101. package/dist/migrate-BgT-hmu8.mjs +2 -0
  102. package/dist/{migrate-NLsjBbuM.mjs → migrate-uFwojusJ.mjs} +69 -21
  103. package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
  104. package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
  105. package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
  106. package/dist/{node-DJicPvPj.mjs → node-DoKbo1SZ.mjs} +8 -24
  107. package/dist/{operator-args-BNsW5gfp.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
  108. package/dist/{operator-auth-AzVLbrr3.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
  109. package/dist/{operator-client-BQtzyG-g.mjs → operator-client-C-ROjk1I.mjs} +4 -4
  110. package/dist/{operator-cmd-B6f6Cg9Z.mjs → operator-cmd-C5lCctnc.mjs} +8 -8
  111. package/dist/operator-cmd-Cjk5DiRx.mjs +2 -0
  112. package/dist/{output-C50ag2r3.mjs → output-FNHKw5Ac.mjs} +36 -5
  113. package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
  114. package/dist/pages/client.d.mts +1 -1
  115. package/dist/pages/client.mjs +91 -5
  116. package/dist/pages/index.d.mts +1 -2
  117. package/dist/pages/index.mjs +6 -6
  118. package/dist/pages/islands-plugin.mjs +5 -83
  119. package/dist/pages/protocol.d.mts +2 -2
  120. package/dist/pages/protocol.mjs +1 -1
  121. package/dist/pages/serialize.mjs +1 -1
  122. package/dist/{platform-args-BoZkWQnJ.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
  123. package/dist/platform-args-Cm7x-fot.mjs +2 -0
  124. package/dist/{platform-auth-config-n603OANg.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
  125. package/dist/{platform-auth-protection-zxDr0hWW.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
  126. package/dist/{platform-auth-recovery-tw9lgtgE.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
  127. package/dist/{platform-cmd-C00YM14r.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
  128. package/dist/{platform-cmd-B8-bCb7t.mjs → platform-cmd-DxxZO6e5.mjs} +17 -16
  129. package/dist/{platform-discovery-BC0HCKYt.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
  130. package/dist/{platform-domain-p0kobLV8.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
  131. package/dist/{platform-lifecycle-D_QEY32D.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
  132. package/dist/{platform-lifecycle-vFqtNPPa.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
  133. package/dist/{platform-management-oi-SvI3f.mjs → platform-management-CYrLvTGH.mjs} +1 -1
  134. package/dist/{platform-management-BdYblvvE.mjs → platform-management-t7HKy4-U.mjs} +632 -124
  135. package/dist/{platform-plans-config-CjiFv5J4.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
  136. package/dist/{platform-recovery-PvNS9Nl2.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
  137. package/dist/{platform-registry-P387v42A.mjs → platform-registry-B9mWX9LO.mjs} +18 -19
  138. package/dist/{platform-setup-DVe42Ws7.mjs → platform-setup-CTf6MMT9.mjs} +19 -26
  139. package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
  140. package/dist/{prepare-Dq9hTIbo.mjs → prepare-C4zfwks4.mjs} +3 -3
  141. package/dist/{prepare-Do96654b.mjs → prepare-CSH9dKTI.mjs} +11 -13
  142. package/dist/prepare-dr9uxQSV.mjs +2 -0
  143. package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
  144. package/dist/prerender-render.d.mts +2 -0
  145. package/dist/prerender-render.mjs +2 -2
  146. package/dist/project-DiiOBZPF.mjs +2 -0
  147. package/dist/{project-cmd-ti8_yTcA.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
  148. package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
  149. package/dist/{project-DQstYTxO.mjs → project-rqDnVsJN.mjs} +8 -4
  150. package/dist/{project-team-CDPE1Tsg.mjs → project-team-B3_QcStG.mjs} +6 -6
  151. package/dist/{project-token-CkZ1cN0Z.mjs → project-token-CvsRvv2I.mjs} +5 -5
  152. package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
  153. package/dist/{project-zero-trust-DdjLR61k.mjs → project-zero-trust-D1ICiwN_.mjs} +5 -5
  154. package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
  155. package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
  156. package/dist/{provision-BfaLiWbj.mjs → provision-DDh7ITVS.mjs} +118 -865
  157. package/dist/{requests-DFAqyYy8.mjs → requests-3CL3BuZh.mjs} +4 -4
  158. package/dist/resolve-project-B9Hr0D3n.mjs +2 -0
  159. package/dist/resolve-project-C_Cu7E8a.mjs +48 -0
  160. package/dist/{rollback-BKYXBduI.mjs → rollback-Ce1d_0J9.mjs} +7 -17
  161. package/dist/{route-types-CbtsIeFn.mjs → route-types-IrBuwJ7u.mjs} +35 -70
  162. package/dist/routing-assets-VkrKIbxE.mjs +139 -0
  163. package/dist/{runner-9wjsSZx-.mjs → runner-B5huK2eC.mjs} +1 -1
  164. package/dist/{runner-DMBKSrRk.mjs → runner-DcVDrzuR.mjs} +7 -28
  165. package/dist/{runner-mysql-CEzKtmFb.mjs → runner-mysql-CCtyI0p6.mjs} +4 -3
  166. package/dist/runner-mysql-CaJq-hd6.mjs +2 -0
  167. package/dist/runner-pg-BJhFZZG4.mjs +2 -0
  168. package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-CPd-CB_F.mjs} +1 -1
  169. package/dist/runtime/ai.mjs +9 -22
  170. package/dist/runtime/better-auth-mysql.d.mts +2 -5
  171. package/dist/runtime/better-auth-mysql.mjs +6 -31
  172. package/dist/runtime/better-auth-pg.d.mts +2 -5
  173. package/dist/runtime/better-auth-pg.mjs +6 -32
  174. package/dist/runtime/better-auth.d.mts +2 -4
  175. package/dist/runtime/better-auth.mjs +9 -19
  176. package/dist/runtime/db.mjs +1 -1
  177. package/dist/runtime/durable.d.mts +16 -0
  178. package/dist/runtime/durable.mjs +26 -2
  179. package/dist/runtime/email/testing.d.mts +1 -1
  180. package/dist/runtime/email/testing.mjs +9 -23
  181. package/dist/runtime/email-protocol.d.mts +12 -0
  182. package/dist/runtime/email-protocol.mjs +2 -70
  183. package/dist/runtime/email.d.mts +1 -1
  184. package/dist/runtime/email.mjs +79 -221
  185. package/dist/runtime/env-public.d.mts +1 -1
  186. package/dist/runtime/env-public.mjs +12 -38
  187. package/dist/runtime/env.d.mts +1 -12
  188. package/dist/runtime/env.mjs +1 -1
  189. package/dist/runtime/handler.d.mts +1 -1
  190. package/dist/runtime/handler.mjs +1 -1
  191. package/dist/runtime/isr.mjs +1 -1
  192. package/dist/runtime/kv.mjs +1 -1
  193. package/dist/runtime/live-client.d.mts +1 -1
  194. package/dist/runtime/live-server.mjs +1 -16
  195. package/dist/runtime/live.d.mts +1 -1
  196. package/dist/runtime/live.mjs +1 -1
  197. package/dist/runtime/migration-handler-mysql.d.mts +2 -2
  198. package/dist/runtime/migration-handler-mysql.mjs +3 -2
  199. package/dist/runtime/migration-handler-pg.d.mts +2 -2
  200. package/dist/runtime/migration-handler-pg.mjs +1 -1
  201. package/dist/runtime/migration-handler.d.mts +2 -2
  202. package/dist/runtime/migration-handler.mjs +2 -470
  203. package/dist/runtime/queues.mjs +1 -1
  204. package/dist/runtime/remote/binding-handler.mjs +62 -62
  205. package/dist/runtime/remote/index.mjs +16 -77
  206. package/dist/runtime/routing.d.mts +1 -4
  207. package/dist/runtime/routing.mjs +82 -218
  208. package/dist/runtime/sandbox-container.d.mts +2 -2
  209. package/dist/runtime/sandbox-container.mjs +2 -2
  210. package/dist/runtime/sandbox.d.mts +2 -2
  211. package/dist/runtime/sandbox.mjs +13 -6
  212. package/dist/runtime/storage.mjs +1 -1
  213. package/dist/runtime/validator.d.mts +1 -1
  214. package/dist/runtime/ws-server.d.mts +2 -3
  215. package/dist/runtime/ws-server.mjs +6 -28
  216. package/dist/runtime/ws.d.mts +1 -1
  217. package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
  218. package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-DBKIqDEK.mjs} +12 -1
  219. package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
  220. package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
  221. package/dist/{secret-BAt2KMmO.mjs → secret-B5J8bBsI.mjs} +62 -80
  222. package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
  223. package/dist/{skills-BgVMvQdy.mjs → skills-BJsan98C.mjs} +2 -2
  224. package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-gQ-NDA-u.mjs} +38 -43
  225. package/dist/sveltekit.mjs +1 -1
  226. package/dist/validate-C9xtFOYR.mjs +2 -0
  227. package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
  228. package/dist/version-metadata-DIrqEHQo.mjs +73 -0
  229. package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
  230. package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
  231. package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
  232. package/docs/guide/auth.md +2 -0
  233. package/docs/guide/database/postgresql.md +2 -0
  234. package/docs/guide/database.md +2 -0
  235. package/docs/guide/deployment.md +2 -2
  236. package/docs/guide/durable-state.md +24 -0
  237. package/docs/guide/platform/administration/access.md +5 -1
  238. package/docs/guide/platform/administration/connected-apps.md +55 -0
  239. package/docs/guide/platform/installation/credentials.md +3 -1
  240. package/docs/guide/platform/installation/first-deployment.md +1 -1
  241. package/docs/guide/project-collaboration.md +1 -1
  242. package/docs/guide/quickstart.md +2 -0
  243. package/docs/guide/sandboxes.md +2 -0
  244. package/docs/reference/api/deploy.md +23 -0
  245. package/docs/reference/api/pages.md +2 -0
  246. package/docs/reference/api.md +2 -1
  247. package/docs/reference/cli/auth.md +1 -1
  248. package/docs/reference/cli/database.md +9 -3
  249. package/docs/reference/cli/deploy.md +1 -1
  250. package/docs/reference/cli/platform-installation.md +1 -1
  251. package/docs/reference/cli/setup.md +2 -0
  252. package/package.json +14 -17
  253. package/skills/void/SKILL.md +4 -2
  254. package/dist/auth-BgX2qYSY.mjs +0 -2
  255. package/dist/cf-build-output-H9a97vME.mjs +0 -2
  256. package/dist/client-By4JjMw_.mjs +0 -2
  257. package/dist/collect-DLyFDiKW.mjs +0 -2
  258. package/dist/config-5r-YpMC-.mjs +0 -2
  259. package/dist/config-B_ggY-IO.mjs +0 -89
  260. package/dist/config-BtSFvXZx.mjs +0 -2
  261. package/dist/config-write-AHGesphx.mjs +0 -61
  262. package/dist/deploy-BsEvnlJl.mjs +0 -10455
  263. package/dist/deploy-C1d-YTfp.mjs +0 -2
  264. package/dist/dev-inbox-CK-UuPob.mjs +0 -297
  265. package/dist/discover-EDUf6JJw.mjs +0 -2
  266. package/dist/dist-_UUlL6bg.mjs +0 -2
  267. package/dist/env-validation-Dxdx_5wo.mjs +0 -951
  268. package/dist/gen-dA9hW7AV.mjs +0 -2
  269. package/dist/head-client-DzmJGN4C.mjs +0 -90
  270. package/dist/help-DzKUrQvk.mjs +0 -2
  271. package/dist/login-Dc-wuTDq.mjs +0 -2
  272. package/dist/migrate-BHp07yJE.mjs +0 -2
  273. package/dist/operator-cmd-Cwn50lOV.mjs +0 -2
  274. package/dist/pages/head-client.d.mts +0 -13
  275. package/dist/pages/head-client.mjs +0 -2
  276. package/dist/platform-args-DYgITk0D.mjs +0 -2
  277. package/dist/prepare-DRUV-g3X.mjs +0 -2
  278. package/dist/project-BiaPQ7ur.mjs +0 -2
  279. package/dist/provision-Wu9ZBk9L.mjs +0 -2
  280. package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
  281. package/dist/resolve-project-CP8rZs_p.mjs +0 -28
  282. package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
  283. package/dist/runner-pg-BGYRFdRp.mjs +0 -2
  284. package/dist/runtime/env-helpers.d.mts +0 -2
  285. package/dist/runtime/env-helpers.mjs +0 -2
  286. package/dist/validate-BJr9LfXy.mjs +0 -2
  287. package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
package/README.md CHANGED
@@ -20,7 +20,7 @@ npx void init
20
20
  npm run dev
21
21
  ```
22
22
 
23
- Choose your UI framework and starter, then select Cloudflare to deploy to your account:
23
+ Vite+ is the default toolchain; setup installs it for you and keeps your existing package-manager configuration. Choose your UI framework and starter, then select Cloudflare to deploy to your account:
24
24
 
25
25
  ```sh
26
26
  npx void deploy
@@ -43,6 +43,8 @@ Read the [Void documentation](https://void.cloud) online or use the Markdown gui
43
43
  - [API](https://void.cloud/reference/api) and [CLI](https://void.cloud/reference/cli) reference
44
44
  - [Coding agents](https://void.cloud/integrations/agents)
45
45
 
46
+ Applications that publish through a platform OAuth client can prepare a built app without credentials using [`void/deploy`](https://void.cloud/reference/api/deploy), then request [user approval](https://void.cloud/guide/platform/administration/connected-apps).
47
+
46
48
  ## License
47
49
 
48
50
  MIT
@@ -1,14 +1,14 @@
1
- import { c as getToken, f as removeToken } from "./auth-B5_tZLxT.mjs";
1
+ import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-D3m88sjf.mjs";
3
- import { d as printSuccess } from "./output-C50ag2r3.mjs";
4
- import { r as PlatformClient } from "./client-C2Prx_Bi.mjs";
5
- import { n as runLoginCommand } from "./login-D-Q4xw3Q.mjs";
3
+ import { m as printSuccess } from "./output-FNHKw5Ac.mjs";
4
+ import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
5
+ import { n as runLoginCommand } from "./login-CZ2Cqa-D.mjs";
6
6
  import { execSync } from "node:child_process";
7
7
  //#region src/cli/account-cmd.ts
8
8
  async function runAccountCommand(root, args) {
9
9
  switch (args.subcommand) {
10
10
  case "login": return runLoginCommand(root);
11
- case "link": return import("./auth-link-D5RmKnzh.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
11
+ case "link": return import("./auth-link-DWr6Afao.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
12
12
  case "logout":
13
13
  if (removeToken(root)) printSuccess("Logged out.");
14
14
  else log.info("Not logged in.");
@@ -1,4 +1,4 @@
1
- import { a as join } from "./dist-BVqXeR_h.mjs";
1
+ import { a as join } from "./dist-ipQi0Q8y.mjs";
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { fileURLToPath } from "node:url";
4
4
  //#region src/cli/agents.ts
@@ -12,6 +12,9 @@ function getPackageDir() {
12
12
  }
13
13
  throw new Error("Could not find void package root");
14
14
  }
15
+ function getOwnVersion() {
16
+ return JSON.parse(readFileSync(join(getPackageDir(), "package.json"), "utf-8")).version;
17
+ }
15
18
  const agents = {
16
19
  "claude-code": {
17
20
  displayName: "Claude Code",
@@ -108,4 +111,4 @@ function detectAgents(root) {
108
111
  return Object.values(agents).filter((a) => a.detect(root));
109
112
  }
110
113
  //#endregion
111
- export { getPackageDir as n, detectAgents as t };
114
+ export { getOwnVersion as n, getPackageDir as r, detectAgents as t };
@@ -1,20 +1,20 @@
1
- import { a as join, i as isAbsolute, t as basename } from "./dist-BVqXeR_h.mjs";
2
- import { c as scanWebSocketRoutes, h as needsApplicationDatabase, i as inferProjectBindings, l as scanWebSocketRoutesSync, n as FRAMEWORK_SCAN_DIRS, p as readResourceDefinition, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-BlQbOL0P.mjs";
3
- import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
4
- import { t as findVoidAuthConfig } from "./config-DPByhVck.mjs";
5
- import { h as resolveBindingNames, u as getDatabaseDialect } from "./config-DiowPT80.mjs";
6
- import { n as globSync, t as glob } from "./dist-Bn8Kodjp.mjs";
1
+ import { a as join, i as isAbsolute, t as basename } from "./dist-ipQi0Q8y.mjs";
2
+ import { c as scanWebSocketRoutesSync, f as readResourceDefinition, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listConventionFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-DsARdQKE.mjs";
3
+ import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
4
+ import { t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
5
+ import { f as resolveBindingNames, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
6
+ import { n as globSync } from "./dist-Bn8Kodjp.mjs";
7
7
  import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
8
8
  import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename, o as unwrapStaticExpression, t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.mjs";
9
9
  import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
10
- import { t as collectMigrations } from "./collect-DiTn9yr6.mjs";
11
- import { a as scanEmailHandlersSync, i as scanEmailHandlers, r as hasEmailHandlers } from "./email-d_Aux1vM.mjs";
12
- import { t as scanPages } from "./scan-C3uDzz6J.mjs";
13
- import { o as isSandboxEnabled } from "./config-B_ggY-IO.mjs";
10
+ import { t as collectMigrations } from "./collect-xjffdCdk.mjs";
11
+ import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
12
+ import { t as scanPages } from "./scan-C0BMdmEd.mjs";
14
13
  import { existsSync, readFileSync, readdirSync } from "node:fs";
14
+ import { fileURLToPath } from "node:url";
15
15
  import { parseSync } from "vite";
16
+ import { isSandboxRegistryImage } from "@void/deploy-core";
16
17
  //#region src/crons/scan.ts
17
- const JOB_PATTERN = "**/*.{ts,mts,js,mjs}";
18
18
  function extractJobName(filePath) {
19
19
  return filePath.replace(/\.[^.]+$/, "");
20
20
  }
@@ -29,14 +29,9 @@ function extractCronExpressions(source, filePath) {
29
29
  return cron.trim();
30
30
  });
31
31
  }
32
- function resolveDir(root, dir) {
33
- return isAbsolute(dir) ? dir : join(root, dir);
34
- }
35
- function parseJobFiles(root, jobsDir, files) {
36
- const jobsDirPath = resolveDir(root, jobsDir);
37
- return files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
38
- const absPath = join(jobsDirPath, filePath);
39
- const source = readFileSync(absPath, "utf-8");
32
+ function scanJobsSync(cronsDir) {
33
+ return listConventionFiles(cronsDir).sort((leftFilePath, rightFilePath) => leftFilePath.localeCompare(rightFilePath)).map((filePath) => {
34
+ const source = readFileSync(join(cronsDir, filePath), "utf-8");
40
35
  return {
41
36
  filePath,
42
37
  name: extractJobName(filePath),
@@ -44,31 +39,13 @@ function parseJobFiles(root, jobsDir, files) {
44
39
  };
45
40
  });
46
41
  }
47
- async function scanJobs(root, jobsDir = "crons") {
48
- return parseJobFiles(root, jobsDir, await glob(JOB_PATTERN, {
49
- cwd: resolveDir(root, jobsDir),
50
- absolute: false
51
- }).catch(() => []));
52
- }
53
- function scanJobsSync(root, jobsDir = "crons") {
54
- let files;
55
- try {
56
- files = globSync(JOB_PATTERN, {
57
- cwd: resolveDir(root, jobsDir),
58
- absolute: false
59
- });
60
- } catch {
61
- files = [];
62
- }
63
- return parseJobFiles(root, jobsDir, files);
64
- }
65
42
  //#endregion
66
43
  //#region src/durable/scan.ts
67
44
  const MODULE_PATTERN = /\.(?:[cm]?[jt]s)$/;
68
45
  function inferDurableResourceName(filePath) {
69
46
  return filePath.replace(/\\/g, "/").split("/").pop().replace(MODULE_PATTERN, "");
70
47
  }
71
- const DURABLE_HELPERS = /* @__PURE__ */ new Set(["defineDurableState"]);
48
+ const DURABLE_HELPERS = /* @__PURE__ */ new Set(["defineDurableState", "defineDurableObject"]);
72
49
  function deriveDurableResourceIdentity(name) {
73
50
  const parts = resourceNameWords(name);
74
51
  const classBase = parts.map((part) => part[0].toUpperCase() + part.slice(1)).join("");
@@ -103,7 +80,6 @@ function scanDurableObjectModules(root) {
103
80
  }
104
81
  //#endregion
105
82
  //#region src/queues/scan.ts
106
- const QUEUE_PATTERN = "**/*.{ts,mts,js,mjs}";
107
83
  function extractName(filePath) {
108
84
  return filePath.replace(/\.[^.]+$/, "").replaceAll("/", "-");
109
85
  }
@@ -116,12 +92,9 @@ const OPTION_NAMES = [
116
92
  "maxRetries",
117
93
  "retryDelay"
118
94
  ];
119
- function resolveQueuesDir(root, queuesDir) {
120
- return isAbsolute(queuesDir) ? queuesDir : join(root, queuesDir);
121
- }
122
- function parseQueueFiles(queuesDirPath, files) {
123
- const definitions = files.filter((filePath) => !filePath.split("/").some((segment) => segment.startsWith("_"))).sort().map((filePath) => {
124
- const absPath = join(queuesDirPath, filePath);
95
+ function scanQueuesSync(queuesDir) {
96
+ const definitions = listConventionFiles(queuesDir).sort().map((filePath) => {
97
+ const absPath = join(queuesDir, filePath);
125
98
  const source = readFileSync(absPath, "utf-8");
126
99
  const name = extractName(filePath);
127
100
  const options = OPTION_NAMES.some((option) => source.includes(option)) ? staticExportInitializers(absPath, source, new Set(OPTION_NAMES)) : /* @__PURE__ */ new Map();
@@ -156,26 +129,6 @@ function parseQueueFiles(queuesDirPath, files) {
156
129
  ].join("\n"));
157
130
  return definitions;
158
131
  }
159
- async function scanQueues(root, queuesDir = "queues") {
160
- const queuesDirPath = resolveQueuesDir(root, queuesDir);
161
- return parseQueueFiles(queuesDirPath, await glob(QUEUE_PATTERN, {
162
- cwd: queuesDirPath,
163
- absolute: false
164
- }).catch(() => []));
165
- }
166
- function scanQueuesSync(root, queuesDir = "queues") {
167
- const queuesDirPath = resolveQueuesDir(root, queuesDir);
168
- let files;
169
- try {
170
- files = globSync(QUEUE_PATTERN, {
171
- cwd: queuesDirPath,
172
- absolute: false
173
- });
174
- } catch {
175
- files = [];
176
- }
177
- return parseQueueFiles(queuesDirPath, files);
178
- }
179
132
  //#endregion
180
133
  //#region src/router/detect-exports.ts
181
134
  const HTTP_METHODS = /* @__PURE__ */ new Set([
@@ -224,12 +177,6 @@ function detectHttpExports(absPath) {
224
177
  }
225
178
  //#endregion
226
179
  //#region src/router/scan.ts
227
- const ROUTE_PATTERN = `**/*.{${[
228
- "ts",
229
- "mts",
230
- "js",
231
- "mjs"
232
- ].join(",")}}`;
233
180
  function parseMiddlewareDefinitions(files) {
234
181
  return files.filter((f) => !f.startsWith("_")).map((f) => {
235
182
  const match = f.split("/").pop().match(/^(\d+)\./);
@@ -251,67 +198,110 @@ function compareRouteSpecificity(a, b) {
251
198
  }
252
199
  return aSegments.length - bSegments.length;
253
200
  }
254
- /**
255
- * Scan routes/ and middleware/ directories and return a structured manifest.
256
- * Files starting with _ are ignored.
257
- */
201
+ /** Add pages and HTTP methods to the inventories already resolved for this application phase. */
258
202
  async function scanRoutes(root, options) {
259
- const paths = options?.paths ?? readProjectPaths(root);
260
- const [routeFiles, websockets, middlewareFiles, jobs, queues, pages, email] = await Promise.all([
261
- options?.inventory ? [] : glob(ROUTE_PATTERN, {
262
- cwd: paths.routesDir,
263
- absolute: false
264
- }),
265
- options?.inventory?.websockets ?? scanWebSocketRoutes(root, paths, options?.environment),
266
- options?.inventory ? [] : glob(ROUTE_PATTERN, {
267
- cwd: paths.middlewareDir,
268
- absolute: false
269
- }).catch(() => []),
270
- options?.inventory?.jobs ?? scanJobs(root, paths.cronsDir),
271
- options?.inventory?.queues ?? scanQueues(root, paths.queuesDir),
272
- scanPages(root, {
273
- output: options?.output,
274
- paths
275
- }),
276
- options?.inventory?.email ?? scanEmailHandlers(paths.sourceRoot)
277
- ]);
278
- const routesDir = paths.routesDir;
203
+ const { paths, inventory } = options;
204
+ const pages = await scanPages(root, {
205
+ output: options.output,
206
+ paths
207
+ });
208
+ const routes = inventory.routes.map((route) => ({
209
+ ...route,
210
+ methods: detectHttpExports(join(paths.routesDir, route.filePath))
211
+ })).sort(compareRouteSpecificity);
279
212
  return {
280
- routes: (options?.inventory?.routes ?? routeFiles.filter((f) => !isWebSocketPatternFile(f)).filter((f) => !f.split("/").some((s) => s.startsWith("_"))).map((file) => parseRouteFilename(file)).filter((route) => isRouteEnabledForEnvironment(route, options?.environment))).map((route) => ({
281
- ...route,
282
- methods: detectHttpExports(join(routesDir, route.filePath))
283
- })).sort(compareRouteSpecificity),
284
- websockets,
285
- middleware: options?.inventory?.middleware ?? parseMiddlewareDefinitions(middlewareFiles),
286
- jobs,
287
- queues,
288
- pages,
289
- email
213
+ ...inventory,
214
+ routes,
215
+ pages
290
216
  };
291
217
  }
292
218
  function scanMiddlewareSync(root, paths = readProjectPaths(root)) {
293
- let middlewareFiles;
294
- try {
295
- middlewareFiles = globSync(ROUTE_PATTERN, {
296
- cwd: paths.middlewareDir,
297
- absolute: false
298
- });
299
- } catch {
300
- middlewareFiles = [];
301
- }
302
- return parseMiddlewareDefinitions(middlewareFiles);
219
+ return parseMiddlewareDefinitions(globSync("**/*.{ts,mts,js,mjs}", { cwd: paths.middlewareDir }));
303
220
  }
304
221
  function scanRoutePatternsSync(root, paths = readProjectPaths(root), environment) {
305
- let routeFiles;
306
- try {
307
- routeFiles = globSync(ROUTE_PATTERN, {
308
- cwd: paths.routesDir,
309
- absolute: false
310
- });
311
- } catch {
312
- routeFiles = [];
222
+ return listConventionFiles(paths.routesDir).filter((f) => !isWebSocketPatternFile(f)).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
223
+ }
224
+ const DEFAULT_SANDBOX_CLASS_NAME = "SandboxV1";
225
+ const DEFAULT_SANDBOX_CONTAINER_NAME = "void-sandbox-v1";
226
+ const SANDBOX_MIGRATION_TAG = "void-sandbox-v2";
227
+ function isSandboxEnabled(config) {
228
+ return config.sandbox !== void 0 && config.sandbox !== false;
229
+ }
230
+ function getDefaultSandboxImage() {
231
+ return fileURLToPath(new URL("../../sandbox.Dockerfile", import.meta.resolve("void/sandbox")));
232
+ }
233
+ function getDefaultSandboxPlatformImage() {
234
+ return "cloudflare/debian-trixie";
235
+ }
236
+ function isLocalSandboxImage(image) {
237
+ return isAbsolute(image) || image.startsWith("./") || image.startsWith("../") || image.toLowerCase().includes("dockerfile");
238
+ }
239
+ function requiresSandboxPlatformImage(config) {
240
+ if (typeof config.sandbox !== "object" || config.sandbox === null) return false;
241
+ return typeof config.sandbox.image === "string" && isLocalSandboxImage(config.sandbox.image) && config.sandbox.platformImage === void 0;
242
+ }
243
+ function resolveSandboxConfig(config, root = process.cwd()) {
244
+ const raw = typeof config.sandbox === "object" ? config.sandbox : {};
245
+ const image = raw.image ?? getDefaultSandboxImage();
246
+ const imageBuildContext = raw.imageBuildContext;
247
+ const platformImage = raw.platformImage ?? (raw.image && !isLocalSandboxImage(raw.image) ? raw.image : getDefaultSandboxPlatformImage());
248
+ if (!isLocalSandboxImage(image) && !isSandboxRegistryImage(image)) throw new Error("sandbox.image must be a Dockerfile or a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
249
+ if (platformImage !== getDefaultSandboxPlatformImage() && !isSandboxRegistryImage(platformImage)) throw new Error("sandbox.platformImage must be a digest-pinned Cloudflare registry image (registry.cloudflare.com/<account>/<image>@sha256:<digest>).");
250
+ return {
251
+ binding: raw.binding ?? "SANDBOX",
252
+ className: raw.className ?? "SandboxV1",
253
+ containerName: raw.containerName ?? DEFAULT_SANDBOX_CONTAINER_NAME,
254
+ image: resolveSandboxImage(image, root),
255
+ platformImage,
256
+ ...imageBuildContext && { imageBuildContext: isAbsolute(imageBuildContext) ? imageBuildContext : join(root, imageBuildContext) },
257
+ ...raw.instanceType && { instanceType: raw.instanceType }
258
+ };
259
+ }
260
+ function resolveSandboxImage(image, root) {
261
+ if (!isLocalSandboxImage(image) || isAbsolute(image)) return image;
262
+ return join(root, image);
263
+ }
264
+ function sandboxContainerConfig(sandbox) {
265
+ return {
266
+ name: sandbox.containerName,
267
+ class_name: sandbox.className,
268
+ scheduling_policy: "durable_object",
269
+ images: { default: isLocalSandboxImage(sandbox.image) ? {
270
+ dockerfile: sandbox.image,
271
+ ...sandbox.imageBuildContext && { build_context: sandbox.imageBuildContext }
272
+ } : { image: sandbox.image } }
273
+ };
274
+ }
275
+ /** Resolve the final local storage kind without recreating a renamed or deleted class. */
276
+ function resolveSandboxMigrationStorage(migrations, className) {
277
+ const storage = /* @__PURE__ */ new Map();
278
+ for (const migration of migrations) {
279
+ for (const name of migration.new_classes ?? []) storage.set(name, "legacy-kv");
280
+ for (const name of migration.new_sqlite_classes ?? []) storage.set(name, "sqlite");
281
+ for (const rename of migration.renamed_classes ?? []) {
282
+ const sqlite = storage.get(rename.from);
283
+ storage.delete(rename.from);
284
+ storage.set(rename.to, sqlite ?? "unknown");
285
+ }
286
+ for (const transfer of migration.transferred_classes ?? []) storage.set(transfer.to, "unknown");
287
+ for (const name of migration.deleted_classes ?? []) storage.delete(name);
313
288
  }
314
- return routeFiles.filter((f) => !isWebSocketPatternFile(f)).filter((f) => !f.split("/").some((s) => s.startsWith("_"))).map((f) => parseRouteFilename(f)).filter((route) => isRouteEnabledForEnvironment(route, environment)).sort(compareRouteSpecificity);
289
+ return storage.get(className);
290
+ }
291
+ function hasSandboxSqliteMigration(migrations, className) {
292
+ return resolveSandboxMigrationStorage(migrations, className) === "sqlite";
293
+ }
294
+ /** Refuse namespace reuse before either uploader can change a live Worker. */
295
+ function assertSandboxNamespaceConfig(config, sandbox) {
296
+ const containers = Array.isArray(config.containers) ? config.containers : [];
297
+ const durable = config.durable_objects;
298
+ const binding = durable?.bindings?.find((entry) => entry.name === sandbox.binding);
299
+ if (binding && (binding.script_name !== void 0 || binding.environment !== void 0)) throw new Error(`sandbox: binding '${sandbox.binding}' must reference the local '${sandbox.className}' class. Choose another sandbox.binding name to preserve the existing external Durable Object.`);
300
+ const migrations = Array.isArray(config.migrations) ? config.migrations : [];
301
+ const storage = resolveSandboxMigrationStorage(migrations, sandbox.className);
302
+ if (storage === "legacy-kv" || storage === "unknown") throw new Error(`sandbox: class '${sandbox.className}' needs SQLite storage, but its existing namespace has ${storage} storage. Preserve the existing migration history and choose a fresh Worker name or a new sandbox.className and sandbox.binding.`);
303
+ if (storage !== "sqlite" && migrations.some((migration) => migration.tag === "void-sandbox-v2")) throw new Error(`sandbox: migration tag '${SANDBOX_MIGRATION_TAG}' is already configured for another class. Keep the existing history and choose a fresh Worker for Sandbox.`);
304
+ if (containers.some((container) => container.class_name === sandbox.className && container.scheduling_policy !== "durable_object") || durable?.bindings?.some((binding) => binding.name === sandbox.binding && binding.class_name !== sandbox.className)) throw new Error("Sandbox SDK 1.0 needs a new Durable Object namespace. Back up existing Sandbox data and deploy to a fresh Worker name with the new Sandbox configuration; remove legacy Sandbox bindings, containers, and migrations from that new Worker configuration. See https://developers.cloudflare.com/containers/guides/migrate-to-durable-object-scheduling-policy/.");
315
305
  }
316
306
  //#endregion
317
307
  //#region src/application-analysis.ts
@@ -339,8 +329,8 @@ function analyzeApplicationSync(root, options) {
339
329
  };
340
330
  const dialect = getDatabaseDialect(config);
341
331
  const migrations = collectMigrations(paths.migrationsDir);
342
- const jobs = scanJobsSync(root, paths.cronsDir);
343
- const queues = scanQueuesSync(root, paths.queuesDir);
332
+ const jobs = scanJobsSync(paths.cronsDir);
333
+ const queues = scanQueuesSync(paths.queuesDir);
344
334
  const allWebsockets = scanWebSocketRoutesSync(root, paths);
345
335
  const websockets = allWebsockets.filter((route) => isRouteEnabledForEnvironment(route, environment));
346
336
  const durableObjects = scanDurableObjectModules(root);
@@ -350,19 +340,12 @@ function analyzeApplicationSync(root, options) {
350
340
  const reasons = {
351
341
  database: [],
352
342
  kv: bindings.needsKV ? [bindingReason("kv", "KV", "app uses env.KV")] : [],
353
- r2: bindings.needsR2 ? [bindingReason("storage", "R2", "app uses env.STORAGE (R2)")] : [],
354
- ai: bindings.needsAI ? [bindingReason("ai", "Workers AI", "app uses Workers AI")] : [],
355
- sandbox: bindings.needsSandbox ? [isSandboxEnabled(config) ? "void.config.ts enables Sandbox" : "app uses void/sandbox"] : [],
356
- live: bindings.needsLive ? ["app uses void/live"] : [],
357
- email: bindings.needsEmail ? [bindingReason("email", "email", "app uses void/email")] : [],
358
- queues: bindings.needsQueues ? ["app uses void/queues"] : []
343
+ r2: bindings.needsR2 ? [bindingReason("storage", "R2", "app uses env.STORAGE (R2)")] : []
359
344
  };
360
345
  const databaseName = dialect === "sqlite" ? "a D1 database" : "a Hyperdrive database";
361
346
  if (bindings.needsD1) reasons.database.push(bindingReason("db", databaseName, dialect === "sqlite" ? "app uses env.DB (D1)" : "app uses a database"));
362
347
  if (authEnabled) reasons.database.push(`auth requires ${databaseName}`);
363
348
  if (migrations.length > 0) reasons.database.push(`checked-in migrations need ${databaseName}`);
364
- for (const queue of queues) reasons.queues.push(`queues/${queue.filePath} requires ${queue.bindingName}`);
365
- if (hasEmailHandlers(email)) reasons.email.push("email/ contains inbound email handlers");
366
349
  return {
367
350
  root,
368
351
  config,
@@ -388,4 +371,4 @@ function analyzeApplicationSync(root, options) {
388
371
  };
389
372
  }
390
373
  //#endregion
391
- export { inferDurableResourceName as a, deriveDurableResourceIdentity as i, scanRoutes as n, scanDurableObjectModules as o, scanQueuesSync as r, scanJobsSync as s, analyzeApplicationSync as t };
374
+ export { hasSandboxSqliteMigration as a, sandboxContainerConfig as c, deriveDurableResourceIdentity as d, inferDurableResourceName as f, assertSandboxNamespaceConfig as i, scanRoutes as l, scanJobsSync as m, DEFAULT_SANDBOX_CLASS_NAME as n, requiresSandboxPlatformImage as o, scanDurableObjectModules as p, SANDBOX_MIGRATION_TAG as r, resolveSandboxConfig as s, analyzeApplicationSync as t, scanQueuesSync as u };
@@ -1,11 +1,10 @@
1
- import { n as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-DKy02UY0.mjs";
1
+ import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-D72ZQfMZ.mjs";
2
2
  //#region src/application-routing.ts
3
3
  /** Complete route/page analysis using the same resource and handler inventories. */
4
4
  async function completeApplicationAnalysis(analysis) {
5
5
  const scan = await scanRoutes(analysis.root, {
6
6
  output: analysis.config.output,
7
7
  paths: analysis.paths,
8
- environment: analysis.environment,
9
8
  inventory: {
10
9
  routes: analysis.routes,
11
10
  middleware: analysis.middleware,
@@ -0,0 +1,18 @@
1
+ import { renameSync, rmSync, writeFileSync } from "node:fs";
2
+ import { randomUUID } from "node:crypto";
3
+ //#region src/shared/atomic-write.ts
4
+ /** Write through a unique temporary file and rename it, so readers never see a partial file. */
5
+ function writeFileAtomic(path, content, mode) {
6
+ const temporary = `${path}.${randomUUID()}.tmp`;
7
+ try {
8
+ writeFileSync(temporary, content, {
9
+ flag: "wx",
10
+ mode
11
+ });
12
+ renameSync(temporary, path);
13
+ } finally {
14
+ rmSync(temporary, { force: true });
15
+ }
16
+ }
17
+ //#endregion
18
+ export { writeFileAtomic as t };
@@ -1,11 +1,12 @@
1
- import { a as join } from "./dist-BVqXeR_h.mjs";
2
- import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-P387v42A.mjs";
3
- import { i as readProjectPlatformUrl, r as readProjectConfig } from "./project-DQstYTxO.mjs";
4
- import { t as cfAccessHeaders } from "./cf-access-TWNzXltp.mjs";
5
- import { t as ensureCloudflaredToken } from "./cf-access-ngGqZpHZ.mjs";
1
+ import { a as join } from "./dist-ipQi0Q8y.mjs";
2
+ import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-B9mWX9LO.mjs";
3
+ import { a as readProjectPlatformUrl, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
4
+ import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
5
+ import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
6
6
  import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
7
7
  import { createHash, randomBytes } from "node:crypto";
8
8
  import { homedir } from "node:os";
9
+ import { execFile } from "node:child_process";
9
10
  import { browserPageLead, browserPageStatus, renderBrowserPage } from "@void/platform/browser-page";
10
11
  //#region src/cli/auth.ts
11
12
  const CONFIG_DIR = join(homedir(), ".void");
@@ -97,20 +98,16 @@ function readTokenForOrigin(apiUrl, config) {
97
98
  function getTokenSource() {
98
99
  return process.env.VOID_TOKEN ? "ci" : "manual";
99
100
  }
100
- function saveToken(token, root = process.cwd(), dependencies = {}) {
101
- savePlatformToken(token, getApiUrl(root), dependencies);
102
- }
103
101
  function readPlatformToken(apiUrl) {
104
102
  return readOriginScopedToken(apiUrl, readConfig());
105
103
  }
106
- function savePlatformToken(token, origin, dependencies = {}) {
104
+ function savePlatformToken(token, origin) {
107
105
  const apiUrl = normalizePlatformApiUrl(origin);
108
- const account = platformCredentialAccount(apiUrl);
109
- if ((dependencies.keyringSet ?? keyringSet)(account, token)) return;
106
+ if (keyringSet(platformCredentialAccount(apiUrl), token)) return;
110
107
  throw new Error("auth: The system keychain is unavailable. Refusing to store your platform token in plaintext. Configure a system keychain, or set VOID_TOKEN from a secret manager in headless environments.");
111
108
  }
112
109
  function removeToken(root = process.cwd()) {
113
- const apiUrl = normalizePlatformApiUrl(getApiUrl(root));
110
+ const apiUrl = getApiUrl(root);
114
111
  const account = platformCredentialAccount(apiUrl);
115
112
  let removed = false;
116
113
  if (keyringDelete(account)) removed = true;
@@ -137,9 +134,8 @@ function createCodeChallenge(verifier) {
137
134
  return base64Url(createHash("sha256").update(verifier).digest());
138
135
  }
139
136
  async function exchangeLoginCode(apiUrl, code, state, codeVerifier) {
140
- const base = apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`;
141
- ensureCloudflaredToken(apiUrl);
142
- const res = await fetch(new URL("auth/cli/token", base), {
137
+ ensurePlatformAccessToken(apiUrl);
138
+ const res = await fetch(`${apiUrl}/auth/cli/token`, {
143
139
  method: "POST",
144
140
  headers: {
145
141
  "Content-Type": "application/json",
@@ -181,48 +177,32 @@ function page(title, message) {
181
177
  content: browserPageStatus(title === "Login failed" ? "error" : "success") + browserPageLead(title, message)
182
178
  });
183
179
  }
184
- function openBrowser(url, execFile) {
180
+ function openBrowser(url, run = execFile) {
185
181
  const ignore = () => {};
186
182
  if (process.platform === "win32") {
187
- execFile("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
183
+ run("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
188
184
  return;
189
185
  }
190
186
  if (process.platform === "darwin") {
191
- execFile("open", [url], ignore);
187
+ run("open", [url], ignore);
192
188
  return;
193
189
  }
194
190
  if (process.env.WSL_DISTRO_NAME || process.env.WSL_INTEROP) {
195
- execFile("wslview", [url], (error) => {
196
- if (error) execFile("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
191
+ run("wslview", [url], (error) => {
192
+ if (error) run("rundll32.exe", ["url.dll,FileProtocolHandler", url], ignore);
197
193
  });
198
194
  return;
199
195
  }
200
- execFile("xdg-open", [url], ignore);
196
+ run("xdg-open", [url], ignore);
201
197
  }
202
198
  /**
203
- * Start a local HTTP callback server, open the browser to a caller-built
204
- * authorize URL, and wait for the redirect back to `http://localhost:PORT/callback`.
205
- *
206
- * The server validates the `state` it appended to the callback URL against the
207
- * incoming request, then runs the caller's `finalize` hook INSIDE the request
208
- * handler (so the browser only ever sees the success page after the underlying
209
- * exchange/link actually succeeded). On finalize success it renders the success
210
- * HTML and resolves with finalize's return value; on finalize failure it
211
- * renders the same "could not complete" failure page the login flow uses and
212
- * rejects with the thrown error. The server is always closed before settling.
213
- *
214
- * `onUrl` is invoked with the authorize URL once the local server is listening,
215
- * so callers can show the URL to the user as a manual fallback when the browser
216
- * fails to open (common on WSL2, headless SSH, Docker, etc.). To match the
217
- * login flow it fires immediately before the browser is opened.
218
- *
219
- * `execFile` is injectable so tests can avoid launching a real browser.
199
+ * Serve `http://localhost:PORT/callback`, open the browser at the caller's
200
+ * authorize URL, and settle with `finalize`'s result. The server closes before settling.
220
201
  */
221
202
  async function awaitBrowserCallback(options) {
222
203
  const http = await import("node:http");
223
204
  const { state, buildAuthUrl, finalize, describeError, validate, onUrl } = options;
224
205
  const timeoutMs = options.timeoutMs ?? 3e5;
225
- const execFile = options.execFile ?? (await import("node:child_process")).execFile;
226
206
  return new Promise((resolve, reject) => {
227
207
  let settled = false;
228
208
  const fail = (error) => {
@@ -295,37 +275,24 @@ async function awaitBrowserCallback(options) {
295
275
  return;
296
276
  }
297
277
  onUrl?.(authUrl);
298
- openBrowser(authUrl, execFile);
278
+ openBrowser(authUrl, options.execFile);
299
279
  });
300
280
  setTimeout(() => {
301
281
  fail(/* @__PURE__ */ new Error("auth: Login timed out after 5 minutes. Try again."));
302
282
  }, timeoutMs).unref();
303
283
  });
304
284
  }
305
- /**
306
- * Start a local HTTP server, open the browser to the platform login page,
307
- * and wait for the OAuth callback with a short-lived code. The CLI exchanges
308
- * the code itself so the localhost callback never accepts bearer tokens.
309
- *
310
- * `onUrl` is invoked with the login URL once the local server is listening,
311
- * so callers can show the URL to the user as a manual fallback when the
312
- * browser fails to open (common on WSL2, headless SSH, Docker, etc.).
313
- */
314
- async function runLogin(root = process.cwd(), provider = "github", onUrl) {
315
- return runPlatformLogin(getApiUrl(root), provider, onUrl);
316
- }
285
+ /** The CLI exchanges the code itself, so the localhost callback never accepts bearer tokens. */
317
286
  async function runPlatformLogin(origin, provider = "github", onUrl) {
318
- const { execFile } = await import("node:child_process");
319
287
  const apiUrl = normalizePlatformApiUrl(origin);
320
288
  const state = randomBytes(32).toString("hex");
321
289
  const codeVerifier = createCodeVerifier();
322
290
  const codeChallenge = createCodeChallenge(codeVerifier);
323
291
  return awaitBrowserCallback({
324
292
  state,
325
- execFile,
326
293
  onUrl,
327
294
  buildAuthUrl: (callback) => {
328
- const loginUrl = new URL("auth/login", apiUrl.endsWith("/") ? apiUrl : `${apiUrl}/`);
295
+ const loginUrl = new URL(`${apiUrl}/auth/login`);
329
296
  loginUrl.searchParams.set("redirect", callback.href);
330
297
  loginUrl.searchParams.set("provider", provider);
331
298
  loginUrl.searchParams.set("code_challenge", codeChallenge);
@@ -342,4 +309,4 @@ async function runPlatformLogin(origin, provider = "github", onUrl) {
342
309
  });
343
310
  }
344
311
  //#endregion
345
- export { getApiUrl as a, getToken as c, readPlatformToken as d, removeToken as f, saveToken as g, savePlatformToken as h, getAccountCredential as i, getTokenSource as l, runPlatformLogin as m, createCodeChallenge as n, getProxyUrl as o, runLogin as p, createCodeVerifier as r, getSiteDomain as s, awaitBrowserCallback as t, openBrowser as u };
312
+ export { getApiUrl as a, getToken as c, readPlatformToken as d, removeToken as f, getAccountCredential as i, getTokenSource as l, savePlatformToken as m, createCodeChallenge as n, getProxyUrl as o, runPlatformLogin as p, createCodeVerifier as r, getSiteDomain as s, awaitBrowserCallback as t, openBrowser as u };
@@ -1,9 +1,9 @@
1
- import { a as getApiUrl, c as getToken, h as savePlatformToken, m as runPlatformLogin, u as openBrowser } from "./auth-B5_tZLxT.mjs";
1
+ import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-D3m88sjf.mjs";
3
- import { r as PlatformClient } from "./client-C2Prx_Bi.mjs";
4
- import { r as selectPlatformLoginMethod } from "./login-D-Q4xw3Q.mjs";
5
- import { t as discoverPlatform } from "./platform-cmd-B8-bCb7t.mjs";
6
- import { execFile } from "node:child_process";
3
+ import { l as formatUrl } from "./output-FNHKw5Ac.mjs";
4
+ import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
5
+ import { r as selectPlatformLoginMethod } from "./login-CZ2Cqa-D.mjs";
6
+ import { t as discoverPlatform } from "./platform-cmd-DxxZO6e5.mjs";
7
7
  //#region src/cli/auth-link.ts
8
8
  async function runAuthLink(root, connectionId) {
9
9
  const token = getToken(root);
@@ -12,16 +12,16 @@ async function runAuthLink(root, connectionId) {
12
12
  const platform = await discoverPlatform(apiUrl);
13
13
  if (!platform.authentication) throw new Error("auth: This platform must be upgraded before linking login methods.");
14
14
  const target = await selectPlatformLoginMethod(platform, connectionId);
15
- const existing = await new PlatformClient(token, apiUrl).whoami();
15
+ const existing = await new PlatformClient(token, { apiUrl }).whoami();
16
16
  log.info(`Sign in again to ${existing.login} using an already linked login method.`);
17
17
  const source = await selectPlatformLoginMethod(platform);
18
- const freshToken = await runPlatformLogin(apiUrl, source.id, (url) => log.info(`Sign in: ${url}`));
19
- const client = new PlatformClient(freshToken, apiUrl);
18
+ const freshToken = await runPlatformLogin(apiUrl, source.id, (url) => log.info(`Sign in: ${formatUrl(url)}`));
19
+ const client = new PlatformClient(freshToken, { apiUrl });
20
20
  if ((await client.whoami()).id !== existing.id) throw new Error("auth: You signed in to a different Void account. Start again with a login method already linked to your original account.");
21
21
  savePlatformToken(freshToken, apiUrl);
22
22
  const launch = await client.startIdentityLink(target.id);
23
- log.info(`Authenticate with ${target.label}, then review and confirm the identity in your browser.\n${launch.url}`);
24
- openBrowser(launch.url, execFile);
23
+ log.info(`Authenticate with ${target.label}, then review and confirm the identity in your browser.\n${formatUrl(launch.url)}`);
24
+ openBrowser(launch.url);
25
25
  }
26
26
  //#endregion
27
27
  export { runAuthLink };