void 1.1.11 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (233) hide show
  1. package/dist/{account-cmd-R35a4Oa8.mjs → account-cmd-CdUll_35.mjs} +5 -5
  2. package/dist/action-key-XZ9HkWAO.mjs +26 -0
  3. package/dist/{application-analysis-D7nNmNJb.mjs → application-analysis-fEqoSeMp.mjs} +11 -11
  4. package/dist/{application-routing-CZH66gXn.mjs → application-routing-DAhNP4u3.mjs} +1 -1
  5. package/dist/{ast-CPGPjb0V.mjs → ast-CsZ_q_gc.mjs} +6 -1
  6. package/dist/ast-bindings-C3yaPs1y.mjs +296 -0
  7. package/dist/{auth-link-VHmiKZmP.mjs → auth-link-C87vGXM-.mjs} +5 -5
  8. package/dist/{auth-router-O_Wrs5kg.mjs → auth-router-6I81r-ix.mjs} +3 -3
  9. package/dist/{better-auth-shared-Bv18bB-l.d.mts → better-auth-shared-DVk2DkTW.d.mts} +1 -1
  10. package/dist/{build-cmd-CMZiMn46.mjs → build-cmd-ex1g-j_e.mjs} +4 -4
  11. package/dist/{cache-TZ5Ab3d7.mjs → cache-oHzrnY3z.mjs} +4 -4
  12. package/dist/{cancel-deploy-DXoR6oC3.mjs → cancel-deploy-viAMD0Q_.mjs} +3 -3
  13. package/dist/cf-build-output-BJHuSsVN.mjs +1 -0
  14. package/dist/{cf-build-output-Bc8i3dzE.mjs → cf-build-output-BhVxldCw.mjs} +75 -10
  15. package/dist/{cf-user-agent-ChjQp2MU.mjs → cf-command-values-ByHk0xg4.mjs} +6 -16
  16. package/dist/cf-worker-settings-BECvvTVd.mjs +37 -0
  17. package/dist/cli/cli.mjs +139 -35
  18. package/dist/cli/cloudflare-operation-process.mjs +65 -18
  19. package/dist/cli/env-schema-probe.d.mts +1 -1
  20. package/dist/cli/env-schema-probe.mjs +3 -3
  21. package/dist/{client-GuSO3v_x.mjs → client-BEkdj1kx.mjs} +58 -13
  22. package/dist/client-BiRDZTSd.mjs +1 -0
  23. package/dist/{cloudflare-auth-DSvBc1Gu.mjs → cloudflare-auth-Byo_0_N9.mjs} +1 -1
  24. package/dist/{cloudflare-cmd-ZSErUl6Y.mjs → cloudflare-cmd-DMzCv12s.mjs} +5 -5
  25. package/dist/{cloudflare-config-rdFOys4X.mjs → cloudflare-config-DchHxPTo.mjs} +1 -1
  26. package/dist/{cloudflare-connect-BN-k2kD-.mjs → cloudflare-connect-CCRTVg-I.mjs} +3 -3
  27. package/dist/{cloudflare-operations-DH3GedbV.mjs → cloudflare-operations-Dh9dEHJj.mjs} +17 -7
  28. package/dist/{cloudflare-operations-Cm8lVx7W.mjs → cloudflare-operations-DsSaw2BT.mjs} +1 -1
  29. package/dist/{cloudflare-process-CZJ4viYl.mjs → cloudflare-process-8jEYIeim.mjs} +3 -2
  30. package/dist/{config-DC5llZaI.mjs → config-BIaXIkkv.mjs} +8 -3
  31. package/dist/{config-DYJV8aEH.mjs → config-BU6hMu1W.mjs} +1 -1
  32. package/dist/{config-D26zcdKy.mjs → config-DHgSEWT7.mjs} +39 -6
  33. package/dist/{config-7qoq2p9v.d.mts → config-DQfHOKh9.d.mts} +10 -1
  34. package/dist/config-entry.d.mts +1 -1
  35. package/dist/{connect-yQuLbuiJ.mjs → connect-k7R2rPVA.mjs} +6 -6
  36. package/dist/{create-project-CGOo_OL_.mjs → create-project-DTuy-l0z.mjs} +1 -1
  37. package/dist/{create-project-DEEWJX_M.mjs → create-project-DV71ol5d.mjs} +4 -4
  38. package/dist/{db-COI-yTJE.mjs → db-DVOkLH5X.mjs} +79 -23
  39. package/dist/{delete-PgN6L_9N.mjs → delete-BbP5eopu.mjs} +4 -4
  40. package/dist/{deploy-DsW-PrRQ.mjs → deploy-7H32EnUs.mjs} +220 -95
  41. package/dist/deploy-CE0Ev0Ob.mjs +2 -0
  42. package/dist/{deploy-managed-static-Dqz06S2u.mjs → deploy-managed-static-DlvcvnQT.mjs} +74 -28
  43. package/dist/{deploy-transport-nY3vLXPL.mjs → deploy-transport-BzGEj0Ge.mjs} +2 -2
  44. package/dist/deploy.d.mts +22 -1
  45. package/dist/deploy.mjs +49 -8
  46. package/dist/{dev-inbox-Rd6j_8vM.mjs → dev-inbox-D0jxye_D.mjs} +1 -1
  47. package/dist/{dispatch-BAbbn3jg.mjs → dispatch-DoUnxTNo.mjs} +15 -11
  48. package/dist/{dist-CfgIkieS.mjs → dist-B1PLt4_8.mjs} +1 -1
  49. package/dist/{dist-BVdsO7Py.mjs → dist-Cor9XGoz.mjs} +94 -200
  50. package/dist/{dist-Bn8Kodjp.mjs → dist-D15hFhP0.mjs} +1 -1
  51. package/dist/{domain-DKlNI0SR.mjs → domain-CA2wBgra.mjs} +5 -5
  52. package/dist/drizzle-9TubSZvI.mjs +1 -0
  53. package/dist/{email-BcjSyAL0.mjs → email-B9ayYQEG.mjs} +1 -1
  54. package/dist/{email-C0s3OvJk.mjs → email-DXpCc77w.mjs} +10 -10
  55. package/dist/{email-cloudflare-etpKiITL.mjs → email-cloudflare-D03g2TkS.mjs} +7 -7
  56. package/dist/{entry-B_0IhV64.mjs → entry-BEM8ZuGP.mjs} +40 -12
  57. package/dist/{env-BX2JFsgF.mjs → env-DgOQ9_8S.mjs} +6 -6
  58. package/dist/{env-public-CCdykygU.d.mts → env-public-6lqiSD2b.d.mts} +1 -0
  59. package/dist/{env-types-GRchm5dw.mjs → env-types-BicfKBhV.mjs} +1 -1
  60. package/dist/{env-validation-CuGfWRJd.mjs → env-validation-BmsdCZEk.mjs} +1 -1
  61. package/dist/{env-validation-D_KyMdab.mjs → env-validation-Dwq3PJzK.mjs} +3 -3
  62. package/dist/{fetch-DHLOuPyk.d.mts → fetch-CUX0tB78.d.mts} +14 -1
  63. package/dist/fetch-CtESUYWd.mjs +26 -0
  64. package/dist/{fetch-error-Dj3crt0e.mjs → fetch-error-Bw0n-IY-.mjs} +1 -1
  65. package/dist/{fetch-stream-PGgz4uGz.mjs → fetch-stream-BspOeTAI.mjs} +1 -1
  66. package/dist/{fetch-stream-CNxOrBdP.d.mts → fetch-stream-DfkAzZf-.d.mts} +1 -1
  67. package/dist/{gen-Bj6ZkOcI.mjs → gen-BfmcIi2g.mjs} +5 -5
  68. package/dist/gen-NrOlWZaG.mjs +1 -0
  69. package/dist/{github-cmd-DQDryS-5.mjs → github-cmd-CY9LUqLh.mjs} +4 -4
  70. package/dist/{handler-_PqY82xe.d.mts → handler-BbkSPzGF.d.mts} +91 -9
  71. package/dist/{headers-Bi4bOAwp.mjs → headers-D522zd0A.mjs} +2 -2
  72. package/dist/help-BeAFFE5C.mjs +1 -0
  73. package/dist/{help-D49SL_lN.mjs → help-CxSlPpzJ.mjs} +83 -12
  74. package/dist/{inbound-BuTfm11U.mjs → inbound-VrOLqwZY.mjs} +1 -1
  75. package/dist/index.d.mts +1 -1
  76. package/dist/index.mjs +125 -124
  77. package/dist/{info-Bxunp14X.mjs → info-7VDlhtyy.mjs} +4 -4
  78. package/dist/{init-DyTEY04s.mjs → init-DxYyOs4-.mjs} +103 -43
  79. package/dist/{link-CgOVn9EC.mjs → link-Ddmod1dZ.mjs} +5 -5
  80. package/dist/{list-CUfD9RSb.mjs → list-MogaugiO.mjs} +5 -5
  81. package/dist/{live-DJONVlQK.d.mts → live-Bt8Y_0bg.d.mts} +1 -1
  82. package/dist/{local-d1-CpaPbd_L.mjs → local-d1-BHBnKWRb.mjs} +1 -1
  83. package/dist/{log-vqY3pqwI.mjs → log-BMwmN5Ae.mjs} +2 -2
  84. package/dist/{login-BJvGW5Eu.mjs → login-Cttnagmm.mjs} +4 -4
  85. package/dist/login-DgDwlKc_.mjs +1 -0
  86. package/dist/{logs-DeizBI4j.mjs → logs-CAszUWZI.mjs} +4 -4
  87. package/dist/{migrate-8rk56vV8.mjs → migrate-DyT2jJ8y.mjs} +5 -5
  88. package/dist/migrate-n49ZeS1X.mjs +1 -0
  89. package/dist/{mime-srOklVVv.mjs → mime-BAyHPskU.mjs} +1 -1
  90. package/dist/nitro.mjs +3 -3
  91. package/dist/{node-uN8_zxJr.mjs → node-WB7c2N4L.mjs} +2 -2
  92. package/dist/operator-cmd-d2MvJOrl.mjs +1 -0
  93. package/dist/{operator-cmd-CA5QQyvE.mjs → operator-cmd-skshjMGl.mjs} +4 -4
  94. package/dist/output-BW9uK099.mjs +1 -0
  95. package/dist/{output-Ba6ZbrzY.mjs → output-BpgYODYx.mjs} +16 -4
  96. package/dist/pages/client.d.mts +2 -2
  97. package/dist/pages/client.mjs +48 -25
  98. package/dist/pages/index.d.mts +2 -2
  99. package/dist/pages/index.mjs +4 -4
  100. package/dist/pages/islands-plugin.d.mts +43 -5
  101. package/dist/pages/islands-plugin.mjs +100 -28
  102. package/dist/pages/protocol.d.mts +2 -2
  103. package/dist/pages/protocol.mjs +1 -1
  104. package/dist/pages/serialize.d.mts +2 -2
  105. package/dist/pages/serialize.mjs +1 -1
  106. package/dist/{parse-filename-CUbj-1MP.mjs → parse-filename-DioPHiR9.mjs} +1 -35
  107. package/dist/{picocolors-BTps1_gs.mjs → picocolors-BsDfhxIw.mjs} +1 -1
  108. package/dist/{platform-args-B7ke06up.mjs → platform-args-DVbVClZl.mjs} +12 -4
  109. package/dist/platform-args-kQrgxScY.mjs +1 -0
  110. package/dist/{platform-auth-config-CZaY812e.mjs → platform-auth-config-C-pm5Qzx.mjs} +6 -6
  111. package/dist/{platform-auth-protection-U9HCqoXv.mjs → platform-auth-protection-SHhvim1L.mjs} +4 -4
  112. package/dist/{platform-auth-recovery-B0BV2hfV.mjs → platform-auth-recovery-DXVWs-wA.mjs} +4 -4
  113. package/dist/{platform-cmd-CXrjk4fb.mjs → platform-cmd-D5I1beUX.mjs} +7 -7
  114. package/dist/{platform-cmd-D9lwFpcl.mjs → platform-cmd-PiNRkopU.mjs} +1 -1
  115. package/dist/{platform-domain-CXyq-68_.mjs → platform-domain-jpmBfZeb.mjs} +4 -4
  116. package/dist/{platform-lifecycle-Dz2cJsLX.mjs → platform-lifecycle-DH3Yr1qQ.mjs} +1 -1
  117. package/dist/{platform-lifecycle-D0TdyXbN.mjs → platform-lifecycle-DyKmuNY6.mjs} +405 -44
  118. package/dist/{platform-management-CnXhgxTM.mjs → platform-management--vDwSn35.mjs} +49 -5
  119. package/dist/{platform-management-BvgbusqL.mjs → platform-management-7m-PLaPJ.mjs} +1 -1
  120. package/dist/{platform-plans-config-BWn1S2Rv.mjs → platform-plans-config-CeydDSj0.mjs} +2 -2
  121. package/dist/{platform-recovery-CH_fThW6.mjs → platform-recovery-BiNpZZab.mjs} +2 -2
  122. package/dist/{platform-setup-YvN9VQXV.mjs → platform-setup-Ca53gtt0.mjs} +3 -2
  123. package/dist/{plugin-inference-Bekzjuqw.mjs → plugin-inference-DUjCd55H.mjs} +145 -218
  124. package/dist/{prepare-2XD6kh77.mjs → prepare-BcAE5Sdj.mjs} +3 -3
  125. package/dist/prepare-C4I0f--h.mjs +1 -0
  126. package/dist/{prepare-DepAGBcV.mjs → prepare-DA-17DhO.mjs} +5 -5
  127. package/dist/{prerender-render-Bfsumdkv.mjs → prerender-render-Cijv7UFo.mjs} +11 -6
  128. package/dist/prerender-render.mjs +1 -1
  129. package/dist/{project-cmd-CpLYflCH.mjs → project-cmd-DA4K5faU.mjs} +18 -18
  130. package/dist/{project-team-CTSY7W7Q.mjs → project-team-CQBNveX3.mjs} +4 -4
  131. package/dist/{project-token-Cybtlfbl.mjs → project-token-CCalFyQf.mjs} +4 -4
  132. package/dist/{project-zero-trust-DKOtqyvu.mjs → project-zero-trust-DPnkiEuT.mjs} +4 -4
  133. package/dist/{protocol-B8sI8dRD.d.mts → protocol-BBDpJz3G.d.mts} +3 -1
  134. package/dist/{protocol-RNP0u7UY.mjs → protocol-DimNxVRr.mjs} +42 -17
  135. package/dist/{provision-UcYjpTRh.mjs → provision-BFLCrnUp.mjs} +1 -1
  136. package/dist/{provision-BuifYvLc.mjs → provision-DtROpNNI.mjs} +6 -5
  137. package/dist/{requests-Ryiazz9i.mjs → requests-BpH0kImL.mjs} +3 -3
  138. package/dist/resolve-project-DD1vu8s9.mjs +1 -0
  139. package/dist/{resolve-project-WpwkCB_c.mjs → resolve-project-Xoi6eTWY.mjs} +1 -1
  140. package/dist/{rollback-Or0EV3rP.mjs → rollback-CXS1tAa-.mjs} +10 -9
  141. package/dist/{rolldown-runtime-DXIUcv95.mjs → rolldown-runtime-3h0WiCiA.mjs} +1 -1
  142. package/dist/{routing-assets-VkrKIbxE.mjs → routing-assets-DdSFxoLp.mjs} +10 -4
  143. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  144. package/dist/runtime/better-auth-pg.d.mts +1 -1
  145. package/dist/runtime/better-auth.d.mts +1 -1
  146. package/dist/runtime/client-react.d.mts +2 -2
  147. package/dist/runtime/client-react.mjs +3 -3
  148. package/dist/runtime/client-solid.d.mts +2 -2
  149. package/dist/runtime/client-solid.mjs +3 -3
  150. package/dist/runtime/client-svelte.d.mts +2 -2
  151. package/dist/runtime/client-svelte.mjs +3 -3
  152. package/dist/runtime/client-vue.d.mts +2 -2
  153. package/dist/runtime/client-vue.mjs +3 -3
  154. package/dist/runtime/client.d.mts +2 -2
  155. package/dist/runtime/client.mjs +3 -3
  156. package/dist/runtime/email/testing.mjs +4 -4
  157. package/dist/runtime/email.mjs +3 -3
  158. package/dist/runtime/env-public.d.mts +1 -1
  159. package/dist/runtime/fetch-server.d.mts +8 -0
  160. package/dist/runtime/fetch-server.mjs +30 -0
  161. package/dist/runtime/fetch-stream.d.mts +2 -2
  162. package/dist/runtime/fetch-stream.mjs +2 -2
  163. package/dist/runtime/fetch.d.mts +2 -2
  164. package/dist/runtime/fetch.mjs +3 -3
  165. package/dist/runtime/handler.d.mts +1 -1
  166. package/dist/runtime/live-client.d.mts +1 -1
  167. package/dist/runtime/live.d.mts +1 -1
  168. package/dist/runtime/routing.d.mts +17 -76
  169. package/dist/runtime/routing.mjs +277 -216
  170. package/dist/runtime/validator.d.mts +1 -1
  171. package/dist/runtime/ws-server.d.mts +2 -2
  172. package/dist/runtime/ws.d.mts +1 -1
  173. package/dist/{scan-D2-FcLHs.mjs → scan-8IzYXiU_.mjs} +12 -11
  174. package/dist/{secret-CClHaFxm.mjs → secret-BbXHfLAt.mjs} +6 -6
  175. package/dist/serialize-DtR8Vwa_.d.mts +18 -0
  176. package/dist/serialize-YHvlcG3Q.mjs +31 -0
  177. package/dist/{skills-C_yRTg0g.mjs → skills-CrUO3PJ0.mjs} +1 -1
  178. package/dist/{subcommand-prompt-Bm3ZlYgA.mjs → subcommand-prompt-D9OhhbGG.mjs} +2 -2
  179. package/dist/{version-metadata-B1Bm2wSq.mjs → version-metadata-tS39iW09.mjs} +1 -1
  180. package/dist/wrangler-BLb3_luP.mjs +1 -0
  181. package/dist/{wrangler-C9XSzrju.mjs → wrangler-F96NnLyb.mjs} +13 -5
  182. package/dist/{wrapper-BOigE1xJ.mjs → wrapper-D3sZyh2C.mjs} +5 -3
  183. package/dist/{ws-CsBNxv86.d.mts → ws-BH-im_tX.d.mts} +1 -1
  184. package/docs/guide/ai.md +1 -1
  185. package/docs/guide/database/postgresql.md +1 -1
  186. package/docs/guide/database.md +26 -0
  187. package/docs/guide/deployment.md +2 -0
  188. package/docs/guide/edge/headers.md +1 -1
  189. package/docs/guide/email/domains.md +1 -1
  190. package/docs/guide/email/receiving.md +1 -1
  191. package/docs/guide/email/sending.md +3 -3
  192. package/docs/guide/pages-routing/actions-and-forms.md +1 -1
  193. package/docs/guide/pages-routing/markdown.md +3 -1
  194. package/docs/guide/platform/administration/email.md +7 -1
  195. package/docs/guide/platform/installation/ci.md +2 -0
  196. package/docs/guide/platform/installation/credentials.md +24 -6
  197. package/docs/guide/platform/installation/domains.md +16 -0
  198. package/docs/guide/platform/installation/maintenance.md +32 -2
  199. package/docs/guide/platform/installation/setup.md +1 -1
  200. package/docs/guide/self-hosted-platform.md +1 -1
  201. package/docs/guide/server-routing.md +1 -1
  202. package/docs/guide/typed-fetch.md +1 -1
  203. package/docs/integrations/cloudflare.md +2 -1
  204. package/docs/integrations/frameworks/tanstack-start.md +25 -0
  205. package/docs/reference/api/deploy.md +35 -3
  206. package/docs/reference/api/env.md +1 -1
  207. package/docs/reference/api/rewrites.md +1 -1
  208. package/docs/reference/api/types.md +1 -0
  209. package/docs/reference/cli/database.md +15 -0
  210. package/docs/reference/cli/platform-installation.md +5 -2
  211. package/docs/reference/cli/project.md +4 -2
  212. package/docs/reference/cli/setup.md +17 -0
  213. package/docs/reference/cli.md +1 -0
  214. package/docs/reference/config.md +14 -1
  215. package/docs/reference/resource-inference.md +4 -0
  216. package/package.json +23 -22
  217. package/sandbox.Dockerfile +1 -1
  218. package/schema.json +23 -3
  219. package/dist/cf-build-output-BU3hqdHu.mjs +0 -1
  220. package/dist/client-DrdeJgHR.mjs +0 -1
  221. package/dist/deploy-CxNgEYr4.mjs +0 -2
  222. package/dist/fetch-sAcwjzLO.mjs +0 -18
  223. package/dist/gen-DsCukhuw.mjs +0 -1
  224. package/dist/help-DOFygYi4.mjs +0 -1
  225. package/dist/login-alAlxw4S.mjs +0 -1
  226. package/dist/migrate-D2odrAmh.mjs +0 -1
  227. package/dist/operator-cmd-D7toMPJ9.mjs +0 -1
  228. package/dist/platform-args-B_LrqEZB.mjs +0 -1
  229. package/dist/prepare-EVEbQ9n2.mjs +0 -1
  230. package/dist/resolve-project-PnhzMtY6.mjs +0 -1
  231. package/dist/serialize-BtQyaYoC.mjs +0 -20
  232. package/dist/serialize-CfSwWfF2.d.mts +0 -10
  233. package/dist/wrangler-DAdxHEzh.mjs +0 -1
