void 1.7.0 → 1.9.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 (314) hide show
  1. package/dist/{account-cmd-BfkJ_1PC.mjs → account-cmd-BEMOdwtl.mjs} +5 -5
  2. package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-3VVsflWZ.mjs} +28 -8
  3. package/dist/{application-routing-QpyC5G8z.mjs → application-routing-CJRlXCc2.mjs} +1 -1
  4. package/dist/{auth-CZrthGxs.d.mts → auth-CV9kXHKe.d.mts} +4 -2
  5. package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
  6. package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-B1IynRW5.mjs} +5 -5
  7. package/dist/{auth-router-CNBKnEZi.mjs → auth-router-DVaWJdRB.mjs} +3 -3
  8. package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
  9. package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-ajs3LNrY.d.mts} +2 -2
  10. package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
  11. package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-Dq8tdqQG.mjs} +4 -4
  12. package/dist/{cache-DVBBbWQL.mjs → cache-DGMnskX7.mjs} +4 -4
  13. package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-96S5hD1E.mjs} +3 -3
  14. package/dist/cli/cli.mjs +1 -1
  15. package/dist/cli/cloudflare-operation-process.mjs +92 -19
  16. package/dist/cli/env-schema-probe.d.mts +1 -1
  17. package/dist/cli/env-schema-probe.mjs +3 -3
  18. package/dist/{cli-main-DFteHrJI.mjs → cli-main-CQRLxZAu.mjs} +32 -32
  19. package/dist/client-66c0RLDM.mjs +1 -0
  20. package/dist/{client-BEZmTP6p.mjs → client-D6w5x7hM.mjs} +7 -7
  21. package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
  22. package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-BuuHUM4z.mjs} +5 -5
  23. package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
  24. package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-D1QOosLd.mjs} +3 -3
  25. package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-G5AObYzF.mjs} +6 -6
  26. package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
  27. package/dist/{cloudflare-process-BcPvlMFd.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
  28. package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
  29. package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
  30. package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
  31. package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
  32. package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
  33. package/dist/config-entry.d.mts +1 -1
  34. package/dist/{connect-j1F1C_rW.mjs → connect-4uImOwut.mjs} +6 -6
  35. package/dist/{create-project-CE3jOmd5.mjs → create-project-BaUzZnLZ.mjs} +4 -4
  36. package/dist/{create-project-DZH3aYGQ.mjs → create-project-CQMyzTvK.mjs} +1 -1
  37. package/dist/{db-DyLzzxvM.mjs → db-DEpDeDsi.mjs} +22 -22
  38. package/dist/{db-types-DdHHUVPy.mjs → db-types-BpPYAx0B.mjs} +4 -2
  39. package/dist/{delete-Dey6YoMA.mjs → delete-BVD2kI82.mjs} +4 -4
  40. package/dist/deploy-Dr_Qamzw.mjs +2 -0
  41. package/dist/{deploy-Ccw2D2lw.mjs → deploy-Dyeo5soA.mjs} +40 -81
  42. package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-Kn73R83A.mjs} +22 -22
  43. package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-BpKBs_KR.mjs} +3 -3
  44. package/dist/deploy.mjs +6 -6
  45. package/dist/discover-Diq0l6TZ.mjs +1 -0
  46. package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
  47. package/dist/{dispatch-pYaww76u.mjs → dispatch-BBfb519j.mjs} +8 -8
  48. package/dist/{dist-DeTdhbZc.mjs → dist-Cp4b1_T9.mjs} +1 -1
  49. package/dist/{dist-BQdgCVQF.mjs → dist-STQXl8ck.mjs} +86 -138
  50. package/dist/{domain-Dh3mG8Vs.mjs → domain-BTIdyUVk.mjs} +5 -5
  51. package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
  52. package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
  53. package/dist/{email-DKyMjOYM.mjs → email-DvrS-I0U.mjs} +10 -10
  54. package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-DAGpgzY1.mjs} +16 -11
  55. package/dist/{entry-Bw-G1VVx.mjs → entry-DMgR7XOf.mjs} +2 -2
  56. package/dist/{env-DkZzh_Dd.mjs → env-D7vORwpn.mjs} +6 -6
  57. package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
  58. package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
  59. package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
  60. package/dist/{env-validation-C8NL3lEH.mjs → env-validation-DKDcpxbt.mjs} +1 -1
  61. package/dist/{env-validation-1snjKtDX.mjs → env-validation-DeYNRp1d.mjs} +5 -5
  62. package/dist/{gen-BZmFOGDQ.mjs → gen-DimkGNve.mjs} +6 -6
  63. package/dist/gen-DmEeVEs4.mjs +1 -0
  64. package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-D-zs6VQr.mjs} +4 -4
  65. package/dist/{handler-DjqciiDc.d.mts → handler-6fzr_ikp.d.mts} +5 -4
  66. package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
  67. package/dist/{head-5XPcnG-j.mjs → head-CWJhfUwV.mjs} +62 -3
  68. package/dist/{headers-CimYIfQI.mjs → headers-Q0kZDpk8.mjs} +11 -2
  69. package/dist/{help-CNuUb47C.mjs → help-Cgdcd-SG.mjs} +6 -6
  70. package/dist/help-Cp3K5m1w.mjs +1 -0
  71. package/dist/index.d.mts +5 -5
  72. package/dist/index.mjs +257 -188
  73. package/dist/{info-DwB8IWIx.mjs → info-BbxQ34kk.mjs} +4 -4
  74. package/dist/{init-CUGSmcED.mjs → init-zyRj3QRw.mjs} +19 -20
  75. package/dist/{link-BlRTGHan.mjs → link-DAFXuIER.mjs} +5 -5
  76. package/dist/{list-iCg7d5Pa.mjs → list-BTIcC3W9.mjs} +5 -5
  77. package/dist/{live-zKGbRT4h.d.mts → live-DBybyDt0.d.mts} +2 -2
  78. package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
  79. package/dist/load-user-env-ztmIyiLx.mjs +34 -0
  80. package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
  81. package/dist/login-DBs8JuSl.mjs +1 -0
  82. package/dist/{login-TA51e5Fw.mjs → login-DOE-MkeK.mjs} +4 -4
  83. package/dist/{logs-BlyAxlvx.mjs → logs-CUsjihc3.mjs} +4 -4
  84. package/dist/migrate-BYhoIK9R.mjs +1 -0
  85. package/dist/{migrate-BH6LCr00.mjs → migrate-DtoKdGas.mjs} +6 -6
  86. package/dist/nitro.mjs +3 -3
  87. package/dist/{node-B0otYjDv.mjs → node-D9dPyUr0.mjs} +4 -4
  88. package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
  89. package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-BCCohcz3.mjs} +10 -1
  90. package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-CQOQrUiO.mjs} +27 -7
  91. package/dist/operator-cmd-xCACDtT1.mjs +1 -0
  92. package/dist/output-BsdnNpxa.mjs +1 -0
  93. package/dist/{output-CXJTIAtF.mjs → output-DNVILSz2.mjs} +1 -1
  94. package/dist/pages/client.d.mts +28 -3
  95. package/dist/pages/client.mjs +146 -27
  96. package/dist/pages/head.d.mts +2 -2
  97. package/dist/pages/head.mjs +1 -1
  98. package/dist/pages/index.d.mts +5 -4
  99. package/dist/pages/index.mjs +5 -5
  100. package/dist/pages/islands-plugin.d.mts +6 -2
  101. package/dist/pages/islands-plugin.mjs +18 -3
  102. package/dist/pages/protocol.d.mts +2 -2
  103. package/dist/pages/protocol.mjs +1 -1
  104. package/dist/platform-args-DSi4_M8n.mjs +1 -0
  105. package/dist/{platform-args-DfT8yQBF.mjs → platform-args-DtpHS_75.mjs} +1 -1
  106. package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-fLwIS5VG.mjs} +6 -6
  107. package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-BTRI_YwD.mjs} +4 -4
  108. package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +4 -4
  109. package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
  110. package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-HS_FSthn.mjs} +7 -7
  111. package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-CHpcq_qg.mjs} +4 -4
  112. package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
  113. package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-D2RS7DE0.mjs} +239 -29
  114. package/dist/{platform-management-BMdyt667.mjs → platform-management-C-T0ch4y.mjs} +1 -1
  115. package/dist/{platform-management-CrP1XhVd.mjs → platform-management-d3ETv3Dw.mjs} +15 -15
  116. package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-B7yJQKf7.mjs} +116 -32
  117. package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
  118. package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
  119. package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-DZHmVe1f.mjs} +4 -4
  120. package/dist/{prepare-DXduEwQp.mjs → prepare-AVM4Hj3T.mjs} +10 -10
  121. package/dist/prepare-BSXKz6m8.mjs +1 -0
  122. package/dist/{prepare-DJYHjpzq.mjs → prepare-DMk8NAO-.mjs} +3 -3
  123. package/dist/{prerender-render-BN9Lmebs.mjs → prerender-render-BAdYhivW.mjs} +15 -2
  124. package/dist/prerender-render.d.mts +2 -0
  125. package/dist/prerender-render.mjs +1 -1
  126. package/dist/{project-cmd-Dfb1Sg8w.mjs → project-cmd-TQKAOTMV.mjs} +17 -17
  127. package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
  128. package/dist/{project-team-BO2dyc7S.mjs → project-team-B1OKeb-T.mjs} +4 -4
  129. package/dist/{project-token-ByO2mEI2.mjs → project-token-RW_wpmN-.mjs} +4 -4
  130. package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
  131. package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust-TNc66p0_.mjs} +4 -4
  132. package/dist/{protocol-yxdHxFLN.mjs → protocol-IPSWHolJ.mjs} +233 -76
  133. package/dist/{protocol-xZMvWsrg.d.mts → protocol-YS3tbxWE.d.mts} +10 -3
  134. package/dist/{provision-CMH4-8ri.mjs → provision-BLdkpFT4.mjs} +1 -1
  135. package/dist/{provision-D5q-ptD3.mjs → provision-bgQTi5QZ.mjs} +2 -2
  136. package/dist/redirect-Dqb4fEc5.mjs +80 -0
  137. package/dist/{requests-CPOiDkjh.mjs → requests-Cj15-yrI.mjs} +3 -3
  138. package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
  139. package/dist/{resolve-project-ClvLMTI9.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
  140. package/dist/{rollback-BfCs2la4.mjs → rollback-CYnkng7B.mjs} +4 -4
  141. package/dist/{route-types-Cl3x0Q8B.mjs → route-types-C6eAOmOj.mjs} +4 -3
  142. package/dist/routes-stub.d.mts +4 -3
  143. package/dist/runtime/auth.d.mts +1 -1
  144. package/dist/runtime/auth.mjs +1 -1
  145. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  146. package/dist/runtime/better-auth-mysql.mjs +1 -1
  147. package/dist/runtime/better-auth-pg.d.mts +1 -1
  148. package/dist/runtime/better-auth-pg.mjs +1 -1
  149. package/dist/runtime/better-auth.d.mts +1 -1
  150. package/dist/runtime/better-auth.mjs +1 -1
  151. package/dist/runtime/client-react.d.mts +1 -1
  152. package/dist/runtime/client-solid.d.mts +1 -1
  153. package/dist/runtime/client-svelte.d.mts +1 -1
  154. package/dist/runtime/client-vue.d.mts +1 -1
  155. package/dist/runtime/client.d.mts +1 -1
  156. package/dist/runtime/db.d.mts +6 -3
  157. package/dist/runtime/db.mjs +2 -2
  158. package/dist/runtime/env-public.d.mts +1 -1
  159. package/dist/runtime/env-public.mjs +53 -39
  160. package/dist/runtime/handler.d.mts +1 -1
  161. package/dist/runtime/live-client.d.mts +1 -1
  162. package/dist/runtime/live-server.mjs +1 -1
  163. package/dist/runtime/live.d.mts +1 -1
  164. package/dist/runtime/live.mjs +1 -1
  165. package/dist/runtime/routing.d.mts +8 -3
  166. package/dist/runtime/routing.mjs +164 -23
  167. package/dist/runtime/validator.d.mts +1 -1
  168. package/dist/runtime/ws-server.d.mts +3 -3
  169. package/dist/runtime/ws-server.mjs +1 -1
  170. package/dist/runtime/ws.d.mts +1 -1
  171. package/dist/{scan-L8OSv1f7.mjs → scan-4YOxDaw2.mjs} +230 -29
  172. package/dist/{secret-CuI6LTpD.mjs → secret-BSf7dgg_.mjs} +6 -6
  173. package/dist/{skills-BBO9wMjB.mjs → skills-CoBB9_Ao.mjs} +1 -1
  174. package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
  175. package/dist/{subcommand-prompt-BZMnCA8T.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
  176. package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
  177. package/dist/url-DaehRGKR.mjs +106 -0
  178. package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
  179. package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
  180. package/dist/wrangler-fNGvPTlO.mjs +1 -0
  181. package/dist/{wrapper-BGsi_uHs.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
  182. package/dist/{ws-DB8Feytg.d.mts → ws-C2zy0QBf.d.mts} +2 -2
  183. package/docs/guide/ai.md +2 -1
  184. package/docs/guide/app-types.md +1 -0
  185. package/docs/guide/auth.md +23 -27
  186. package/docs/guide/database/d1.md +18 -1
  187. package/docs/guide/database/mysql.md +1 -0
  188. package/docs/guide/database/postgresql.md +1 -0
  189. package/docs/guide/database.md +30 -27
  190. package/docs/guide/deployment.md +3 -2
  191. package/docs/guide/durable-state.md +1 -0
  192. package/docs/guide/edge/headers.md +4 -3
  193. package/docs/guide/edge/prerendering.md +6 -5
  194. package/docs/guide/edge/redirects.md +2 -1
  195. package/docs/guide/edge/revalidation.md +6 -1
  196. package/docs/guide/edge/rewrites.md +2 -1
  197. package/docs/guide/edge/static-assets.md +5 -0
  198. package/docs/guide/email/domains.md +1 -0
  199. package/docs/guide/email/receiving.md +3 -2
  200. package/docs/guide/email/sending.md +7 -4
  201. package/docs/guide/email.md +1 -0
  202. package/docs/guide/env-vars.md +4 -0
  203. package/docs/guide/index.md +1 -0
  204. package/docs/guide/jobs.md +1 -0
  205. package/docs/guide/kv.md +1 -0
  206. package/docs/guide/live.md +2 -1
  207. package/docs/guide/pages-routing/actions-and-forms.md +58 -22
  208. package/docs/guide/pages-routing/errors.md +109 -0
  209. package/docs/guide/pages-routing/head.md +45 -1
  210. package/docs/guide/pages-routing/islands.md +4 -1
  211. package/docs/guide/pages-routing/layouts.md +4 -1
  212. package/docs/guide/pages-routing/loaders.md +4 -1
  213. package/docs/guide/pages-routing/markdown.md +6 -4
  214. package/docs/guide/pages-routing/overview.md +16 -20
  215. package/docs/guide/pages-routing/view-transitions.md +1 -0
  216. package/docs/guide/platform/administration/access.md +1 -0
  217. package/docs/guide/platform/administration/connected-apps.md +13 -2
  218. package/docs/guide/platform/administration/email.md +1 -0
  219. package/docs/guide/platform/administration/operations.md +1 -0
  220. package/docs/guide/platform/administration/plans.md +35 -1
  221. package/docs/guide/platform/administration/projects.md +16 -1
  222. package/docs/guide/platform/administration/zero-trust.md +1 -0
  223. package/docs/guide/platform/development/local.md +1 -0
  224. package/docs/guide/platform/development/runtime.md +1 -0
  225. package/docs/guide/platform/development/schema-ci.md +1 -0
  226. package/docs/guide/platform/installation/ci.md +1 -0
  227. package/docs/guide/platform/installation/credentials.md +12 -9
  228. package/docs/guide/platform/installation/domains.md +1 -0
  229. package/docs/guide/platform/installation/first-deployment.md +1 -0
  230. package/docs/guide/platform/installation/maintenance.md +8 -1
  231. package/docs/guide/platform/installation/prerequisites.md +1 -0
  232. package/docs/guide/platform/installation/setup.md +9 -7
  233. package/docs/guide/platform/installation/uninstall.md +1 -0
  234. package/docs/guide/platform-administration.md +1 -0
  235. package/docs/guide/platform-development.md +1 -0
  236. package/docs/guide/project-collaboration.md +1 -0
  237. package/docs/guide/queues.md +3 -0
  238. package/docs/guide/quickstart.md +3 -2
  239. package/docs/guide/remote-dev.md +1 -0
  240. package/docs/guide/sandboxes.md +1 -0
  241. package/docs/guide/self-hosted-platform.md +1 -0
  242. package/docs/guide/server-routing.md +3 -2
  243. package/docs/guide/sse.md +2 -1
  244. package/docs/guide/ssg.md +18 -6
  245. package/docs/guide/ssr.md +1 -0
  246. package/docs/guide/storage.md +2 -1
  247. package/docs/guide/testing.md +64 -0
  248. package/docs/guide/type-safety.md +24 -21
  249. package/docs/guide/typed-fetch.md +1 -0
  250. package/docs/guide/websockets.md +1 -0
  251. package/docs/index.md +1 -0
  252. package/docs/integrations/agents.md +1 -0
  253. package/docs/integrations/cloudflare.md +7 -2
  254. package/docs/integrations/frameworks/analog.md +1 -0
  255. package/docs/integrations/frameworks/astro.md +1 -0
  256. package/docs/integrations/frameworks/nuxt.md +2 -1
  257. package/docs/integrations/frameworks/overview.md +1 -0
  258. package/docs/integrations/frameworks/react-router.md +1 -0
  259. package/docs/integrations/frameworks/sveltekit.md +1 -0
  260. package/docs/integrations/frameworks/tanstack-start.md +1 -0
  261. package/docs/integrations/hono.md +22 -0
  262. package/docs/integrations/nodejs-bun-deno.md +5 -4
  263. package/docs/reference/api/auth.md +23 -4
  264. package/docs/reference/api/client.md +1 -0
  265. package/docs/reference/api/database.md +24 -1
  266. package/docs/reference/api/deploy.md +4 -0
  267. package/docs/reference/api/durable.md +1 -0
  268. package/docs/reference/api/env.md +1 -0
  269. package/docs/reference/api/handlers.md +1 -0
  270. package/docs/reference/api/pages.md +38 -16
  271. package/docs/reference/api/plugin.md +1 -0
  272. package/docs/reference/api/resources.md +2 -1
  273. package/docs/reference/api/rewrites.md +9 -4
  274. package/docs/reference/api/types.md +1 -0
  275. package/docs/reference/api.md +2 -1
  276. package/docs/reference/cli/auth.md +1 -0
  277. package/docs/reference/cli/database.md +1 -0
  278. package/docs/reference/cli/deploy.md +5 -2
  279. package/docs/reference/cli/domains.md +1 -0
  280. package/docs/reference/cli/email.md +1 -0
  281. package/docs/reference/cli/generate.md +1 -0
  282. package/docs/reference/cli/github.md +1 -0
  283. package/docs/reference/cli/platform-config.md +4 -3
  284. package/docs/reference/cli/platform-email.md +1 -0
  285. package/docs/reference/cli/platform-installation.md +1 -0
  286. package/docs/reference/cli/platform-operations.md +1 -0
  287. package/docs/reference/cli/platform-users.md +71 -1
  288. package/docs/reference/cli/platform-zero-trust.md +1 -0
  289. package/docs/reference/cli/platform.md +1 -0
  290. package/docs/reference/cli/project.md +1 -0
  291. package/docs/reference/cli/secrets.md +1 -0
  292. package/docs/reference/cli/setup.md +1 -0
  293. package/docs/reference/cli.md +3 -0
  294. package/docs/reference/config.md +8 -3
  295. package/docs/reference/resource-inference.md +1 -0
  296. package/docs/reference/structure.md +1 -0
  297. package/package.json +25 -25
  298. package/skills/void/SKILL.md +3 -1
  299. package/dist/action-key-XtKKbbsi.mjs +0 -25
  300. package/dist/client-BAxLpSKv.mjs +0 -1
  301. package/dist/deploy-DEZkUS77.mjs +0 -2
  302. package/dist/discover-1DJD4YXD.mjs +0 -1
  303. package/dist/gen-C6iknRdI.mjs +0 -1
  304. package/dist/help-C_cqTByy.mjs +0 -1
  305. package/dist/load-user-env-CSwdofj0.mjs +0 -48
  306. package/dist/login-C4q1S-5b.mjs +0 -1
  307. package/dist/migrate-CVBsSFhC.mjs +0 -1
  308. package/dist/operator-cmd-DnaCnCSP.mjs +0 -1
  309. package/dist/output-CNsMDEd2.mjs +0 -1
  310. package/dist/platform-args-B7-wQ0_B.mjs +0 -1
  311. package/dist/prepare-Bx4a8cb1.mjs +0 -1
  312. package/dist/resolve-project-BALVa9q0.mjs +0 -1
  313. package/dist/url-CuoEn0o3.mjs +0 -43
  314. package/dist/wrangler-R3kMdJfw.mjs +0 -1
@@ -76,13 +76,18 @@ function usesUnboundedMySqlText(defaultModelName, defaultFieldName, field) {
76
76
  return field.type === "string" && !field.unique && !field.index && !field.references && !field.sortable && UNBOUNDED_MYSQL_AUTH_FIELDS.has(`${defaultModelName}.${defaultFieldName}`);
77
77
  }
78
78
  /**
79
- * The default of a required field when the database can store it as a literal.
79
+ * The default of a field when it can be written as a literal.
80
80
  * Function, date and JSON defaults have none.
81
81
  */
82
- function resolveFixedDefault(field) {
83
- if (field.required === false || field.type === "date" || isJsonField(field)) return {};
82
+ function resolveLiteralDefault(field) {
83
+ if (field.type === "date" || isJsonField(field)) return;
84
84
  const value = field.defaultValue;
85
- return typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value) ? { defaultValue: value } : {};
85
+ return typeof value === "string" || typeof value === "boolean" || typeof value === "number" && Number.isFinite(value) ? value : void 0;
86
+ }
87
+ /** The default of a required field when the database can store it as a literal. */
88
+ function resolveFixedDefault(field) {
89
+ const value = field.required === false ? void 0 : resolveLiteralDefault(field);
90
+ return value === void 0 ? {} : { defaultValue: value };
86
91
  }
87
92
  function resolveReferenceFieldName(schema, model, field) {
88
93
  if (field === "id") return "id";
@@ -130,7 +135,11 @@ function createColumnBuilder(dialect, idStrategy, defaultModelName, defaultField
130
135
  default: return `text(${JSON.stringify(fieldName)})`;
131
136
  }
132
137
  }
133
- function createColumnDefinition(dialect, schema, idStrategy, defaultToVariable, defaultModelName, defaultFieldName, field) {
138
+ function hasBuiltInUpdateHook(options, model, field) {
139
+ if (field !== "updatedAt" || model !== "user" && model !== "session" && model !== "account" && model !== "verification") return false;
140
+ return options[model]?.additionalFields?.updatedAt === void 0 && !options.plugins?.some((plugin) => plugin.schema?.[model]?.fields.updatedAt !== void 0);
141
+ }
142
+ function createColumnDefinition(options, dialect, schema, idStrategy, defaultToVariable, defaultModelName, defaultFieldName, field) {
134
143
  const actualFieldName = resolveFieldName(defaultFieldName, field);
135
144
  const parts = [createColumnBuilder(dialect, idStrategy, defaultModelName, defaultFieldName, actualFieldName, field)];
136
145
  if (actualFieldName === "id") {
@@ -149,6 +158,9 @@ function createColumnDefinition(dialect, schema, idStrategy, defaultToVariable,
149
158
  }
150
159
  }
151
160
  if (field.unique && actualFieldName !== "id") parts.push(".unique()");
161
+ const literalDefault = resolveLiteralDefault(field);
162
+ if (literalDefault !== void 0) parts.push(`.$defaultFn(() => ${JSON.stringify(literalDefault)})`);
163
+ if (field.onUpdate && field.type === "date" && hasBuiltInUpdateHook(options, defaultModelName, defaultFieldName)) parts.push(".$onUpdate(() => new Date())");
152
164
  return parts.join("");
153
165
  }
154
166
  function collectCoreImports(dialect, schema, idStrategy) {
@@ -202,12 +214,12 @@ function generateVoidAuthDrizzleSchema(runtime, env = {}) {
202
214
  for (const [defaultModelName, table] of entries) {
203
215
  const variableName = defaultToVariable.get(defaultModelName);
204
216
  const fieldEntries = Object.entries(table.fields);
205
- const renderedFields = [` "id": ${createColumnDefinition(runtime.dialect, schema, idStrategy, defaultToVariable, defaultModelName, "id", {
217
+ const renderedFields = [` "id": ${createColumnDefinition(options, runtime.dialect, schema, idStrategy, defaultToVariable, defaultModelName, "id", {
206
218
  type: idStrategy === "serial" ? "number" : "string",
207
219
  required: true
208
220
  })},`, ...fieldEntries.map(([defaultFieldName, field]) => {
209
221
  const actualFieldName = resolveFieldName(defaultFieldName, field);
210
- return ` ${JSON.stringify(actualFieldName)}: ${createColumnDefinition(runtime.dialect, schema, idStrategy, defaultToVariable, defaultModelName, defaultFieldName, field)},`;
222
+ return ` ${JSON.stringify(actualFieldName)}: ${createColumnDefinition(options, runtime.dialect, schema, idStrategy, defaultToVariable, defaultModelName, defaultFieldName, field)},`;
211
223
  })];
212
224
  const indexedFields = fieldEntries.filter(([, field]) => field.index && !field.unique);
213
225
  lines.push(`export const ${variableName} = ${tableFactory}(${JSON.stringify(table.modelName)}, {`, ...renderedFields, ...indexedFields.length > 0 ? [
@@ -260,10 +272,24 @@ function resolveVoidAuthMigrationSchema(runtime, env = {}) {
260
272
  function generateVoidAuthDatabaseModule(options) {
261
273
  const schemaImport = JSON.stringify(options.schemaImportPath);
262
274
  const provider = options.dialect === "postgresql" ? "pg" : options.dialect === "mysql" ? "mysql" : "sqlite";
275
+ const database = options.dialect === "sqlite" ? [
276
+ "import { createDb as __voidCreateDb } from \"void/db\";",
277
+ "import { getRuntimeRequestResource, requireRuntimeBinding } from \"void/_env\";",
278
+ "",
279
+ "// Keep auth reads fresh without sharing a D1 session across requests.",
280
+ "const __voidAuthDbKey = {};",
281
+ `const __voidCreateAuthDb = () => __voidCreateDb(requireRuntimeBinding<D1Database>(${JSON.stringify(options.d1BindingName ?? "DB")}), { session: "first-primary" });`,
282
+ "const __voidDb = new Proxy({} as ReturnType<typeof __voidCreateDb>, {",
283
+ " get(_, prop) {",
284
+ " const db = getRuntimeRequestResource(__voidAuthDbKey, __voidCreateAuthDb, __voidCreateAuthDb);",
285
+ " return Reflect.get(db, prop);",
286
+ " },",
287
+ "});"
288
+ ].join("\n") : "import { db as __voidDb } from \"void/db\";";
263
289
  return [
264
290
  "// Auto-generated by void — do not edit",
265
291
  `import { drizzleAdapter } from ${JSON.stringify(options.drizzleAdapterPath)};`,
266
- `import { db as __voidDb } from "void/db";`,
292
+ database,
267
293
  `import { schema as __voidAuthSchema } from ${schemaImport};`,
268
294
  "",
269
295
  "// Better Auth reads Drizzle metadata while creating the adapter.",
@@ -1,16 +1,16 @@
1
- import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-BQdgCVQF.mjs";
1
+ import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { a as join } from "./dist-DMYe8CZJ.mjs";
3
- import { p as readConfig } from "./config-5oSQhZNj.mjs";
4
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
+ import { p as readConfig } from "./config-CzFdJYNA.mjs";
4
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
5
5
  import { i as scanEmailHandlersSync } from "./email-BHY72ixO.mjs";
6
6
  import { c as getToken, u as openBrowser } from "./auth-CCk9Seol.mjs";
7
- import { n as PlatformApiError, r as PlatformClient } from "./client-BEZmTP6p.mjs";
8
- import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-Ccw2D2lw.mjs";
9
- import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-CTt2n_W2.mjs";
10
- import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-CXJTIAtF.mjs";
11
- import { i as resolveCommandProjectId } from "./resolve-project-ClvLMTI9.mjs";
12
- import { o as resolveDeployTransport } from "./deploy-transport-Dt0IvSVW.mjs";
13
- import { M as writeProvisionedWranglerConfig } from "./wrangler-k40T7XTQ.mjs";
7
+ import { n as PlatformApiError, r as PlatformClient } from "./client-D6w5x7hM.mjs";
8
+ import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-Dyeo5soA.mjs";
9
+ import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-DAGpgzY1.mjs";
10
+ import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-DNVILSz2.mjs";
11
+ import { i as resolveCommandProjectId } from "./resolve-project-Da3OgCU1.mjs";
12
+ import { o as resolveDeployTransport } from "./deploy-transport-BpKBs_KR.mjs";
13
+ import { M as writeProvisionedWranglerConfig } from "./wrangler-B1gkT_wC.mjs";
14
14
  import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
15
15
  import { tmpdir } from "node:os";
16
16
  import { execSync } from "node:child_process";
@@ -1,18 +1,18 @@
1
1
  import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
2
2
  import { a as join, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
3
3
  import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
4
- import { p as readConfig } from "./config-5oSQhZNj.mjs";
4
+ import { p as readConfig } from "./config-CzFdJYNA.mjs";
5
5
  import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
6
6
  import { i as readProjectIdField } from "./project-CLwxcEdq.mjs";
7
- import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-k40T7XTQ.mjs";
7
+ import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-B1gkT_wC.mjs";
8
8
  import { n as scopedAccessCredentials } from "./cf-access-pejlJmuy.mjs";
9
9
  import { n as ensurePlatformProxyAccess } from "./cf-access-Dnyw8KFY.mjs";
10
10
  import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-CCk9Seol.mjs";
11
- import { u as stripInternalEnvKeys } from "./env-CuzZZyjB.mjs";
11
+ import { d as stripInternalEnvKeys } from "./env-UqS-21xi.mjs";
12
12
  import { i as collectFiles } from "./isr-config-Czzb4mIq.mjs";
13
- import { i as renderPrerenderPaths, n as outputFileForPath, r as readPrerenderPathsResponse } from "./prerender-render-BN9Lmebs.mjs";
13
+ import { a as renderPrerenderPaths, i as renderBoundary404, n as outputFileForPath, r as readPrerenderPathsResponse } from "./prerender-render-BAdYhivW.mjs";
14
14
  import { t as renderDefaultErrorPage } from "./error-pages-COVBnzK7.mjs";
15
- import { a as buildEnv } from "./version-metadata-eUd6Ar_U.mjs";
15
+ import { a as buildEnv } from "./version-metadata-CeftH0fQ.mjs";
16
16
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
17
17
  import { isRecord } from "@void/deploy-core";
18
18
  import { execFile } from "node:child_process";
@@ -180,15 +180,19 @@ async function prerenderPages(options) {
180
180
  const runner = await createCloudflarePrerenderRunner(options);
181
181
  try {
182
182
  const paths = await runner.collectPaths();
183
- if (paths.length === 0) return {
184
- paths,
185
- rendered: [],
186
- failed: []
187
- };
183
+ if (paths.length === 0) {
184
+ await renderBoundary404(options.clientDir, () => runner.fetchPath("/__void/static-not-found"));
185
+ return {
186
+ paths,
187
+ rendered: [],
188
+ failed: []
189
+ };
190
+ }
188
191
  const result = await renderPrerenderPaths(paths, options.clientDir, (path) => runner.fetchPath(path), (path) => runner.fetchPageData(path), (path, outputFile, error) => {
189
192
  if (error !== void 0) voidWarn(`prerender ${path} failed: ${error}`);
190
193
  else voidLog(`prerender ${import_picocolors.default.blue(outputFile)}`);
191
194
  });
195
+ await renderBoundary404(options.clientDir, () => runner.fetchPath("/__void/static-not-found"));
192
196
  ensureStatic404(options.clientDir);
193
197
  return {
194
198
  paths,
@@ -204,7 +208,7 @@ async function runNodePrerenderRunner(root, config) {
204
208
  writeFileSync(runnerPath, `
205
209
  import { pathToFileURL } from "node:url";
206
210
  import { dirname, join } from "node:path";
207
- import { readPrerenderPathsResponse, renderPrerenderPaths } from ${JSON.stringify(nodeRendererUrl)};
211
+ import { readPrerenderPathsResponse, renderPrerenderPaths, renderBoundary404 } from ${JSON.stringify(nodeRendererUrl)};
208
212
 
209
213
  const config = JSON.parse(process.argv[2]);
210
214
  const { mode, ssrDir, clientDir } = config;
@@ -246,6 +250,7 @@ if (mode === "collect") {
246
250
  } else {
247
251
  const paths = await collectPaths();
248
252
  const result = await renderPaths(paths);
253
+ if (clientDir) await renderBoundary404(clientDir, () => fetch(new Request("http://localhost/__void/static-not-found"), { __VOID_PRERENDER: "1" }));
249
254
  process.stdout.write(JSON.stringify({ paths, ...result }));
250
255
  }
251
256
  `);
@@ -1,6 +1,6 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
- import { n as bindingResolver, o as unwrapStaticExpression, t as bindingNames } from "./ast-bindings-BkivMJIo.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
3
+ import { a as unwrapStaticExpression, o as bindingNames, s as bindingResolver } from "./static-exports-DFkzL-NX.mjs";
4
4
  import { n as isIdentifier, o as moduleExportName } from "./ast-Cv0JwXqb.mjs";
5
5
  import { existsSync, readFileSync } from "node:fs";
6
6
  import { parseSync } from "vite";
@@ -1,10 +1,10 @@
1
- import { H as outro, L as log } from "./dist-BQdgCVQF.mjs";
1
+ import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { a as join } from "./dist-DMYe8CZJ.mjs";
3
- import { r as generateEnvTypes, t as findEnvFile } from "./env-types-Dz9qkiOn.mjs";
3
+ import { r as generateEnvTypes, t as findEnvFile } from "./env-types-WEZw5D-r.mjs";
4
4
  import { c as getToken } from "./auth-CCk9Seol.mjs";
5
- import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
6
- import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-1snjKtDX.mjs";
7
- import { m as printSuccess, p as note } from "./output-CXJTIAtF.mjs";
5
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
6
+ import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-DeYNRp1d.mjs";
7
+ import { m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
8
8
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
9
9
  import { mkdirSync, writeFileSync } from "node:fs";
10
10
  // src/cli/env.ts
@@ -25,7 +25,7 @@ async function runCheck(root, useRemoteSecrets) {
25
25
  const platform = readDeploymentPlatform(root);
26
26
  if (platform === "none") throw new Error("env: Deployment is disabled. Run `void init` to choose a platform.");
27
27
  if (platform === "cloudflare") {
28
- const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-CZkjFrzH.mjs");
28
+ const { listCloudflareSecrets, resolveCloudflareOperationContext } = await import("./cloudflare-operations-I4t3mt4R.mjs");
29
29
  remoteSecrets = await listCloudflareSecrets(resolveCloudflareOperationContext(root));
30
30
  } else {
31
31
  const token = getToken(root);
@@ -39,6 +39,13 @@ function findLegacyEnvFiles(root) {
39
39
  }
40
40
  }
41
41
  /**
42
+ * Sentence to append to a legacy-file error when `.env.example` is among the
43
+ * files, since it is usually added out of habit to document expected keys.
44
+ */
45
+ function legacyEnvExampleHint(legacyFiles) {
46
+ return legacyFiles.includes(".env.example") ? " env.ts lists the keys this app expects, so .env.example is not needed." : "";
47
+ }
48
+ /**
42
49
  * Resolve whether the plugin should run in "remote" mode (proxy real
43
50
  * D1/KV/R2 via the platform) based on the project config plus an optional
44
51
  * `VOID_REMOTE` env override.
@@ -116,4 +123,4 @@ function stripInternalEnvKeys(input) {
116
123
  stripped
117
124
  };
118
125
  }
119
- export { findReservedEnvKeys as a, reservedEnvKeysMessage as c, findLegacyEnvFiles as i, resolveRemoteMode as l, CLOUDFLARE_QUEUE_NAMES_BUILD_ENV as n, isClientEnvKey as o, LOCAL_ENV_FILE as r, loadLocalEnv as s, CLOUDFLARE_DEPLOY_BUILD_ENV as t, stripInternalEnvKeys as u };
126
+ export { findReservedEnvKeys as a, loadLocalEnv as c, stripInternalEnvKeys as d, findLegacyEnvFiles as i, reservedEnvKeysMessage as l, CLOUDFLARE_QUEUE_NAMES_BUILD_ENV as n, isClientEnvKey as o, LOCAL_ENV_FILE as r, legacyEnvExampleHint as s, CLOUDFLARE_DEPLOY_BUILD_ENV as t, resolveRemoteMode as u };
@@ -25,10 +25,12 @@ type InferEnv<S extends AnySchema> = { readonly [K in keyof S]: StandardSchemaV1
25
25
  */
26
26
  declare function defineEnv<S extends AnySchema>(schema: S): InferEnv<S>;
27
27
  /**
28
- * Internal: validate the whole schema against the worker env once per isolate,
29
- * from the generated worker entry. Catches remote-secret values the deploy CLI
30
- * cannot see. Async validators are awaited here and their values cached, so
31
- * later synchronous `env.X` reads can serve them.
28
+ * Internal: validate the whole schema against the worker env, from the generated
29
+ * worker entry. Catches remote-secret values the deploy CLI cannot see. A
30
+ * completed validation is reused for the same raw values; an env with other
31
+ * values is validated again. Async validators are awaited here, and their values
32
+ * serve later synchronous `env.X` reads of the env this call receives, and of any
33
+ * other env that holds the same raw values.
32
34
  */
33
35
  declare function _validateEnvOnce(envValues: unknown): Promise<void>;
34
36
  /** Internal: framework-only access to the registered schema (for plugin/CLI). */
@@ -73,9 +75,8 @@ type EnvValidationReport = {
73
75
  messages: Array<string>;
74
76
  }>;
75
77
  /**
76
- * Resolved values for keys that validated successfully. Used to seed the
77
- * per-env cache after async pre-validation so sync `env.X` reads hit the
78
- * cache.
78
+ * Resolved values for keys that validated successfully. After async
79
+ * pre-validation they serve sync `env.X` reads.
79
80
  */
80
81
  values: Map<string, unknown>;
81
82
  };
@@ -1,6 +1,6 @@
1
1
  import { s as relative } from "./dist-DMYe8CZJ.mjs";
2
2
  import { i as voidWarn } from "./log-D9hwSySP.mjs";
3
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
3
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
4
4
  import { existsSync } from "node:fs";
5
5
  // src/codegen/env-types.ts
6
6
  /** Roots already warned about duplicate env.ts files — dedupes noisy repeat calls. */
@@ -1 +1 @@
1
- export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-1snjKtDX.mjs";
1
+ export { r as SelfHostSchemaError, a as computeInvalidEmittedKeys, c as deriveSelfHostSchemaFacts, p as readEmittedWorkerVars } from "./env-validation-DeYNRp1d.mjs";
@@ -1,10 +1,10 @@
1
1
  import { a as join, c as resolve, n as dirname } from "./dist-DMYe8CZJ.mjs";
2
- import { t as findEnvFile } from "./env-types-Dz9qkiOn.mjs";
3
- import { t as loadUserEnvFile } from "./load-user-env-CSwdofj0.mjs";
2
+ import { t as findEnvFile } from "./env-types-WEZw5D-r.mjs";
3
+ import { t as loadUserEnvFile } from "./load-user-env-ztmIyiLx.mjs";
4
4
  import { i as voidWarn } from "./log-D9hwSySP.mjs";
5
5
  import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
6
- import { a as findReservedEnvKeys, c as reservedEnvKeysMessage, i as findLegacyEnvFiles, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as loadLocalEnv } from "./env-CuzZZyjB.mjs";
7
- import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-BcPvlMFd.mjs";
6
+ import { a as findReservedEnvKeys, c as loadLocalEnv, i as findLegacyEnvFiles, l as reservedEnvKeysMessage, o as isClientEnvKey, r as LOCAL_ENV_FILE, s as legacyEnvExampleHint } from "./env-UqS-21xi.mjs";
7
+ import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-wcnaQ5JG.mjs";
8
8
  import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
9
9
  import { existsSync, readFileSync } from "node:fs";
10
10
  import { spawn } from "node:child_process";
@@ -50,7 +50,7 @@ function emptyReport() {
50
50
  */
51
51
  async function validateProdEnv(root, options) {
52
52
  const legacyFiles = findLegacyEnvFiles(root);
53
- if (legacyFiles.length > 0) throw new Error(`env: only .env is supported for local development. Remove ${legacyFiles.join(", ")} and follow the env migration guide.`);
53
+ if (legacyFiles.length > 0) throw new Error(`env: only .env is supported for local development. Remove ${legacyFiles.join(", ")} and follow the env migration guide.${legacyEnvExampleHint(legacyFiles)}`);
54
54
  const reservedInDotenv = options.productionOnly ? [] : findReservedEnvKeys(scanWranglerDotenvKeys(join(root, LOCAL_ENV_FILE)));
55
55
  if (reservedInDotenv.length > 0) throw new Error(`env: ${reservedEnvKeysMessage(".env", reservedInDotenv)}`);
56
56
  const envFile = findEnvFile(root);
@@ -1,12 +1,12 @@
1
- import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-BQdgCVQF.mjs";
1
+ import { K as select, L as log, O as cancel, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { a as join, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
3
- import { l as getDatabaseDialect, p as readConfig } from "./config-5oSQhZNj.mjs";
4
- import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-DcqUBGCb.mjs";
3
+ import { l as getDatabaseDialect, p as readConfig } from "./config-CzFdJYNA.mjs";
4
+ import { r as writeDrizzleConfig, t as PLACEHOLDER_DB_URL } from "./config-DlWQ_hIJ.mjs";
5
5
  import { n as snapshotDrizzleOutputs } from "./generate-CWb8aOsm.mjs";
6
6
  import { n as readJournal, t as collectMigrations } from "./collect-C6Blu9yw.mjs";
7
7
  import { t as assertJournalCoherence } from "./validate-Ddzl-IwT.mjs";
8
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
9
- import { m as printSuccess } from "./output-CXJTIAtF.mjs";
8
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
9
+ import { m as printSuccess } from "./output-DNVILSz2.mjs";
10
10
  import { n as drizzleKitBin, t as buildDrizzleKitSpawnEnv } from "./yarn-pnp-DgWbE7z5.mjs";
11
11
  import { existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
12
12
  import { spawnSync } from "node:child_process";
@@ -329,7 +329,7 @@ async function runModel(root, name, columns) {
329
329
  const existing = readFileSync(barrelPath, "utf-8");
330
330
  if (!existing.includes(exportLine)) writeFileSync(barrelPath, existing.trimEnd() + "\n" + exportLine + "\n");
331
331
  } else writeFileSync(barrelPath, exportLine + "\n");
332
- const { prepareProject } = await import("./prepare-Bx4a8cb1.mjs");
332
+ const { prepareProject } = await import("./prepare-BSXKz6m8.mjs");
333
333
  await prepareProject(root);
334
334
  log.step(`Created ${relative(root, modelPath)}`);
335
335
  log.step(`Updated ${relative(root, barrelPath)}`);
@@ -0,0 +1 @@
1
+ export { r as runGenCommand } from "./gen-DimkGNve.mjs";
@@ -1,10 +1,10 @@
1
- import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-BQdgCVQF.mjs";
1
+ import { A as confirm, K as select, L as log, O as cancel, X as text, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken, n as createCodeChallenge, r as createCodeVerifier, t as awaitBrowserCallback, u as openBrowser } from "./auth-CCk9Seol.mjs";
3
- import { c as platformErrorMessage, n as PlatformApiError, r as PlatformClient, s as parsePlatformErrorBody } from "./client-BEZmTP6p.mjs";
3
+ import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { t as collectGitDeployMetadata } from "./git-metadata-Cukp5kV5.mjs";
5
- import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-CXJTIAtF.mjs";
5
+ import { f as import_picocolors, l as formatUrl, m as printSuccess } from "./output-DNVILSz2.mjs";
6
6
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
7
- import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-ClvLMTI9.mjs";
7
+ import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
8
8
  import { randomBytes } from "node:crypto";
9
9
  // src/cli/github-cmd.ts
10
10
  /**
@@ -1,8 +1,8 @@
1
1
  import { l as VoidPlatformSandbox } from "./sandbox-DE1WsxuB.mjs";
2
- import { n as HeadDescriptor } from "./head-MeF_5M_3.mjs";
3
- import { i as AuthUser, n as AuthSession } from "./auth-CZrthGxs.mjs";
2
+ import { n as HeadDescriptor, t as HeadConfig } from "./head-CVO92KEx.mjs";
3
+ import { i as AuthUser, n as AuthSession } from "./auth-CV9kXHKe.mjs";
4
4
  import { u as TypedRoutes } from "./route-url-C3JwYrER.mjs";
5
- import { t as DevCssAsset } from "./types-agfx0alu.mjs";
5
+ import { t as DevCssAsset } from "./types-IPut3_Yx.mjs";
6
6
  import { t as StandardSchemaV1 } from "./standard-schema-CuDawHOC.mjs";
7
7
  import { Context, Env, ExecutionContext as ExecutionContext$1, MiddlewareHandler, Next, TypedResponse } from "hono";
8
8
  import { RewriteDestination, RouteDestination, RouteUrl, RouteUrlInput } from "void/routes";
@@ -70,6 +70,7 @@ type WorkerFetchOptions = {
70
70
  remoteEnv?: (env: RuntimeEnvironment) => RuntimeEnvironment;
71
71
  internalRoute: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Response | null>;
72
72
  collectPrerenderPaths: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Array<string>>;
73
+ staticNotFound?: (request: Request, env: RuntimeEnvironment) => Promise<Response>;
73
74
  emailReceipt?: (request: Request, env: RuntimeEnvironment, ctx: ExecutionContext$1) => Promise<Response>;
74
75
  isr?: {
75
76
  deploymentId: string;
@@ -145,7 +146,7 @@ type RewritePath = TypedRoutes extends true ? RouteUrl : RewriteDestination;
145
146
  interface CloudContextVariables {
146
147
  user: AuthUser | null;
147
148
  session: AuthSession | null;
148
- headDefaults?: HeadDescriptor;
149
+ headDefaults?: HeadConfig;
149
150
  [key: string]: unknown;
150
151
  }
151
152
  declare global {
@@ -28,16 +28,27 @@ type HeadConfig = HeadDescriptor & {
28
28
  /**
29
29
  * Merge head descriptors with precedence: page > middleware > config.
30
30
  *
31
- * - `title`: page wins; `titleTemplate` from config wraps it (`%s` replaced)
31
+ * - `title`: page wins; `titleTemplate` from middleware, else config, wraps it (`%s` replaced)
32
32
  * - `meta`: page overrides entries with same `name`/`property`; others appended
33
33
  * - `link`/`script`: concatenated (config first, then middleware, then page)
34
34
  * - `htmlAttrs`/`bodyAttrs`: shallow merge, page wins conflicts
35
35
  */
36
- declare function resolveHead(configHead: HeadConfig | undefined, middlewareHead: HeadDescriptor | undefined, pageHead: HeadDescriptor | undefined): HeadDescriptor | undefined;
36
+ declare function resolveHead(configHead: HeadConfig | undefined, middlewareHead: HeadConfig | undefined, pageHead: HeadDescriptor | undefined): HeadDescriptor | undefined;
37
+ /**
38
+ * Resolve relative values of the meta tags that must be absolute against the
39
+ * request URL. Config, middleware and page layers all end up here after
40
+ * merging, so a root-relative `og:image` becomes a URL social crawlers accept
41
+ * without the app having to know its own origin.
42
+ *
43
+ * `requestUrl` is undefined while prerendering, which runs on a placeholder
44
+ * origin: baking that origin into the built HTML would be worse than the
45
+ * relative value, so the tags stay as written.
46
+ */
47
+ declare function absolutizeHead(head: HeadDescriptor | undefined, requestUrl: string | undefined): HeadDescriptor | undefined;
37
48
  /** Serialize a HeadDescriptor to HTML tags for injection into `<head>`. */
38
49
  declare function renderHeadToString(head: HeadDescriptor): string;
39
50
  /** Serialize htmlAttrs to an attribute string (includes leading space). */
40
51
  declare function renderHtmlAttrs(head: HeadDescriptor): string;
41
52
  /** Serialize bodyAttrs to an attribute string (includes leading space). */
42
53
  declare function renderBodyAttrs(head: HeadDescriptor): string;
43
- export { renderHtmlAttrs as a, renderHeadToString as i, HeadDescriptor as n, resolveHead as o, renderBodyAttrs as r, HeadConfig as t };
54
+ export { renderHeadToString as a, renderBodyAttrs as i, HeadDescriptor as n, renderHtmlAttrs as o, absolutizeHead as r, resolveHead as s, HeadConfig as t };
@@ -2,7 +2,7 @@
2
2
  /**
3
3
  * Merge head descriptors with precedence: page > middleware > config.
4
4
  *
5
- * - `title`: page wins; `titleTemplate` from config wraps it (`%s` replaced)
5
+ * - `title`: page wins; `titleTemplate` from middleware, else config, wraps it (`%s` replaced)
6
6
  * - `meta`: page overrides entries with same `name`/`property`; others appended
7
7
  * - `link`/`script`: concatenated (config first, then middleware, then page)
8
8
  * - `htmlAttrs`/`bodyAttrs`: shallow merge, page wins conflicts
@@ -17,7 +17,7 @@ function resolveHead(configHead, middlewareHead, pageHead) {
17
17
  const result = {};
18
18
  const title = pageHead?.title ?? middlewareHead?.title ?? configHead?.title;
19
19
  if (title !== void 0) {
20
- const template = configHead?.titleTemplate;
20
+ const template = middlewareHead?.titleTemplate ?? configHead?.titleTemplate;
21
21
  result.title = template ? template.replace("%s", title) : title;
22
22
  }
23
23
  const metaMap = /* @__PURE__ */ new Map();
@@ -55,6 +55,65 @@ function escapeHtml(s) {
55
55
  function serializeAttrs(attrs) {
56
56
  return Object.entries(attrs).filter(([, value]) => value != null).map(([key, value]) => `${key}="${escapeHtml(value)}"`).join(" ");
57
57
  }
58
+ /** Meta tags that only work as an absolute URL, so crawlers can read them. */
59
+ const ABSOLUTE_URL_META = /* @__PURE__ */ new Set([
60
+ "og:image",
61
+ "og:image:url",
62
+ "og:image:secure_url",
63
+ "og:video",
64
+ "og:video:url",
65
+ "og:video:secure_url",
66
+ "og:audio",
67
+ "og:audio:url",
68
+ "og:audio:secure_url",
69
+ "og:url",
70
+ "twitter:image"
71
+ ]);
72
+ /** Any scheme, or a protocol-relative `//host/path`, is already absolute. */
73
+ function isAbsoluteUrl(value) {
74
+ return value.startsWith("//") || /^[a-z][a-z\d+.-]*:/i.test(value);
75
+ }
76
+ /**
77
+ * Resolve relative values of the meta tags that must be absolute against the
78
+ * request URL. Config, middleware and page layers all end up here after
79
+ * merging, so a root-relative `og:image` becomes a URL social crawlers accept
80
+ * without the app having to know its own origin.
81
+ *
82
+ * `requestUrl` is undefined while prerendering, which runs on a placeholder
83
+ * origin: baking that origin into the built HTML would be worse than the
84
+ * relative value, so the tags stay as written.
85
+ */
86
+ function absolutizeHead(head, requestUrl) {
87
+ const entries = head?.meta;
88
+ if (!entries?.length || requestUrl === void 0) return head;
89
+ let base;
90
+ try {
91
+ base = new URL(requestUrl);
92
+ } catch {
93
+ return head;
94
+ }
95
+ let meta;
96
+ for (const [index, entry] of entries.entries()) {
97
+ const key = entry.property ?? entry.name;
98
+ const content = entry.content;
99
+ if (!key || !content || !ABSOLUTE_URL_META.has(key) || isAbsoluteUrl(content)) continue;
100
+ let resolved;
101
+ try {
102
+ resolved = new URL(content, base).href;
103
+ } catch {
104
+ continue;
105
+ }
106
+ meta ??= [...entries];
107
+ meta[index] = {
108
+ ...entry,
109
+ content: resolved
110
+ };
111
+ }
112
+ return meta ? {
113
+ ...head,
114
+ meta
115
+ } : head;
116
+ }
58
117
  /** Serialize a HeadDescriptor to HTML tags for injection into `<head>`. */
59
118
  function renderHeadToString(head) {
60
119
  const parts = [];
@@ -86,4 +145,4 @@ function renderBodyAttrs(head) {
86
145
  const attrs = head.bodyAttrs ? serializeAttrs(head.bodyAttrs) : "";
87
146
  return attrs ? " " + attrs : "";
88
147
  }
89
- export { resolveHead as i, renderHeadToString as n, renderHtmlAttrs as r, renderBodyAttrs as t };
148
+ export { resolveHead as a, renderHtmlAttrs as i, renderBodyAttrs as n, renderHeadToString as r, absolutizeHead as t };
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { a as convertRewritesConfig, d as isProtocolRelative, f as parseHostPrefixedSource, i as convertRedirectsConfig, n as convertFallbacksConfig, o as countSplats, r as convertHeadersConfig, t as VALID_REDIRECT_STATUSES } from "./config-5oSQhZNj.mjs";
2
+ import { a as convertRewritesConfig, d as isProtocolRelative, f as parseHostPrefixedSource, i as convertRedirectsConfig, n as convertFallbacksConfig, o as countSplats, r as convertHeadersConfig, t as VALID_REDIRECT_STATUSES } from "./config-CzFdJYNA.mjs";
3
3
  import { i as voidWarn } from "./log-D9hwSySP.mjs";
4
4
  import { existsSync, readFileSync } from "node:fs";
5
5
  // src/asset-routing.ts
@@ -178,7 +178,7 @@ function resolveStaticPageBypass(facts, assetsDir, files) {
178
178
  if (!assetsDir || !isPlainPath(assetsDir)) return null;
179
179
  rules.add("/" + assetsDir + "/*");
180
180
  } else if (files.length > 0) headers = renderGeneratedAssetHeaders(files);
181
- const runWorkerFirst = [...VOID_INTERNAL_WORKER_FIRST, ...[...rules].sort()];
181
+ const runWorkerFirst = withoutRedundantRules([...VOID_INTERNAL_WORKER_FIRST, ...[...rules].sort()]);
182
182
  return fitsRunWorkerFirstLimits(runWorkerFirst) ? {
183
183
  runWorkerFirst,
184
184
  headers
@@ -199,6 +199,15 @@ function workerPathRules(pattern) {
199
199
  const rule = "/" + prefix + "/*";
200
200
  return dynamic === segments.length - 1 && segments[dynamic] === "*" ? ["/" + prefix, rule] : [rule];
201
201
  }
202
+ /**
203
+ * Leaves out each rule that a `/prefix/*` rule in the list already matches.
204
+ * Cloudflare rejects a list with such a rule ("rule '/blog/*' makes it
205
+ * redundant"), and the wider rule already sends those paths to the Worker.
206
+ */
207
+ function withoutRedundantRules(rules) {
208
+ const prefixes = rules.filter((rule) => rule.endsWith("/*")).map((rule) => rule.slice(0, -1));
209
+ return rules.filter((rule) => !prefixes.some((prefix) => rule !== prefix + "*" && rule.startsWith(prefix)));
210
+ }
202
211
  function fitsRunWorkerFirstLimits(rules) {
203
212
  return rules.length <= MAX_RUN_WORKER_FIRST_RULES && rules.every((rule) => rule.length <= MAX_RUN_WORKER_FIRST_RULE_LENGTH);
204
213
  }
@@ -1,7 +1,7 @@
1
- import { H as outro } from "./dist-BQdgCVQF.mjs";
1
+ import { H as outro } from "./dist-STQXl8ck.mjs";
2
2
  import { n as getOwnVersion } from "./agents-DRo8gzni.mjs";
3
- import { n as operatorGroups, t as operatorCommands } from "./operator-args-DuKAQ3Ks.mjs";
4
- import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-CXJTIAtF.mjs";
3
+ import { n as operatorGroups, t as operatorCommands } from "./operator-args-BCCohcz3.mjs";
4
+ import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-DNVILSz2.mjs";
5
5
  // src/cli/ascii.ts
6
6
  const asciiArts = [
7
7
  `
@@ -404,7 +404,7 @@ const HELP_TREE = {
404
404
  },
405
405
  {
406
406
  command: "set <id>",
407
- description: "Edit a plan name, limits, or build instance size"
407
+ description: "Edit a plan name, limits, build size, or AI Gateway logging default"
408
408
  },
409
409
  {
410
410
  command: "reset <id>",
@@ -428,7 +428,7 @@ const HELP_TREE = {
428
428
  },
429
429
  {
430
430
  command: "sync",
431
- description: "Continue pending account limit updates"
431
+ description: "Continue pending account limit and AI logging updates"
432
432
  }
433
433
  ],
434
434
  options: [
@@ -438,7 +438,7 @@ const HELP_TREE = {
438
438
  },
439
439
  {
440
440
  command: "--file <path>",
441
- description: "Read plan settings and partial limits from JSON"
441
+ description: "Read plan settings, partial limits, and aiLogging from JSON"
442
442
  },
443
443
  {
444
444
  command: "--name <name>",
@@ -0,0 +1 @@
1
+ export { r as printHelpPage } from "./help-Cgdcd-SG.mjs";
package/dist/index.d.mts CHANGED
@@ -1,8 +1,8 @@
1
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-DjqciiDc.mjs";
2
- import { i as AuthUser } from "./auth-CZrthGxs.mjs";
1
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, x as DeferredState, y as defineScheduled } from "./handler-6fzr_ikp.mjs";
2
+ import { i as AuthUser } from "./auth-CV9kXHKe.mjs";
3
3
  import { t as QueueMap } from "./queues-DdM42xXW.mjs";
4
- import { n as HeadDescriptor } from "./head-MeF_5M_3.mjs";
5
- import { s as RouteEnvironment } from "./types-agfx0alu.mjs";
4
+ import { n as HeadDescriptor, t as HeadConfig } from "./head-CVO92KEx.mjs";
5
+ import { l as RouteEnvironment } from "./types-IPut3_Yx.mjs";
6
6
  import { Plugin } from "vite";
7
7
  import { convertToWranglerConfig } from "@cloudflare/config";
8
8
  import { PluginConfig } from "@cloudflare/vite-plugin";
@@ -63,4 +63,4 @@ export declare function voidPlugin(options?: {
63
63
  persistTo?: string;
64
64
  auxiliaryWorkers?: Array<AuxiliaryWorkerConfig>;
65
65
  }): Array<Plugin>;
66
- export { type AuthUser, type BasicAuthOptions, type CloudBindings, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
66
+ export { type AuthUser, type BasicAuthOptions, type CloudBindings, type CloudContext, type CloudContextVariables, type CloudEnv, type Deferred, type DeferredState, type HandlerInput, type HeadConfig, type HeadDescriptor, type InferProps, type QueueBatch, type QueueMap, type QueueMessage, type QueueRetryOptions, type RenderAssetTags, type TypedHandler, type TypedQueueHandler, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };