void 1.7.0 → 1.8.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 (277) hide show
  1. package/dist/{account-cmd-BfkJ_1PC.mjs → account-cmd-CZKntRH2.mjs} +5 -5
  2. package/dist/action-key-ByZ6DDld.mjs +64 -0
  3. package/dist/{application-analysis-OV0CBJ80.mjs → application-analysis-CyTagJQM.mjs} +25 -5
  4. package/dist/{application-routing-QpyC5G8z.mjs → application-routing-BLrMVpqi.mjs} +1 -1
  5. package/dist/{auth-CZrthGxs.d.mts → auth-Bk9VGtQW.d.mts} +1 -1
  6. package/dist/{auth-link-CW1Zh6FM.mjs → auth-link-BOaQWMKw.mjs} +5 -5
  7. package/dist/{auth-router-CNBKnEZi.mjs → auth-router-D0-VcmDs.mjs} +3 -3
  8. package/dist/{better-auth-shared-C-0uZg8-.d.mts → better-auth-shared-CQFdtguU.d.mts} +2 -2
  9. package/dist/boundary-plans-CRmWH68v.d.mts +25 -0
  10. package/dist/{build-cmd-C9qOKW9W.mjs → build-cmd-JTsXXf2F.mjs} +4 -4
  11. package/dist/{cache-DVBBbWQL.mjs → cache-D0m3Z_Xf.mjs} +4 -4
  12. package/dist/{cancel-deploy-COavnjud.mjs → cancel-deploy-Ce6Os4fa.mjs} +3 -3
  13. package/dist/cli/cli.mjs +1 -1
  14. package/dist/cli/cloudflare-operation-process.mjs +92 -19
  15. package/dist/cli/env-schema-probe.d.mts +1 -1
  16. package/dist/cli/env-schema-probe.mjs +2 -2
  17. package/dist/{cli-main-DFteHrJI.mjs → cli-main-rkrJy2Ge.mjs} +32 -32
  18. package/dist/client-D1Vz1Zep.mjs +1 -0
  19. package/dist/{client-BEZmTP6p.mjs → client-SZPyj4X_.mjs} +1 -1
  20. package/dist/{cloudflare-auth-DGIivpTb.mjs → cloudflare-auth-7jTqy9Bx.mjs} +1 -1
  21. package/dist/{cloudflare-cmd-DJaxC-bc.mjs → cloudflare-cmd-ChPLQcTP.mjs} +4 -4
  22. package/dist/{cloudflare-connect-BjpWmglw.mjs → cloudflare-connect-Co93VYTo.mjs} +2 -2
  23. package/dist/{cloudflare-operations-k7wYUv56.mjs → cloudflare-operations-CXaDKYj2.mjs} +4 -4
  24. package/dist/{cloudflare-operations-CZkjFrzH.mjs → cloudflare-operations-DATekLwI.mjs} +1 -1
  25. package/dist/{cloudflare-process-BcPvlMFd.mjs → cloudflare-process-DmTxZR-N.mjs} +1 -1
  26. package/dist/{connect-j1F1C_rW.mjs → connect-DlvXt1JR.mjs} +6 -6
  27. package/dist/{create-project-CE3jOmd5.mjs → create-project-CC_7hmYJ.mjs} +4 -4
  28. package/dist/{create-project-DZH3aYGQ.mjs → create-project-DzY05xqC.mjs} +1 -1
  29. package/dist/{db-DyLzzxvM.mjs → db-FhyYGcJJ.mjs} +13 -13
  30. package/dist/{db-types-DdHHUVPy.mjs → db-types-sVwEpyPR.mjs} +3 -1
  31. package/dist/{delete-Dey6YoMA.mjs → delete-CModjyOC.mjs} +4 -4
  32. package/dist/{deploy-Ccw2D2lw.mjs → deploy-Cz9TEzZy.mjs} +34 -24
  33. package/dist/deploy-DMieisRu.mjs +2 -0
  34. package/dist/{deploy-managed-static-BBVtpuGv.mjs → deploy-managed-static-DlxxXkAM.mjs} +10 -10
  35. package/dist/{deploy-transport-Dt0IvSVW.mjs → deploy-transport-DUvm6-CR.mjs} +2 -2
  36. package/dist/deploy.mjs +5 -5
  37. package/dist/{dispatch-pYaww76u.mjs → dispatch-CCiaAnSK.mjs} +4 -4
  38. package/dist/{dist-DeTdhbZc.mjs → dist-Cp4b1_T9.mjs} +1 -1
  39. package/dist/{dist-BQdgCVQF.mjs → dist-STQXl8ck.mjs} +86 -138
  40. package/dist/{domain-Dh3mG8Vs.mjs → domain-DvdZPA50.mjs} +5 -5
  41. package/dist/{drizzle-C8MPqt5m.mjs → drizzle-D4V_06-B.mjs} +1 -1
  42. package/dist/{drizzle-lFdzSEa9.mjs → drizzle-DBSpPpU1.mjs} +34 -8
  43. package/dist/{email-DKyMjOYM.mjs → email-ASpNrfLd.mjs} +7 -7
  44. package/dist/{email-cloudflare-CTt2n_W2.mjs → email-cloudflare-kqoN9jst.mjs} +13 -8
  45. package/dist/{entry-Bw-G1VVx.mjs → entry-BweGTCgj.mjs} +1 -1
  46. package/dist/{env-DkZzh_Dd.mjs → env-Bpkg3G5i.mjs} +5 -5
  47. package/dist/{env-CuzZZyjB.mjs → env-UqS-21xi.mjs} +8 -1
  48. package/dist/{env-public-CeNeO_AT.d.mts → env-public-DtJL_hZq.d.mts} +8 -7
  49. package/dist/{env-validation-1snjKtDX.mjs → env-validation-BpCCQE_6.mjs} +3 -3
  50. package/dist/{env-validation-C8NL3lEH.mjs → env-validation-CN386Utu.mjs} +1 -1
  51. package/dist/gen-M5fNQKfH.mjs +1 -0
  52. package/dist/{gen-BZmFOGDQ.mjs → gen-upKJChvd.mjs} +3 -3
  53. package/dist/{github-cmd-7Oky9qgH.mjs → github-cmd-BvMOlb8Z.mjs} +4 -4
  54. package/dist/{handler-DjqciiDc.d.mts → handler-BO7Od-z9.d.mts} +3 -2
  55. package/dist/{headers-CimYIfQI.mjs → headers-COGEDoMN.mjs} +10 -1
  56. package/dist/help-CItQVDL4.mjs +1 -0
  57. package/dist/{help-CNuUb47C.mjs → help-TPCjTu6e.mjs} +3 -3
  58. package/dist/index.d.mts +3 -3
  59. package/dist/index.mjs +247 -178
  60. package/dist/{info-DwB8IWIx.mjs → info-EsDyihwf.mjs} +2 -2
  61. package/dist/{init-CUGSmcED.mjs → init-a4lVagrb.mjs} +13 -14
  62. package/dist/{link-BlRTGHan.mjs → link-CE55DDzS.mjs} +5 -5
  63. package/dist/{list-iCg7d5Pa.mjs → list-CxRthQks.mjs} +5 -5
  64. package/dist/{live-zKGbRT4h.d.mts → live-Kc55iuOQ.d.mts} +2 -2
  65. package/dist/{login-TA51e5Fw.mjs → login-AfcSGSmE.mjs} +4 -4
  66. package/dist/login-ZHsAm-I6.mjs +1 -0
  67. package/dist/{logs-BlyAxlvx.mjs → logs-BgRJuvb1.mjs} +4 -4
  68. package/dist/{migrate-BH6LCr00.mjs → migrate-BNAh6m_C.mjs} +2 -2
  69. package/dist/migrate-BflbbZQK.mjs +1 -0
  70. package/dist/nitro.mjs +2 -2
  71. package/dist/{node-B0otYjDv.mjs → node-CXFUw0Uz.mjs} +2 -2
  72. package/dist/{operator-args-DuKAQ3Ks.mjs → operator-args-DGTuCdSE.mjs} +8 -0
  73. package/dist/{operator-cmd-CoHlJjcT.mjs → operator-cmd-C-viB7Si.mjs} +4 -4
  74. package/dist/operator-cmd-D6qNuJ_z.mjs +1 -0
  75. package/dist/output-BsdnNpxa.mjs +1 -0
  76. package/dist/{output-CXJTIAtF.mjs → output-DNVILSz2.mjs} +1 -1
  77. package/dist/pages/client.d.mts +28 -3
  78. package/dist/pages/client.mjs +132 -15
  79. package/dist/pages/index.d.mts +3 -2
  80. package/dist/pages/index.mjs +2 -2
  81. package/dist/pages/islands-plugin.d.mts +1 -1
  82. package/dist/pages/islands-plugin.mjs +13 -2
  83. package/dist/pages/protocol.d.mts +2 -2
  84. package/dist/pages/protocol.mjs +1 -1
  85. package/dist/{platform-args-DfT8yQBF.mjs → platform-args-CiYeZmc5.mjs} +1 -1
  86. package/dist/platform-args-DJvF1-kl.mjs +1 -0
  87. package/dist/{platform-auth-config-MO0VdVs9.mjs → platform-auth-config-Dt2qEc2w.mjs} +6 -6
  88. package/dist/{platform-auth-protection-Dv208eyL.mjs → platform-auth-protection-B7TaF-PZ.mjs} +4 -4
  89. package/dist/{platform-auth-recovery-DvAQ674F.mjs → platform-auth-recovery-suXSteJ6.mjs} +4 -4
  90. package/dist/{platform-cmd-dlSxrcQ7.mjs → platform-cmd-9rvYBBtr.mjs} +7 -7
  91. package/dist/{platform-cmd-BpUA19r_.mjs → platform-cmd-DuAsIxbU.mjs} +1 -1
  92. package/dist/{platform-domain-DSO4eUEw.mjs → platform-domain-DhH_vDr6.mjs} +4 -4
  93. package/dist/{platform-lifecycle-CfcFygHb.mjs → platform-lifecycle-3uI-E2bF.mjs} +1 -1
  94. package/dist/{platform-lifecycle-BSvsyB_x.mjs → platform-lifecycle-CXmXe2xt.mjs} +13 -13
  95. package/dist/{platform-management-CrP1XhVd.mjs → platform-management-BBCHfwji.mjs} +3 -3
  96. package/dist/{platform-management-BMdyt667.mjs → platform-management-PdrgDQTe.mjs} +1 -1
  97. package/dist/{platform-plans-config-CgDiwflR.mjs → platform-plans-config-BGwkXYDM.mjs} +2 -2
  98. package/dist/{platform-recovery-CHWwXVZ6.mjs → platform-recovery-C8NxXGRR.mjs} +2 -2
  99. package/dist/{platform-setup-BTQVbnTC.mjs → platform-setup-Casiffqj.mjs} +2 -2
  100. package/dist/{plugin-inference-g66Q1Mx9.mjs → plugin-inference-CErfTgEx.mjs} +3 -3
  101. package/dist/{prepare-DXduEwQp.mjs → prepare-BDKWZgfL.mjs} +5 -5
  102. package/dist/{prepare-DJYHjpzq.mjs → prepare-BLrzXjIl.mjs} +3 -3
  103. package/dist/prepare-a1_5usAn.mjs +1 -0
  104. package/dist/{prerender-render-BN9Lmebs.mjs → prerender-render-BAdYhivW.mjs} +15 -2
  105. package/dist/prerender-render.d.mts +2 -0
  106. package/dist/prerender-render.mjs +1 -1
  107. package/dist/{project-cmd-Dfb1Sg8w.mjs → project-cmd-DzGvxXKH.mjs} +17 -17
  108. package/dist/{project-team-BO2dyc7S.mjs → project-team-C5XtHbZk.mjs} +4 -4
  109. package/dist/{project-token-ByO2mEI2.mjs → project-token-B4D5yhHQ.mjs} +4 -4
  110. package/dist/{project-zero-trust-CoQfwRBR.mjs → project-zero-trust--0LvktDg.mjs} +4 -4
  111. package/dist/{protocol-yxdHxFLN.mjs → protocol-B1Tvc9-x.mjs} +191 -69
  112. package/dist/{protocol-xZMvWsrg.d.mts → protocol-Cg2I81NA.d.mts} +9 -2
  113. package/dist/{provision-D5q-ptD3.mjs → provision-C3yiHdld.mjs} +1 -1
  114. package/dist/{provision-CMH4-8ri.mjs → provision-CAcrauvr.mjs} +1 -1
  115. package/dist/{requests-CPOiDkjh.mjs → requests-CrRiTgQA.mjs} +3 -3
  116. package/dist/resolve-project-C5wC-Hoi.mjs +1 -0
  117. package/dist/{resolve-project-ClvLMTI9.mjs → resolve-project-Da3OgCU1.mjs} +1 -1
  118. package/dist/{rollback-BfCs2la4.mjs → rollback-BsmQyj-Q.mjs} +4 -4
  119. package/dist/{route-types-Cl3x0Q8B.mjs → route-types-CgtlFCDz.mjs} +3 -2
  120. package/dist/routes-stub.d.mts +4 -3
  121. package/dist/runtime/auth.d.mts +1 -1
  122. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  123. package/dist/runtime/better-auth-pg.d.mts +1 -1
  124. package/dist/runtime/better-auth.d.mts +1 -1
  125. package/dist/runtime/client-react.d.mts +1 -1
  126. package/dist/runtime/client-solid.d.mts +1 -1
  127. package/dist/runtime/client-svelte.d.mts +1 -1
  128. package/dist/runtime/client-vue.d.mts +1 -1
  129. package/dist/runtime/client.d.mts +1 -1
  130. package/dist/runtime/db.d.mts +6 -3
  131. package/dist/runtime/db.mjs +2 -2
  132. package/dist/runtime/env-public.d.mts +1 -1
  133. package/dist/runtime/env-public.mjs +53 -39
  134. package/dist/runtime/handler.d.mts +1 -1
  135. package/dist/runtime/live-client.d.mts +1 -1
  136. package/dist/runtime/live.d.mts +1 -1
  137. package/dist/runtime/routing.d.mts +8 -3
  138. package/dist/runtime/routing.mjs +161 -21
  139. package/dist/runtime/validator.d.mts +1 -1
  140. package/dist/runtime/ws-server.d.mts +3 -3
  141. package/dist/runtime/ws.d.mts +1 -1
  142. package/dist/{scan-L8OSv1f7.mjs → scan-BJ3bj6aP.mjs} +228 -27
  143. package/dist/{secret-CuI6LTpD.mjs → secret-D0g5oBsP.mjs} +6 -6
  144. package/dist/{skills-BBO9wMjB.mjs → skills-CoBB9_Ao.mjs} +1 -1
  145. package/dist/{ast-bindings-BkivMJIo.mjs → static-exports-DFkzL-NX.mjs} +96 -33
  146. package/dist/{subcommand-prompt-BZMnCA8T.mjs → subcommand-prompt-0yIARXf2.mjs} +2 -2
  147. package/dist/{types-agfx0alu.d.mts → types-IPut3_Yx.d.mts} +15 -1
  148. package/dist/{wrapper-BGsi_uHs.mjs → wrapper-CVMZarxf.mjs} +1 -1
  149. package/dist/{ws-DB8Feytg.d.mts → ws--U7QicYy.d.mts} +2 -2
  150. package/docs/guide/ai.md +1 -0
  151. package/docs/guide/app-types.md +1 -0
  152. package/docs/guide/auth.md +1 -0
  153. package/docs/guide/database/d1.md +16 -1
  154. package/docs/guide/database/mysql.md +1 -0
  155. package/docs/guide/database/postgresql.md +1 -0
  156. package/docs/guide/database.md +1 -0
  157. package/docs/guide/deployment.md +1 -0
  158. package/docs/guide/durable-state.md +1 -0
  159. package/docs/guide/edge/headers.md +1 -0
  160. package/docs/guide/edge/prerendering.md +1 -0
  161. package/docs/guide/edge/redirects.md +1 -0
  162. package/docs/guide/edge/revalidation.md +3 -0
  163. package/docs/guide/edge/rewrites.md +1 -0
  164. package/docs/guide/edge/static-assets.md +1 -0
  165. package/docs/guide/email/domains.md +1 -0
  166. package/docs/guide/email/receiving.md +3 -2
  167. package/docs/guide/email/sending.md +3 -2
  168. package/docs/guide/email.md +1 -0
  169. package/docs/guide/env-vars.md +4 -0
  170. package/docs/guide/index.md +1 -0
  171. package/docs/guide/jobs.md +1 -0
  172. package/docs/guide/kv.md +1 -0
  173. package/docs/guide/live.md +1 -0
  174. package/docs/guide/pages-routing/actions-and-forms.md +36 -18
  175. package/docs/guide/pages-routing/errors.md +101 -0
  176. package/docs/guide/pages-routing/head.md +1 -0
  177. package/docs/guide/pages-routing/islands.md +1 -0
  178. package/docs/guide/pages-routing/layouts.md +3 -0
  179. package/docs/guide/pages-routing/loaders.md +1 -0
  180. package/docs/guide/pages-routing/markdown.md +1 -1
  181. package/docs/guide/pages-routing/overview.md +3 -0
  182. package/docs/guide/pages-routing/view-transitions.md +1 -0
  183. package/docs/guide/platform/administration/access.md +1 -0
  184. package/docs/guide/platform/administration/connected-apps.md +4 -0
  185. package/docs/guide/platform/administration/email.md +1 -0
  186. package/docs/guide/platform/administration/operations.md +1 -0
  187. package/docs/guide/platform/administration/plans.md +1 -0
  188. package/docs/guide/platform/administration/projects.md +11 -0
  189. package/docs/guide/platform/administration/zero-trust.md +1 -0
  190. package/docs/guide/platform/development/local.md +1 -0
  191. package/docs/guide/platform/development/runtime.md +1 -0
  192. package/docs/guide/platform/development/schema-ci.md +1 -0
  193. package/docs/guide/platform/installation/ci.md +1 -0
  194. package/docs/guide/platform/installation/credentials.md +1 -0
  195. package/docs/guide/platform/installation/domains.md +1 -0
  196. package/docs/guide/platform/installation/first-deployment.md +1 -0
  197. package/docs/guide/platform/installation/maintenance.md +1 -0
  198. package/docs/guide/platform/installation/prerequisites.md +1 -0
  199. package/docs/guide/platform/installation/setup.md +1 -0
  200. package/docs/guide/platform/installation/uninstall.md +1 -0
  201. package/docs/guide/platform-administration.md +1 -0
  202. package/docs/guide/platform-development.md +1 -0
  203. package/docs/guide/project-collaboration.md +1 -0
  204. package/docs/guide/queues.md +3 -0
  205. package/docs/guide/quickstart.md +3 -2
  206. package/docs/guide/remote-dev.md +1 -0
  207. package/docs/guide/sandboxes.md +1 -0
  208. package/docs/guide/self-hosted-platform.md +1 -0
  209. package/docs/guide/server-routing.md +1 -0
  210. package/docs/guide/sse.md +1 -0
  211. package/docs/guide/ssg.md +1 -0
  212. package/docs/guide/ssr.md +1 -0
  213. package/docs/guide/storage.md +1 -0
  214. package/docs/guide/testing.md +62 -0
  215. package/docs/guide/type-safety.md +1 -0
  216. package/docs/guide/typed-fetch.md +1 -0
  217. package/docs/guide/websockets.md +1 -0
  218. package/docs/index.md +1 -0
  219. package/docs/integrations/agents.md +1 -0
  220. package/docs/integrations/cloudflare.md +1 -0
  221. package/docs/integrations/frameworks/analog.md +1 -0
  222. package/docs/integrations/frameworks/astro.md +1 -0
  223. package/docs/integrations/frameworks/nuxt.md +1 -0
  224. package/docs/integrations/frameworks/overview.md +1 -0
  225. package/docs/integrations/frameworks/react-router.md +1 -0
  226. package/docs/integrations/frameworks/sveltekit.md +1 -0
  227. package/docs/integrations/frameworks/tanstack-start.md +1 -0
  228. package/docs/integrations/hono.md +1 -0
  229. package/docs/integrations/nodejs-bun-deno.md +1 -0
  230. package/docs/reference/api/auth.md +1 -0
  231. package/docs/reference/api/client.md +1 -0
  232. package/docs/reference/api/database.md +24 -1
  233. package/docs/reference/api/deploy.md +4 -0
  234. package/docs/reference/api/durable.md +1 -0
  235. package/docs/reference/api/env.md +1 -0
  236. package/docs/reference/api/handlers.md +1 -0
  237. package/docs/reference/api/pages.md +22 -4
  238. package/docs/reference/api/plugin.md +1 -0
  239. package/docs/reference/api/resources.md +1 -0
  240. package/docs/reference/api/rewrites.md +2 -1
  241. package/docs/reference/api/types.md +1 -0
  242. package/docs/reference/api.md +1 -0
  243. package/docs/reference/cli/auth.md +1 -0
  244. package/docs/reference/cli/database.md +1 -0
  245. package/docs/reference/cli/deploy.md +1 -0
  246. package/docs/reference/cli/domains.md +1 -0
  247. package/docs/reference/cli/email.md +1 -0
  248. package/docs/reference/cli/generate.md +1 -0
  249. package/docs/reference/cli/github.md +1 -0
  250. package/docs/reference/cli/platform-config.md +1 -0
  251. package/docs/reference/cli/platform-email.md +1 -0
  252. package/docs/reference/cli/platform-installation.md +1 -0
  253. package/docs/reference/cli/platform-operations.md +1 -0
  254. package/docs/reference/cli/platform-users.md +23 -0
  255. package/docs/reference/cli/platform-zero-trust.md +1 -0
  256. package/docs/reference/cli/platform.md +1 -0
  257. package/docs/reference/cli/project.md +1 -0
  258. package/docs/reference/cli/secrets.md +1 -0
  259. package/docs/reference/cli/setup.md +1 -0
  260. package/docs/reference/cli.md +3 -0
  261. package/docs/reference/config.md +1 -0
  262. package/docs/reference/resource-inference.md +1 -0
  263. package/docs/reference/structure.md +1 -0
  264. package/package.json +25 -25
  265. package/skills/void/SKILL.md +2 -0
  266. package/dist/action-key-XtKKbbsi.mjs +0 -25
  267. package/dist/client-BAxLpSKv.mjs +0 -1
  268. package/dist/deploy-DEZkUS77.mjs +0 -2
  269. package/dist/gen-C6iknRdI.mjs +0 -1
  270. package/dist/help-C_cqTByy.mjs +0 -1
  271. package/dist/login-C4q1S-5b.mjs +0 -1
  272. package/dist/migrate-CVBsSFhC.mjs +0 -1
  273. package/dist/operator-cmd-DnaCnCSP.mjs +0 -1
  274. package/dist/output-CNsMDEd2.mjs +0 -1
  275. package/dist/platform-args-B7-wQ0_B.mjs +0 -1
  276. package/dist/prepare-Bx4a8cb1.mjs +0 -1
  277. package/dist/resolve-project-BALVa9q0.mjs +0 -1