@@ -1,3 +1,5 @@
1
+ import { i as searchWithoutActionKey } from "../action-key-XZ9HkWAO.mjs";
2
+ import { t as ISLAND_FRONTMATTER_ID } from "../serialize-YHvlcG3Q.mjs";
1
3
  import { t as interpolateRouteParams } from "../route-url-BjGv_KKY.mjs";
2
4
  import { n as parseCacheFor, t as PrefetchCache } from "../prefetch-Bsc_Pb6c.mjs";
3
5
  import { readUsageLimit } from "@void/edge";
@@ -245,7 +247,27 @@ function createScrollRestoration() {
245
247
  };
246
248
  }
247
249
  //#endregion
250
+ //#region src/pages/url.ts
251
+ function isSameOrigin(url, origin) {
252
+ if (url.protocol === "capacitor:") {
253
+ const current = new URL(origin);
254
+ return current.protocol === "capacitor:" && url.host !== "" && url.host === current.host;
255
+ }
256
+ return url.origin === origin;
257
+ }
258
+ //#endregion
248
259
  //#region src/pages/navigation-engine.ts
260
+ /**
261
+ * The server leaves a named action's key out of the page URL. When the page URL
262
+ * shows that, drop the key from the URL written to history as well.
263
+ */
264
+ function withoutActionKey(fetchUrl, pageUrl) {
265
+ const q = fetchUrl.indexOf("?");
266
+ if (q === -1) return fetchUrl;
267
+ const search = searchWithoutActionKey(fetchUrl.slice(q));
268
+ const pageQ = pageUrl.indexOf("?");
269
+ return search === (pageQ === -1 ? "" : pageUrl.slice(pageQ)) ? fetchUrl.slice(0, q) + search : fetchUrl;
270
+ }
249
271
  const PAGE_DATA_SCRIPT_ID = "__VOID_PAGE_DATA__";
