void 1.1.0 → 1.1.12

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 (246) hide show
  1. package/dist/{account-cmd-BTcUzv9L.mjs → account-cmd-Cj6sCMTk.mjs} +4 -4
  2. package/dist/{application-analysis-AB_YYWgH.mjs → application-analysis-D7nNmNJb.mjs} +6 -6
  3. package/dist/{application-routing-L7V-TFhZ.mjs → application-routing-CZH66gXn.mjs} +1 -1
  4. package/dist/{auth-link-DUJuvRx5.mjs → auth-link-Dj7lAC_K.mjs} +4 -4
  5. package/dist/{auth-migrations-Cgs0k6lS.mjs → auth-migrations-BO27GDNr.mjs} +38 -2
  6. package/dist/{auth-router-CIxiMG7i.mjs → auth-router-CNsMOFCa.mjs} +5 -4
  7. package/dist/{better-auth-shared-B74NJIus.d.mts → better-auth-shared-Bv18bB-l.d.mts} +2 -0
  8. package/dist/{better-auth-shared-CMXlZG7W.mjs → better-auth-shared-D-6z0q0f.mjs} +28 -1
  9. package/dist/{build-cmd-BkIv25PA.mjs → build-cmd-ByhegwRC.mjs} +2 -2
  10. package/dist/{cache-Ctzfig-W.mjs → cache-CEFb5ban.mjs} +2 -2
  11. package/dist/{cancel-deploy-CD9o-SsC.mjs → cancel-deploy-CaARY26n.mjs} +2 -2
  12. package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-ChEKWan2.mjs} +71 -7
  13. package/dist/cf-build-output-Dcmxa-Zm.mjs +1 -0
  14. package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-b8OqDoo9.mjs} +5 -16
  15. package/dist/cf-user-agent-BkEHPDLA.mjs +16 -0
  16. package/dist/cli/cli.mjs +180 -57
  17. package/dist/cli/cloudflare-operation-process.mjs +46 -9
  18. package/dist/cli/env-schema-probe.mjs +3 -3
  19. package/dist/{client-DM9Kcf4e.mjs → client-BdzxubTS.mjs} +58 -13
  20. package/dist/client-DAnfyMe9.mjs +1 -0
  21. package/dist/{cloudflare-auth-CqFBDo52.mjs → cloudflare-auth-DSvBc1Gu.mjs} +1 -1
  22. package/dist/{cloudflare-cmd-BIAF_BIY.mjs → cloudflare-cmd-D_2-Q-_i.mjs} +4 -4
  23. package/dist/{cloudflare-config-DV60XFFK.mjs → cloudflare-config-rdFOys4X.mjs} +2 -2
  24. package/dist/{cloudflare-connect-WjwnVOJA.mjs → cloudflare-connect-BN-k2kD-.mjs} +2 -2
  25. package/dist/{cloudflare-operations-CrSUFRzJ.mjs → cloudflare-operations-BFLCpUCV.mjs} +1 -1
  26. package/dist/{cloudflare-operations-B42EZeJy.mjs → cloudflare-operations-D5PLrOqD.mjs} +18 -8
  27. package/dist/{cloudflare-process-CeDWJRhj.mjs → cloudflare-process-CZJ4viYl.mjs} +2 -2
  28. package/dist/collect-BWhkgtAn.mjs +1 -0
  29. package/dist/{collect-xjffdCdk.mjs → collect-Dew86qce.mjs} +4 -3
  30. package/dist/{config-D0GY5ItR.mjs → config-CyUJzi3q.mjs} +1 -1
  31. package/dist/{config-Bx_1SpnO.mjs → config-D26zcdKy.mjs} +2 -2
  32. package/dist/{config-BEm9vRvS.mjs → config-DC5llZaI.mjs} +2 -2
  33. package/dist/{config-QrJWu0IX.mjs → config-DYJV8aEH.mjs} +1 -1
  34. package/dist/{connect-CKtk-EZe.mjs → connect-C4_m2moF.mjs} +5 -5
  35. package/dist/{create-project-B-ewF_Af.mjs → create-project-CvuYDD-l.mjs} +1 -1
  36. package/dist/{create-project-yInGo72M.mjs → create-project-D8jQTwVQ.mjs} +2 -2
  37. package/dist/database-provider.d.mts +6 -0
  38. package/dist/{db-7I_gfdVq.mjs → db-BsiOAa0A.mjs} +306 -111
  39. package/dist/{db-types-Bb4WBWIs.mjs → db-types-NGxPwnlt.mjs} +1 -1
  40. package/dist/{delete-Cy-M1u-r.mjs → delete-CAma7nFi.mjs} +2 -2
  41. package/dist/{deploy-BYYlnsiy.mjs → deploy-D1gIPiAq.mjs} +148 -64
  42. package/dist/deploy-Dc0XsCQj.mjs +2 -0
  43. package/dist/{deploy-managed-static-Ca4TFdmx.mjs → deploy-managed-static-B9KVxY3X.mjs} +80 -34
  44. package/dist/{deploy-transport-DWlWBe6M.mjs → deploy-transport-B3mtEi_q.mjs} +2 -2
  45. package/dist/deploy.d.mts +22 -1
  46. package/dist/deploy.mjs +49 -8
  47. package/dist/discover-D4TPKo57.mjs +1 -0
  48. package/dist/{discover-D2PGT63u.mjs → discover-LaV0tbIu.mjs} +1 -1
  49. package/dist/{dispatch-DrTTk8Xg.mjs → dispatch-BAbbn3jg.mjs} +6 -6
  50. package/dist/{domain-CZGxPv9u.mjs → domain-BAdwm-QS.mjs} +3 -3
  51. package/dist/{drizzle-CF84FOVM.mjs → drizzle-BQfyvQKX.mjs} +13 -2
  52. package/dist/{email-DzyNVuoU.mjs → email-MwjA7kaL.mjs} +11 -12
  53. package/dist/{email-cloudflare-DfG6UEMm.mjs → email-cloudflare-etpKiITL.mjs} +7 -10
  54. package/dist/{entry-ehmBvs5w.mjs → entry-B_0IhV64.mjs} +1 -1
  55. package/dist/{env-Nx3yf50r.mjs → env-B163-G1s.mjs} +5 -5
  56. package/dist/{env-types-DS2_y4X8.mjs → env-types-GRchm5dw.mjs} +1 -1
  57. package/dist/{env-validation-BT7z-qpQ.mjs → env-validation-CuGfWRJd.mjs} +1 -1
  58. package/dist/{env-validation-DYxjz_Wo.mjs → env-validation-D_KyMdab.mjs} +2 -2
  59. package/dist/{fetch-BPCYVi3H.d.mts → fetch-CUX0tB78.d.mts} +16 -3
  60. package/dist/fetch-CtESUYWd.mjs +26 -0
  61. package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
  62. package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
  63. package/dist/{fetch-stream-obvZ7fvO.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
  64. package/dist/{gen-CufHEf42.mjs → gen-CYN3wiov.mjs} +26 -20
  65. package/dist/gen-Cf-RBVg4.mjs +1 -0
  66. package/dist/{generate-Dat0UTry.mjs → generate-B1m4Cm4n.mjs} +1 -1
  67. package/dist/{generate-ClI89brV.mjs → generate-DkEb9rL-.mjs} +1 -1
  68. package/dist/{github-cmd-FU8EjFyU.mjs → github-cmd-C8QsnJQs.mjs} +2 -2
  69. package/dist/{handler-_PqY82xe.d.mts → handler-D5K_yP6T.d.mts} +1 -1
  70. package/dist/{headers-Di1FsD3e.mjs → headers-Bi4bOAwp.mjs} +1 -1
  71. package/dist/{help-BT2hovNI.mjs → help-B2sFwn9b.mjs} +60 -15
  72. package/dist/help-w-xlx_kq.mjs +1 -0
  73. package/dist/{inbound-brj2-TM5.d.mts → inbound-Da7XsjH3.d.mts} +6 -12
  74. package/dist/index.d.mts +1 -1
  75. package/dist/index.mjs +139 -126
  76. package/dist/{info-l249eUdH.mjs → info-Bxunp14X.mjs} +4 -4
  77. package/dist/{init-D0A6M64Q.mjs → init-DGFQMnbk.mjs} +51 -28
  78. package/dist/{link-WMoJFf4i.mjs → link-CwrfpjIM.mjs} +3 -3
  79. package/dist/{list-CQ2EQEHL.mjs → list-hKoW5z-b.mjs} +3 -3
  80. package/dist/{live-DJONVlQK.d.mts → live-JheIDZKc.d.mts} +1 -1
  81. package/dist/{local-d1-BxvQYEFi.mjs → local-d1-CpaPbd_L.mjs} +5 -5
  82. package/dist/login-08mBwZfI.mjs +1 -0
  83. package/dist/{login-C2T1oVG-.mjs → login-f2eu2TQh.mjs} +3 -3
  84. package/dist/{logs-DnC1d7xB.mjs → logs-CEWqD-_B.mjs} +3 -3
  85. package/dist/{migrate-BDIprOYd.mjs → migrate-DYfdWBXt.mjs} +5 -5
  86. package/dist/migrate-Di-4EuoE.mjs +1 -0
  87. package/dist/{neon-n74ta1Pr.mjs → neon-DTZr7Bu7.mjs} +0 -1
  88. package/dist/nitro.mjs +3 -3
  89. package/dist/{node-cPadMgUO.mjs → node-uN8_zxJr.mjs} +15 -9
  90. package/dist/operator-cmd-Bv20yLu2.mjs +1 -0
  91. package/dist/{operator-cmd-DHieWtFp.mjs → operator-cmd-DCr_QGMH.mjs} +4 -4
  92. package/dist/{output-Ba6ZbrzY.mjs → output-CKguMgr7.mjs} +13 -1
  93. package/dist/pages/client.d.mts +2 -2
  94. package/dist/pages/client.mjs +18 -5
  95. package/dist/pages/index.d.mts +2 -2
  96. package/dist/pages/index.mjs +5 -5
  97. package/dist/pages/islands-plugin.d.mts +44 -6
  98. package/dist/pages/islands-plugin.mjs +99 -28
  99. package/dist/pages/protocol.d.mts +2 -2
  100. package/dist/pages/protocol.mjs +1 -1
  101. package/dist/pages/serialize.d.mts +2 -2
  102. package/dist/pages/serialize.mjs +1 -1
  103. package/dist/{platform-args-CaCL_1Ch.mjs → platform-args-B7ke06up.mjs} +1 -4
  104. package/dist/platform-args-B_LrqEZB.mjs +1 -0
  105. package/dist/{platform-auth-config-Z16-I8nT.mjs → platform-auth-config-qGvEuns3.mjs} +5 -5
  106. package/dist/{platform-auth-protection-BXwZiJSF.mjs → platform-auth-protection-CyLcD6ot.mjs} +3 -3
  107. package/dist/{platform-auth-recovery-CXjfqyOv.mjs → platform-auth-recovery-B2LKI8V2.mjs} +3 -3
  108. package/dist/{platform-cmd-PT4YwMLM.mjs → platform-cmd-B2ec5eFg.mjs} +1 -1
  109. package/dist/{platform-cmd-DaAOiWTl.mjs → platform-cmd-CX7phm7V.mjs} +6 -6
  110. package/dist/{platform-domain-CxpvUeo0.mjs → platform-domain-DDNK2y-4.mjs} +3 -3
  111. package/dist/{platform-lifecycle-DBiS0cJd.mjs → platform-lifecycle-3CR98Tg2.mjs} +399 -40
  112. package/dist/{platform-lifecycle-u9pMOvxC.mjs → platform-lifecycle-CWc5gr6c.mjs} +1 -1
  113. package/dist/{platform-management-DvBS83rC.mjs → platform-management-DAE6g2QU.mjs} +1 -1
  114. package/dist/{platform-management-DhEFdQAf.mjs → platform-management-o3LCCeE4.mjs} +40 -4
  115. package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CBMZxCep.mjs} +1 -1
  116. package/dist/{platform-recovery-BUGOB4RC.mjs → platform-recovery-Dmsg7lWA.mjs} +2 -2
  117. package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-hFbnWAVQ.mjs} +1 -1
  118. package/dist/{plugin-inference-DsARdQKE.mjs → plugin-inference-Bekzjuqw.mjs} +2 -2
  119. package/dist/{prepare-DEB5SeVJ.mjs → prepare-DepAGBcV.mjs} +9 -9
  120. package/dist/prepare-EVEbQ9n2.mjs +1 -0
  121. package/dist/{prepare-PQCgsny0.mjs → prepare-HKo7Rh5V.mjs} +2 -2
  122. package/dist/{project-cmd-DVatD8Ev.mjs → project-cmd-8ylYGx-O.mjs} +18 -18
  123. package/dist/{project-paths-DMvEeSau.mjs → project-paths-DGu_QZ_Q.mjs} +1 -1
  124. package/dist/{project-team-DJrWEAG1.mjs → project-team-Bvpl78we.mjs} +2 -2
  125. package/dist/{project-token-CBgLBuL6.mjs → project-token-QWHoJH2t.mjs} +2 -2
  126. package/dist/{project-tsconfig-bveqhlYA.mjs → project-tsconfig-Itv1f4WC.mjs} +1 -1
  127. package/dist/{project-zero-trust-92gLtZ25.mjs → project-zero-trust-8tJ-RFvu.mjs} +2 -2
  128. package/dist/{protocol-4H7V_3Os.d.mts → protocol-Ssc_LhHj.d.mts} +2 -2
  129. package/dist/{protocol-RNP0u7UY.mjs → protocol-bAUUkx70.mjs} +1 -1
  130. package/dist/{providers-BXuhmuub.mjs → providers-BUHwJlmM.mjs} +10 -1
  131. package/dist/provision-BgXFDv0d.mjs +1 -0
  132. package/dist/{provision-BnSSkiED.mjs → provision-DZKYCEJg.mjs} +66 -66
  133. package/dist/r2-conditions-B8xUgJRc.mjs +61 -0
  134. package/dist/{requests-7W1Pygt2.mjs → requests-Vk5Zyhcy.mjs} +2 -2
  135. package/dist/{rollback-BcASVnwP.mjs → rollback-CH4yMQys.mjs} +9 -8
  136. package/dist/{runner-CabsQ-iM.mjs → runner-3uGC-oLF.mjs} +9 -7
  137. package/dist/{runner-So9mYfcm.mjs → runner-WCdfeI0q.mjs} +1 -1
  138. package/dist/{runner-mysql-BhRaONkO.mjs → runner-mysql-BWmbk5IE.mjs} +1 -1
  139. package/dist/{runner-mysql-DWwE8jKi.mjs → runner-mysql-BcHnLUuM.mjs} +1 -1
  140. package/dist/{runner-pg-_Xncr3H5.mjs → runner-pg-Cgp-cr_p.mjs} +1 -1
  141. package/dist/{runner-pg-BRemq_GX.mjs → runner-pg-Cr3qrqi4.mjs} +1 -1
  142. package/dist/runtime/ai.d.mts +4 -0
  143. package/dist/runtime/ai.mjs +2 -37
  144. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  145. package/dist/runtime/better-auth-mysql.mjs +2 -2
  146. package/dist/runtime/better-auth-pg.d.mts +1 -1
  147. package/dist/runtime/better-auth-pg.mjs +2 -2
  148. package/dist/runtime/better-auth.d.mts +1 -1
  149. package/dist/runtime/better-auth.mjs +2 -2
  150. package/dist/runtime/client-react.d.mts +2 -2
  151. package/dist/runtime/client-react.mjs +3 -3
  152. package/dist/runtime/client-solid.d.mts +2 -2
  153. package/dist/runtime/client-solid.mjs +3 -3
  154. package/dist/runtime/client-svelte.d.mts +2 -2
  155. package/dist/runtime/client-svelte.mjs +3 -3
  156. package/dist/runtime/client-vue.d.mts +2 -2
  157. package/dist/runtime/client-vue.mjs +3 -3
  158. package/dist/runtime/client.d.mts +2 -2
  159. package/dist/runtime/client.mjs +3 -3
  160. package/dist/runtime/email/testing.d.mts +1 -1
  161. package/dist/runtime/email.d.mts +2 -3
  162. package/dist/runtime/email.mjs +2 -3
  163. package/dist/runtime/fetch-server.d.mts +8 -0
  164. package/dist/runtime/fetch-server.mjs +30 -0
  165. package/dist/runtime/fetch-stream.d.mts +2 -2
  166. package/dist/runtime/fetch-stream.mjs +2 -2
  167. package/dist/runtime/fetch.d.mts +2 -2
  168. package/dist/runtime/fetch.mjs +3 -3
  169. package/dist/runtime/handler.d.mts +1 -1
  170. package/dist/runtime/live-client.d.mts +1 -1
  171. package/dist/runtime/live.d.mts +1 -1
  172. package/dist/runtime/migration-handler-mysql.mjs +4 -4
  173. package/dist/runtime/migration-handler-pg.mjs +9 -1
  174. package/dist/runtime/remote/binding-handler.mjs +25 -25
  175. package/dist/runtime/remote/index.d.mts +3 -0
  176. package/dist/runtime/remote/index.mjs +86 -23
  177. package/dist/runtime/routing.d.mts +2 -2
  178. package/dist/runtime/routing.mjs +1 -1
  179. package/dist/runtime/sse-client.d.mts +4 -0
  180. package/dist/runtime/validator.d.mts +1 -1
  181. package/dist/runtime/ws-server.d.mts +2 -2
  182. package/dist/runtime/ws.d.mts +1 -1
  183. package/dist/{scan-C0BMdmEd.mjs → scan-D2-FcLHs.mjs} +13 -5
  184. package/dist/{secret-bg73f1Ge.mjs → secret-wr6Sn4Xa.mjs} +4 -4
  185. package/dist/serialize-DtR8Vwa_.d.mts +18 -0
  186. package/dist/serialize-YHvlcG3Q.mjs +31 -0
  187. package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-CNZc4XUd.mjs} +1 -1
  188. package/dist/{types-BAp5AEBU.d.mts → types-7AIz0OZu.d.mts} +1 -1
  189. package/dist/{validate-CheZGRE7.mjs → validate-CnZPMq4q.mjs} +22 -17
  190. package/dist/validate-D7Wn8PUX.mjs +1 -0
  191. package/dist/{version-metadata-DIrqEHQo.mjs → version-metadata-B1Bm2wSq.mjs} +1 -1
  192. package/dist/{wrangler-BYs07Rxy.mjs → wrangler-C9XSzrju.mjs} +3 -3
  193. package/dist/wrangler-DAdxHEzh.mjs +1 -0
  194. package/dist/{wrapper-CwhpNWtH.mjs → wrapper-DGsYwNi6.mjs} +6 -4
  195. package/dist/{ws-aKVYB-fA.d.mts → ws-nnFnAyQb.d.mts} +6 -1
  196. package/docs/guide/auth.md +1 -1
  197. package/docs/guide/database/d1.md +2 -2
  198. package/docs/guide/database/mysql.md +1 -1
  199. package/docs/guide/deployment.md +2 -0
  200. package/docs/guide/edge/headers.md +10 -2
  201. package/docs/guide/edge/revalidation.md +2 -0
  202. package/docs/guide/email/receiving.md +1 -1
  203. package/docs/guide/email/sending.md +3 -3
  204. package/docs/guide/pages-routing/islands.md +2 -2
  205. package/docs/guide/pages-routing/markdown.md +3 -1
  206. package/docs/guide/platform/administration/connected-apps.md +18 -2
  207. package/docs/guide/platform/administration/email.md +7 -1
  208. package/docs/guide/platform/installation/ci.md +2 -0
  209. package/docs/guide/platform/installation/credentials.md +23 -5
  210. package/docs/guide/platform/installation/maintenance.md +32 -2
  211. package/docs/guide/platform/installation/setup.md +1 -1
  212. package/docs/guide/remote-dev.md +2 -0
  213. package/docs/guide/typed-fetch.md +1 -1
  214. package/docs/guide/websockets.md +2 -2
  215. package/docs/index.md +78 -22
  216. package/docs/integrations/cloudflare.md +1 -1
  217. package/docs/integrations/frameworks/tanstack-start.md +25 -0
  218. package/docs/reference/api/deploy.md +35 -3
  219. package/docs/reference/api/pages.md +7 -5
  220. package/docs/reference/api.md +2 -0
  221. package/docs/reference/cli/database.md +22 -5
  222. package/docs/reference/cli/deploy.md +12 -10
  223. package/docs/reference/cli/email.md +1 -1
  224. package/docs/reference/cli/generate.md +1 -1
  225. package/docs/reference/cli/platform-installation.md +4 -2
  226. package/docs/reference/cli/project.md +8 -4
  227. package/docs/reference/cli.md +2 -1
  228. package/docs/reference/config.md +12 -2
  229. package/package.json +8 -7
  230. package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
  231. package/dist/client-B60PwCC4.mjs +0 -1
  232. package/dist/collect-Cae8A7Zr.mjs +0 -1
  233. package/dist/deploy-9lgfhrXS.mjs +0 -2
  234. package/dist/discover-ClzFSwns.mjs +0 -1
  235. package/dist/fetch-sAcwjzLO.mjs +0 -18
  236. package/dist/gen-sXyp5DFO.mjs +0 -1
  237. package/dist/help-i2YGGnTH.mjs +0 -1
  238. package/dist/login-XD844Xs-.mjs +0 -1
  239. package/dist/migrate-BRwU-blY.mjs +0 -1
  240. package/dist/operator-cmd-D6gnZsnK.mjs +0 -1
  241. package/dist/platform-args-B0HeTh0C.mjs +0 -1
  242. package/dist/prepare-CYT6tAzD.mjs +0 -1
  243. package/dist/r2-conditions-D1Wk8i7b.mjs +0 -30
  244. package/dist/serialize-BtQyaYoC.mjs +0 -20
  245. package/dist/serialize-CfSwWfF2.d.mts +0 -10
  246. package/dist/validate-BQFdf0Pi.mjs +0 -1
