void 0.27.0 → 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 (283) hide show
  1. package/README.md +3 -1
  2. package/dist/{account-cmd-l-FM7Ioq.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-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
  8. package/dist/{auth-link-vz9Z2kmG.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-DvsCUVw4.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-D6we0VjO.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
  16. package/dist/{cache-CZRdzKx1.mjs → cache-D0Tt28cn.mjs} +5 -5
  17. package/dist/{cancel-deploy-CQ3NnMvf.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-BcIBSKqG.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 +41 -15
  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-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-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-BfPBHHm-.mjs → connect-nukQSoEO.mjs} +8 -8
  45. package/dist/{create-project-BdXEFKal.mjs → create-project-D4APeBwX.mjs} +7 -7
  46. package/dist/{create-project-qFDC45zg.mjs → create-project-DL7YXpjj.mjs} +1 -1
  47. package/dist/{db-Xs80hcaA.mjs → db-27RztQLy.mjs} +173 -263
  48. package/dist/{delete-d2vuou3j.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-BsDUBAvt.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-_lGAHOhp.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-C74QepDE.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-DaDdBbSS.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-0bTe_lID.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-DaBGmaXC.mjs → init-ZWOJvc-Z.mjs} +179 -388
  91. package/dist/isr-config-DPjXM8J2.mjs +194 -0
  92. package/dist/{link-C6fjafep.mjs → link-UEc7bnF4.mjs} +8 -8
  93. package/dist/{list-BTFBlqKl.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-GKcNUmtI.mjs → login-CZ2Cqa-D.mjs} +11 -11
  99. package/dist/login-DhK7o1oJ.mjs +2 -0
  100. package/dist/{logs-BiMSULmc.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-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
  108. package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
  109. package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
  110. package/dist/{operator-cmd-BT4hgavL.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-DUeXY9Om.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
  123. package/dist/platform-args-Cm7x-fot.mjs +2 -0
  124. package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
  125. package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
  126. package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
  127. package/dist/{platform-cmd-BbmJiq5O.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
  128. package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DxxZO6e5.mjs} +15 -15
  129. package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
  130. package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
  131. package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
  132. package/dist/{platform-lifecycle-ByAlpkhV.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
  133. package/dist/{platform-management-CBOT4BSM.mjs → platform-management-CYrLvTGH.mjs} +1 -1
  134. package/dist/{platform-management-CuuVDhyt.mjs → platform-management-t7HKy4-U.mjs} +632 -124
  135. package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
  136. package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
  137. package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
  138. package/dist/{platform-setup-BBxRxmFC.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-DaoRrn-8.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
  148. package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
  149. package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
  150. package/dist/{project-team-Q_lCA7Io.mjs → project-team-B3_QcStG.mjs} +6 -6
  151. package/dist/{project-token-BArgK9o1.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-KO9Hu2Pq.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-C7Oeoh5u.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-DVAtrLAl.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-BvtB7IjY.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/durable-state.md +24 -0
  236. package/docs/guide/platform/administration/access.md +4 -0
  237. package/docs/guide/platform/administration/connected-apps.md +55 -0
  238. package/docs/guide/platform/installation/credentials.md +3 -1
  239. package/docs/guide/quickstart.md +2 -0
  240. package/docs/guide/sandboxes.md +2 -0
  241. package/docs/reference/api/deploy.md +23 -0
  242. package/docs/reference/api/pages.md +2 -0
  243. package/docs/reference/api.md +2 -1
  244. package/docs/reference/cli/database.md +9 -3
  245. package/docs/reference/cli/platform-installation.md +1 -1
  246. package/docs/reference/cli/setup.md +2 -0
  247. package/package.json +13 -16
  248. package/skills/void/SKILL.md +1 -0
  249. package/dist/auth-LMJcNESe.mjs +0 -2
  250. package/dist/cf-build-output-H9a97vME.mjs +0 -2
  251. package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
  252. package/dist/client-tso2OfcG.mjs +0 -2
  253. package/dist/collect-DLyFDiKW.mjs +0 -2
  254. package/dist/config-5r-YpMC-.mjs +0 -2
  255. package/dist/config-B_ggY-IO.mjs +0 -89
  256. package/dist/config-BtSFvXZx.mjs +0 -2
  257. package/dist/config-write-AHGesphx.mjs +0 -61
  258. package/dist/deploy-Bqe1PYBw.mjs +0 -10458
  259. package/dist/deploy-VsWsVQkw.mjs +0 -2
  260. package/dist/dev-inbox-CK-UuPob.mjs +0 -297
  261. package/dist/discover-EDUf6JJw.mjs +0 -2
  262. package/dist/dist-_UUlL6bg.mjs +0 -2
  263. package/dist/env-validation-Dxdx_5wo.mjs +0 -951
  264. package/dist/gen-dA9hW7AV.mjs +0 -2
  265. package/dist/head-client-DzmJGN4C.mjs +0 -90
  266. package/dist/help-DfQYVfGY.mjs +0 -2
  267. package/dist/login-mx_ydhmp.mjs +0 -2
  268. package/dist/migrate-BHp07yJE.mjs +0 -2
  269. package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
  270. package/dist/pages/head-client.d.mts +0 -13
  271. package/dist/pages/head-client.mjs +0 -2
  272. package/dist/platform-args-D4E1PjVw.mjs +0 -2
  273. package/dist/prepare-DRUV-g3X.mjs +0 -2
  274. package/dist/project-DedqCp59.mjs +0 -2
  275. package/dist/provision-Wu9ZBk9L.mjs +0 -2
  276. package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
  277. package/dist/resolve-project-CP8rZs_p.mjs +0 -28
  278. package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
  279. package/dist/runner-pg-BGYRFdRp.mjs +0 -2
  280. package/dist/runtime/env-helpers.d.mts +0 -2
  281. package/dist/runtime/env-helpers.mjs +0 -2
  282. package/dist/validate-BJr9LfXy.mjs +0 -2
  283. package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
@@ -0,0 +1,180 @@
1
+ import { a as join } from "./dist-ipQi0Q8y.mjs";
2
+ import { n as scanWranglerDotenvKeys } from "./dotenv-CNazY3-w.mjs";
3
+ import { t as CLOUDFLARE_DEPLOY_BUILD_ENV } from "./env-BJjULvL0.mjs";
4
+ import { i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DIrqEHQo.mjs";
5
+ import { a as deleteEnvVarCaseAware, d as resolvePinnedApiBaseUrl, t as assertNoTransportRedirectInProjectDotenv, u as provisionEnv } from "./provision-DDh7ITVS.mjs";
6
+ import { readWranglerTopLevelString } from "@void/deploy-cloudflare";
7
+ //#region src/cli/deploy-transport.ts
8
+ /**
9
+ * Marks a build child as driven by a MANAGED `void deploy`.
10
+ *
11
+ * The platform resolves the asset routing policy out-of-band (`resolveAssetConfig`
12
+ * → `manifest.assetConfig`) and applies it to the uploaded script, so settings the
13
+ * Vite plugin cannot safely write into the built wrangler config — `routing.notFound`
14
+ * for a Class A framework, which needs an `assets` policy Void does not own there —
15
+ * are still honored on this path. `void:framework-build-wrapper` warns about exactly
16
+ * those when this flag is ABSENT, i.e. on a self-hosted `vite build && wrangler deploy`.
17
+ *
18
+ * Passed through the CHILD env only (never `process.env`), the same way
19
+ * `VOID_DEPLOY_PROJECT_ID` is, so it cannot leak into an unrelated child process or a
20
+ * later `void dev` in the same shell.
21
+ *
22
+ * Deliberately NOT set by `runCloudflareDeploy` (`--platform cloudflare`): that flow
23
+ * deploys the built output to the user's own account and IS the self-host path the
24
+ * warning is about.
25
+ */
26
+ const MANAGED_DEPLOY_BUILD_ENV = { VOID_DEPLOY_BUILD: "1" };
27
+ /** Remove managed-only build markers from an explicit native Cloudflare child. */
28
+ function scrubManagedDeployBuildMarkers(env) {
29
+ deleteEnvVarCaseAware(env, "VOID_DEPLOY_PROJECT_ID");
30
+ deleteEnvVarCaseAware(env, CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV);
31
+ for (const name of Object.keys(MANAGED_DEPLOY_BUILD_ENV)) deleteEnvVarCaseAware(env, name);
32
+ return env;
33
+ }
34
+ /**
35
+ * Deploy-time env selectors that pin the WRONG worker/config out from under the
36
+ * top-level config this flow provisions + preflights. Scrubbed from every child env
37
+ * and fenced in the project dotenv (see below), on top of the provisioner's transport
38
+ * scrub/fence which owns the endpoint-redirect + `CLOUDFLARE_ENV` vars:
39
+ * - `WRANGLER_CI_OVERRIDE_NAME` — wrangler 4.131 applies it AFTER config load
40
+ * (`mergeSharedConfigArgs` → `getCIOverrideName()`), REPLACING the upload name, so a
41
+ * bare `wrangler deploy` uploads a worker whose name the generated-config check never
42
+ * validated.
43
+ * - `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — the CF Vite plugin points the build at an
44
+ * ALTERNATE wrangler config, flattening a different binding set into
45
+ * `dist/ssr/wrangler.json`.
46
+ */
47
+ const DEPLOY_CONFIG_OVERRIDE_ENV_VARS = ["WRANGLER_CI_OVERRIDE_NAME", "CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH"];
48
+ /**
49
+ * The dotenv files wrangler 4.131 reloads into `process.env` (`override: true`) for
50
+ * the orchestrator's `--env=` calls (`getDefaultEnvFiles("")`), so a repo dotenv here
51
+ * would resurrect `WRANGLER_CI_OVERRIDE_NAME` at the DEPLOY step after the child-env
52
+ * scrub removed it.
53
+ */
54
+ const DEPLOY_WRANGLER_DOTENV_FILES = [
55
+ ".env",
56
+ ".env.local",
57
+ ".env.",
58
+ ".env..local"
59
+ ];
60
+ /**
61
+ * The dotenv files Vite's `loadEnv(mode, …)` reads for a production `vite build`
62
+ * (`.env`, `.env.local`, `.env.production`, `.env.production.local`), where the CF Vite
63
+ * plugin picks up `CLOUDFLARE_ENV` / `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` — a set
64
+ * DISJOINT from wrangler's `--env=` files, so it is fenced separately for the build.
65
+ */
66
+ const DEPLOY_VITE_DOTENV_FILES = [
67
+ ".env",
68
+ ".env.local",
69
+ ".env.production",
70
+ ".env.production.local"
71
+ ];
72
+ /** The first non-blank ambient selector of a non-top-level worker/config, if any. */
73
+ function findAmbientConfigOverride() {
74
+ return ["CLOUDFLARE_ENV", "CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH"].find((name) => process.env[name]?.trim());
75
+ }
76
+ /**
77
+ * FAIL CLOSED when the AMBIENT env selects a non-top-level worker/config for the
78
+ * Cloudflare backend, which deploys the top-level environment of the canonical root
79
+ * config ONLY. `CLOUDFLARE_ENV` picks a named env block (different account/name/bindings);
80
+ * `CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH` points the build at a different config. We refuse
81
+ * rather than silently deploy a target the drift-check / provision never reasoned about.
82
+ */
83
+ function assertNoAmbientConfigOverride() {
84
+ const override = findAmbientConfigOverride();
85
+ if (override === "CLOUDFLARE_ENV") throw new Error("CLOUDFLARE_ENV is set. --platform cloudflare deploys the TOP-LEVEL environment of your root wrangler config only (a named environment can carry a different account, worker name, or binding set). Unset CLOUDFLARE_ENV and retry.");
86
+ if (override) throw new Error("CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH is set. --platform cloudflare builds from the canonical root wrangler config only. Unset it and retry.");
87
+ }
88
+ /** Which of `names` the project dotenv `file` declares; win32 keys match case-insensitively. */
89
+ function findDotenvDeclaration(root, file, names, platform) {
90
+ const caseInsensitive = platform === "win32";
91
+ const rawKeys = scanWranglerDotenvKeys(join(root, file));
92
+ const keys = caseInsensitive ? new Set([...rawKeys].map((key) => key.toLowerCase())) : rawKeys;
93
+ return names.find((name) => keys.has(caseInsensitive ? name.toLowerCase() : name));
94
+ }
95
+ /** The first dotenv file wrangler reloads that declares `WRANGLER_CI_OVERRIDE_NAME`. */
96
+ function findWranglerCiOverrideDotenvFile(root, platform = process.platform) {
97
+ return DEPLOY_WRANGLER_DOTENV_FILES.find((file) => findDotenvDeclaration(root, file, ["WRANGLER_CI_OVERRIDE_NAME"], platform));
98
+ }
99
+ /**
100
+ * FAIL CLOSED when the project's dotenv files declare a deploy-time config-override
101
+ * selector. wrangler / Vite reload dotenv on every command, so a repo dotenv would
102
+ * reintroduce a scrubbed var AFTER the child-env scrub — reselecting the upload worker
103
+ * name (wrangler `--env=` files) or the build's wrangler config (Vite production files).
104
+ * The provisioner's transport fence ({@link assertNoTransportRedirectInProjectDotenv})
105
+ * owns `CLOUDFLARE_ENV` + the endpoint-redirect vars; this closes the deploy-specific
106
+ * name/config-path selectors it does not cover, across BOTH consumers' file sets.
107
+ * Exported for direct unit testing of the file-set + win32 case rule.
108
+ */
109
+ function assertNoConfigOverrideInProjectDotenv(root, platform = process.platform) {
110
+ const ciOverrideFile = findWranglerCiOverrideDotenvFile(root, platform);
111
+ if (ciOverrideFile) throw new Error(`the project file "${ciOverrideFile}" sets WRANGLER_CI_OVERRIDE_NAME, which wrangler reloads on every command and applies AFTER config load to REPLACE the deployed worker name — so \`wrangler deploy\` would upload a worker whose name was never validated. Remove it from "${ciOverrideFile}" (set it in your shell/CI only if you truly need a CI name override).`);
112
+ for (const file of DEPLOY_VITE_DOTENV_FILES) {
113
+ const offender = findDotenvDeclaration(root, file, ["CLOUDFLARE_ENV", "CLOUDFLARE_VITE_WRANGLER_CONFIG_PATH"], platform);
114
+ if (offender) throw new Error(`the project file "${file}" sets ${offender}, which the Cloudflare Vite plugin reads at build time to select a named environment or an ALTERNATE wrangler config — flattening a different binding set into dist/ssr/wrangler.json than this deploy provisioned. Remove ${offender} from "${file}".`);
115
+ }
116
+ }
117
+ /**
118
+ * Resolve + validate the ONE pinned transport for the whole deploy, and FAIL CLOSED
119
+ * on any ambient/dotenv redirect that would move the target out from under the pinned
120
+ * top-level config. Reuses the provisioner's resolver + dotenv fence so provision AND
121
+ * the deploy tail (build / whoami / migrate / deploy) share one source of truth.
122
+ * Returns the single resolved API base URL to pin into every child env.
123
+ */
124
+ function resolveDeployTransport(root, rootConfig) {
125
+ assertNoAmbientConfigOverride();
126
+ assertNoTransportRedirectInProjectDotenv(root);
127
+ assertNoConfigOverrideInProjectDotenv(root);
128
+ return resolvePinnedApiBaseUrl(process.env, readWranglerTopLevelString(rootConfig, "compliance_region"));
129
+ }
130
+ /**
131
+ * Build a child env for an orchestrator-owned wrangler / build invocation. Reuses the
132
+ * provisioner's {@link provisionEnv} (scrubs the CF Access pair + EVERY transport
133
+ * selector incl. `CLOUDFLARE_ENV` + win32 case variants, pins ONE account + API base),
134
+ * then scrubs the deploy-specific config-override selectors on top.
135
+ *
136
+ * {@link createDeployWranglerRunner} runs the deploy's Cloudflare operations with this
137
+ * env, so it KEEPS the Cloudflare credentials; only children that run project code layer
138
+ * {@link scrubWranglerAuthCredentials} on top.
139
+ */
140
+ function deployChildEnv(accountId, apiBaseUrl) {
141
+ const env = provisionEnv({
142
+ accountId,
143
+ apiBaseUrl
144
+ });
145
+ for (const name of DEPLOY_CONFIG_OVERRIDE_ENV_VARS) deleteEnvVarCaseAware(env, name);
146
+ deleteEnvVarCaseAware(env, "WRANGLER_LOG");
147
+ env.WRANGLER_LOG = "log";
148
+ env.CLOUDFLARE_AUTH_USE_KEYRING = "true";
149
+ return env;
150
+ }
151
+ /**
152
+ * Delete every {@link WRANGLER_AUTH_CREDENTIAL_ENV_VARS} entry from `env` IN PLACE and
153
+ * return it, for a Cloudflare-fork child that executes UNTRUSTED project code.
154
+ */
155
+ function scrubWranglerAuthCredentials(env) {
156
+ for (const name of WRANGLER_AUTH_CREDENTIAL_ENV_VARS) deleteEnvVarCaseAware(env, name);
157
+ deleteEnvVarCaseAware(env, "DATABASE_URL");
158
+ deleteEnvVarCaseAware(env, "VOID_TOKEN");
159
+ return env;
160
+ }
161
+ /**
162
+ * Build the child env for the isolated env-schema probe. Starts from
163
+ * {@link deployChildEnv} (CF Access + every transport selector scrubbed, one account +
164
+ * API base pinned), then (1) scrubs the FULL wrangler-auth credential set case-aware —
165
+ * the probe needs no credentials — and (2) pins `NODE_ENV=production` so the child
166
+ * evaluates env.ts under the SAME environment the build uses (`vite build` sets
167
+ * `NODE_ENV=production`), keeping the required-key set the probe derives identical to
168
+ * the built worker's. Used by BOTH the pre-build facts probe and the post-build
169
+ * `validate-emitted` probe.
170
+ */
171
+ function buildSchemaProbeEnv(accountId, apiBaseUrl) {
172
+ const env = scrubManagedDeployBuildMarkers(scrubWranglerAuthCredentials(deployChildEnv(accountId, apiBaseUrl)));
173
+ deleteEnvVarCaseAware(env, CLOUDFLARE_DEPLOY_BUILD_ENV);
174
+ env[CLOUDFLARE_DEPLOY_BUILD_ENV] = "1";
175
+ deleteEnvVarCaseAware(env, "NODE_ENV");
176
+ env.NODE_ENV = "production";
177
+ return env;
178
+ }
179
+ //#endregion
180
+ export { findWranglerCiOverrideDotenvFile as a, scrubWranglerAuthCredentials as c, findAmbientConfigOverride as i, buildSchemaProbeEnv as n, resolveDeployTransport as o, deployChildEnv as r, scrubManagedDeployBuildMarkers as s, MANAGED_DEPLOY_BUILD_ENV as t };
@@ -0,0 +1,10 @@
1
+ import { DeployArtifact } from "@void/deploy-core";
2
+ //#region src/deploy.d.ts
3
+ export type PreparedDeployArtifact = {
4
+ artifact: DeployArtifact;
5
+ /** Static asset bytes keyed by URL path, encoded as base64. */
6
+ assets: Record<string, string>;
7
+ };
8
+ /** Package an already-built Void app for managed deployment, without platform credentials. */
9
+ export declare function prepareDeployArtifact(root?: string): Promise<PreparedDeployArtifact>;
10
+ //#endregion
@@ -0,0 +1,82 @@
1
+ import { a as join, c as resolve } from "./dist-ipQi0Q8y.mjs";
2
+ import { c as isNodeTarget, d as readConfig } from "./config-Bx_1SpnO.mjs";
3
+ import { o as validateSsrEntry } from "./entry-ehmBvs5w.mjs";
4
+ import { r as hasEmailHandlers } from "./email-BcjSyAL0.mjs";
5
+ import { a as resolveDistDir, c as hasApiRoutes, l as hasDocumentRoutes, n as collectRevalidate, o as resolveWorkerDirName, u as resolveAssetConfig } from "./isr-config-DPjXM8J2.mjs";
6
+ import { t as analyzeApplication } from "./application-routing-Dy589Vgn.mjs";
7
+ import { I as toManifestSchedulesAndQueues, L as validateDeployMigrations, M as resolveDeployWranglerCompat, b as assertWorkerMainUploaded, f as mergeAndLintRoutingRules, h as assertDeploySchemaDriftFree, j as resolveDeployWorkerMain, o as collectAndHashAssets, r as assertManagedDurableStateSupported, s as collectWorkerFiles, t as assembleVoidManifest } from "./deploy-managed-static-CGswbcay.mjs";
8
+ import { existsSync } from "node:fs";
9
+ import { createDeployArtifact } from "@void/deploy-core";
10
+ //#region src/deploy.ts
11
+ /** Package an already-built Void app for managed deployment, without platform credentials. */
12
+ async function prepareDeployArtifact(root = process.cwd()) {
13
+ root = resolve(root);
14
+ const config = readConfig(root);
15
+ if (isNodeTarget(config.target) || config.output === "static") throw new Error("Artifact preparation requires a Void Cloudflare Worker build.");
16
+ assertManagedDurableStateSupported(root);
17
+ const analysis = await analyzeApplication(root, {
18
+ config,
19
+ environment: "prod"
20
+ });
21
+ if (analysis.bindings.needsSandbox || analysis.bindings.needsLive) throw new Error("Artifact preparation does not yet support Sandbox or Live resources. Use void deploy for those apps.");
22
+ if (config.routing?.prerender?.length || config.remote) throw new Error("Artifact preparation requires a build without remote data or deploy-time prerendering.");
23
+ const dist = resolveDistDir(root);
24
+ const workerDir = join(dist, resolveWorkerDirName(dist));
25
+ const clientDir = join(dist, "client");
26
+ const { paths, dialect, bindings, authEnabled, scan, websockets } = analysis;
27
+ assertDeploySchemaDriftFree(root, dialect);
28
+ const migrations = validateDeployMigrations(paths.migrationsDir, analysis.migrations);
29
+ const { schedules, queues } = toManifestSchedulesAndQueues(analysis.jobs, analysis.queues);
30
+ const pages = existsSync(paths.pagesDir);
31
+ const ssr = Boolean(validateSsrEntry(root, paths)) || pages;
32
+ const compat = resolveDeployWranglerCompat(root, config, workerDir, {
33
+ authEnabled,
34
+ dialect
35
+ });
36
+ const workerMain = resolveDeployWorkerMain(config, workerDir);
37
+ const workerFiles = collectWorkerFiles(workerDir);
38
+ if (!workerFiles.size) throw new Error("Worker build output is missing. Run the app build first.");
39
+ assertWorkerMainUploaded(workerFiles, workerMain);
40
+ const rules = mergeAndLintRoutingRules(clientDir, config.routing);
41
+ const manifest = assembleVoidManifest(pages ? scan.pages : null, false, {
42
+ bindings,
43
+ hasEmailHandlers: scan.email !== void 0 && hasEmailHandlers(scan.email),
44
+ migrations,
45
+ schedules,
46
+ queues,
47
+ dialect,
48
+ webSockets: websockets,
49
+ ssr: ssr || scan.routes.length > 0 || scan.middleware.length > 0 || websockets.length > 0 || authEnabled,
50
+ revalidate: collectRevalidate(config, pages ? scan.pages : null),
51
+ assetConfig: resolveAssetConfig({
52
+ isSsr: ssr,
53
+ hasPages: pages,
54
+ hasApiRoutes: hasApiRoutes(scan.routes) || hasApiRoutes(websockets) || authEnabled,
55
+ hasDocumentRoutes: hasDocumentRoutes(scan.routes),
56
+ hasMiddleware: scan.middleware.length > 0,
57
+ hasWebSockets: hasDocumentRoutes(websockets),
58
+ authEnabled,
59
+ liveEnabled: false,
60
+ notFound: config.routing?.notFound
61
+ }),
62
+ options: {
63
+ compatibilityDate: compat?.compatibilityDate,
64
+ compatibilityFlags: compat?.compatibilityFlags,
65
+ cpuMs: config.worker?.limits?.cpu_ms,
66
+ workerMain,
67
+ revalidateQueryAllowlist: config.routing?.revalidateQueryAllowlist
68
+ },
69
+ ...rules
70
+ }, config.routing?.revalidate, config.routing?.isr !== false);
71
+ const { assetManifest, assetFiles } = await collectAndHashAssets(clientDir);
72
+ return {
73
+ artifact: createDeployArtifact({
74
+ manifest,
75
+ assetManifest,
76
+ workerFiles: Object.fromEntries([...workerFiles].map(([path, bytes]) => [path, bytes.toString("base64")]))
77
+ }),
78
+ assets: Object.fromEntries([...assetFiles].map(([path, bytes]) => [path, bytes.toString("base64")]))
79
+ };
80
+ }
81
+ //#endregion
82
+ export { prepareDeployArtifact };
@@ -0,0 +1,217 @@
1
+ import { n as bytesToBase64, t as base64ToBytes } from "./base64-DVrOndmI.mjs";
2
+ import { a as newId, t as MAX_MESSAGE_BYTES } from "./mime-srOklVVv.mjs";
3
+ //#region src/runtime/email/dev-inbox.ts
4
+ /**
5
+ * In-memory email capture for `void dev` and tests. The inbox buffer lives in
6
+ * the Vite dev server's Node process; `sendEmail` runs in workerd, a separate
7
+ * process, so it POSTs each capture to {@link DEV_INBOX_CAPTURE_URL} over the
8
+ * dev assets binding. The sink registry serves only sends in the same
9
+ * isolate, such as `createEmailTestHarness`.
10
+ */
11
+ /** Mount point of the dev inbox on the Vite dev server. */
12
+ const DEV_INBOX_PREFIX = "/__void/inbox";
13
+ /** Capture endpoint, relative to {@link DEV_INBOX_PREFIX} (connect strips the mount). */
14
+ const DEV_INBOX_CAPTURE_PATH = "/_capture";
15
+ /** Absolute path the worker POSTs a captured message to. */
16
+ const DEV_INBOX_CAPTURE_URL = `${DEV_INBOX_PREFIX}${DEV_INBOX_CAPTURE_PATH}`;
17
+ /**
18
+ * Serve-only var naming the binding that loops back to the Vite dev server.
19
+ * Its presence is the dev gate (`shouldInjectEmailDevInboxVar` in index.ts).
20
+ */
21
+ const DEV_INBOX_ENV_VAR = "__VOID_EMAIL_DEV_INBOX";
22
+ /**
23
+ * Serve-only var carrying the dev-trigger token for the capture POST: the
24
+ * router's token const is not importable from `void/email`.
25
+ */
26
+ const DEV_INBOX_TOKEN_ENV_VAR = "__VOID_EMAIL_DEV_INBOX_TOKEN";
27
+ /**
28
+ * Every inbox route requires the dev-trigger token, as this header or, for
29
+ * browser links, this query parameter.
30
+ */
31
+ const DEV_INBOX_TOKEN_HEADER = "x-void-dev-trigger";
32
+ const DEV_INBOX_TOKEN_QUERY = "token";
33
+ /**
34
+ * Marks a capture response: over the assets binding, a plain 200 could also
35
+ * be a static asset.
36
+ */
37
+ const DEV_INBOX_ACK_HEADER = "x-void-email-inbox";
38
+ const DEV_INBOX_ACK_VALUE = "captured";
39
+ /**
40
+ * Capture body cap. 6x covers the base64 MIME plus the JSON copy of every
41
+ * rendered caller string for a max-size message. Strings with no MIME
42
+ * footprint (a bcc name, a reserved header, folded-away whitespace) are not
43
+ * bounded by it, so a message padded with them is still refused.
44
+ */
45
+ const DEV_INBOX_MAX_CAPTURE_BYTES = 6 * MAX_MESSAGE_BYTES;
46
+ /** Encode a captured message for the worker -> dev-server hop (`raw` as base64). */
47
+ function serializeCapturedMessage(message) {
48
+ return JSON.stringify({
49
+ ...message,
50
+ raw: bytesToBase64(message.raw)
51
+ });
52
+ }
53
+ function asAddress(value) {
54
+ if (typeof value !== "object" || value === null) return;
55
+ const v = value;
56
+ if (typeof v.email !== "string") return;
57
+ return typeof v.name === "string" ? {
58
+ email: v.email,
59
+ name: v.name
60
+ } : { email: v.email };
61
+ }
62
+ function asAddressList(value) {
63
+ if (!Array.isArray(value)) return;
64
+ const out = [];
65
+ for (const entry of value) {
66
+ const address = asAddress(entry);
67
+ if (!address) return;
68
+ out.push(address);
69
+ }
70
+ return out;
71
+ }
72
+ /**
73
+ * Decode a capture payload. Returns `undefined` for anything malformed — the
74
+ * endpoint is reachable from the dev server's own origin, so it must reject
75
+ * junk rather than throw inside the middleware.
76
+ */
77
+ function parseCapturedMessage(value) {
78
+ if (typeof value !== "object" || value === null) return;
79
+ const v = value;
80
+ if (typeof v.id !== "string" || typeof v.raw !== "string") return;
81
+ let raw;
82
+ try {
83
+ raw = base64ToBytes(v.raw);
84
+ } catch {
85
+ return;
86
+ }
87
+ const from = asAddress(v.from);
88
+ const to = asAddressList(v.to);
89
+ const cc = asAddressList(v.cc);
90
+ const bcc = asAddressList(v.bcc);
91
+ if (!from || !to || !cc || !bcc) return;
92
+ const attachments = [];
93
+ if (!Array.isArray(v.attachments)) return;
94
+ for (const entry of v.attachments) {
95
+ if (typeof entry !== "object" || entry === null) return;
96
+ const a = entry;
97
+ attachments.push({
98
+ filename: typeof a.filename === "string" ? a.filename : "",
99
+ contentType: typeof a.contentType === "string" ? a.contentType : "application/octet-stream",
100
+ size: typeof a.size === "number" ? a.size : 0,
101
+ ...typeof a.contentId === "string" && { contentId: a.contentId },
102
+ disposition: a.disposition === "inline" ? "inline" : "attachment"
103
+ });
104
+ }
105
+ const headers = {};
106
+ if (typeof v.headers === "object" && v.headers !== null) {
107
+ for (const [k, hv] of Object.entries(v.headers)) if (typeof hv === "string") headers[k] = hv;
108
+ }
109
+ const replyTo = asAddress(v.replyTo);
110
+ return {
111
+ id: v.id,
112
+ capturedAt: typeof v.capturedAt === "number" ? v.capturedAt : Date.now(),
113
+ raw,
114
+ messageId: typeof v.messageId === "string" ? v.messageId : "",
115
+ from,
116
+ to,
117
+ cc,
118
+ bcc,
119
+ ...replyTo && { replyTo },
120
+ subject: typeof v.subject === "string" ? v.subject : "",
121
+ ...typeof v.text === "string" && { text: v.text },
122
+ ...typeof v.html === "string" && { html: v.html },
123
+ headers,
124
+ attachments
125
+ };
126
+ }
127
+ const SINK_KEY = "__voidEmailSinks__";
128
+ const BUFFER_KEY = "__voidEmailDevBuffer__";
129
+ const DEFAULT_BUFFER_LIMIT = 100;
130
+ /** Retained-byte budget: 100 messages of up to 5 MiB each would fill the dev server's heap. */
131
+ const DEFAULT_BUFFER_BYTES = 67108864;
132
+ const inboxGlobal = globalThis;
133
+ function registry() {
134
+ let r = inboxGlobal[SINK_KEY];
135
+ if (!r) {
136
+ r = { sinks: /* @__PURE__ */ new Set() };
137
+ inboxGlobal[SINK_KEY] = r;
138
+ }
139
+ return r;
140
+ }
141
+ function registerEmailSink(sink) {
142
+ const r = registry();
143
+ r.sinks.add(sink);
144
+ return () => r.sinks.delete(sink);
145
+ }
146
+ function dispatchToSinks(message) {
147
+ for (const sink of registry().sinks) try {
148
+ sink(message);
149
+ } catch (err) {
150
+ console.warn("[email-dev-inbox] sink error:", err);
151
+ }
152
+ }
153
+ function hasActiveSink() {
154
+ return registry().sinks.size > 0;
155
+ }
156
+ /** Get or create the shared dev-server ring buffer. */
157
+ function getDevBuffer() {
158
+ let b = inboxGlobal[BUFFER_KEY];
159
+ if (!b) {
160
+ b = {
161
+ bytes: 0,
162
+ items: []
163
+ };
164
+ inboxGlobal[BUFFER_KEY] = b;
165
+ }
166
+ return b;
167
+ }
168
+ /** What a retained message costs: the raw MIME plus both decoded bodies. */
169
+ function messageBytes(message) {
170
+ return message.raw.byteLength + (message.text?.length ?? 0) + (message.html?.length ?? 0);
171
+ }
172
+ function pushToDevBuffer(message) {
173
+ const b = getDevBuffer();
174
+ b.items.push(message);
175
+ b.bytes += messageBytes(message);
176
+ while (b.items.length > DEFAULT_BUFFER_LIMIT || b.bytes > DEFAULT_BUFFER_BYTES && b.items.length > 1) {
177
+ const evicted = b.items.shift();
178
+ if (evicted) b.bytes -= messageBytes(evicted);
179
+ }
180
+ }
181
+ function listDevMessages() {
182
+ return [...getDevBuffer().items].reverse();
183
+ }
184
+ function findDevMessage(id) {
185
+ return getDevBuffer().items.find((m) => m.id === id);
186
+ }
187
+ function clearDevBuffer() {
188
+ const b = getDevBuffer();
189
+ b.items.length = 0;
190
+ b.bytes = 0;
191
+ }
192
+ function captureMessage(email, raw, messageId) {
193
+ return {
194
+ id: newId("dev"),
195
+ capturedAt: Date.now(),
196
+ raw,
197
+ messageId,
198
+ from: email.from,
199
+ to: email.to,
200
+ cc: email.cc,
201
+ bcc: email.bcc,
202
+ replyTo: email.replyTo,
203
+ subject: email.subject,
204
+ text: email.text,
205
+ html: email.html,
206
+ headers: { ...email.headers },
207
+ attachments: email.attachments.map((a) => ({
208
+ filename: a.filename,
209
+ contentType: a.contentType,
210
+ size: a.bytes.byteLength,
211
+ contentId: a.contentId,
212
+ disposition: a.disposition
213
+ }))
214
+ };
215
+ }
216
+ //#endregion
217
+ export { parseCapturedMessage as _, DEV_INBOX_ENV_VAR as a, serializeCapturedMessage as b, DEV_INBOX_TOKEN_ENV_VAR as c, captureMessage as d, clearDevBuffer as f, listDevMessages as g, hasActiveSink as h, DEV_INBOX_CAPTURE_URL as i, DEV_INBOX_TOKEN_HEADER as l, findDevMessage as m, DEV_INBOX_ACK_VALUE as n, DEV_INBOX_MAX_CAPTURE_BYTES as o, dispatchToSinks as p, DEV_INBOX_CAPTURE_PATH as r, DEV_INBOX_PREFIX as s, DEV_INBOX_ACK_HEADER as t, DEV_INBOX_TOKEN_QUERY as u, pushToDevBuffer as v, registerEmailSink as y };
@@ -0,0 +1,2 @@
1
+ import { t as discoverSchema } from "./discover-D2PGT63u.mjs";
2
+ export { discoverSchema };
@@ -1,5 +1,5 @@
1
- import { l as relative } from "./dist-BVqXeR_h.mjs";
2
- import { n as readProjectPaths } from "./project-paths-GgcMozYz.mjs";
1
+ import { s as relative } from "./dist-ipQi0Q8y.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
3
3
  import { existsSync, statSync } from "node:fs";
4
4
  //#region src/drizzle/discover.ts
5
5
  /**
@@ -44,7 +44,6 @@ const win32 = {
44
44
  const posix = { ...nodePath.posix };
45
45
  posix.posix = win32.posix = posix;
46
46
  posix.win32 = win32.win32 = win32;
47
- const path = isWindows ? win32 : posix;
48
- const { basename, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, parse, relative, resolve, sep, toNamespacedPath } = path;
47
+ const { basename, delimiter, dirname, extname, format, isAbsolute, join, matchesGlob, normalize, parse, relative, resolve, sep, toNamespacedPath } = isWindows ? win32 : posix;
49
48
  //#endregion
50
- export { join as a, posix as c, toSlash as d, win32 as f, isAbsolute as i, relative as l, dirname as n, normalize as o, extname as r, path as s, basename as t, resolve as u };
49
+ export { join as a, resolve as c, isAbsolute as i, toSlash as l, dirname as n, normalize as o, extname as r, relative as s, basename as t };
@@ -1,8 +1,9 @@
1
- import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-BAm2aB6Q.mjs";
2
- import { c as getToken } from "./auth-Dn2vw-SG.mjs";
1
+ import { n as readDeploymentPlatform } from "./project-rqDnVsJN.mjs";
2
+ import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { L as log } from "./dist-D3m88sjf.mjs";
4
- import { d as printSuccess, l as import_picocolors, u as note } from "./output-C50ag2r3.mjs";
5
- import { r as PlatformClient } from "./client-DlDJuY0s.mjs";
4
+ import { f as import_picocolors, m as printSuccess, p as note } from "./output-FNHKw5Ac.mjs";
5
+ import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
6
+ import { i as resolveCommandProjectId } from "./resolve-project-C_Cu7E8a.mjs";
6
7
  //#region src/cli/domain.ts
7
8
  async function runDomainCommand(root, args) {
8
9
  const platform = readDeploymentPlatform(root);
@@ -14,23 +15,7 @@ async function runDomainCommand(root, args) {
14
15
  process.exit(1);
15
16
  }
16
17
  const client = new PlatformClient(token, { root });
17
- const requestedSlug = args.projectSlug ?? process.env.VOID_PROJECT?.trim();
18
- let projectId;
19
- if (requestedSlug) {
20
- const project = (await client.listProjects()).find((p) => p.slug === requestedSlug);
21
- if (!project) {
22
- log.error(`project: No project found with slug '${requestedSlug}'.`);
23
- process.exit(1);
24
- }
25
- projectId = project.id;
26
- } else {
27
- const config = readProjectConfig(root);
28
- if (!config) {
29
- log.error("No linked project. Run `void project link` or pass --project <name>.");
30
- process.exit(1);
31
- }
32
- projectId = config.projectId;
33
- }
18
+ const projectId = await resolveCommandProjectId(client, root, args.projectSlug);
34
19
  switch (args.subcommand) {
35
20
  case "add": return domainAdd(client, projectId, args.hostname);
36
21
  case "delete": return domainRemove(client, projectId, args.hostname);
@@ -40,7 +25,7 @@ async function runDomainCommand(root, args) {
40
25
  }
41
26
  async function runCloudflareDomainCommand(root, args) {
42
27
  if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
43
- const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-BlYLlowZ.mjs");
28
+ const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-Ds-lX3Ts.mjs");
44
29
  if (args.subcommand === "add") {
45
30
  const result = await changeCloudflareDomain(root, args.hostname, "add");
46
31
  note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
@@ -28,21 +28,13 @@ import { parseEnv } from "node:util";
28
28
  /** Valid dotenv key — ASCII letter/underscore followed by letters/digits/underscore. */
29
29
  const VALID_KEY = /^[A-Za-z_][A-Za-z0-9_]*$/;
30
30
  /**
31
- * Parse the raw contents of a dotenv file into a record, optionally
32
- * expanding `${VAR}` / `$VAR` references against earlier entries.
31
+ * Parse the raw contents of a dotenv file into a record, skipping invalid
32
+ * keys and expanding `${VAR}` / `$VAR` references against earlier entries.
33
33
  */
34
34
  function parseDotenv(content, options = {}) {
35
- const { expand: shouldExpand = true, skipInvalidKeys = true, onWarn } = options;
36
35
  const env = {};
37
- for (const [key, value] of Object.entries(parseEnv(content))) {
38
- if (value === void 0) continue;
39
- if (!VALID_KEY.test(key)) {
40
- if (skipInvalidKeys) continue;
41
- throw new Error(`dotenv: Invalid key '${key}'.`);
42
- }
43
- env[key] = value;
44
- }
45
- return shouldExpand ? expandDotenv(env, { onWarn }) : env;
36
+ for (const [key, value] of Object.entries(parseEnv(content))) if (value !== void 0 && VALID_KEY.test(key)) env[key] = value;
37
+ return expandDotenv(env, options);
46
38
  }
47
39
  /**
48
40
  * Read and parse a dotenv file. Returns `{}` when the file is missing so
@@ -148,10 +140,6 @@ function expandValue(value, resolve) {
148
140
  const WRANGLER_DOTENV_LINE = /(?:^|^)\s*(?:export\s+)?([\w.-]+)(?:\s*=\s*?|:\s+?)(\s*'(?:\\'|[^'])*'|\s*"(?:\\"|[^"])*"|\s*`(?:\\`|[^`])*`|[^#\r\n]+)?\s*(?:#.*)?(?:$|$)/gm;
149
141
  /**
150
142
  * The set of declared dotenv KEYS in `filePath`, parsed the way wrangler does.
151
- * Lives in this leaf module (no `proper-lockfile` / lifecycle side effects) so both
152
- * the provisioner's transport fence and the deploy orchestrator's config-override
153
- * fence can read keys exactly as wrangler's per-command reload would, without either
154
- * caller pulling in the provision lifecycle just to parse dotenv keys.
155
143
  */
156
144
  function scanWranglerDotenvKeys(filePath) {
157
145
  const keys = /* @__PURE__ */ new Set();
@@ -1,5 +1,5 @@
1
- import { a as join } from "./dist-BVqXeR_h.mjs";
2
- import { n as globSync, t as glob } from "./dist-Bn8Kodjp.mjs";
1
+ import { a as join } from "./dist-ipQi0Q8y.mjs";
2
+ import { n as globSync } from "./dist-Bn8Kodjp.mjs";
3
3
  //#region src/router/email.ts
4
4
  /**
5
5
  * Scan `email/` for inbound email handlers.
@@ -155,28 +155,12 @@ function parseEmailFiles(files) {
155
155
  defaultHandler
156
156
  };
157
157
  }
158
- async function scanEmailHandlers(root, emailDir = "email") {
159
- const pattern = `*.{${EMAIL_EXTENSIONS.join(",")}}`;
160
- return parseEmailFiles(await glob(pattern, {
161
- cwd: join(root, emailDir),
162
- absolute: false
163
- }).catch(() => []));
164
- }
165
158
  function scanEmailHandlersSync(root, emailDir = "email") {
166
159
  const pattern = `*.{${EMAIL_EXTENSIONS.join(",")}}`;
167
- let files;
168
- try {
169
- files = globSync(pattern, {
170
- cwd: join(root, emailDir),
171
- absolute: false
172
- });
173
- } catch {
174
- files = [];
175
- }
176
- return parseEmailFiles(files);
160
+ return parseEmailFiles(globSync(pattern, { cwd: join(root, emailDir) }));
177
161
  }
178
162
  function hasEmailHandlers(scan) {
179
163
  return scan.addresses.length > 0 || Boolean(scan.defaultHandler);
180
164
  }
181
165
  //#endregion
182
- export { scanEmailHandlersSync as a, scanEmailHandlers as i, compileEmailPattern as n, hasEmailHandlers as r, compareEmailRoutes as t };
166
+ export { scanEmailHandlersSync as i, compileEmailPattern as n, hasEmailHandlers as r, compareEmailRoutes as t };