@@ -1,10 +1,10 @@
1
- import { n as __toESM, t as __commonJSMin } from "./rolldown-runtime-uD8oG6U2.mjs";
1
+ import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
2
2
  import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
3
3
  import "node:fs";
4
4
  import { randomBytes } from "node:crypto";
5
5
  import { stripVTControlCharacters, styleText } from "node:util";
6
6
  import process$1, { stdin, stdout } from "node:process";
7
- import l__default, * as l from "node:readline";
7
+ import f__default, * as f$1 from "node:readline";
8
8
  import { ReadStream } from "node:tty";
9
9
  // ../../node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
10
10
  const getCodePointsLength$1 = (() => {
@@ -284,63 +284,53 @@ const CRLF_OR_LF$1 = /\r?\n/;
284
284
  function wrapAnsi$1(string, columns, options) {
285
285
  return String(string).normalize().split(CRLF_OR_LF$1).map((line) => exec$1(line, columns, options)).join("\n");
286
286
  }
287
- // ../../node_modules/.pnpm/@clack+core@1.5.1/node_modules/@clack/core/dist/index.mjs
288
- var import_src = (/* @__PURE__ */ __commonJSMin(((exports, module) => {
289
- const ESC = "\x1B";
290
- const CSI = `${ESC}[`;
291
- const beep = "\x07";
292
- const cursor = {
293
- to(x, y) {
294
- if (!y) return `${CSI}${x + 1}G`;
295
- return `${CSI}${y + 1};${x + 1}H`;
296
- },
297
- move(x, y) {
298
- let ret = "";
299
- if (x < 0) ret += `${CSI}${-x}D`;
300
- else if (x > 0) ret += `${CSI}${x}C`;
301
- if (y < 0) ret += `${CSI}${-y}A`;
302
- else if (y > 0) ret += `${CSI}${y}B`;
303
- return ret;
304
- },
305
- up: (count = 1) => `${CSI}${count}A`,
306
- down: (count = 1) => `${CSI}${count}B`,
307
- forward: (count = 1) => `${CSI}${count}C`,
308
- backward: (count = 1) => `${CSI}${count}D`,
309
- nextLine: (count = 1) => `${CSI}E`.repeat(count),
310
- prevLine: (count = 1) => `${CSI}F`.repeat(count),
311
- left: `${CSI}G`,
312
- hide: `${CSI}?25l`,
313
- show: `${CSI}?25h`,
314
- save: `${ESC}7`,
315
- restore: `${ESC}8`
316
- };
317
- module.exports = {
318
- cursor,
319
- scroll: {
320
- up: (count = 1) => `${CSI}S`.repeat(count),
321
- down: (count = 1) => `${CSI}T`.repeat(count)
322
- },
323
- erase: {
324
- screen: `${CSI}2J`,
325
- up: (count = 1) => `${CSI}1J`.repeat(count),
326
- down: (count = 1) => `${CSI}J`.repeat(count),
327
- line: `${CSI}2K`,
328
- lineEnd: `${CSI}K`,
329
- lineStart: `${CSI}1K`,
330
- lines(count) {
331
- let clear = "";
332
- for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
333
- if (count) clear += cursor.left;
334
- return clear;
335
- }
336
- },
337
- beep
338
- };
339
- })))();
340
- function findCursor(s, o, l) {
341
- if (!l.some((r) => !r.disabled)) return s;
342
- const t = s + o, n = Math.max(l.length - 1, 0), e = t < 0 ? n : t > n ? 0 : t;
343
- return l[e]?.disabled ? findCursor(e, o < 0 ? -1 : 1, l) : e;
287
+ // ../../node_modules/.pnpm/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
288
+ const ESC$1 = "\x1B";
289
+ const CSI$1 = `${ESC$1}[`;
290
+ const cursor = {
291
+ to(x, y) {
292
+ if (!y) return `${CSI$1}${x + 1}G`;
293
+ return `${CSI$1}${y + 1};${x + 1}H`;
294
+ },
295
+ move(x, y) {
296
+ let ret = "";
297
+ if (x < 0) ret += `${CSI$1}${-x}D`;
298
+ else if (x > 0) ret += `${CSI$1}${x}C`;
299
+ if (y < 0) ret += `${CSI$1}${-y}A`;
300
+ else if (y > 0) ret += `${CSI$1}${y}B`;
301
+ return ret;
302
+ },
303
+ up: (count = 1) => `${CSI$1}${count}A`,
304
+ down: (count = 1) => `${CSI$1}${count}B`,
305
+ forward: (count = 1) => `${CSI$1}${count}C`,
306
+ backward: (count = 1) => `${CSI$1}${count}D`,
307
+ nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
308
+ prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
309
+ left: `${CSI$1}G`,
310
+ hide: `${CSI$1}?25l`,
311
+ show: `${CSI$1}?25h`,
312
+ save: `${ESC$1}7`,
313
+ restore: `${ESC$1}8`
314
+ };
315
+ const erase = {
316
+ screen: `${CSI$1}2J`,
317
+ up: (count = 1) => `${CSI$1}1J`.repeat(count),
318
+ down: (count = 1) => `${CSI$1}J`.repeat(count),
319
+ line: `${CSI$1}2K`,
320
+ lineEnd: `${CSI$1}K`,
321
+ lineStart: `${CSI$1}1K`,
322
+ lines(count) {
323
+ let clear = "";
324
+ for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
325
+ if (count) clear += cursor.left;
326
+ return clear;
327
+ }
328
+ };
329
+ // ../../node_modules/.pnpm/@clack+core@1.6.0/node_modules/@clack/core/dist/index.mjs
330
+ function findCursor(o, s, l) {
331
+ if (!l.some((r) => !r.disabled)) return o;
332
+ const t = o + s, n = Math.max(l.length - 1, 0), e = t < 0 ? n : t > n ? 0 : t;
333
+ return l[e]?.disabled ? findCursor(e, s < 0 ? -1 : 1, l) : e;
344
334
  }
345
335
  const settings = {
346
336
  actions: /* @__PURE__ */ new Set([
@@ -442,32 +432,32 @@ function setRawMode(e, r) {
442
432
  o.isTTY && o.setRawMode(r);
443
433
  }
444
434
  function block({ input: e = stdin, output: r = stdout, overwrite: o = true, hideCursor: n = true } = {}) {
445
- const s = l.createInterface({
435
+ const s = f$1.createInterface({
446
436
  input: e,
447
437
  output: r,
448
438
  prompt: "",
449
439
  tabSize: 1
450
440
  });
451
- l.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
452
- const t = (f, { name: a, sequence: w }) => {
441
+ f$1.emitKeypressEvents(e, s), e instanceof ReadStream && e.isTTY && e.setRawMode(true);
442
+ const t = (l, { name: i, sequence: p }) => {
453
443
  if (isActionKey([
454
- String(f),
455
- a,
456
- w
444
+ String(l),
445
+ i,
446
+ p
457
447
  ], "cancel")) {
458
- n && r.write(import_src.cursor.show), process.exit(0);
448
+ n && r.write(cursor.show), process.exit(0);
459
449
  return;
460
450
  }
461
451
  if (!o) return;
462
- const i = a === "return" ? 0 : -1, m = a === "return" ? -1 : 0;
463
- l.moveCursor(r, i, m, () => {
464
- l.clearLine(r, 1, () => {
452
+ const c = i === "return" ? 0 : -1, a = i === "return" ? -1 : 0;
453
+ f$1.moveCursor(r, c, a, () => {
454
+ f$1.clearLine(r, 1, () => {
465
455
  e.once("keypress", t);
466
456
  });
467
457
  });
468
458
  };
469
- return n && r.write(import_src.cursor.hide), e.once("keypress", t), () => {
470
- e.off("keypress", t), n && r.write(import_src.cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
459
+ return n && r.write(cursor.hide), e.once("keypress", t), () => {
460
+ e.off("keypress", t), n && r.write(cursor.show), e instanceof ReadStream && e.isTTY && !R && e.setRawMode(false), s.terminal = false, s.close();
471
461
  };
472
462
  }
473
463
  const getColumns = (e) => "columns" in e && typeof e.columns == "number" ? e.columns : 80;
@@ -479,7 +469,7 @@ function runValidation(e, a) {
479
469
  }
480
470
  return e(a);
481
471
  }
482
- var y = class {
472
+ let C$1 = class C {
483
473
  input;
484
474
  output;
485
475
  _abortSignal;
@@ -557,16 +547,16 @@ var y = class {
557
547
  this.state = "cancel", this.close();
558
548
  }, { once: true });
559
549
  }
560
- this.rl = l__default.createInterface({
550
+ this.rl = f__default.createInterface({
561
551
  input: this.input,
562
552
  tabSize: 2,
563
553
  prompt: "",
564
554
  escapeCodeTimeout: 50,
565
555
  terminal: true
566
556
  }), this.rl.prompt(), this.opts.initialUserInput !== void 0 && this._setUserInput(this.opts.initialUserInput, true), this.input.on("keypress", this.onKeypress), setRawMode(this.input, true), this.output.on("resize", this.render), this.render(), this.once("submit", () => {
567
- this.output.write(import_src.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t(this.value);
557
+ this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t(this.value);
568
558
  }), this.once("cancel", () => {
569
- this.output.write(import_src.cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t(CANCEL_SYMBOL);
559
+ this.output.write(cursor.show), this.output.off("resize", this.render), setRawMode(this.input, false), t(CANCEL_SYMBOL);
570
560
  });
571
561
  });
572
562
  }
@@ -613,20 +603,20 @@ var y = class {
613
603
  `), setRawMode(this.input, false), this.rl?.close(), this.rl = void 0, this.emit(`${this.state}`, this.value), this.unsubscribe();
614
604
  }
615
605
  restoreCursor() {
616
- const t = wrapAnsi$1(this._prevFrame, process.stdout.columns, {
606
+ const t = wrapAnsi$1(this._prevFrame, getColumns(this.output), {
617
607
  hard: true,
618
608
  trim: false
619
609
  }).split(`
620
610
  `).length - 1;
621
- this.output.write(import_src.cursor.move(-999, t * -1));
611
+ this.output.write(cursor.move(-999, t * -1));
622
612
  }
623
613
  render() {
624
- const t = wrapAnsi$1(this._render(this) ?? "", process.stdout.columns, {
614
+ const t = wrapAnsi$1(this._render(this) ?? "", getColumns(this.output), {
625
615
  hard: true,
626
616
  trim: false
627
617
  });
628
618
  if (t !== this._prevFrame) {
629
- if (this.state === "initial") this.output.write(import_src.cursor.hide);
619
+ if (this.state === "initial") this.output.write(cursor.hide);
630
620
  else {
631
621
  const e = diffLines(this._prevFrame, t), i = getRows(this.output);
632
622
  if (this.restoreCursor(), e) {
@@ -637,32 +627,32 @@ var y = class {
637
627
  return;
638
628
  }
639
629
  if (e.lines.length === 1) {
640
- this.output.write(import_src.cursor.move(0, n - r)), this.output.write(import_src.erase.lines(1));
630
+ this.output.write(cursor.move(0, n - r)), this.output.write(erase.lines(1));
641
631
  const o = t.split(`
642
632
  `);
643
- this.output.write(o[n]), this._prevFrame = t, this.output.write(import_src.cursor.move(0, o.length - n - 1));
633
+ this.output.write(o[n]), this._prevFrame = t, this.output.write(cursor.move(0, o.length - n - 1));
644
634
  return;
645
635
  } else if (e.lines.length > 1) {
646
636
  if (s < r) n = s;
647
637
  else {
648
638
  const h = n - r;
649
- h > 0 && this.output.write(import_src.cursor.move(0, h));
639
+ h > 0 && this.output.write(cursor.move(0, h));
650
640
  }
651
- this.output.write(import_src.erase.down());
652
- const f = t.split(`
641
+ this.output.write(erase.down());
642
+ const m = t.split(`
653
643
  `).slice(n);
654
- this.output.write(f.join(`
644
+ this.output.write(m.join(`
655
645
  `)), this._prevFrame = t;
656
646
  return;
657
647
  }
658
648
  }
659
- this.output.write(import_src.erase.down());
649
+ this.output.write(erase.down());
660
650
  }
661
651
  this.output.write(t), this.state === "initial" && (this.state = "active"), this._prevFrame = t;
662
652
  }
663
653
  }
664
654
  };
665
- var r = class extends y {
655
+ var r = class extends C$1 {
666
656
  get cursor() {
667
657
  return this.value ? 0 : 1;
668
658
  }
@@ -673,13 +663,13 @@ var r = class extends y {
673
663
  super(t, false), this.value = !!t.initialValue, this.on("userInput", () => {
674
664
  this.value = this._value;
675
665
  }), this.on("confirm", (i) => {
676
- this.output.write(import_src.cursor.move(0, -1)), this.value = i, this.state = "submit", this.close();
666
+ this.output.write(cursor.move(0, -1)), this.value = i, this.state = "submit", this.close();
677
667
  }), this.on("cursor", () => {
678
668
  this.value = !this.value;
679
669
  });
680
670
  }
681
671
  };
682
- var a = class extends y {
672
+ var a = class extends C$1 {
683
673
  options;
684
674
  cursor = 0;
685
675
  get _value() {
@@ -706,8 +696,8 @@ var a = class extends y {
706
696
  constructor(e) {
707
697
  super(e, false), this.options = e.options, this.value = [...e.initialValues ?? []];
708
698
  const i = Math.max(this.options.findIndex(({ value: t }) => t === e.cursorAt), 0);
709
- this.cursor = this.options[i]?.disabled ? findCursor(i, 1, this.options) : i, this.on("key", (t, l) => {
710
- l.name === "a" && this.toggleAll(), l.name === "i" && this.toggleInvert();
699
+ this.cursor = this.options[i]?.disabled ? findCursor(i, 1, this.options) : i, this.on("key", (t, s) => {
700
+ s.name === "a" && this.toggleAll(), s.name === "i" && this.toggleInvert(), s.name === void 0 && t === " " && this.toggleValue();
711
701
  }), this.on("cursor", (t) => {
712
702
  switch (t) {
713
703
  case "left":
@@ -723,7 +713,7 @@ var a = class extends y {
723
713
  });
724
714
  }
725
715
  };
726
- let u$1 = class u extends y {
716
+ var u = class extends C$1 {
727
717
  _mask = "•";
728
718
  get cursor() {
729
719
  return this._cursor;
@@ -749,7 +739,7 @@ let u$1 = class u extends y {
749
739
  });
750
740
  }
751
741
  };
752
- let n$1 = class n extends y {
742
+ let n$1 = class n extends C$1 {
753
743
  options;
754
744
  cursor = 0;
755
745
  get _selectedValue() {
@@ -775,7 +765,7 @@ let n$1 = class n extends y {
775
765
  });
776
766
  }
777
767
  };
778
- var n = class extends y {
768
+ var n = class extends C$1 {
779
769
  get userInputWithCursor() {
780
770
  if (this.state === "submit") return this.userInput;
781
771
  const t = this.userInput;
@@ -797,50 +787,8 @@ var n = class extends y {
797
787
  });
798
788
  }
799
789
  };
800
- // ../../node_modules/.pnpm/sisteransi@2.0.0/node_modules/sisteransi/dist/index.js
790
+ // ../../node_modules/.pnpm/@voidzero-dev+vite-plus-prompts@1.6.0/node_modules/@voidzero-dev/vite-plus-prompts/dist/index.mjs
801
791
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
802
- const ESC$1 = "\x1B";
803
- const CSI$1 = `${ESC$1}[`;
804
- const cursor = {
805
- to(x, y) {
806
- if (!y) return `${CSI$1}${x + 1}G`;
807
- return `${CSI$1}${y + 1};${x + 1}H`;
808
- },
809
- move(x, y) {
810
- let ret = "";
811
- if (x < 0) ret += `${CSI$1}${-x}D`;
812
- else if (x > 0) ret += `${CSI$1}${x}C`;
813
- if (y < 0) ret += `${CSI$1}${-y}A`;
814
- else if (y > 0) ret += `${CSI$1}${y}B`;
815
- return ret;
816
- },
817
- up: (count = 1) => `${CSI$1}${count}A`,
818
- down: (count = 1) => `${CSI$1}${count}B`,
819
- forward: (count = 1) => `${CSI$1}${count}C`,
820
- backward: (count = 1) => `${CSI$1}${count}D`,
821
- nextLine: (count = 1) => `${CSI$1}E`.repeat(count),
822
- prevLine: (count = 1) => `${CSI$1}F`.repeat(count),
823
- left: `${CSI$1}G`,
824
- hide: `${CSI$1}?25l`,
825
- show: `${CSI$1}?25h`,
826
- save: `${ESC$1}7`,
827
- restore: `${ESC$1}8`
828
- };
829
- const erase = {
830
- screen: `${CSI$1}2J`,
831
- up: (count = 1) => `${CSI$1}1J`.repeat(count),
832
- down: (count = 1) => `${CSI$1}J`.repeat(count),
833
- line: `${CSI$1}2K`,
834
- lineEnd: `${CSI$1}K`,
835
- lineStart: `${CSI$1}1K`,
836
- lines(count) {
837
- let clear = "";
838
- for (let i = 0; i < count; i++) clear += this.line + (i < count - 1 ? cursor.up() : "");
839
- if (count) clear += cursor.left;
840
- return clear;
841
- }
842
- };
843
- // ../../node_modules/.pnpm/@voidzero-dev+vite-plus-prompts@1.5.0/node_modules/@voidzero-dev/vite-plus-prompts/dist/index.mjs
844
792
  const getCodePointsLength = (() => {
845
793
  const SURROGATE_PAIR_RE = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g;
846
794
  return (input) => {
@@ -1624,7 +1572,7 @@ const note = (message = "", title = "", opts) => {
1624
1572
  });
1625
1573
  };
1626
1574
  const password = (opts) => {
1627
- return new u$1({
1575
+ return new u({
1628
1576
  validate: opts.validate,
1629
1577
  mask: opts.mask ?? S_PASSWORD_MASK,
1630
1578
  signal: opts.signal,
@@ -1,9 +1,9 @@
1
- import { L as log } from "./dist-BQdgCVQF.mjs";
1
+ import { L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-BEZmTP6p.mjs";
4
- import { f as import_picocolors, m as printSuccess, p as note } from "./output-CXJTIAtF.mjs";
3
+ import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
4
+ import { f as import_picocolors, m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
5
5
  import { n as readDeploymentPlatform } from "./project-CLwxcEdq.mjs";
6
- import { i as resolveCommandProjectId } from "./resolve-project-ClvLMTI9.mjs";
6
+ import { i as resolveCommandProjectId } from "./resolve-project-Da3OgCU1.mjs";
7
7
  // src/cli/domain.ts
8
8
  async function runDomainCommand(root, args) {
9
9
  const platform = readDeploymentPlatform(root);
@@ -25,7 +25,7 @@ async function runDomainCommand(root, args) {
25
25
  }
26
26
  async function runCloudflareDomainCommand(root, args) {
27
27
  if (args.projectSlug) throw new Error("domain: --project selects a Void platform project and is not used for direct Cloudflare apps.");
28
- const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-CZkjFrzH.mjs");
28
+ const { changeCloudflareDomain, listCloudflareDomains } = await import("./cloudflare-operations-DATekLwI.mjs");
29
29
  if (args.subcommand === "add") {
30
30
  const result = await changeCloudflareDomain(root, args.hostname, "add");
31
31
  note("Cloudflare Custom Domains manages the DNS record and TLS certificate in the zone on your account.", "Cloudflare Domain");
@@ -1 +1 @@
1
- export { t as generateVoidAuthDatabaseModule, n as generateVoidAuthDrizzleSchema } from "./drizzle-lFdzSEa9.mjs";
1
+ export { t as generateVoidAuthDatabaseModule, n as generateVoidAuthDrizzleSchema } from "./drizzle-DBSpPpU1.mjs";
@@ -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,15 +1,15 @@
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
3
  import { p as readConfig } from "./config-5oSQhZNj.mjs";
4
4
  import { n as readProjectPaths } from "./project-paths-G0yut6Zz.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";
7
+ import { n as PlatformApiError, r as PlatformClient } from "./client-SZPyj4X_.mjs";
8
+ import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-Cz9TEzZy.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-kqoN9jst.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-DUvm6-CR.mjs";
13
13
  import { M as writeProvisionedWranglerConfig } from "./wrangler-k40T7XTQ.mjs";
14
14
  import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
15
15
  import { tmpdir } from "node:os";
@@ -8,9 +8,9 @@ import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler
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
15
  import { a as buildEnv } from "./version-metadata-eUd6Ar_U.mjs";
16
16
  import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
@@ -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
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";
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
3
  import { r as generateEnvTypes, t as findEnvFile } from "./env-types-Dz9qkiOn.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-SZPyj4X_.mjs";
6
+ import { d as formatEnvReport, g as validateProdEnv, u as fetchRemoteSecretNames } from "./env-validation-BpCCQE_6.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-DATekLwI.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 };