@@ -1,14 +1,14 @@
1
1
  import { c as getToken, f as removeToken } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-BVdsO7Py.mjs";
3
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
4
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
5
- import { n as runLoginCommand } from "./login-C2T1oVG-.mjs";
3
+ import { m as printSuccess } from "./output-CKguMgr7.mjs";
4
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
5
+ import { n as runLoginCommand } from "./login-f2eu2TQh.mjs";
6
6
  import { execSync } from "node:child_process";
7
7
  //#region src/cli/account-cmd.ts
8
8
  async function runAccountCommand(root, args) {
9
9
  switch (args.subcommand) {
10
10
  case "login": return runLoginCommand(root);
11
- case "link": return import("./auth-link-DUJuvRx5.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
11
+ case "link": return import("./auth-link-Dj7lAC_K.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
12
12
  case "logout":
13
13
  if (removeToken(root)) printSuccess("Logged out.");
14
14
  else log.info("Not logged in.");
@@ -1,15 +1,15 @@
1
1
  import { a as join, i as isAbsolute, t as basename } from "./dist-ipQi0Q8y.mjs";
2
- import { c as scanWebSocketRoutesSync, f as readResourceDefinition, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listConventionFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-DsARdQKE.mjs";
3
- import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
4
- import { t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
5
- import { f as resolveBindingNames, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
2
+ import { c as scanWebSocketRoutesSync, f as readResourceDefinition, h as needsApplicationDatabase, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as listConventionFiles, r as detectFramework, s as isWebSocketPatternFile } from "./plugin-inference-Bekzjuqw.mjs";
3
+ import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-DGu_QZ_Q.mjs";
4
+ import { t as findVoidAuthConfig } from "./config-CyUJzi3q.mjs";
5
+ import { f as resolveBindingNames, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
6
6
  import { n as globSync } from "./dist-Bn8Kodjp.mjs";
7
7
  import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
8
8
  import { a as staticLiteral, i as staticExportInitializers, n as parseRouteFilename, o as unwrapStaticExpression, t as isRouteEnabledForEnvironment } from "./parse-filename-CUbj-1MP.mjs";
9
9
  import { n as resourceNameWords } from "./resource-name-C7LVpcRm.mjs";
10
- import { t as collectMigrations } from "./collect-xjffdCdk.mjs";
10
+ import { t as collectMigrations } from "./collect-Dew86qce.mjs";
11
11
  import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
12
- import { t as scanPages } from "./scan-C0BMdmEd.mjs";
12
+ import { t as scanPages } from "./scan-D2-FcLHs.mjs";
13
13
  import { existsSync, readFileSync, readdirSync } from "node:fs";
14
14
  import { fileURLToPath } from "node:url";
15
15
  import { parseSync } from "vite";
@@ -1,4 +1,4 @@
1
- import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-AB_YYWgH.mjs";
1
+ import { l as scanRoutes, t as analyzeApplicationSync } from "./application-analysis-D7nNmNJb.mjs";
2
2
  //#region src/application-routing.ts
3
3
  /** Complete route/page analysis using the same resource and handler inventories. */
4
4
  async function completeApplicationAnalysis(analysis) {
@@ -1,9 +1,9 @@
1
1
  import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
2
  import { L as log } from "./dist-BVdsO7Py.mjs";
3
- import { l as formatUrl } from "./output-Ba6ZbrzY.mjs";
4
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
5
- import { r as selectPlatformLoginMethod } from "./login-C2T1oVG-.mjs";
6
- import { t as discoverPlatform } from "./platform-cmd-DaAOiWTl.mjs";
3
+ import { l as formatUrl } from "./output-CKguMgr7.mjs";
4
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
5
+ import { r as selectPlatformLoginMethod } from "./login-f2eu2TQh.mjs";
6
+ import { t as discoverPlatform } from "./platform-cmd-CX7phm7V.mjs";
7
7
  //#region src/cli/auth-link.ts
8
8
  async function runAuthLink(root, connectionId) {
9
9
  const token = getToken(root);
@@ -48,7 +48,7 @@ function resolveColumnType(dialect, idStrategy, fieldName, field) {
48
48
  if (useIdType) {
49
49
  if (fieldName === "id" && idStrategy === "serial") return "integer GENERATED BY DEFAULT AS IDENTITY";
50
50
  if (idStrategy === "serial") return "integer";
51
- if (idStrategy === "uuid") return "uuid";
51
+ if (idStrategy === "uuid") return fieldName === "id" ? "uuid DEFAULT gen_random_uuid()" : "uuid";
52
52
  return "text";
53
53
  }
54
54
  if (field.type === "boolean") return "boolean";
@@ -61,10 +61,18 @@ function resolveColumnType(dialect, idStrategy, fieldName, field) {
61
61
  if (field.type === "boolean" || field.type === "date" || field.type === "number") return "INTEGER";
62
62
  return "TEXT";
63
63
  }
64
+ function renderDefaultLiteral(dialect, value) {
65
+ if (typeof value === "boolean") return dialect === "sqlite" ? value ? "1" : "0" : value ? "TRUE" : "FALSE";
66
+ if (typeof value === "number") return String(value);
67
+ if (dialect === "mysql" && value.includes("\\")) return `_utf8mb4 X'${Array.from(new TextEncoder().encode(value), (byte) => byte.toString(16).padStart(2, "0")).join("")}'`;
68
+ if (dialect === "postgresql" && value.includes("\\")) return `E'${value.replaceAll("\\", "\\\\").replaceAll("'", "''")}'`;
69
+ return `'${value.replaceAll("'", "''")}'`;
70
+ }
64
71
  function buildColumnDefinition(dialect, schema, fieldName, field, options = {}) {
65
72
  const parts = [`${quoteIdentifier(fieldName, dialect)} ${resolveColumnType(dialect, schema.idStrategy, fieldName, field)}`];
66
73
  if (options.primaryKey) parts.push("PRIMARY KEY");
67
74
  if (field.required || options.primaryKey) parts.push("NOT NULL");
75
+ if (options.withDefault && field.defaultValue !== void 0) parts.push(`DEFAULT ${renderDefaultLiteral(dialect, field.defaultValue)}`);
68
76
  if (field.references) parts.push(`REFERENCES ${quoteIdentifier(field.references.table, dialect)}(${quoteIdentifier(field.references.field, dialect)}) ON DELETE ${String(field.references.onDelete ?? "cascade").toUpperCase()}`);
69
77
  return parts.join(" ");
70
78
  }
@@ -81,7 +89,7 @@ function buildCreateTableSql(schema, table) {
81
89
  }
82
90
  function buildAddColumnSql(schema, tableName, fieldName, field) {
83
91
  const ifNotExists = schema.dialect === "postgresql" ? " IF NOT EXISTS" : "";
84
- return `ALTER TABLE ${quoteIdentifier(tableName, schema.dialect)} ADD COLUMN${ifNotExists} ${buildColumnDefinition(schema.dialect, schema, fieldName, field)}`;
92
+ return `ALTER TABLE ${quoteIdentifier(tableName, schema.dialect)} ADD COLUMN${ifNotExists} ${buildColumnDefinition(schema.dialect, schema, fieldName, field, { withDefault: true })}`;
85
93
  }
86
94
  function buildModifyMySqlColumnSql(schema, tableName, fieldName, field) {
87
95
  return `ALTER TABLE ${quoteIdentifier(tableName, "mysql")} MODIFY COLUMN ${buildColumnDefinition("mysql", schema, fieldName, field)}`;
@@ -105,6 +113,31 @@ async function ensurePgIndexes(runner, schemaName, table) {
105
113
  const indexRows = await runner.all("SELECT indexname FROM pg_indexes WHERE schemaname = $1 AND tablename = $2", [schemaName, table.name]);
106
114
  await createMissingIndexes(runner, "postgresql", table, new Set(indexRows.map((row) => String(row.indexname))));
107
115
  }
116
+ /**
117
+ * Name the fields that a table with rows cannot take, and the fix, before the table changes.
118
+ * SQLite and PostgreSQL cannot add a NOT NULL column with no default to a table that has rows;
119
+ * MySQL fills those rows itself. On each dialect, a new required column gives every row the same
120
+ * value, so its unique index fails when the table has two or more rows.
121
+ */
122
+ async function assertRequiredColumnsCanBeAdded(runner, dialect, table, missing) {
123
+ const required = missing.filter((fieldName) => table.fields[fieldName].required);
124
+ const unique = required.filter((fieldName) => table.fields[fieldName].unique);
125
+ const noDefault = dialect === "mysql" ? [] : required.filter((fieldName) => table.fields[fieldName].defaultValue === void 0);
126
+ if (unique.length === 0 && noDefault.length === 0) return;
127
+ const rows = await runner.all(`SELECT 1 AS present FROM ${quoteIdentifier(table.name, dialect)} LIMIT 2`);
128
+ const describe = (fieldNames) => ({
129
+ names: fieldNames.map((fieldName) => JSON.stringify(fieldName)).join(", "),
130
+ noun: fieldNames.length === 1 ? "field" : "fields"
131
+ });
132
+ if (rows.length >= 2 && unique.length > 0) {
133
+ const { names, noun } = describe(unique);
134
+ throw new Error(`Cannot add required unique auth ${noun} ${names} to table ${JSON.stringify(table.name)}: the table has more than one row, and a new column gives every row the same value. Set \`required: false\` on the ${noun}, or add the ${unique.length === 1 ? "column" : "columns"} in a migration that gives each row its own value.`);
135
+ }
136
+ if (rows.length >= 1 && noDefault.length > 0) {
137
+ const { names, noun } = describe(noDefault);
138
+ throw new Error(`Cannot add required auth ${noun} ${names} to table ${JSON.stringify(table.name)}: the table has rows, and there is no fixed default value to fill them. Set \`required: false\` on the ${noun}. A string, number or boolean field can use a fixed \`defaultValue\` instead.`);
139
+ }
140
+ }
108
141
  async function applySqliteAuthMigrations(runner, schema) {
109
142
  const tableRows = await runner.all("SELECT name FROM sqlite_master WHERE type = 'table'");
110
143
  const existingTables = new Set(tableRows.map((row) => String(row.name)));
@@ -117,6 +150,7 @@ async function applySqliteAuthMigrations(runner, schema) {
117
150
  }
118
151
  const columnRows = await runner.all(`PRAGMA table_info(${quotePragmaArg(table.name)})`);
119
152
  const existingColumns = new Set(columnRows.map((row) => String(row.name)));
153
+ await assertRequiredColumnsCanBeAdded(runner, "sqlite", table, Object.keys(table.fields).filter((fieldName) => !existingColumns.has(fieldName)));
120
154
  for (const [fieldName, field] of Object.entries(table.fields)) {
121
155
  if (existingColumns.has(fieldName)) continue;
122
156
  await runner.run(buildAddColumnSql(schema, table.name, fieldName, field));
@@ -138,6 +172,7 @@ async function applyPgAuthMigrations(runner, schema) {
138
172
  }
139
173
  const columnRows = await runner.all("SELECT column_name FROM information_schema.columns WHERE table_schema = $1 AND table_name = $2", [schemaName, table.name]);
140
174
  const existingColumns = new Set(columnRows.map((row) => String(row.column_name)));
175
+ await assertRequiredColumnsCanBeAdded(runner, "postgresql", table, Object.keys(table.fields).filter((fieldName) => !existingColumns.has(fieldName)));
141
176
  for (const [fieldName, field] of Object.entries(table.fields)) {
142
177
  if (existingColumns.has(fieldName)) continue;
143
178
  await runner.run(buildAddColumnSql(schema, table.name, fieldName, field));
@@ -157,6 +192,7 @@ async function applyMySqlAuthMigrations(runner, schema) {
157
192
  } else {
158
193
  const columnRows = await runner.all("SELECT COLUMN_NAME AS column_name, DATA_TYPE AS data_type FROM information_schema.columns WHERE table_schema = ? AND table_name = ?", [databaseName, table.name]);
159
194
  const existingColumns = new Map(columnRows.map((row) => [String(row.column_name), row]));
195
+ await assertRequiredColumnsCanBeAdded(runner, "mysql", table, Object.keys(table.fields).filter((fieldName) => !existingColumns.has(fieldName)));
160
196
  for (const [fieldName, field] of Object.entries(table.fields)) {
161
197
  const existingColumn = existingColumns.get(fieldName);
162
198
  if (!existingColumn) await runner.run(buildAddColumnSql(schema, table.name, fieldName, field));
@@ -22,7 +22,8 @@ async function chooseDestination(root, args, interactive) {
22
22
  ...connections.length === 0 ? [{
23
23
  value: "void",
24
24
  label: "Void platform",
25
- hint: "Use the current Void account origin"
25
+ hint: "Run `void connect <url>` first",
26
+ disabled: true
26
27
  }] : []
27
28
  ];
28
29
  const selected = await select({
@@ -32,17 +33,17 @@ async function chooseDestination(root, args, interactive) {
32
33
  if (isCancel(selected) || typeof selected !== "string") throw new Error("auth: Cancelled.");
33
34
  return selected === "cloudflare" ? { platform: "cloudflare" } : {
34
35
  platform: "void",
35
- ...selected === "void" ? {} : { apiUrl: selected }
36
+ apiUrl: selected
36
37
  };
37
38
  }
38
39
  async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
39
40
  const destination = await chooseDestination(root, args, interactive);
40
41
  if (destination.platform === "cloudflare") {
41
- const { runCloudflareCommand } = await import("./cloudflare-cmd-BIAF_BIY.mjs");
42
+ const { runCloudflareCommand } = await import("./cloudflare-cmd-D_2-Q-_i.mjs");
42
43
  await runCloudflareCommand(root, { subcommand: args.subcommand });
43
44
  return;
44
45
  }
45
- const { runAccountCommand } = await import("./account-cmd-BTcUzv9L.mjs");
46
+ const { runAccountCommand } = await import("./account-cmd-Cj6sCMTk.mjs");
46
47
  const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
47
48
  if (!destination.apiUrl) {
48
49
  await runAccountCommand(root, { subcommand });
@@ -12,6 +12,8 @@ type VoidAuthMigrationField = {
12
12
  index: boolean;
13
13
  bigint: boolean;
14
14
  unbounded?: boolean;
15
+ /** A fixed default of a required field. Adding the column fills rows that exist with it. */
16
+ defaultValue?: string | number | boolean;
15
17
  references?: {
16
18
  table: string;
17
19
  field: string;
@@ -1,4 +1,4 @@
1
- import { a as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-BXuhmuub.mjs";
1
+ import { i as getVoidAuthProviderSettingEnvNames, o as isVoidSocialAuthProvider, r as getVoidAuthProviderEnvNames } from "./providers-BUHwJlmM.mjs";
2
2
  import { t as authContext } from "./auth-3sGB0zJ1.mjs";
3
3
  import { randomBytes, scrypt, timingSafeEqual } from "node:crypto";
4
4
  import { betterAuth } from "better-auth";
@@ -64,11 +64,37 @@ function resolveSocialProviderCredentials(env, provider) {
64
64
  const clientId = readEnvString(env, envNames.clientId);
65
65
  const clientSecret = readEnvString(env, envNames.clientSecret);
66
66
  if (!clientId || !clientSecret) throw new Error(`auth: Missing credentials for provider '${provider}'. Set ${envNames.clientId} and ${envNames.clientSecret}, or remove '${provider}' from auth.providers.`);
67
+ const settings = {};
68
+ for (const [option, envName] of Object.entries(getVoidAuthProviderSettingEnvNames(provider))) {
69
+ const value = readEnvString(env, envName);
70
+ if (value) settings[option] = value;
71
+ }
67
72
  return {
73
+ ...settings,
68
74
  clientId,
69
75
  clientSecret
70
76
  };
71
77
  }
78
+ /** Fail early when a configured provider still lacks a required setting after auth.ts runs. */
79
+ function assertSocialProviderSettings(options, configuredProviders) {
80
+ const socialProviders = options.socialProviders;
81
+ for (const provider of configuredProviders ?? []) {
82
+ if (!isVoidSocialAuthProvider(provider)) continue;
83
+ const config = socialProviders?.[provider];
84
+ if (typeof config !== "object" || config === null) continue;
85
+ const values = config;
86
+ if (values.enabled === false) continue;
87
+ const missing = Object.entries(getVoidAuthProviderSettingEnvNames(provider)).filter(([option]) => !values[option]);
88
+ if (missing.length > 0) {
89
+ const options = joinNames(missing.map(([option]) => option));
90
+ throw new Error(`auth: Missing ${options} for the ${provider} provider. Set ${joinNames(missing.map(([, envName]) => envName))}, or set ${options} in auth.ts.`);
91
+ }
92
+ }
93
+ }
94
+ /** `a`, `a and b`, `a, b and c`. */
95
+ function joinNames(names) {
96
+ return names.length > 1 ? `${names.slice(0, -1).join(", ")} and ${names.at(-1)}` : names[0];
97
+ }
72
98
  function resolveSocialProviders(env, configuredProviders) {
73
99
  if (!configuredProviders) return;
74
100
  const providers = {};
@@ -215,6 +241,7 @@ function createVoidAuthRuntime(dialect, applyMigrations) {
215
241
  trustedOrigins: [origin]
216
242
  };
217
243
  const resolved = resolveUserConfig(runtime.userConfig, defaults, request, env, dialect);
244
+ assertSocialProviderSettings(resolved, runtime.providers);
218
245
  return runtime.dev !== true && cloudflareClientIp(request) ? applyCloudflareRateLimitDefaults(resolved) : resolved;
219
246
  }
220
247
  async function createVoidAuth(request, env, runtime, database) {
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { f as import_picocolors, i as dim, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
5
- import { n as PlatformApiError, r as PlatformClient } from "./client-DM9Kcf4e.mjs";
4
+ import { f as import_picocolors, i as dim, m as printSuccess } from "./output-CKguMgr7.mjs";
5
+ import { n as PlatformApiError, r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  import { appendFileSync, writeFileSync } from "node:fs";
8
8
  //#region src/cli/build-cmd.ts
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { L as log } from "./dist-BVdsO7Py.mjs";
4
- import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
4
+ import { m as printSuccess, o as formatCount, r as createSpinner } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/cache.ts
8
8
  async function runPurgeCacheCommand(root, projectSlug) {
@@ -1,8 +1,8 @@
1
1
  import { r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { A as confirm, H as outro, L as log, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
4
+ import { m as printSuccess } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  //#region src/cli/cancel-deploy.ts
7
7
  const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
8
8
  "pending",
@@ -6,9 +6,9 @@ import { randomUUID } from "node:crypto";
6
6
  import { tmpdir } from "node:os";
7
7
  import { isDeepStrictEqual } from "node:util";
8
8
  import { spawn, spawnSync } from "node:child_process";
9
- import ignore from "ignore";
10
- import { getWorkerBundleDir, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
9
+ import { getRootConfigPath, getWorkerAssetsDir, getWorkerBundleDir, getWorkerConfigPath, normalizeDirectoryName, readBuildOutput, writeAssets, writeContainerConfig, writeRootConfig, writeWorkerConfig } from "@cloudflare/build-output-utils";
11
10
  import { InputConfigSchema, OutputContainerSchema } from "@cloudflare/config";
11
+ import ignore from "ignore";
12
12
  //#region src/cli/cf-config-migrate.ts
13
13
  function record(value) {
14
14
  return isRecord(value) ? value : null;
@@ -363,6 +363,14 @@ function isInside(directory, path) {
363
363
  const child = relative(directory, path);
364
364
  return child !== "" && child !== ".." && !child.startsWith("../") && !isAbsolute(child);
365
365
  }
366
+ /** Asset copies follow symlinks, so a link may not reach outside the asset directory. */
367
+ function assertAssetSymlinksInside(directory) {
368
+ const realDirectory = realpathSync(directory);
369
+ for (const entry of readdirSync(directory, {
370
+ recursive: true,
371
+ withFileTypes: true
372
+ })) if (entry.isSymbolicLink() && !isInside(realDirectory, realpathSync(join(entry.parentPath, entry.name)))) throw new Error("The Worker assets contain a symlink outside the asset directory.");
373
+ }
366
374
  function copyBundle(source, destination) {
367
375
  const modules = {};
368
376
  for (const entry of readdirSync(source, {
@@ -384,12 +392,14 @@ function copyBundle(source, destination) {
384
392
  }
385
393
  return modules;
386
394
  }
387
- /** Create a private cf Build Output tree from Void's verified Vite artifact. */
388
- async function prepareCfBuildOutput(workerDirectory, accountId) {
395
+ /** Create a disposable cf Build Output tree from an existing Cloudflare Worker build. */
396
+ async function prepareCfBuildOutput(workerDirectory, accountId, mode) {
389
397
  const source = resolve(workerDirectory);
398
+ if (existsSync(getRootConfigPath(source))) return prepareNativeBuildOutput(source, accountId, mode);
399
+ if (!existsSync(join(source, "wrangler.json"))) throw new Error(`No Cloudflare Worker build found in ${source}. Pass the project root that contains .cloudflare/output/v0, or the Worker output directory that contains wrangler.json.`);
390
400
  const raw = record(JSON.parse(readFileSync(join(source, "wrangler.json"), "utf8")));
391
401
  if (!raw) return null;
392
- if (typeof raw.account_id === "string" && raw.account_id !== accountId) return null;
402
+ if (typeof raw.account_id === "string" && accountId !== void 0 && raw.account_id !== accountId) return null;
393
403
  const config = migrateBuiltWranglerConfig(raw);
394
404
  if (!config.worker) throw new Error("cf did not produce a Worker configuration.");
395
405
  if (typeof raw.main !== "string" || !raw.main) throw new Error("The built Worker configuration is missing its main entry. Rebuild the app.");
@@ -412,9 +422,10 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
412
422
  const bundle = getWorkerBundleDir(directory);
413
423
  mkdirSync(bundle, { recursive: true });
414
424
  const modules = copyBundle(source, bundle);
415
- await writeRootConfig(directory, { accountId }, {
425
+ const configuredAccountId = accountId ?? raw.account_id;
426
+ await writeRootConfig(directory, typeof configuredAccountId === "string" ? { accountId: configuredAccountId } : {}, {
416
427
  isPreview: false,
417
- mode: "production"
428
+ mode: mode ?? "production"
418
429
  });
419
430
  await writeWorkerConfig({
420
431
  root: directory,
@@ -448,6 +459,7 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
448
459
  await dispose();
449
460
  return null;
450
461
  }
462
+ assertAssetSymlinksInside(assetPath);
451
463
  await writeAssets({
452
464
  root: directory,
453
465
  sourceDirectory: assetPath
@@ -464,6 +476,58 @@ async function prepareCfBuildOutput(workerDirectory, accountId) {
464
476
  throw error;
465
477
  }
466
478
  }
479
+ /** Copy and complete the native artifact without changing the Vite build's inputs or metadata. */
480
+ async function prepareNativeBuildOutput(source, accountId, mode) {
481
+ const built = await readBuildOutput(source);
482
+ if (accountId !== void 0 && built.rootConfig.accountId !== void 0 && accountId !== built.rootConfig.accountId || mode !== void 0 && mode !== built.rootConfig.buildContext.mode) return null;
483
+ const directory = mkdtempSync(join(tmpdir(), "void-cf-native-"));
484
+ const dispose = async () => {
485
+ rmSync(directory, {
486
+ recursive: true,
487
+ force: true
488
+ });
489
+ };
490
+ try {
491
+ await writeRootConfig(directory, {
492
+ accountId: accountId ?? built.rootConfig.accountId,
493
+ complianceRegion: built.rootConfig.complianceRegion
494
+ }, {
495
+ ...built.rootConfig.buildContext,
496
+ mode: built.rootConfig.buildContext.mode
497
+ });
498
+ for (const [name, worker] of Object.entries(built.workers)) {
499
+ if (worker.bundleDir && (!worker.config.manifest || worker.config.manifest.modules[worker.config.manifest.mainModule]?.type !== "esm")) throw new Error("The native Worker build must declare its main ES module.");
500
+ const configPath = getWorkerConfigPath(directory, name);
501
+ mkdirSync(dirname(configPath), { recursive: true });
502
+ writeFileSync(configPath, JSON.stringify(worker.config));
503
+ if (worker.bundleDir && worker.config.manifest) {
504
+ const bundle = getWorkerBundleDir(directory, name);
505
+ for (const module of Object.keys(worker.config.manifest.modules)) {
506
+ const destination = join(bundle, module);
507
+ if (module.includes("\\") || module.includes(":") || !isInside(bundle, resolve(bundle, module)) || !isInside(worker.bundleDir, resolve(worker.bundleDir, module))) throw new Error("Native Worker modules must stay inside the build bundle.");
508
+ if (!existsSync(join(worker.bundleDir, module))) throw new Error(`Native Worker module ${module} is missing from the build bundle.`);
509
+ mkdirSync(dirname(destination), { recursive: true });
510
+ copyFileSync(join(worker.bundleDir, module), destination);
511
+ }
512
+ }
513
+ if (worker.assetsDir) cpSync(worker.assetsDir, getWorkerAssetsDir(directory, name), { recursive: true });
514
+ }
515
+ for (const container of built.containers) await writeContainerConfig({
516
+ root: directory,
517
+ config: container.config,
518
+ directoryName: basename(dirname(container.configPath))
519
+ });
520
+ await readBuildOutput(directory);
521
+ return {
522
+ directory,
523
+ ...built.workers.default.assetsDir ? { assetsDirectory: built.workers.default.assetsDir } : {},
524
+ dispose
525
+ };
526
+ } catch (error) {
527
+ await dispose();
528
+ throw error;
529
+ }
530
+ }
467
531
  /** Bundle a generated Worker entry with Vite, then hand the result to `prepareCfBuildOutput`. */
468
532
  async function prepareBundledBuildOutput(options) {
469
533
  const scratch = mkdtempSync(join(tmpdir(), options.scratchPrefix));
@@ -0,0 +1 @@
1
+ export { t as prepareCfBuildOutput } from "./cf-build-output-ChEKWan2.mjs";
@@ -1,5 +1,3 @@
1
- import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
2
- import { readFileSync } from "node:fs";
3
1
  //#region src/cli/cf-command-values.ts
4
2
  /** Accept a cf positional only when it cannot be read as a flag or carry control characters. */
5
3
  function safePositional(value) {
@@ -8,6 +6,10 @@ function safePositional(value) {
8
6
  return code < 32 || code === 127;
9
7
  });
10
8
  }
9
+ /** Accept only Cloudflare's hex-segment D1 Time Travel bookmarks; Void prints them as commands to copy. */
10
+ function isD1Bookmark(value) {
11
+ return typeof value === "string" && /^[0-9a-f]+(?:-[0-9a-f]+)+$/i.test(value);
12
+ }
11
13
  /** Read the version ID and URLs that cf prints after a prebuilt upload. */
12
14
  function readCfUploadOutput(stdout) {
13
15
  return {
@@ -17,17 +19,4 @@ function readCfUploadOutput(stdout) {
17
19
  };
18
20
  }
19
21
  //#endregion
20
- //#region src/cli/cf-user-agent.ts
21
- let voidUserAgent;
22
- let cfCliVersion;
23
- function getVoidUserAgent() {
24
- if (voidUserAgent === void 0) voidUserAgent = `void/${getOwnVersion()}`;
25
- return voidUserAgent;
26
- }
27
- /** cf prepends `cf-cli/` to CLI_VERSION for both API requests and uploads. */
28
- function getCfCliVersion(attribution) {
29
- if (cfCliVersion === void 0) cfCliVersion = `${JSON.parse(readFileSync(new URL(import.meta.resolve("cf/package.json")), "utf8")).version} ${getVoidUserAgent()}`;
30
- return attribution ? `${cfCliVersion} ${attribution}` : cfCliVersion;
31
- }
32
- //#endregion
33
- export { safePositional as i, getVoidUserAgent as n, readCfUploadOutput as r, getCfCliVersion as t };
22
+ export { readCfUploadOutput as n, safePositional as r, isD1Bookmark as t };
@@ -0,0 +1,16 @@
1
+ import { n as getOwnVersion } from "./agents-CuNtT0D_.mjs";
2
+ import { readFileSync } from "node:fs";
3
+ //#region src/cli/cf-user-agent.ts
4
+ let voidUserAgent;
5
+ let cfCliVersion;
6
+ function getVoidUserAgent() {
7
+ if (voidUserAgent === void 0) voidUserAgent = `void/${getOwnVersion()}`;
8
+ return voidUserAgent;
9
+ }
10
+ /** cf prepends `cf-cli/` to CLI_VERSION for both API requests and uploads. */
11
+ function getCfCliVersion(attribution) {
12
+ if (cfCliVersion === void 0) cfCliVersion = `${JSON.parse(readFileSync(new URL(import.meta.resolve("cf/package.json")), "utf8")).version} ${getVoidUserAgent()}`;
13
+ return attribution ? `${cfCliVersion} ${attribution}` : cfCliVersion;
14
+ }
15
+ //#endregion
16
+ export { getVoidUserAgent as n, getCfCliVersion as t };