void 1.1.11 → 1.2.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 (233) hide show
  1. package/dist/{account-cmd-R35a4Oa8.mjs → account-cmd-CdUll_35.mjs} +5 -5
  2. package/dist/action-key-XZ9HkWAO.mjs +26 -0
  3. package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
  4. package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
  5. package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
  6. package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
  7. package/dist/{auth-link-VHmiKZmP.mjs → auth-link-C87vGXM-.mjs} +5 -5
  8. package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-6I81r-ix.mjs} +3 -3
  9. package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
  10. package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
  11. package/dist/{cache-TZ5Ab3d7.mjs → cache-oHzrnY3z.mjs} +4 -4
  12. package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
  13. package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
  14. package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-BhVxldCw.mjs} +75 -10
  15. package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-ByHk0xg4.mjs} +6 -16
  16. package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
  17. package/dist/cli/cli.mjs +139 -35
  18. package/dist/cli/cloudflare-operation-process.mjs +65 -18
  19. package/dist/cli/env-schema-probe.d.mts +1 -1
  20. package/dist/cli/env-schema-probe.mjs +3 -3
  21. package/dist/{client-GuSO3v_x.mjs → client-BEkdj1kx.mjs} +58 -13
  22. package/dist/client-BiRDZTSd.mjs +1 -0
  23. package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
  24. package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
  25. package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
  26. package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
  27. package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-Dh9dEHJj.mjs} +17 -7
  28. package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
  29. package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
  30. package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
  31. package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
  32. package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
  33. package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
  34. package/dist/config-entry.d.mts +1 -1
  35. package/dist/{connect-yQuLbuiJ.mjs → connect-k7R2rPVA.mjs} +6 -6
  36. package/dist/{create-project-CGOo_OL_.mjs → create-project-DTuy-l0z.mjs} +1 -1
  37. package/dist/{create-project-DEEWJX_M.mjs → create-project-DV71ol5d.mjs} +4 -4
  38. package/dist/{db-COI-yTJE.mjs → db-DVOkLH5X.mjs} +79 -23
  39. package/dist/{delete-PgN6L_9N.mjs → delete-BbP5eopu.mjs} +4 -4
  40. package/dist/{deploy-DsW-PrRQ.mjs → deploy-7H32EnUs.mjs} +220 -95
  41. package/dist/deploy-CE0Ev0Ob.mjs +2 -0
  42. package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-DlvcvnQT.mjs} +74 -28
  43. package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
  44. package/dist/deploy.d.mts +22 -1
  45. package/dist/deploy.mjs +49 -8
  46. package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
  47. package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
  48. package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
  49. package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
  50. package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
  51. package/dist/{domain-DKlNI0SR.mjs → domain-CA2wBgra.mjs} +5 -5
  52. package/dist/drizzle-9TubSZvI.mjs +1 -0
  53. package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
  54. package/dist/{email-C0s3OvJk.mjs → email-DXpCc77w.mjs} +10 -10
  55. package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
  56. package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
  57. package/dist/{env-BX2JFsgF.mjs → env-DgOQ9_8S.mjs} +6 -6
  58. package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
  59. package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
  60. package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
  61. package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
  62. package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
  63. package/dist/fetch-CtESUYWd.mjs +26 -0
  64. package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
  65. package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
  66. package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
  67. package/dist/{gen-Bj6ZkOcI.mjs → gen-BfmcIi2g.mjs} +5 -5
  68. package/dist/gen-NrOlWZaG.mjs +1 -0
  69. package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
  70. package/dist/{handler-_PqY82xe.d.mts → handler-BbkSPzGF.d.mts} +91 -9
  71. package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
  72. package/dist/help-BeAFFE5C.mjs +1 -0
  73. package/dist/{help-D49SL_lN.mjs → help-CxSlPpzJ.mjs} +83 -12
  74. package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
  75. package/dist/index.d.mts +1 -1
  76. package/dist/index.mjs +125 -124
  77. package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
  78. package/dist/{init-DyTEY04s.mjs → init-DxYyOs4-.mjs} +103 -43
  79. package/dist/{link-CgOVn9EC.mjs → link-Ddmod1dZ.mjs} +5 -5
  80. package/dist/{list-CUfD9RSb.mjs → list-MogaugiO.mjs} +5 -5
  81. package/dist/{live-DJONVlQK.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
  82. package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
  83. package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
  84. package/dist/{login-BJvGW5Eu.mjs → login-Cttnagmm.mjs} +4 -4
  85. package/dist/login-DgDwlKc_.mjs +1 -0
  86. package/dist/{logs-DeizBI4j.mjs → logs-CAszUWZI.mjs} +4 -4
  87. package/dist/{migrate-8rk56vV8.mjs → migrate-DyT2jJ8y.mjs} +5 -5
  88. package/dist/migrate-n49ZeS1X.mjs +1 -0
  89. package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
  90. package/dist/nitro.mjs +3 -3
  91. package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
  92. package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
  93. package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-skshjMGl.mjs} +4 -4
  94. package/dist/output-BW9uK099.mjs +1 -0
  95. package/dist/{output-Ba6ZbrzY.mjs → output-BpgYODYx.mjs} +16 -4
  96. package/dist/pages/client.d.mts +2 -2
  97. package/dist/pages/client.mjs +48 -25
  98. package/dist/pages/index.d.mts +2 -2
  99. package/dist/pages/index.mjs +4 -4
  100. package/dist/pages/islands-plugin.d.mts +43 -5
  101. package/dist/pages/islands-plugin.mjs +100 -28
  102. package/dist/pages/protocol.d.mts +2 -2
  103. package/dist/pages/protocol.mjs +1 -1
  104. package/dist/pages/serialize.d.mts +2 -2
  105. package/dist/pages/serialize.mjs +1 -1
  106. package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
  107. package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
  108. package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
  109. package/dist/platform-args-kQrgxScY.mjs +1 -0
  110. package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
  111. package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
  112. package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
  113. package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
  114. package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
  115. package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
  116. package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
  117. package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-DyKmuNY6.mjs} +405 -44
  118. package/dist/{platform-management-CnXhgxTM.mjs → platform-management--vDwSn35.mjs} +49 -5
  119. package/dist/{platform-management-BvgbusqL.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
  120. package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
  121. package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
  122. package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
  123. package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
  124. package/dist/{prepare-2XD6kh77.mjs → prepare-BcAE5Sdj.mjs} +3 -3
  125. package/dist/prepare-C4I0f--h.mjs +1 -0
  126. package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
  127. package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
  128. package/dist/prerender-render.mjs +1 -1
  129. package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-DA4K5faU.mjs} +18 -18
  130. package/dist/{project-team-CTSY7W7Q.mjs → project-team-CQBNveX3.mjs} +4 -4
  131. package/dist/{project-token-Cybtlfbl.mjs → project-token-CCalFyQf.mjs} +4 -4
  132. package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
  133. package/dist/{protocol-B8sI8dRD.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
  134. package/dist/{protocol-RNP0u7UY.mjs → protocol-DimNxVRr.mjs} +42 -17
  135. package/dist/{provision-UcYjpTRh.mjs → provision-BFLCrnUp.mjs} +1 -1
  136. package/dist/{provision-BuifYvLc.mjs → provision-DtROpNNI.mjs} +6 -5
  137. package/dist/{requests-Ryiazz9i.mjs → requests-BpH0kImL.mjs} +3 -3
  138. package/dist/resolve-project-DD1vu8s9.mjs +1 -0
  139. package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
  140. package/dist/{rollback-Or0EV3rP.mjs → rollback-CXS1tAa-.mjs} +10 -9
  141. package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
  142. package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
  143. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  144. package/dist/runtime/better-auth-pg.d.mts +1 -1
  145. package/dist/runtime/better-auth.d.mts +1 -1
  146. package/dist/runtime/client-react.d.mts +2 -2
  147. package/dist/runtime/client-react.mjs +3 -3
  148. package/dist/runtime/client-solid.d.mts +2 -2
  149. package/dist/runtime/client-solid.mjs +3 -3
  150. package/dist/runtime/client-svelte.d.mts +2 -2
  151. package/dist/runtime/client-svelte.mjs +3 -3
  152. package/dist/runtime/client-vue.d.mts +2 -2
  153. package/dist/runtime/client-vue.mjs +3 -3
  154. package/dist/runtime/client.d.mts +2 -2
  155. package/dist/runtime/client.mjs +3 -3
  156. package/dist/runtime/email/testing.mjs +4 -4
  157. package/dist/runtime/email.mjs +3 -3
  158. package/dist/runtime/env-public.d.mts +1 -1
  159. package/dist/runtime/fetch-server.d.mts +8 -0
  160. package/dist/runtime/fetch-server.mjs +30 -0
  161. package/dist/runtime/fetch-stream.d.mts +2 -2
  162. package/dist/runtime/fetch-stream.mjs +2 -2
  163. package/dist/runtime/fetch.d.mts +2 -2
  164. package/dist/runtime/fetch.mjs +3 -3
  165. package/dist/runtime/handler.d.mts +1 -1
  166. package/dist/runtime/live-client.d.mts +1 -1
  167. package/dist/runtime/live.d.mts +1 -1
  168. package/dist/runtime/routing.d.mts +17 -76
  169. package/dist/runtime/routing.mjs +277 -216
  170. package/dist/runtime/validator.d.mts +1 -1
  171. package/dist/runtime/ws-server.d.mts +2 -2
  172. package/dist/runtime/ws.d.mts +1 -1
  173. package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
  174. package/dist/{secret-CClHaFxm.mjs → secret-BbXHfLAt.mjs} +6 -6
  175. package/dist/serialize-DtR8Vwa_.d.mts +18 -0
  176. package/dist/serialize-YHvlcG3Q.mjs +31 -0
  177. package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
  178. package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
  179. package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
  180. package/dist/wrangler-BLb3_luP.mjs +1 -0
  181. package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
  182. package/dist/{wrapper-BOigE1xJ.mjs → wrapper-D3sZyh2C.mjs} +5 -3
  183. package/dist/{ws-CsBNxv86.d.mts → ws-BH-im_tX.d.mts} +1 -1
  184. package/docs/guide/ai.md +1 -1
  185. package/docs/guide/database/postgresql.md +1 -1
  186. package/docs/guide/database.md +26 -0
  187. package/docs/guide/deployment.md +2 -0
  188. package/docs/guide/edge/headers.md +1 -1
  189. package/docs/guide/email/domains.md +1 -1
  190. package/docs/guide/email/receiving.md +1 -1
  191. package/docs/guide/email/sending.md +3 -3
  192. package/docs/guide/pages-routing/actions-and-forms.md +1 -1
  193. package/docs/guide/pages-routing/markdown.md +3 -1
  194. package/docs/guide/platform/administration/email.md +7 -1
  195. package/docs/guide/platform/installation/ci.md +2 -0
  196. package/docs/guide/platform/installation/credentials.md +24 -6
  197. package/docs/guide/platform/installation/domains.md +16 -0
  198. package/docs/guide/platform/installation/maintenance.md +32 -2
  199. package/docs/guide/platform/installation/setup.md +1 -1
  200. package/docs/guide/self-hosted-platform.md +1 -1
  201. package/docs/guide/server-routing.md +1 -1
  202. package/docs/guide/typed-fetch.md +1 -1
  203. package/docs/integrations/cloudflare.md +2 -1
  204. package/docs/integrations/frameworks/tanstack-start.md +25 -0
  205. package/docs/reference/api/deploy.md +35 -3
  206. package/docs/reference/api/env.md +1 -1
  207. package/docs/reference/api/rewrites.md +1 -1
  208. package/docs/reference/api/types.md +1 -0
  209. package/docs/reference/cli/database.md +15 -0
  210. package/docs/reference/cli/platform-installation.md +5 -2
  211. package/docs/reference/cli/project.md +4 -2
  212. package/docs/reference/cli/setup.md +17 -0
  213. package/docs/reference/cli.md +1 -0
  214. package/docs/reference/config.md +14 -1
  215. package/docs/reference/resource-inference.md +4 -0
  216. package/package.json +23 -22
  217. package/sandbox.Dockerfile +1 -1
  218. package/schema.json +23 -3
  219. package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
  220. package/dist/client-DrdeJgHR.mjs +0 -1
  221. package/dist/deploy-CxNgEYr4.mjs +0 -2
  222. package/dist/fetch-sAcwjzLO.mjs +0 -18
  223. package/dist/gen-DsCukhuw.mjs +0 -1
  224. package/dist/help-DOFygYi4.mjs +0 -1
  225. package/dist/login-alAlxw4S.mjs +0 -1
  226. package/dist/migrate-D2odrAmh.mjs +0 -1
  227. package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
  228. package/dist/platform-args-B_LrqEZB.mjs +0 -1
  229. package/dist/prepare-EVEbQ9n2.mjs +0 -1
  230. package/dist/resolve-project-PnhzMtY6.mjs +0 -1
  231. package/dist/serialize-BtQyaYoC.mjs +0 -20
  232. package/dist/serialize-CfSwWfF2.d.mts +0 -10
  233. package/dist/wrangler-DAdxHEzh.mjs +0 -1
@@ -1,20 +1,20 @@
1
1
  import { a as join, c as resolve, n as dirname, r as extname, s as relative, t as basename } from "./dist-ipQi0Q8y.mjs";
2
- import { r as detectFramework } from "./plugin-inference-Bekzjuqw.mjs";
2
+ import { r as detectFramework } from "./plugin-inference-DUjCd55H.mjs";
3
3
  import { n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
4
- import { d as readConfig, f as resolveBindingNames, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
4
+ import { c as getDatabaseCasing, l as getDatabaseDialect, m as resolveBindingNames, p as readConfig } from "./config-DHgSEWT7.mjs";
5
5
  import { i as writeJournal, n as readJournal, r as stripSqlExt, t as collectMigrations } from "./collect-Dew86qce.mjs";
6
6
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
7
- import { t as resolveLocalD1Target } from "./local-d1-CpaPbd_L.mjs";
7
+ import { t as resolveLocalD1Target } from "./local-d1-BHBnKWRb.mjs";
8
8
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
9
9
  import { n as ensurePlatformProxyAccess, r as isCloudflareAccessChallenge, t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
10
10
  import { c as getToken, o as getProxyUrl } from "./auth-B6iOCjKI.mjs";
11
- import { A as confirm, H as outro, L as log, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
12
- import { f as import_picocolors, i as dim, l as formatUrl, m as printSuccess, o as formatCount, u as getErrorMessage } from "./output-Ba6ZbrzY.mjs";
13
11
  import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
14
12
  import { i as validateMigrations, t as assertJournalCoherence } from "./validate-CnZPMq4q.mjs";
15
- import { n as PlatformApiError, r as PlatformClient } from "./client-GuSO3v_x.mjs";
13
+ import { A as confirm, H as outro, L as log, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
14
+ import { n as PlatformApiError, r as PlatformClient } from "./client-BEkdj1kx.mjs";
15
+ import { f as import_picocolors, i as dim, l as formatUrl, m as printSuccess, o as formatCount, u as getErrorMessage } from "./output-BpgYODYx.mjs";
16
16
  import { n as drizzleKitBin } from "./yarn-pnp-DLbEFMT0.mjs";
17
- import { n as formatTimestamp } from "./gen-Bj6ZkOcI.mjs";
17
+ import { n as formatTimestamp } from "./gen-BfmcIi2g.mjs";
18
18
  import { createRequire } from "node:module";
19
19
  import { existsSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
20
20
  import { pathToFileURL } from "node:url";
@@ -156,7 +156,7 @@ function runDrizzleKit(root, args) {
156
156
  * already printed its own error.
157
157
  */
158
158
  async function runDrizzleKitWithDatabaseUrl(root, url, dialect, command) {
159
- const { withPrivateDrizzleConfig } = await import("./config-DYJV8aEH.mjs");
159
+ const { withPrivateDrizzleConfig } = await import("./config-BU6hMu1W.mjs");
160
160
  if (!withPrivateDrizzleConfig(root, url, dialect, (configPath) => {
161
161
  try {
162
162
  runDrizzleKit(root, [
@@ -223,6 +223,7 @@ async function runDbCommand(root, args) {
223
223
  else if (args.action === "studio") await runStudio(root, dialect, args.remote);
224
224
  else if (args.action === "set-url") await runSetUrl(root, dialect);
225
225
  else if (args.action === "connect") await runConnect(root, dialect, args);
226
+ else if (args.action === "restore") await runRestore(root, dialect, args);
226
227
  else if (args.action === "rename-migrations") await runRenameMigrations(root, dialect);
227
228
  else await runExport(root, args, dialect);
228
229
  }
@@ -311,7 +312,7 @@ async function runPush(root, dialect) {
311
312
  printSuccess("Database schema pushed.");
312
313
  return;
313
314
  }
314
- const { writeDrizzleConfig } = await import("./config-DYJV8aEH.mjs");
315
+ const { writeDrizzleConfig } = await import("./config-BU6hMu1W.mjs");
315
316
  const { databasePath: dbPath } = getLocalD1Target(root);
316
317
  mkdirSync(dirname(dbPath), { recursive: true });
317
318
  const configPath = writeDrizzleConfig(root, dbPath);
@@ -327,8 +328,8 @@ async function runPush(root, dialect) {
327
328
  printSuccess("Database schema pushed.");
328
329
  }
329
330
  async function runGenerate(root, dialect) {
330
- const { prepareProject } = await import("./prepare-EVEbQ9n2.mjs");
331
- const { PLACEHOLDER_DB_URL, writeDrizzleConfig } = await import("./config-DYJV8aEH.mjs");
331
+ const { prepareProject } = await import("./prepare-C4I0f--h.mjs");
332
+ const { PLACEHOLDER_DB_URL, writeDrizzleConfig } = await import("./config-BU6hMu1W.mjs");
332
333
  await prepareProject(root);
333
334
  const authSchemaPath = join(root, ".void", "better-auth-schema.ts");
334
335
  const additionalSchemas = existsSync(authSchemaPath) ? [authSchemaPath] : void 0;
@@ -398,7 +399,7 @@ async function runStatus(root, dialect) {
398
399
  applied_at: ""
399
400
  }));
400
401
  } else {
401
- const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-Cm8lVx7W.mjs");
402
+ const { readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-DsSaw2BT.mjs");
402
403
  remoteApplied = (await readCloudflareD1Migrations(resolveCloudflareD1Context(root, configuredD1Binding(root)))).map((name) => ({
403
404
  name,
404
405
  applied_at: ""
@@ -710,7 +711,7 @@ async function runExecute(root, command, file, dialect, remote) {
710
711
  process.exit(0);
711
712
  }
712
713
  if (dialect === "sqlite") {
713
- const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-Cm8lVx7W.mjs");
714
+ const { executeCloudflareD1Sql, resolveCloudflareD1Context } = await import("./cloudflare-operations-DsSaw2BT.mjs");
714
715
  const rows = await executeCloudflareD1Sql(resolveCloudflareD1Context(root, configuredD1Binding(root)), sql);
715
716
  if (rows.length > 0) printTable(rows);
716
717
  } else {
@@ -904,7 +905,7 @@ async function runMigrate(root, dialect, remote) {
904
905
  log.info(`No migration files found in ${paths.sourceRelative("db/migrations")}/`);
905
906
  return;
906
907
  }
907
- const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-Cm8lVx7W.mjs");
908
+ const { applyCloudflareD1Migrations, readCloudflareD1Migrations, resolveCloudflareD1Context } = await import("./cloudflare-operations-DsSaw2BT.mjs");
908
909
  const binding = configuredD1Binding(root);
909
910
  const context = resolveCloudflareD1Context(root, binding);
910
911
  const remoteBefore = new Set(await readCloudflareD1Migrations(context));
@@ -924,7 +925,7 @@ async function runMigrate(root, dialect, remote) {
924
925
  log.error(`db: D1 binding ${binding} has no "migrations_dir", so Cloudflare would apply ./migrations instead of ${dir}/. Add "migrations_dir": "./${dir}" to that D1 binding in your Cloudflare config, then run the command again.`);
925
926
  process.exit(1);
926
927
  }
927
- const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-CxNgEYr4.mjs");
928
+ const { checkWranglerMigrationApplySet, parseRootWranglerConfig } = await import("./deploy-CE0Ev0Ob.mjs");
928
929
  const applySet = await checkWranglerMigrationApplySet(context.operation.configPath, parseRootWranglerConfig(context.operation.configPath), binding, context.migrationsDir, rawMigrations, paths.sourceRelative("db/migrations"));
929
930
  if (!applySet.ok) {
930
931
  log.error(applySet.reason);
@@ -1040,6 +1041,55 @@ async function runMigrate(root, dialect, remote) {
1040
1041
  printSuccess(`Applied ${formatCount(applied.length, "migration")}.`);
1041
1042
  }
1042
1043
  }
1044
+ async function runRestore(root, dialect, { target, platform: explicitPlatform, yes }) {
1045
+ const platform = readDeploymentPlatform(root);
1046
+ const directCloudflare = explicitPlatform === "cloudflare" || platform === "cloudflare" || platform === null && !readProjectConfig(root) && await hasDeployedCloudflareDatabase(root);
1047
+ if (dialect !== "sqlite") {
1048
+ log.error("db: `void db restore` restores D1 databases only.");
1049
+ process.exit(1);
1050
+ }
1051
+ if (!directCloudflare) {
1052
+ log.error("db: `void db restore` restores the D1 database of a direct Cloudflare deploy. After a one-off `void deploy --platform cloudflare`, run it with `--platform cloudflare`.");
1053
+ process.exit(1);
1054
+ }
1055
+ const { readCloudflareD1Migrations, resolveCloudflareD1Context, restoreCloudflareD1Database } = await import("./cloudflare-operations-DsSaw2BT.mjs");
1056
+ const binding = configuredD1Binding(root);
1057
+ const context = resolveCloudflareD1Context(root, binding);
1058
+ const database = `D1 database ${context.migrateToken} (${binding})`;
1059
+ const point = "bookmark" in target ? `bookmark ${target.bookmark}` : target.timestamp;
1060
+ if (!yes) {
1061
+ if (!process.stdin.isTTY) {
1062
+ log.error(`db: Refusing to restore ${database} without confirmation. Re-run with --yes.`);
1063
+ process.exit(1);
1064
+ }
1065
+ const ok = await confirm({
1066
+ message: `This restores ${database} to ${point} and discards every write made after it. Continue?`,
1067
+ initialValue: false
1068
+ });
1069
+ if (isCancel(ok) || !ok) {
1070
+ log.info("Cancelled.");
1071
+ process.exit(0);
1072
+ }
1073
+ }
1074
+ let previousBookmark;
1075
+ try {
1076
+ previousBookmark = await restoreCloudflareD1Database(context, target);
1077
+ } catch (error) {
1078
+ log.error(`db: Could not restore ${database} to ${point}: ${getErrorMessage(error)}\nRestore points expire after 7 days on Workers Free and 30 days on Workers Paid. To undo an older migration, write a new migration that reverses it.`);
1079
+ process.exit(1);
1080
+ }
1081
+ const platformFlag = platform === "cloudflare" ? "" : " --platform cloudflare";
1082
+ if (previousBookmark) log.info(`To undo this restore, run \`void db restore${platformFlag} --bookmark=${previousBookmark}\`.`);
1083
+ const paths = readProjectPaths(root);
1084
+ try {
1085
+ const applied = new Set(await readCloudflareD1Migrations(context));
1086
+ const unapplied = collectMigrations(paths.migrationsDir).filter((migration) => !applied.has(migration.name));
1087
+ if (unapplied.length > 0) log.warn(`The remote database does not have these migrations applied: ${unapplied.map((migration) => migration.name).join(", ")}. The next \`void deploy${platformFlag}\` applies them. Fix or remove a migration that caused the problem before you deploy.`);
1088
+ } catch (error) {
1089
+ log.warn(`Could not read the applied migrations after the restore: ${getErrorMessage(error)}. ` + (platformFlag ? `The next \`void deploy${platformFlag}\` applies any migration the restore rewound.` : "Run `void db status` to check them."));
1090
+ }
1091
+ printSuccess(`Restored ${database} to ${point}.`);
1092
+ }
1043
1093
  async function runStudio(root, dialect, remote) {
1044
1094
  if (remote) {
1045
1095
  if (dialect === "sqlite") {
@@ -1076,7 +1126,7 @@ async function runStudio(root, dialect, remote) {
1076
1126
  await runDrizzleKitWithDatabaseUrl(root, url, dialect, "studio");
1077
1127
  return;
1078
1128
  }
1079
- const { writeDrizzleConfig } = await import("./config-DYJV8aEH.mjs");
1129
+ const { writeDrizzleConfig } = await import("./config-BU6hMu1W.mjs");
1080
1130
  const { databasePath: dbPath } = getLocalD1Target(root);
1081
1131
  if (!existsSync(dbPath)) {
1082
1132
  log.error("No local database found. Start the dev server first.");
@@ -1096,8 +1146,8 @@ async function runStudio(root, dialect, remote) {
1096
1146
  }
1097
1147
  /** A direct Cloudflare deploy records its D1 or Hyperdrive id in the checked-in Cloudflare config. */
1098
1148
  async function hasDeployedCloudflareDatabase(root) {
1099
- const { readRootWranglerConfig } = await import("./wrangler-DAdxHEzh.mjs");
1100
- const { isRealD1Id, isRealHyperdriveId } = await import("./provision-UcYjpTRh.mjs");
1149
+ const { readRootWranglerConfig } = await import("./wrangler-BLb3_luP.mjs");
1150
+ const { isRealD1Id, isRealHyperdriveId } = await import("./provision-BFLCrnUp.mjs");
1101
1151
  const config = readRootWranglerConfig(root)?.config;
1102
1152
  const entries = (key) => {
1103
1153
  const value = config?.[key];
@@ -1593,10 +1643,11 @@ function toSeedTarget(root, seedPath, displayPath) {
1593
1643
  }
1594
1644
  async function runSeedModule(root, seed, dialect) {
1595
1645
  const schema = await loadSeedSchema(root);
1646
+ const casing = getDatabaseCasing(readConfig(root));
1596
1647
  if (dialect === "postgresql") {
1597
1648
  const { drizzle } = await import("drizzle-orm/node-postgres");
1598
1649
  await withPgClient(root, async (client) => {
1599
- const options = getDrizzleSchemaOptions(schema);
1650
+ const options = getDrizzleSchemaOptions(schema, casing);
1600
1651
  const drizzleClient = client;
1601
1652
  await seed({
1602
1653
  dialect,
@@ -1611,7 +1662,7 @@ async function runSeedModule(root, seed, dialect) {
1611
1662
  const { createConnection } = await import("mysql2/promise");
1612
1663
  const connection = await createConnection(getLocalDatabaseUrl(root, "mysql"));
1613
1664
  try {
1614
- const options = getDrizzleSchemaOptions(schema);
1665
+ const options = getDrizzleSchemaOptions(schema, casing);
1615
1666
  await seed({
1616
1667
  dialect,
1617
1668
  db: options ? drizzle(connection, {
@@ -1630,7 +1681,7 @@ async function runSeedModule(root, seed, dialect) {
1630
1681
  const { databasePath: dbPath } = getLocalD1Target(root);
1631
1682
  const sqlite = await openSqliteDatabase(dbPath);
1632
1683
  try {
1633
- const options = getDrizzleSchemaOptions(schema);
1684
+ const options = getDrizzleSchemaOptions(schema, casing);
1634
1685
  await seed({
1635
1686
  dialect,
1636
1687
  db: options ? drizzle(sqlite, options) : drizzle(sqlite),
@@ -1677,8 +1728,13 @@ async function importLocalModule(modulePath) {
1677
1728
  interopDefault: false
1678
1729
  }).import(modulePath);
1679
1730
  }
1680
- function getDrizzleSchemaOptions(schema) {
1681
- return Object.keys(schema).length > 0 ? { schema } : void 0;
1731
+ /** The schema and casing that `void/db` gives drizzle, or undefined when neither is set. */
1732
+ function getDrizzleSchemaOptions(schema, casing) {
1733
+ const options = {
1734
+ ...Object.keys(schema).length > 0 ? { schema } : {},
1735
+ ...casing ? { casing } : {}
1736
+ };
1737
+ return Object.keys(options).length > 0 ? options : void 0;
1682
1738
  }
1683
1739
  //#endregion
1684
1740
  export { runDbCommand };
@@ -1,9 +1,9 @@
1
1
  import { o as removeProjectConfig, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
- import { L as log, O as cancel, X as text, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { m as printSuccess, p as note, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-GuSO3v_x.mjs";
6
- import { a as resolveProjectBySlug } from "./resolve-project-WpwkCB_c.mjs";
3
+ import { L as log, O as cancel, X as text, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
+ import { r as PlatformClient } from "./client-BEkdj1kx.mjs";
5
+ import { m as printSuccess, p as note, r as createSpinner } from "./output-BpgYODYx.mjs";
6
+ import { a as resolveProjectBySlug } from "./resolve-project-Xoi6eTWY.mjs";
7
7
  //#region src/cli/delete.ts
8
8
  async function runDeleteCommand(root, slug, options) {
9
9
  console.log();