250
272
  const STATIC_PAGE_DATA_PREFIX = "/_void/pages";
251
273
  function isFile(value) {
@@ -351,8 +373,11 @@ async function createPageNavigationEngine(config) {
351
373
  this.groups = {};
352
374
  if (!pageData.deferredKeys) return;
353
375
  for (const [key, group] of Object.entries(pageData.deferredKeys)) {
354
- const ref = adapter.createDeferred();
355
- const value = resolved ? adapter.resolveDeferred(ref, pageData.props[key]) : ref;
376
+ let value = adapter.createDeferred();
377
+ if (resolved) {
378
+ const error = pageData.deferredErrors?.[group];
379
+ value = error === void 0 ? adapter.resolveDeferred(value, pageData.props[key]) : adapter.rejectDeferred(value, error);
380
+ }
356
381
  this.keyRefs[key] = value;
357
382
  this.props[key] = value;
358
383
  (this.groups[group] ??= []).push(key);
@@ -381,16 +406,8 @@ async function createPageNavigationEngine(config) {
381
406
  }
382
407
  resolve(group, data, error) {
383
408
  if (!this.active) return;
384
- if (data !== void 0) {
385
- if (typeof data === "object" && data !== null && !Array.isArray(data)) {
386
- let resolvedAny = false;
387
- for (const [key, value] of Object.entries(data)) if (this.keyRefs[key]) {
388
- this.resolveKey(key, value);
389
- resolvedAny = true;
390
- }
391
- if (!resolvedAny) this.resolveGroup(group, data);
392
- } else this.resolveGroup(group, data);
393
- } else if (error !== void 0) this.rejectGroup(group, typeof error === "string" ? error : String(error));
409
+ if (data !== void 0) this.resolveGroup(group, data);
410
+ else if (error !== void 0) this.rejectGroup(group, typeof error === "string" ? error : String(error));
394
411
  adapter.onDeferredUpdate?.(this.props);
395
412
  }
396
413
  rejectPending(error, notify = true) {
@@ -409,23 +426,23 @@ async function createPageNavigationEngine(config) {
409
426
  }
410
427
  retainOnly(keys, props) {
411
428
  const keyRefs = {};
412
- const groups = {};
413
429
  for (const [key, ref] of Object.entries(this.keyRefs)) if (keys.has(key)) {
414
430
  keyRefs[key] = ref;
415
431
  props[key] = this.props[key];
416
432
  } else if (adapter.isLoading(ref)) adapter.rejectDeferred(ref, "Navigation disposed before deferred props resolved");
417
- for (const [group, groupKeys] of Object.entries(this.groups)) {
418
- const preservedGroupKeys = groupKeys.filter((key) => keys.has(key));
419
- if (preservedGroupKeys.length > 0) groups[group] = preservedGroupKeys;
420
- }
421
433
  this.props = props;
422
434
  this.keyRefs = keyRefs;
423
- this.groups = groups;
424
435
  adapter.onDeferredUpdate?.(this.props);
425
436
  }
437
+ /** A one-key group takes the raw value; a larger group takes each key from the object. */
426
438
  resolveGroup(group, data) {
427
439
  const keys = this.groups[group] ?? (this.keyRefs[group] ? [group] : []);
428
- for (const key of keys) this.resolveKey(key, data);
440
+ if (keys.length === 1) {
441
+ this.resolveKey(keys[0], data);
442
+ return;
443
+ }
444
+ const values = typeof data === "object" && data !== null ? data : {};
445
+ for (const key of keys) this.resolveKey(key, values[key]);
429
446
  }
430
447
  resolveKey(key, value) {
431
448
  const ref = this.keyRefs[key];
@@ -541,8 +558,8 @@ async function createPageNavigationEngine(config) {
541
558
  }
542
559
  async function loadNavigationShell(id, url, fetchUrl, method, options, signal, commitTarget, deferredRegistry) {
543
560
  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) {
561
+ if (target.protocol !== "http:" && target.protocol !== "https:" && target.protocol !== "capacitor:") throw new Error(`Void Router: refusing to navigate to a ${target.protocol} URL.`);
562
+ if (!isSameOrigin(target, window.location.origin)) {
546
563
  if (method !== "GET") throw new Error("Void Router: non-GET visits must target the current origin.");
547
564
  window.location.href = url;
548
565
  return;
@@ -596,7 +613,7 @@ async function createPageNavigationEngine(config) {
596
613
  }
597
614
  if (response?.redirected) {
598
615
  const redirectUrl = new URL(response.url, window.location.origin);
599
- if (redirectUrl.origin !== window.location.origin) {
616
+ if (!isSameOrigin(redirectUrl, window.location.origin)) {
600
617
  window.location.href = method === "GET" ? url : response.url;
601
618
  return;
602
619
  }
@@ -672,7 +689,10 @@ async function createPageNavigationEngine(config) {
672
689
  if (CACHE_VISITED_PAGE_DATA && method === "GET" && response?.ok && response.headers.get("X-VoidPages") && pageData?.component === matchRoute(fetchUrl) && !pageData.deferredKeys) _prefetchCache.set(fetchUrl, method, Promise.resolve(clonePageData(pageData)), PREFETCH_DEFAULT_CACHE_FOR);
673
690
  }
674
691
  if (!pageData) throw new Error("pages: Missing page payload.");
675
- if (method !== "GET") deferredRegistry.preserveValuesFrom(_committedDeferredRegistry, pageData);
692
+ if (method !== "GET") {
693
+ deferredRegistry.preserveValuesFrom(_committedDeferredRegistry, pageData);
694
+ commitTarget.fetchUrl = withoutActionKey(fetchUrl, pageData.url);
695
+ }
676
696
  const [component, layouts] = await Promise.race([Promise.all([resolveComponent(pageData.component), resolveLayouts(pageData.component)]), abortSignalPromise(signal)]);
677
697
  if (id !== _nextNavigationId && signal.aborted) throw abortError();
678
698
  return {
@@ -960,7 +980,7 @@ function toUrl(value) {
960
980
  function normalizeUrl(value) {
961
981
  if (typeof value === "string" && value.startsWith("#")) return value;
962
982
  const url = toUrl(value);
963
- return url.origin === getUrlOrigin() ? url.pathname + url.search + url.hash : url.href;
983
+ return isSameOrigin(url, getUrlOrigin()) ? url.pathname + url.search + url.hash : url.href;
964
984
  }
965
985
  function navigationMethod(method) {
966
986
  const normalized = method.toUpperCase();
@@ -1206,12 +1226,15 @@ function scheduleHydration(el, loader, props, strategy, hydrateFn) {
1206
1226
  }
1207
1227
  }
1208
1228
  function initIslands(islands, hydrateFn) {
1229
+ const frontmatterText = document.getElementById(ISLAND_FRONTMATTER_ID)?.textContent;
1230
+ const frontmatter = frontmatterText ? JSON.parse(frontmatterText) : {};
1231
+ const hydrate = (el, mod, props) => hydrateFn(el, mod, props, frontmatter);
1209
1232
  document.querySelectorAll("[data-island]").forEach((el) => {
1210
1233
  const id = el.getAttribute("data-island");
1211
1234
  const props = JSON.parse(el.getAttribute("data-props") || "{}");
1212
1235
  const strategy = el.getAttribute("data-hydrate") || "load";
1213
1236
  const loader = islands[id];
1214
- if (loader) scheduleHydration(el, loader, props, strategy, hydrateFn);
1237
+ if (loader) scheduleHydration(el, loader, props, strategy, hydrate);
1215
1238
  });
1216
1239
  }
1217
1240
  //#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
- import "../config-7qoq2p9v.mjs";
2
+ import "../config-DQfHOKh9.mjs";
3
3
  import { i as PageDefinition, n as LayoutDefinition, o as PageScanResult, r as NamedLayoutDefinition } from "../types-7AIz0OZu.mjs";
4
- import { t as serializePageData } from "../serialize-CfSwWfF2.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
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";
3
+ import { p as readConfig } from "../config-DHgSEWT7.mjs";
4
+ import { a as resolveNamedLayout, i as resolveLayoutIds, n as resolveEffectiveLayoutChain, o as toLayoutId, r as resolveLayoutChain, t as scanPages } from "../scan-8IzYXiU_.mjs";
5
+ import { r as parseRedirectsFile } from "../headers-D522zd0A.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
1
  import { o as PageScanResult } from "../types-7AIz0OZu.mjs";
2
- import { ResolvedConfig, ViteDevServer } from "vite";
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-D2-FcLHs.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-8IzYXiU_.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
@@ -116,6 +187,7 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
116
187
  const mod = env.moduleGraph.getModuleById("\0virtual:void-islands-renderer");
117
188
  if (mod) env.moduleGraph.invalidateModule(mod);
118
189
  }
190
+ }, () => {}).finally(() => {
119
191
  pending = null;
120
192
  });
121
193
  }, 50);
@@ -128,4 +200,4 @@ function watchPagesForRescan(server, pagesDir, root, onRescan) {
128
200
  return { flush: () => pending ?? Promise.resolve() };
129
201
  }
130
202
  //#endregion
131
- export { ISLANDS_CLIENT_ENTRY_ID, ISLANDS_RENDERER_ID, computePagesNeedingClientJS, editIslandSource, extractCssImports, findIslandImports, findStaticCssImports, needsIslandClientBundle, resolveSpecifier, rewriteCssImportForVirtualModule, watchPagesForRescan };
203
+ 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-B8sI8dRD.mjs";
1
+ import { w as ValidationError } from "../handler-BbkSPzGF.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet, n as PageRenderResult, o as safeJsonStringify, r as flattenValidationErrors, t as PageObject } from "../protocol-BBDpJz3G.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-DimNxVRr.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";
@@ -1,37 +1,3 @@
1
- import { n as isIdentifier } from "./ast-CPGPjb0V.mjs";
2
- import { parseSync } from "vite";
3
- //#region src/shared/static-exports.ts
4
- /** Read the initializer of directly exported constants without evaluating user code. */
5
- function staticExportInitializers(filename, source, names) {
6
- const result = /* @__PURE__ */ new Map();
7
- const program = parseSync(filename, source).program;
8
- for (const statement of program.body ?? []) {
9
- if (statement.type !== "ExportNamedDeclaration") continue;
10
- const declaration = statement.declaration;
11
- if (declaration?.type !== "VariableDeclaration" || declaration.kind !== "const") continue;
12
- for (const variable of declaration.declarations ?? []) if (isIdentifier(variable.id) && names.has(variable.id.name) && variable.init) result.set(variable.id.name, variable.init);
13
- }
14
- return result;
15
- }
16
- function unwrapStaticExpression(node) {
17
- while (node && [
18
- "ParenthesizedExpression",
19
- "TSAsExpression",
20
- "TSSatisfiesExpression",
21
- "TSTypeAssertion"
22
- ].includes(node.type)) node = node.expression;
23
- return node;
24
- }
25
- function staticLiteral(node) {
26
- node = unwrapStaticExpression(node);
27
- if (node?.type === "Literal") return node.value;
28
- if (node?.type === "TemplateLiteral") {
29
- const expressions = node.expressions;
30
- const quasis = node.quasis;
31
- if (expressions?.length === 0 && quasis?.length === 1) return quasis[0]?.value?.cooked;
32
- }
33
- }
34
- //#endregion
35
1
  //#region src/router/parse-filename.ts
36
2
  const EXTENSIONS = [
37
3
  ".ts",
@@ -108,4 +74,4 @@ function isRouteEnabledForEnvironment(route, environment) {
108
74
  return environment === void 0 || route.env === null || route.env === environment;
109
75
  }
110
76
  //#endregion
111
- export { staticLiteral as a, staticExportInitializers as i, parseRouteFilename as n, unwrapStaticExpression as o, parseWebSocketFilename as r, isRouteEnabledForEnvironment as t };
77
+ export { parseRouteFilename as n, parseWebSocketFilename as r, isRouteEnabledForEnvironment as t };
@@ -1,4 +1,4 @@
1
- import { t as __commonJSMin } from "./rolldown-runtime-DXIUcv95.mjs";
1
+ import { t as __commonJSMin } from "./rolldown-runtime-3h0WiCiA.mjs";
2
2
  //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
3
3
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
4
4
  let p = process || {};
@@ -257,6 +257,7 @@ function parseLifecycleSelector(rest, subcommand) {
257
257
  let fromRuntime = "";
258
258
  let authConfig;
259
259
  let dashboardUrl;
260
+ let customDomains = false;
260
261
  for (let index = 0; index < rest.length; index++) {
261
262
  const arg = rest[index];
262
263
  if (arg === "--runtime") {
@@ -268,7 +269,8 @@ function parseLifecycleSelector(rest, subcommand) {
268
269
  const [value, next] = readValue(rest, index, arg);
269
270
  dashboardUrl = normalizePlatformDashboardUrl(value);
270
271
  index = next;
271
- } else if (arg === "--auth-config" && subcommand === "repair") {
272
+ } else if (arg === "--custom-domains" && (subcommand === "upgrade" || subcommand === "repair")) customDomains = true;
273
+ else if (arg === "--auth-config" && subcommand === "repair") {
272
274
  const [value, next] = readValue(rest, index, arg);
273
275
  authConfig = value;
274
276
  index = next;
@@ -285,7 +287,8 @@ function parseLifecycleSelector(rest, subcommand) {
285
287
  runtime,
286
288
  fromRuntime,
287
289
  ...authConfig !== void 0 ? { authConfig } : {},
288
- ...dashboardUrl !== void 0 ? { dashboardUrl } : {}
290
+ ...dashboardUrl !== void 0 ? { dashboardUrl } : {},
291
+ ...customDomains ? { customDomains: true } : {}
289
292
  };
290
293
  }
291
294
  function parsePlatformArgs(args) {
@@ -378,7 +381,7 @@ function parsePlatformArgs(args) {
378
381
  };
379
382
  }
380
383
  if (subcommand === "upgrade" || subcommand === "rollback" || subcommand === "repair" || subcommand === "disable" || subcommand === "enable") {
381
- const { selector, plan, runtime, fromRuntime, yes, authConfig, dashboardUrl } = parseLifecycleSelector(rest, subcommand);
384
+ const { selector, plan, runtime, fromRuntime, yes, authConfig, dashboardUrl, customDomains } = parseLifecycleSelector(rest, subcommand);
382
385
  return subcommand === "rollback" ? {
383
386
  subcommand,
384
387
  selector,
@@ -393,7 +396,8 @@ function parsePlatformArgs(args) {
393
396
  runtime,
394
397
  yes,
395
398
  ...authConfig !== void 0 ? { authConfig } : {},
396
- ...dashboardUrl !== void 0 ? { dashboardUrl } : {}
399
+ ...dashboardUrl !== void 0 ? { dashboardUrl } : {},
400
+ ...customDomains ? { customDomains } : {}
397
401
  };
398
402
  }
399
403
  if (subcommand === "uninstall") {
@@ -435,6 +439,7 @@ function parsePlatformArgs(args) {
435
439
  "--zone"
436
440
  ]);
437
441
  let workersDev = false;
442
+ let customDomains = false;
438
443
  for (let i = 0; i < rest.length; i++) {
439
444
  const arg = rest[i];
440
445
  if (valueFlags.has(arg)) {
@@ -452,6 +457,7 @@ function parsePlatformArgs(args) {
452
457
  accessProtection = enabled;
453
458
  } else if (arg === "--yes") yes = true;
454
459
  else if (arg === "--workers-dev") workersDev = true;
460
+ else if (arg === "--custom-domains") customDomains = true;
455
461
  else throw new Error(`platform: Unexpected argument '${arg}'.`);
456
462
  }
457
463
  if (noControlPlaneDomain && values.has("--control-plane-domain")) throw new Error("platform: Choose either --control-plane-domain or --no-control-plane-domain.");
@@ -466,10 +472,12 @@ function parsePlatformArgs(args) {
466
472
  const loginMethods = values.get("--login-methods")?.split(",");
467
473
  if (loginMethods && loginMethods.some((method) => !PLATFORM_LOGIN_KINDS.includes(method))) throw new Error("platform: --login-methods accepts github, google, oidc, and cloudflare-access.");
468
474
  if (workersDev && (values.has("--application-domain") || values.has("--zone") || dedicatedZone)) throw new Error("platform: --workers-dev cannot be combined with a domain, zone, or --dedicated-zone.");
475
+ if (customDomains && (workersDev || noDedicatedZone)) throw new Error("platform: --custom-domains needs a dedicated application zone; it cannot be combined with --workers-dev or --no-dedicated-zone.");
469
476
  return {
470
477
  subcommand,
471
478
  ...noControlPlaneDomain ? { noControlPlaneDomain: true } : {},
472
479
  ...noDedicatedZone ? { dedicatedZoneSpecified: true } : {},
480
+ ...customDomains ? { customDomains: true } : {},
473
481
  ...values.has("--hyperdrive") ? { hyperdrive: values.get("--hyperdrive") } : {},
474
482
  ...loginMethods ? { loginMethods: [...new Set(loginMethods)] } : {},
475
483
  ...accessProtection !== void 0 ? { accessProtection } : {},
@@ -0,0 +1 @@
1
+ export { t as parsePlatformArgs } from "./platform-args-DVbVClZl.mjs";
@@ -1,10 +1,10 @@
1
1
  import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
2
- import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-BVdsO7Py.mjs";
3
- import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
2
+ import { A as confirm, K as select, U as password, X as text, z as multiselect } from "./dist-Cor9XGoz.mjs";
3
+ import { l as formatUrl, m as printSuccess } from "./output-BpgYODYx.mjs";
4
4
  import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
5
5
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
6
- import { i as humanLines } from "./operator-cmd-CA5QQyvE.mjs";
7
- import { o as platformPromptAnswer } from "./platform-setup-YvN9VQXV.mjs";
6
+ import { i as humanLines } from "./operator-cmd-skshjMGl.mjs";
7
+ import { o as platformPromptAnswer } from "./platform-setup-Ca53gtt0.mjs";
8
8
  import { parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration } from "@void/platform";
9
9
  import { stripVTControlCharacters } from "node:util";
10
10
  import { setTimeout } from "node:timers/promises";
@@ -142,11 +142,11 @@ async function configurationInput(args, existing) {
142
142
  }
143
143
  async function runPlatformAuthConfig(args) {
144
144
  if (args.action === "recover") {
145
- const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-B0BV2hfV.mjs");
145
+ const { runPlatformAuthRecovery } = await import("./platform-auth-recovery-DXVWs-wA.mjs");
146
146
  return runPlatformAuthRecovery(args);
147
147
  }
148
148
  if (args.action === "protection") {
149
- const { runPlatformProtectionConfig } = await import("./platform-auth-protection-U9HCqoXv.mjs");
149
+ const { runPlatformProtectionConfig } = await import("./platform-auth-protection-SHhvim1L.mjs");
150
150
  return runPlatformProtectionConfig(args);
151
151
  }
152
152
  const origin = resolveOperatorOrigin(args.connection);
@@ -1,12 +1,12 @@
1
1
  import { S as writePendingInstallationSecrets, c as normalizePlatformApiUrl, m as readInstallationRecoverySecrets, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { t as cfAccessHeaders } from "./cf-access-BM9G0lhO.mjs";
3
3
  import { t as ensurePlatformAccessToken } from "./cf-access-CWP4avfP.mjs";
4
- import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
5
- import { m as printSuccess } from "./output-Ba6ZbrzY.mjs";
4
+ import { A as confirm, tt as isCancel } from "./dist-Cor9XGoz.mjs";
5
+ import { m as printSuccess } from "./output-BpgYODYx.mjs";
6
6
  import { n as OperatorClient } from "./operator-client-C-ROjk1I.mjs";
7
7
  import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-Cr2zCc-J.mjs";
8
- import { G as PlatformCloudflareClient, H as parsePlatformAccessSetupSpec, R as resolvePlatformCloudflareCredential, U as preparePlatformAccessSetup, V as checkpointPlatformAccessResources, n as resolvePlatformInstallDatabaseUrl, u as acquirePlatformDatabaseLifecycleLock } from "./platform-lifecycle-D0TdyXbN.mjs";
9
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-CnXhgxTM.mjs";
8
+ import { G as checkpointPlatformAccessResources, H as resolvePlatformCloudflareCredential, K as parsePlatformAccessSetupSpec, Y as PlatformCloudflareClient, m as acquirePlatformDatabaseLifecycleLock, n as resolvePlatformInstallDatabaseUrl, q as preparePlatformAccessSetup } from "./platform-lifecycle-DyKmuNY6.mjs";
9
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management--vDwSn35.mjs";
10
10
  import { parsePlatformAccessProtection, platformProtectionProofMessage } from "@void/platform";
11
11
  import { createHmac } from "node:crypto";
12
12
  import { readFile } from "node:fs/promises";
@@ -1,10 +1,10 @@
1
1
  import { m as readInstallationRecoverySecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest } from "./platform-registry-B9mWX9LO.mjs";
2
2
  import { u as openBrowser } from "./auth-B6iOCjKI.mjs";
3
- import { A as confirm, tt as isCancel } from "./dist-BVdsO7Py.mjs";
4
- import { l as formatUrl, m as printSuccess } from "./output-Ba6ZbrzY.mjs";
3
+ import { A as confirm, tt as isCancel } from "./dist-Cor9XGoz.mjs";
4
+ import { l as formatUrl, m as printSuccess } from "./output-BpgYODYx.mjs";
5
5
  import { a as resolveOperatorOrigin } from "./operator-auth-Cr2zCc-J.mjs";
6
- import { G as PlatformCloudflareClient, R as resolvePlatformCloudflareCredential, d as acquirePlatformDatabaseLifecycleLockConnection, f as platformDatabaseClientUrl, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-D0TdyXbN.mjs";
7
- import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management-CnXhgxTM.mjs";
6
+ import { H as resolvePlatformCloudflareCredential, Y as PlatformCloudflareClient, g as platformDatabaseClientUrl, h as acquirePlatformDatabaseLifecycleLockConnection, n as resolvePlatformInstallDatabaseUrl } from "./platform-lifecycle-DyKmuNY6.mjs";
7
+ import { d as verifyPlatformInstallationOwnership, l as selectAuthoritativePlatformManifest } from "./platform-management--vDwSn35.mjs";
8
8
  import { parsePlatformAccessProtection, parsePlatformAdmissionPolicy, parsePlatformLoginConfiguration, platformAuthenticationRecoveryMessage, validatePlatformAdmissionPolicy } from "@void/platform";
9
9
  import { createCipheriv, createDecipheriv, createHash, createHmac, hkdfSync, randomBytes, randomUUID } from "node:crypto";
10
10
  import { setTimeout } from "node:timers/promises";