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,8 +1,8 @@
1
1
  import { n as readDeploymentPlatform, 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 { _ as tablePrefix, c as formatRelativeTime, f as import_picocolors, h as sanitizeTerminalText, i as dim, o as formatCount } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
4
+ import { _ as tablePrefix, c as formatRelativeTime, f as import_picocolors, h as sanitizeTerminalText, i as dim, o as formatCount } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { a as resolveProjectBySlug } from "./resolve-project-WpwkCB_c.mjs";
7
7
  //#region src/cli/list.ts
8
8
  async function runListCommand(root, slug) {
@@ -42,7 +42,7 @@ async function runListCommand(root, slug) {
42
42
  }
43
43
  async function showCloudflareDeployments(root, slug) {
44
44
  if (slug) throw new Error("project: A project name selects a Void platform project and is not used for direct Cloudflare apps.");
45
- const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
45
+ const { readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BFLCpUCV.mjs");
46
46
  const status = await readCloudflareWorkerStatus(resolveCloudflareOperationContext(root));
47
47
  if (status.versions.length === 0) {
48
48
  outro(`No deployments for ${status.workerName}.`);
@@ -1,5 +1,5 @@
1
1
  import { r as AuthUser } from "./auth-DkcFflXV.mjs";
2
- import { a as CloudEnv, r as CloudContext } from "./handler-_PqY82xe.mjs";
2
+ import { a as CloudEnv, r as CloudContext } from "./handler-D5K_yP6T.mjs";
3
3
  //#region src/runtime/live.d.ts
4
4
  type MaybePromise<T> = T | Promise<T>;
5
5
  type LiveControlRequest = {
@@ -1,6 +1,6 @@
1
1
  import { a as join, c as resolve, i as isAbsolute } from "./dist-ipQi0Q8y.mjs";
2
- import { b as readRootWranglerConfig } from "./wrangler-BYs07Rxy.mjs";
3
- import { r as getMiniflareDatabasePath } from "./runner-CabsQ-iM.mjs";
2
+ import { b as readRootWranglerConfig } from "./wrangler-C9XSzrju.mjs";
3
+ import { r as getMiniflareDatabasePath } from "./runner-3uGC-oLF.mjs";
4
4
  import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
5
5
  import { createHash } from "node:crypto";
6
6
  //#region src/local-d1.ts
@@ -76,13 +76,13 @@ function readLocalD1PersistState(root) {
76
76
  try {
77
77
  state = JSON.parse(readFileSync(path, "utf-8"));
78
78
  } catch {
79
- throw new Error(`db: local D1 state in ${path} is invalid. Run \`void dev\` to refresh it.`);
79
+ throw new Error(`db: local D1 state in ${path} is invalid. Start the dev server to refresh it.`);
80
80
  }
81
81
  const projectRoot = resolve(root);
82
- if (state.version !== 1 || state.projectRoot !== projectRoot || typeof state.persistRoot !== "string" || state.persistRoot.length === 0) throw new Error(`db: local D1 state in ${path} is stale. Run \`void dev\` to refresh it.`);
82
+ if (state.version !== 1 || state.projectRoot !== projectRoot || typeof state.persistRoot !== "string" || state.persistRoot.length === 0) throw new Error(`db: local D1 state in ${path} is stale. Start the dev server to refresh it.`);
83
83
  if (state.viteConfig) {
84
84
  const { path: configPath, hash } = state.viteConfig;
85
- if (!existsSync(configPath) || hashFile(configPath) !== hash) throw new Error("db: voidPlugin persistence configuration changed since the local D1 state was written. Run `void dev` to refresh it before using `void db`.");
85
+ if (!existsSync(configPath) || hashFile(configPath) !== hash) throw new Error("db: voidPlugin persistence configuration changed since the local D1 state was written. Start the dev server to refresh it before using `void db`.");
86
86
  }
87
87
  return state;
88
88
  }
@@ -0,0 +1 @@
1
+ export { r as selectPlatformLoginMethod } from "./login-f2eu2TQh.mjs";
@@ -1,7 +1,7 @@
1
1
  import { a as getApiUrl, c as getToken, f as removeToken, l as getTokenSource, m as savePlatformToken, p as runPlatformLogin } from "./auth-B6iOCjKI.mjs";
2
2
  import { H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-BVdsO7Py.mjs";
3
- import { f as import_picocolors, l as formatUrl, m as printSuccess, r as createSpinner } from "./output-Ba6ZbrzY.mjs";
4
- import { a as isExpiredTokenError, r as PlatformClient } from "./client-DM9Kcf4e.mjs";
3
+ import { f as import_picocolors, l as formatUrl, m as printSuccess, r as createSpinner } from "./output-CKguMgr7.mjs";
4
+ import { a as isExpiredTokenError, r as PlatformClient } from "./client-BdzxubTS.mjs";
5
5
  //#region src/cli/login.ts
6
6
  async function selectPlatformLoginMethod(platform, requestedId) {
7
7
  const providers = platform.authenticationProviders;
@@ -30,7 +30,7 @@ async function selectPlatformLoginMethod(platform, requestedId) {
30
30
  }
31
31
  async function promptForLoginToken(root = process.cwd(), platform) {
32
32
  const apiUrl = platform?.apiUrl ?? getApiUrl(root);
33
- const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-PT4YwMLM.mjs")).discoverPlatform(apiUrl));
33
+ const { id: provider, label: providerName } = await selectPlatformLoginMethod(platform ?? await (await import("./platform-cmd-B2ec5eFg.mjs")).discoverPlatform(apiUrl));
34
34
  const s = createSpinner();
35
35
  s.start(`Opening browser for ${providerName} login...`);
36
36
  try {
@@ -1,15 +1,15 @@
1
1
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-rqDnVsJN.mjs";
2
2
  import { c as getToken } from "./auth-B6iOCjKI.mjs";
3
3
  import { $ as wrapTextWithPrefix, H as outro, L as log } from "./dist-BVdsO7Py.mjs";
4
- import { a as errorStackFrames, f as import_picocolors, i as dim, o as formatCount } from "./output-Ba6ZbrzY.mjs";
5
- import { r as PlatformClient } from "./client-DM9Kcf4e.mjs";
4
+ import { a as errorStackFrames, f as import_picocolors, i as dim, o as formatCount } from "./output-CKguMgr7.mjs";
5
+ import { r as PlatformClient } from "./client-BdzxubTS.mjs";
6
6
  import { t as sanitizeTerminalLogText } from "./terminal-log-text-D9ACPOuG.mjs";
7
7
  //#region src/cli/logs.ts
8
8
  async function runLogsCommand(root, filter, range, deployment, level) {
9
9
  console.log();
10
10
  const platform = readDeploymentPlatform(root);
11
11
  if (platform === "cloudflare") {
12
- const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-CrSUFRzJ.mjs");
12
+ const { resolveCloudflareOperationContext, tailCloudflareWorker } = await import("./cloudflare-operations-BFLCpUCV.mjs");
13
13
  if (range !== "1h") log.warn("Cloudflare tail streams live logs; --range does not select historical entries.");
14
14
  if (level && level !== "all" && level !== "error") log.warn("Cloudflare tail cannot filter individual console levels; showing all invocation logs.");
15
15
  await tailCloudflareWorker(resolveCloudflareOperationContext(root), {
@@ -1,11 +1,11 @@
1
1
  import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
2
- import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-DMvEeSau.mjs";
3
- import { p as validateConfig } from "./config-Bx_1SpnO.mjs";
2
+ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-DGu_QZ_Q.mjs";
3
+ import { p as validateConfig } from "./config-D26zcdKy.mjs";
4
4
  import { t as parseJsoncObject } from "./generated-wrangler-config-DeWj5F9Y.mjs";
5
- import { n as VOID_LOCK_FILE, o as seedCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-DV60XFFK.mjs";
6
- import "./wrangler-BYs07Rxy.mjs";
5
+ import { n as VOID_LOCK_FILE, o as seedCloudflareConfig, s as stashCloudflareDeployPointer } from "./cloudflare-config-rdFOys4X.mjs";
6
+ import "./wrangler-C9XSzrju.mjs";
7
7
  import { L as log } from "./dist-BVdsO7Py.mjs";
8
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
8
+ import { m as printSuccess } from "./output-CKguMgr7.mjs";
9
9
  import { existsSync, mkdirSync, readFileSync, renameSync, rmSync, unlinkSync, writeFileSync } from "node:fs";
10
10
  import { parseSync } from "vite";
11
11
  import { randomUUID } from "node:crypto";
@@ -0,0 +1 @@
1
+ export { n as runMigrateCommand } from "./migrate-DYfdWBXt.mjs";
@@ -44,7 +44,6 @@ function createNeonDatabaseProvider(options = {}) {
44
44
  const projectId = typeof project?.id === "string" ? project.id : void 0;
45
45
  return {
46
46
  connectionString,
47
- projectId,
48
47
  dashboardUrl: projectId ? `https://console.neon.tech/app/projects/${projectId}` : void 0
49
48
  };
50
49
  }
package/dist/nitro.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { a as join, n as dirname } from "./dist-ipQi0Q8y.mjs";
2
- import { d as readConfig, s as getDatabaseDialect } from "./config-Bx_1SpnO.mjs";
3
- import { r as voidDbBundlerPlugin } from "./dispatch-DrTTk8Xg.mjs";
4
- import { n as bundleWorkerSqlDriver } from "./wrapper-CwhpNWtH.mjs";
2
+ import { d as readConfig, s as getDatabaseDialect } from "./config-D26zcdKy.mjs";
3
+ import { r as voidDbBundlerPlugin } from "./dispatch-BAbbn3jg.mjs";
4
+ import { n as bundleWorkerSqlDriver } from "./wrapper-DGsYwNi6.mjs";
5
5
  import { fileURLToPath } from "node:url";
6
6
  import { normalizePath } from "vite";
7
7
  import { resolve } from "node:path/win32";
@@ -1,9 +1,11 @@
1
- import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-D0GY5ItR.mjs";
2
- import { d as readConfig } from "./config-Bx_1SpnO.mjs";
3
- import { r as getMiniflareDatabasePath } from "./runner-CabsQ-iM.mjs";
1
+ import { n as dirname } from "./dist-ipQi0Q8y.mjs";
2
+ import { n as loadVoidAuthConfig, t as findVoidAuthConfig } from "./config-CyUJzi3q.mjs";
3
+ import { d as readConfig } from "./config-D26zcdKy.mjs";
4
+ import { r as getMiniflareDatabasePath } from "./runner-3uGC-oLF.mjs";
4
5
  import { o as loadLocalEnv } from "./env-BJjULvL0.mjs";
5
- import { r as resolveVoidAuthMigrationSchema } from "./drizzle-CF84FOVM.mjs";
6
- import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-Cgs0k6lS.mjs";
6
+ import { r as resolveVoidAuthMigrationSchema } from "./drizzle-BQfyvQKX.mjs";
7
+ import { a as pgMigrationRunner, i as mysqlMigrationRunner, n as applyPgAuthMigrations, r as applySqliteAuthMigrations, t as applyMySqlAuthMigrations } from "./auth-migrations-BO27GDNr.mjs";
8
+ import { mkdirSync } from "node:fs";
7
9
  //#region src/auth/node.ts
8
10
  async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId, configPath = findVoidAuthConfig(root), databaseUrl) {
9
11
  const authConfig = await loadVoidAuthConfig(configPath);
@@ -12,14 +14,19 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId
12
14
  providers: readConfig(root).auth?.providers ?? null,
13
15
  userConfig: authConfig
14
16
  };
17
+ const localEnv = loadLocalEnv(root);
18
+ const connectionString = databaseUrl ?? (process.env.DATABASE_URL || localEnv.DATABASE_URL || void 0);
15
19
  const env = {
16
- ...loadLocalEnv(root),
17
- ...process.env
20
+ ...localEnv,
21
+ ...process.env,
22
+ ...connectionString !== void 0 ? { DATABASE_URL: connectionString } : {}
18
23
  };
19
24
  const migrationSchema = resolveVoidAuthMigrationSchema(runtime, env);
20
25
  if (dialect === "sqlite") {
21
26
  const { DatabaseSync } = await import("node:sqlite");
22
- const db = new DatabaseSync(getMiniflareDatabasePath(persistRoot, databaseId));
27
+ const dbPath = getMiniflareDatabasePath(persistRoot, databaseId);
28
+ mkdirSync(dirname(dbPath), { recursive: true });
29
+ const db = new DatabaseSync(dbPath);
23
30
  try {
24
31
  await applySqliteAuthMigrations({
25
32
  async all(sql) {
@@ -34,7 +41,6 @@ async function runLocalVoidAuthMigrations(root, dialect, persistRoot, databaseId
34
41
  }
35
42
  return;
36
43
  }
37
- const connectionString = databaseUrl ?? (typeof env.DATABASE_URL === "string" && env.DATABASE_URL.length > 0 ? env.DATABASE_URL : void 0);
38
44
  if (!connectionString) return;
39
45
  if (dialect === "mysql") {
40
46
  const { createConnection } = await import("mysql2/promise");
@@ -0,0 +1 @@
1
+ export { a as runOperatorCommand } from "./operator-cmd-DCr_QGMH.mjs";
@@ -1,4 +1,4 @@
1
- import { h as sanitizeTerminalText, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
1
+ import { h as sanitizeTerminalText, m as printSuccess } from "./output-CKguMgr7.mjs";
2
2
  import { n as OperatorClient, r as OperatorClientError } from "./operator-client-C-ROjk1I.mjs";
3
3
  import { a as resolveOperatorOrigin, i as removeOperatorToken, n as readOperatorApiTokenStdin, o as saveOperatorToken, r as readOperatorToken, t as exchangeOperatorSession } from "./operator-auth-Cr2zCc-J.mjs";
4
4
  import { createHash } from "node:crypto";
@@ -163,8 +163,8 @@ async function runAuth(origin, args) {
163
163
  if (args.action === "login" || args.action === "token" && args.tokenStdin) {
164
164
  if (!args.tokenStdin && !process.stdin.isTTY) throw new OperatorClientError("Browser login requires an interactive terminal. Use --token-stdin to exchange an API session.", "interactive_login_required");
165
165
  const apiToken = args.tokenStdin ? await readOperatorApiTokenStdin() : await (async () => {
166
- const { discoverPlatform } = await import("./platform-cmd-PT4YwMLM.mjs");
167
- const { selectPlatformLoginMethod } = await import("./login-XD844Xs-.mjs");
166
+ const { discoverPlatform } = await import("./platform-cmd-B2ec5eFg.mjs");
167
+ const { selectPlatformLoginMethod } = await import("./login-08mBwZfI.mjs");
168
168
  const { runPlatformLogin } = await import("./auth-Cbqi1iVX.mjs");
169
169
  return runPlatformLogin(origin, (await selectPlatformLoginMethod(await discoverPlatform(origin), args.provider)).id, (url) => process.stderr.write(`Sign in at ${url}\n`));
170
170
  })();
@@ -344,7 +344,7 @@ async function migrateDeploymentAssets(client, origin, args) {
344
344
  }
345
345
  async function runOperatorCommand(args) {
346
346
  if (!args.action) {
347
- const { printHelpPage } = await import("./help-i2YGGnTH.mjs");
347
+ const { printHelpPage } = await import("./help-w-xlx_kq.mjs");
348
348
  printHelpPage(["platform", args.group]);
349
349
  return;
350
350
  }
@@ -69,6 +69,15 @@ function createSpinner(options, isTerminal = process.stdout.isTTY === true) {
69
69
  }
70
70
  };
71
71
  }
72
+ /** The URL as the box title shows it: whole, or its longest start cut with "…". */
73
+ function shownUrl(chunk, url) {
74
+ if (chunk.includes(url)) return url;
75
+ const plain = stripVTControlCharacters(chunk);
76
+ for (let end = url.length - 1; end > 0; end--) {
77
+ const label = `${url.slice(0, end)}…`;
78
+ if (plain.includes(label)) return label;
79
+ }
80
+ }
72
81
  /** Narrowest terminal the shared box renderer can draw a note in, guide bar included. */
73
82
  const MIN_NOTE_COLUMNS = 6;
74
83
  /**
@@ -92,7 +101,10 @@ function note(...args) {
92
101
  const sized = {
93
102
  columns: needsWidthFallback ? columns > 0 ? MIN_NOTE_COLUMNS : 80 : columns,
94
103
  write(chunk) {
95
- if (header && urlTitle) chunk = chunk.replace(` ${urlTitle} `, ` ${formatUrl(urlTitle)} `);
104
+ if (header && urlTitle) {
105
+ const label = shownUrl(chunk, urlTitle);
106
+ if (label) chunk = chunk.replace(label, () => terminalLink(label, urlTitle, { fallback: false }));
107
+ }
96
108
  header = false;
97
109
  return output.write(chunk);
98
110
  }
@@ -1,5 +1,5 @@
1
1
  import { t as interpolateRouteParams } from "../route-url-BgPja1GS.mjs";
2
- import { t as PageObject } from "../protocol-4H7V_3Os.mjs";
2
+ import { t as PageObject } from "../protocol-Ssc_LhHj.mjs";
3
3
  import { n as CacheForInput, r as CacheForResult } from "../prefetch-Ce6la4EI.mjs";
4
4
  import { UsageLimitData } from "@void/edge";
5
5
  import { ActionUrl, ResolveActionBody, ResolveActionParams } from "void/routes";
@@ -196,6 +196,6 @@ export declare function createVoidRouter(config: VoidRouterConfig): Promise<{
196
196
  commitInitialRender(): void;
197
197
  }>;
198
198
  export declare function scheduleHydration(el: Element, loader: () => Promise<unknown>, props: Record<string, unknown>, strategy: string, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
199
- export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>) => void | Promise<void>): void;
199
+ export declare function initIslands(islands: Record<string, () => Promise<unknown>>, hydrateFn: (el: Element, mod: unknown, props: Record<string, unknown>, frontmatter: Record<string, unknown>) => void | Promise<void>): void;
200
200
  //#endregion
201
201
  export { type ActionErrorHandlingScope, type ActionResult, type FormMethod, type FormModel, type PageNavigationEngine, type PageNavigationResource, type PageNavigationResult, type PrefetchOptions, type VisitOptions, interpolateRouteParams };
@@ -1,3 +1,4 @@
1
+ import { t as ISLAND_FRONTMATTER_ID } from "../serialize-YHvlcG3Q.mjs";
1
2
  import { t as interpolateRouteParams } from "../route-url-BjGv_KKY.mjs";
2
3
  import { n as parseCacheFor, t as PrefetchCache } from "../prefetch-Bsc_Pb6c.mjs";
3
4
  import { readUsageLimit } from "@void/edge";
@@ -245,6 +246,15 @@ function createScrollRestoration() {
245
246
  };
246
247
  }
247
248
  //#endregion
249
+ //#region src/pages/url.ts
250
+ function isSameOrigin(url, origin) {
251
+ if (url.protocol === "capacitor:") {
252
+ const current = new URL(origin);
253
+ return current.protocol === "capacitor:" && url.host !== "" && url.host === current.host;
254
+ }
255
+ return url.origin === origin;
256
+ }
257
+ //#endregion
248
258
  //#region src/pages/navigation-engine.ts
249
259
  const PAGE_DATA_SCRIPT_ID = "__VOID_PAGE_DATA__";
250
260
  const STATIC_PAGE_DATA_PREFIX = "/_void/pages";
@@ -541,8 +551,8 @@ async function createPageNavigationEngine(config) {
541
551
  }
542
552
  async function loadNavigationShell(id, url, fetchUrl, method, options, signal, commitTarget, deferredRegistry) {
543
553
  const target = new URL(url, window.location.origin);
544
- if (target.protocol !== "http:" && target.protocol !== "https:") throw new Error(`Void Router: refusing to navigate to a ${target.protocol} URL.`);
545
- if (target.origin !== window.location.origin) {
554
+ if (target.protocol !== "http:" && target.protocol !== "https:" && target.protocol !== "capacitor:") throw new Error(`Void Router: refusing to navigate to a ${target.protocol} URL.`);
555
+ if (!isSameOrigin(target, window.location.origin)) {
546
556
  if (method !== "GET") throw new Error("Void Router: non-GET visits must target the current origin.");
547
557
  window.location.href = url;
548
558
  return;
@@ -596,7 +606,7 @@ async function createPageNavigationEngine(config) {
596
606
  }
597
607
  if (response?.redirected) {
598
608
  const redirectUrl = new URL(response.url, window.location.origin);
599
- if (redirectUrl.origin !== window.location.origin) {
609
+ if (!isSameOrigin(redirectUrl, window.location.origin)) {
600
610
  window.location.href = method === "GET" ? url : response.url;
601
611
  return;
602
612
  }
@@ -960,7 +970,7 @@ function toUrl(value) {
960
970
  function normalizeUrl(value) {
961
971
  if (typeof value === "string" && value.startsWith("#")) return value;
962
972
  const url = toUrl(value);
963
- return url.origin === getUrlOrigin() ? url.pathname + url.search + url.hash : url.href;
973
+ return isSameOrigin(url, getUrlOrigin()) ? url.pathname + url.search + url.hash : url.href;
964
974
  }
965
975
  function navigationMethod(method) {
966
976
  const normalized = method.toUpperCase();
@@ -1206,12 +1216,15 @@ function scheduleHydration(el, loader, props, strategy, hydrateFn) {
1206
1216
  }
1207
1217
  }
1208
1218
  function initIslands(islands, hydrateFn) {
1219
+ const frontmatterText = document.getElementById(ISLAND_FRONTMATTER_ID)?.textContent;
1220
+ const frontmatter = frontmatterText ? JSON.parse(frontmatterText) : {};
1221
+ const hydrate = (el, mod, props) => hydrateFn(el, mod, props, frontmatter);
1209
1222
  document.querySelectorAll("[data-island]").forEach((el) => {
1210
1223
  const id = el.getAttribute("data-island");
1211
1224
  const props = JSON.parse(el.getAttribute("data-props") || "{}");
1212
1225
  const strategy = el.getAttribute("data-hydrate") || "load";
1213
1226
  const loader = islands[id];
1214
- if (loader) scheduleHydration(el, loader, props, strategy, hydrateFn);
1227
+ if (loader) scheduleHydration(el, loader, props, strategy, hydrate);
1215
1228
  });
1216
1229
  }
1217
1230
  //#endregion
@@ -1,7 +1,7 @@
1
1
  import { a as renderHtmlAttrs, i as renderHeadToString, n as HeadDescriptor, o as resolveHead, r as renderBodyAttrs, t as HeadConfig } from "../head-C8K_iGe6.mjs";
2
2
  import "../config-7qoq2p9v.mjs";
3
- import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-BAp5AEBU.mjs";
4
- import { t as serializePageData } from "../serialize-CfSwWfF2.mjs";
3
+ import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-7AIz0OZu.mjs";
4
+ import { r as serializePageData } from "../serialize-DtR8Vwa_.mjs";
5
5
  //#region src/project-paths.d.ts
6
6
  type ProjectPaths = {
7
7
  root: string;
@@ -1,10 +1,10 @@
1
1
  import { a as join } from "../dist-ipQi0Q8y.mjs";
2
- import { r as resolvePagesDir } from "../project-paths-DMvEeSau.mjs";
3
- import { d as readConfig } from "../config-Bx_1SpnO.mjs";
4
- import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, o as toLayoutId, r as resolveLayoutChain, t as scanPages } from "../scan-C0BMdmEd.mjs";
5
- import { r as parseRedirectsFile } from "../headers-Di1FsD3e.mjs";
2
+ import { r as resolvePagesDir } from "../project-paths-DGu_QZ_Q.mjs";
3
+ import { d as readConfig } from "../config-D26zcdKy.mjs";
4
+ import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, o as toLayoutId, r as resolveLayoutChain, t as scanPages } from "../scan-D2-FcLHs.mjs";
5
+ import { r as parseRedirectsFile } from "../headers-Bi4bOAwp.mjs";
6
6
  import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "../head-D2VF4ApL.mjs";
7
- import { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
7
+ import { r as serializePageData } from "../serialize-YHvlcG3Q.mjs";
8
8
  //#region src/pages/manifest.ts
9
9
  /**
10
10
  * Generates the component import map and layout tree as code strings.
@@ -1,5 +1,5 @@
1
- import { o as PageScanResult } from "../types-BAp5AEBU.mjs";
2
- import { ResolvedConfig, ViteDevServer } from "vite";
1
+ import { o as PageScanResult } from "../types-7AIz0OZu.mjs";
2
+ import { Plugin, ResolvedConfig, ViteDevServer } from "vite";
3
3
  //#region ../../node_modules/.pnpm/magic-string@1.4.3/node_modules/magic-string/dist/index.d.mts
4
4
  //#region src/SourceMap.d.ts
5
5
  interface SourceMapOptions {
@@ -290,11 +290,49 @@ export type IslandEntry = {
290
290
  /** Resolve a relative import specifier to an absolute path by checking extensions. */
291
291
  export declare function resolveSpecifier(specifier: string, importerDir: string, extensions: Array<string>): string | null;
292
292
  /**
293
- * Check whether the islands client bundle is needed by scanning file contents.
294
- * Returns true if any island/layout file has island imports or CSS,
295
- * or any .md file has a `<script>` block.
293
+ * Whether the app has island pages (`*.island.*` files or Markdown). Their
294
+ * layouts can reach a stylesheet through a component, which only the module
295
+ * graph shows, so the islands client entry is built for every such app.
296
296
  */
297
- export declare function needsIslandClientBundle(dir: string, islandFilePattern: RegExp, checkStyleBlocks: boolean): boolean;
297
+ export declare function hasIslandPages(root: string, pagesDir: string): Promise<boolean>;
298
+ /**
299
+ * The layouts of every island page, outermost first, then the pages. All
300
+ * island pages share one production stylesheet, so layout styles come first.
301
+ */
302
+ export declare function islandStyleRoots(pageScan: PageScanResult, pagesDir: string): Array<string>;
303
+ type ModuleImports = {
304
+ importedIds: ReadonlyArray<string>;
305
+ };
306
+ /**
307
+ * Stylesheets the roots reach through static imports, in import order (like
308
+ * the dev CSS collector). Returns null when the roots are not in the graph.
309
+ * The walk also enters island components, as dev does: a layout can render
310
+ * one without hydrating it, and a page links its styles before it hydrates.
311
+ */
312
+ export declare function collectIslandStyles(getModuleInfo: (id: string) => ModuleImports | null, roots: ReadonlyArray<string>): Array<string> | null;
313
+ type IslandBuildContext = {
314
+ environment?: {
315
+ config: {
316
+ consumer: string;
317
+ };
318
+ };
319
+ getModuleInfo(id: string): ModuleImports | null;
320
+ };
321
+ /**
322
+ * Call from `buildEnd`. Island pages render only on the server, so the server
323
+ * build has resolved their imports (aliases, packages, Vue and Svelte style
324
+ * blocks) and the client build has not. Records the stylesheets of island pages
325
+ * and their layouts for the islands client entry, which builds after it.
326
+ */
327
+ export declare function recordIslandStyles(context: IslandBuildContext, pageScan: PageScanResult | null, pagesDir: string): void;
328
+ /** The stylesheets that the server build recorded, or null without a server build. */
329
+ export declare function recordedIslandStyles(pagesDir: string): ReadonlyArray<string> | null;
330
+ /**
331
+ * Keeps the CSS modules (`*.module.css`, Vue `<style module>`) that the
332
+ * islands client entry imports. Vite marks a CSS module as free of side
333
+ * effects, so the entry's bare import would drop it and its rules.
334
+ */
335
+ export declare function islandStylesPlugin(pagesDir: string): Plugin;
298
336
  /**
299
337
  * Rewrite a matched CSS import line so relative specifiers resolve from the
300
338
  * virtual module. Absolute and bare specifiers are kept as-is.
@@ -1,7 +1,7 @@
1
1
  import { c as resolve, n as dirname } from "../dist-ipQi0Q8y.mjs";
2
- import { c as findIslandImports, l as findStaticCssImports, n as resolveEffectiveLayoutChain, s as editIslandSource, t as scanPages } from "../scan-C0BMdmEd.mjs";
3
- import { existsSync, readFileSync, readdirSync } from "node:fs";
4
- import { normalizePath } from "vite";
2
+ import { c as findIslandImports, l as findStaticCssImports, n as resolveEffectiveLayoutChain, s as editIslandSource, t as scanPages } from "../scan-D2-FcLHs.mjs";
3
+ import { existsSync, readFileSync } from "node:fs";
4
+ import { isCSSRequest, normalizePath } from "vite";
5
5
  //#region src/pages/islands-plugin.ts
6
6
  const ISLANDS_RENDERER_ID = "virtual:void-islands-renderer";
7
7
  const ISLANDS_CLIENT_ENTRY_ID = "virtual:void-islands-client";
@@ -16,34 +16,105 @@ function resolveSpecifier(specifier, importerDir, extensions) {
16
16
  return null;
17
17
  }
18
18
  /**
19
- * Check whether the islands client bundle is needed by scanning file contents.
20
- * Returns true if any island/layout file has island imports or CSS,
21
- * or any .md file has a `<script>` block.
19
+ * Whether the app has island pages (`*.island.*` files or Markdown). Their
20
+ * layouts can reach a stylesheet through a component, which only the module
21
+ * graph shows, so the islands client entry is built for every such app.
22
22
  */
23
- function needsIslandClientBundle(dir, islandFilePattern, checkStyleBlocks) {
24
- const cssImportRe = /import\b[^"']*["'][^"']+\.(?:css|scss|sass|less|styl|stylus|pcss|postcss)["']/;
25
- const mdScriptRe = /^<script\b/m;
26
- const styleRe = checkStyleBlocks ? /<style\b/ : null;
23
+ async function hasIslandPages(root, pagesDir) {
24
+ if (!existsSync(pagesDir)) return false;
27
25
  try {
28
- for (const entry of readdirSync(dir, {
29
- withFileTypes: true,
30
- recursive: true
31
- })) {
32
- if (!entry.isFile()) continue;
33
- const name = entry.name;
34
- if (islandFilePattern.test(name) || name.startsWith("layout.") || name.startsWith("_")) {
35
- const content = readFileSync(resolve(entry.parentPath, name), "utf-8");
36
- if (hasIslandImports(content, name)) return true;
37
- if (styleRe && styleRe.test(content)) return true;
38
- if (cssImportRe.test(content)) return true;
39
- }
40
- if (name.endsWith(".md")) {
41
- const content = readFileSync(resolve(entry.parentPath, name), "utf-8");
42
- if (mdScriptRe.test(content)) return true;
26
+ return (await scanPages(root, { pagesDir })).pages.some((page) => page.island);
27
+ } catch {
28
+ return false;
29
+ }
30
+ }
31
+ /**
32
+ * The layouts of every island page, outermost first, then the pages. All
33
+ * island pages share one production stylesheet, so layout styles come first.
34
+ */
35
+ function islandStyleRoots(pageScan, pagesDir) {
36
+ const layouts = /* @__PURE__ */ new Set();
37
+ const pages = [];
38
+ for (const page of pageScan.pages) {
39
+ if (!page.island) continue;
40
+ for (const layout of resolveEffectiveLayoutChain(page, pageScan.layouts, pageScan.namedLayouts)) layouts.add(normalizePath(resolve(pagesDir, layout.filePath)));
41
+ pages.push(normalizePath(resolve(pagesDir, page.componentPath)));
42
+ }
43
+ return [...layouts, ...pages];
44
+ }
45
+ /** A stylesheet that a page links, not one imported as a string or a URL. */
46
+ function isLinkedStylesheet(id) {
47
+ if (!isCSSRequest(id)) return false;
48
+ const query = id.indexOf("?");
49
+ if (query === -1) return true;
50
+ for (const param of id.slice(query + 1).split("&")) {
51
+ const key = param.split("=")[0];
52
+ if (key === "inline" || key === "url" || key === "raw") return false;
53
+ }
54
+ return true;
55
+ }
56
+ /**
57
+ * Stylesheets the roots reach through static imports, in import order (like
58
+ * the dev CSS collector). Returns null when the roots are not in the graph.
59
+ * The walk also enters island components, as dev does: a layout can render
60
+ * one without hydrating it, and a page links its styles before it hydrates.
61
+ */
62
+ function collectIslandStyles(getModuleInfo, roots) {
63
+ if (!roots.some((root) => getModuleInfo(root))) return null;
64
+ const styles = [];
65
+ const seen = /* @__PURE__ */ new Set();
66
+ const pending = [...roots].reverse();
67
+ while (pending.length > 0) {
68
+ const id = pending.pop();
69
+ if (seen.has(id)) continue;
70
+ seen.add(id);
71
+ if (isLinkedStylesheet(id)) {
72
+ if (!id.startsWith("\0")) styles.push(id);
73
+ continue;
74
+ }
75
+ const imported = getModuleInfo(id)?.importedIds ?? [];
76
+ for (let index = imported.length - 1; index >= 0; index--) pending.push(imported[index]);
77
+ }
78
+ return styles;
79
+ }
80
+ const islandStylesByPagesDir = /* @__PURE__ */ new Map();
81
+ /**
82
+ * Call from `buildEnd`. Island pages render only on the server, so the server
83
+ * build has resolved their imports (aliases, packages, Vue and Svelte style
84
+ * blocks) and the client build has not. Records the stylesheets of island pages
85
+ * and their layouts for the islands client entry, which builds after it.
86
+ */
87
+ function recordIslandStyles(context, pageScan, pagesDir) {
88
+ if (!pageScan || context.environment?.config.consumer !== "server") return;
89
+ const styles = collectIslandStyles((id) => context.getModuleInfo(id), islandStyleRoots(pageScan, pagesDir));
90
+ if (styles) islandStylesByPagesDir.set(normalizePath(pagesDir), styles);
91
+ }
92
+ /** The stylesheets that the server build recorded, or null without a server build. */
93
+ function recordedIslandStyles(pagesDir) {
94
+ return islandStylesByPagesDir.get(normalizePath(pagesDir)) ?? null;
95
+ }
96
+ /**
97
+ * Keeps the CSS modules (`*.module.css`, Vue `<style module>`) that the
98
+ * islands client entry imports. Vite marks a CSS module as free of side
99
+ * effects, so the entry's bare import would drop it and its rules.
100
+ */
101
+ function islandStylesPlugin(pagesDir) {
102
+ return {
103
+ name: "void:islands-styles",
104
+ apply: "build",
105
+ enforce: "post",
106
+ transform: {
107
+ order: "post",
108
+ filter: { id: /\.module\./ },
109
+ handler(code, id) {
110
+ if (this.environment.config.consumer === "client" && recordedIslandStyles(pagesDir)?.includes(id)) return {
111
+ code,
112
+ map: null,
113
+ moduleSideEffects: "no-treeshake"
114
+ };
43
115
  }
44
116
  }
45
- } catch {}
46
- return false;
117
+ };
47
118
  }
48
119
  /**
49
120
  * Rewrite a matched CSS import line so relative specifiers resolve from the
@@ -128,4 +199,4 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
128
199
  return { flush: () => pending ?? Promise.resolve() };
129
200
  }
130
201
  //#endregion
131
- export { ISLANDS_CLIENT_ENTRY_ID, ISLANDS_RENDERER_ID, computePagesNeedingClientJS, editIslandSource, extractCssImports, findIslandImports, findStaticCssImports, needsIslandClientBundle, resolveSpecifier, rewriteCssImportForVirtualModule, watchPagesForRescan };
202
+ export { ISLANDS_CLIENT_ENTRY_ID, ISLANDS_RENDERER_ID, collectIslandStyles, computePagesNeedingClientJS, editIslandSource, extractCssImports, findIslandImports, findStaticCssImports, hasIslandPages, islandStyleRoots, islandStylesPlugin, recordIslandStyles, recordedIslandStyles, resolveSpecifier, rewriteCssImportForVirtualModule, watchPagesForRescan };
@@ -1,3 +1,3 @@
1
- import { w as ValidationError } from "../handler-_PqY82xe.mjs";
2
- import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-4H7V_3Os.mjs";
1
+ import { w as ValidationError } from "../handler-D5K_yP6T.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-Ssc_LhHj.mjs";
3
3
  export { PageObject, PageRenderResult, ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
@@ -1,3 +1,3 @@
1
1
  import { t as ValidationError } from "../validation-error-Dg9Recn1.mjs";
2
- import { i as safeJsonStringify, n as handlePageGet, r as handlePageMutation, t as flattenValidationErrors } from "../protocol-RNP0u7UY.mjs";
2
+ import { i as safeJsonStringify, n as handlePageGet, r as handlePageMutation, t as flattenValidationErrors } from "../protocol-bAUUkx70.mjs";
3
3
  export { ValidationError, flattenValidationErrors, handlePageGet, handlePageMutation, safeJsonStringify };
@@ -1,2 +1,2 @@
1
- import { t as serializePageData } from "../serialize-CfSwWfF2.mjs";
2
- export { serializePageData };
1
+ import { n as islandFrontmatterScript, r as serializePageData, t as ISLAND_FRONTMATTER_ID } from "../serialize-DtR8Vwa_.mjs";
2
+ export { ISLAND_FRONTMATTER_ID, islandFrontmatterScript, serializePageData };
@@ -1 +1 @@
1
- export { t as serializePageData } from "../serialize-BtQyaYoC.mjs";
1
+ export { t as ISLAND_FRONTMATTER_ID, n as islandFrontmatterScript, r as serializePageData } from "../serialize-YHvlcG3Q.mjs";
@@ -400,18 +400,15 @@ function parsePlatformArgs(args) {
400
400
  const parsed = parseSelector(rest.filter((arg) => ![
401
401
  "--purge-data",
402
402
  "--purge-resources",
403
- "--delete-zone",
404
403
  "--keep-zone"
405
404
  ].includes(arg)), subcommand, { allowYes: true });
406
- if (rest.includes("--delete-zone") && rest.includes("--keep-zone")) throw new Error("platform: --delete-zone and --keep-zone cannot be used together.");
407
405
  return {
408
406
  subcommand,
409
407
  selector: parsed.selector,
410
408
  plan: parsed.plan,
411
409
  purgeData: rest.includes("--purge-data") || rest.includes("--purge-resources"),
412
410
  purgeResources: rest.includes("--purge-resources"),
413
- yes: parsed.yes,
414
- deleteZone: rest.includes("--delete-zone") ? true : rest.includes("--keep-zone") ? false : null
411
+ yes: parsed.yes
415
412
  };
416
413
  }
417
414
  if (subcommand === "install") {
@@ -0,0 +1 @@
1
+ export { t as parsePlatformArgs } from "./platform-args-B7ke06up.mjs";