void 1.8.0 → 1.9.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 (222) hide show
  1. package/dist/{account-cmd-CZKntRH2.mjs → account-cmd-BEMOdwtl.mjs} +3 -3
  2. package/dist/{application-analysis-CyTagJQM.mjs → application-analysis-3VVsflWZ.mjs} +5 -5
  3. package/dist/{application-routing-BLrMVpqi.mjs → application-routing-CJRlXCc2.mjs} +1 -1
  4. package/dist/{auth-Bk9VGtQW.d.mts → auth-CV9kXHKe.d.mts} +3 -1
  5. package/dist/{auth-DyWp-fSo.mjs → auth-aMuFOZeI.mjs} +8 -2
  6. package/dist/{auth-link-BOaQWMKw.mjs → auth-link-B1IynRW5.mjs} +3 -3
  7. package/dist/{auth-router-D0-VcmDs.mjs → auth-router-DVaWJdRB.mjs} +2 -2
  8. package/dist/{better-auth-shared-CdVyCUou.mjs → better-auth-shared-C7LHvF4L.mjs} +1 -1
  9. package/dist/{better-auth-shared-CQFdtguU.d.mts → better-auth-shared-ajs3LNrY.d.mts} +1 -1
  10. package/dist/{build-cmd-JTsXXf2F.mjs → build-cmd-Dq8tdqQG.mjs} +1 -1
  11. package/dist/{cache-D0m3Z_Xf.mjs → cache-DGMnskX7.mjs} +1 -1
  12. package/dist/{cancel-deploy-Ce6Os4fa.mjs → cancel-deploy-96S5hD1E.mjs} +1 -1
  13. package/dist/cli/cli.mjs +1 -1
  14. package/dist/cli/env-schema-probe.mjs +3 -3
  15. package/dist/{cli-main-rkrJy2Ge.mjs → cli-main-CQRLxZAu.mjs} +28 -28
  16. package/dist/client-66c0RLDM.mjs +1 -0
  17. package/dist/{client-SZPyj4X_.mjs → client-D6w5x7hM.mjs} +7 -7
  18. package/dist/{cloudflare-auth-7jTqy9Bx.mjs → cloudflare-auth-pNvmT6kL.mjs} +1 -1
  19. package/dist/{cloudflare-cmd-ChPLQcTP.mjs → cloudflare-cmd-BuuHUM4z.mjs} +3 -3
  20. package/dist/{cloudflare-config-DtOGAbeB.mjs → cloudflare-config-PxbinLLE.mjs} +2 -2
  21. package/dist/{cloudflare-connect-Co93VYTo.mjs → cloudflare-connect-D1QOosLd.mjs} +2 -2
  22. package/dist/{cloudflare-operations-CXaDKYj2.mjs → cloudflare-operations-G5AObYzF.mjs} +5 -5
  23. package/dist/{cloudflare-operations-DATekLwI.mjs → cloudflare-operations-I4t3mt4R.mjs} +1 -1
  24. package/dist/{cloudflare-process-DmTxZR-N.mjs → cloudflare-process-wcnaQ5JG.mjs} +2 -2
  25. package/dist/{config-wo2EaH0X.mjs → config-C1DPf8EK.mjs} +1 -1
  26. package/dist/{config-CTlUaXWZ.d.mts → config-CCWVY7DY.d.mts} +1 -1
  27. package/dist/{config-5oSQhZNj.mjs → config-CzFdJYNA.mjs} +1 -1
  28. package/dist/{config-DcqUBGCb.mjs → config-DlWQ_hIJ.mjs} +3 -3
  29. package/dist/{config-eeDzKBS9.mjs → config-Do7gJI3T.mjs} +2 -2
  30. package/dist/config-entry.d.mts +1 -1
  31. package/dist/{connect-DlvXt1JR.mjs → connect-4uImOwut.mjs} +4 -4
  32. package/dist/{create-project-CC_7hmYJ.mjs → create-project-BaUzZnLZ.mjs} +1 -1
  33. package/dist/{create-project-DzY05xqC.mjs → create-project-CQMyzTvK.mjs} +1 -1
  34. package/dist/{db-FhyYGcJJ.mjs → db-DEpDeDsi.mjs} +19 -19
  35. package/dist/{db-types-sVwEpyPR.mjs → db-types-BpPYAx0B.mjs} +1 -1
  36. package/dist/{delete-CModjyOC.mjs → delete-BVD2kI82.mjs} +1 -1
  37. package/dist/deploy-Dr_Qamzw.mjs +2 -0
  38. package/dist/{deploy-Cz9TEzZy.mjs → deploy-Dyeo5soA.mjs} +24 -75
  39. package/dist/{deploy-managed-static-DlxxXkAM.mjs → deploy-managed-static-Kn73R83A.mjs} +20 -20
  40. package/dist/{deploy-transport-DUvm6-CR.mjs → deploy-transport-BpKBs_KR.mjs} +2 -2
  41. package/dist/deploy.mjs +6 -6
  42. package/dist/discover-Diq0l6TZ.mjs +1 -0
  43. package/dist/{discover-CVFCWU7W.mjs → discover-Vd18lHsj.mjs} +1 -1
  44. package/dist/{dispatch-CCiaAnSK.mjs → dispatch-BBfb519j.mjs} +5 -5
  45. package/dist/{domain-DvdZPA50.mjs → domain-BTIdyUVk.mjs} +2 -2
  46. package/dist/{email-ASpNrfLd.mjs → email-DvrS-I0U.mjs} +7 -7
  47. package/dist/{email-cloudflare-kqoN9jst.mjs → email-cloudflare-DAGpgzY1.mjs} +3 -3
  48. package/dist/{entry-BweGTCgj.mjs → entry-DMgR7XOf.mjs} +1 -1
  49. package/dist/{env-Bpkg3G5i.mjs → env-D7vORwpn.mjs} +4 -4
  50. package/dist/{env-types-Dz9qkiOn.mjs → env-types-WEZw5D-r.mjs} +1 -1
  51. package/dist/{env-validation-CN386Utu.mjs → env-validation-DKDcpxbt.mjs} +1 -1
  52. package/dist/{env-validation-BpCCQE_6.mjs → env-validation-DeYNRp1d.mjs} +3 -3
  53. package/dist/{gen-upKJChvd.mjs → gen-DimkGNve.mjs} +4 -4
  54. package/dist/gen-DmEeVEs4.mjs +1 -0
  55. package/dist/{github-cmd-BvMOlb8Z.mjs → github-cmd-D-zs6VQr.mjs} +1 -1
  56. package/dist/{handler-BO7Od-z9.d.mts → handler-6fzr_ikp.d.mts} +3 -3
  57. package/dist/{head-MeF_5M_3.d.mts → head-CVO92KEx.d.mts} +14 -3
  58. package/dist/{head-5XPcnG-j.mjs → head-CWJhfUwV.mjs} +62 -3
  59. package/dist/{headers-COGEDoMN.mjs → headers-Q0kZDpk8.mjs} +1 -1
  60. package/dist/{help-TPCjTu6e.mjs → help-Cgdcd-SG.mjs} +4 -4
  61. package/dist/help-Cp3K5m1w.mjs +1 -0
  62. package/dist/index.d.mts +4 -4
  63. package/dist/index.mjs +23 -23
  64. package/dist/{info-EsDyihwf.mjs → info-BbxQ34kk.mjs} +4 -4
  65. package/dist/{init-a4lVagrb.mjs → init-zyRj3QRw.mjs} +14 -14
  66. package/dist/{link-CE55DDzS.mjs → link-DAFXuIER.mjs} +2 -2
  67. package/dist/{list-CxRthQks.mjs → list-BTIcC3W9.mjs} +2 -2
  68. package/dist/{live-Kc55iuOQ.d.mts → live-DBybyDt0.d.mts} +2 -2
  69. package/dist/{live-CYJ4KGoR.mjs → live-Dw7NF1t2.mjs} +1 -1
  70. package/dist/load-user-env-ztmIyiLx.mjs +34 -0
  71. package/dist/{local-d1-CFcH9Bx3.mjs → local-d1-BnVb7Fem.mjs} +1 -1
  72. package/dist/login-DBs8JuSl.mjs +1 -0
  73. package/dist/{login-AfcSGSmE.mjs → login-DOE-MkeK.mjs} +2 -2
  74. package/dist/{logs-BgRJuvb1.mjs → logs-CUsjihc3.mjs} +2 -2
  75. package/dist/migrate-BYhoIK9R.mjs +1 -0
  76. package/dist/{migrate-BNAh6m_C.mjs → migrate-DtoKdGas.mjs} +4 -4
  77. package/dist/nitro.mjs +3 -3
  78. package/dist/{node-CXFUw0Uz.mjs → node-D9dPyUr0.mjs} +2 -2
  79. package/dist/operator-ai-logging-DFTEp81Z.mjs +121 -0
  80. package/dist/{operator-args-DGTuCdSE.mjs → operator-args-BCCohcz3.mjs} +3 -2
  81. package/dist/{operator-cmd-C-viB7Si.mjs → operator-cmd-CQOQrUiO.mjs} +26 -6
  82. package/dist/operator-cmd-xCACDtT1.mjs +1 -0
  83. package/dist/pages/client.d.mts +1 -1
  84. package/dist/pages/client.mjs +15 -13
  85. package/dist/pages/head.d.mts +2 -2
  86. package/dist/pages/head.mjs +1 -1
  87. package/dist/pages/index.d.mts +2 -2
  88. package/dist/pages/index.mjs +5 -5
  89. package/dist/pages/islands-plugin.d.mts +5 -1
  90. package/dist/pages/islands-plugin.mjs +6 -2
  91. package/dist/pages/protocol.d.mts +2 -2
  92. package/dist/pages/protocol.mjs +1 -1
  93. package/dist/platform-args-DSi4_M8n.mjs +1 -0
  94. package/dist/{platform-args-CiYeZmc5.mjs → platform-args-DtpHS_75.mjs} +1 -1
  95. package/dist/{platform-auth-config-Dt2qEc2w.mjs → platform-auth-config-fLwIS5VG.mjs} +3 -3
  96. package/dist/{platform-auth-protection-B7TaF-PZ.mjs → platform-auth-protection-BTRI_YwD.mjs} +2 -2
  97. package/dist/{platform-auth-recovery-suXSteJ6.mjs → platform-auth-recovery-DPK2Mvmo.mjs} +2 -2
  98. package/dist/{platform-cmd-DuAsIxbU.mjs → platform-cmd-BLy5uCa-.mjs} +1 -1
  99. package/dist/{platform-cmd-9rvYBBtr.mjs → platform-cmd-HS_FSthn.mjs} +5 -5
  100. package/dist/{platform-domain-DhH_vDr6.mjs → platform-domain-CHpcq_qg.mjs} +2 -2
  101. package/dist/{platform-lifecycle-3uI-E2bF.mjs → platform-lifecycle-B6LUBwjS.mjs} +1 -1
  102. package/dist/{platform-lifecycle-CXmXe2xt.mjs → platform-lifecycle-D2RS7DE0.mjs} +236 -26
  103. package/dist/{platform-management-PdrgDQTe.mjs → platform-management-C-T0ch4y.mjs} +1 -1
  104. package/dist/{platform-management-BBCHfwji.mjs → platform-management-d3ETv3Dw.mjs} +14 -14
  105. package/dist/{platform-plans-config-BGwkXYDM.mjs → platform-plans-config-B7yJQKf7.mjs} +114 -30
  106. package/dist/{platform-recovery-C8NxXGRR.mjs → platform-recovery-DS5CAsly.mjs} +2 -2
  107. package/dist/{plugin-inference-CErfTgEx.mjs → plugin-inference-DZHmVe1f.mjs} +3 -3
  108. package/dist/{prepare-BDKWZgfL.mjs → prepare-AVM4Hj3T.mjs} +8 -8
  109. package/dist/prepare-BSXKz6m8.mjs +1 -0
  110. package/dist/{prepare-BLrzXjIl.mjs → prepare-DMk8NAO-.mjs} +1 -1
  111. package/dist/{project-cmd-DzGvxXKH.mjs → project-cmd-TQKAOTMV.mjs} +15 -15
  112. package/dist/{project-paths-G0yut6Zz.mjs → project-paths-CUhCPMpK.mjs} +33 -2
  113. package/dist/{project-team-C5XtHbZk.mjs → project-team-B1OKeb-T.mjs} +1 -1
  114. package/dist/{project-token-B4D5yhHQ.mjs → project-token-RW_wpmN-.mjs} +1 -1
  115. package/dist/{project-tsconfig-nhnTWO_Y.mjs → project-tsconfig-MyRJgufB.mjs} +1 -1
  116. package/dist/{project-zero-trust--0LvktDg.mjs → project-zero-trust-TNc66p0_.mjs} +1 -1
  117. package/dist/{protocol-B1Tvc9-x.mjs → protocol-IPSWHolJ.mjs} +54 -19
  118. package/dist/{protocol-Cg2I81NA.d.mts → protocol-YS3tbxWE.d.mts} +2 -2
  119. package/dist/{provision-CAcrauvr.mjs → provision-BLdkpFT4.mjs} +1 -1
  120. package/dist/{provision-C3yiHdld.mjs → provision-bgQTi5QZ.mjs} +2 -2
  121. package/dist/redirect-Dqb4fEc5.mjs +80 -0
  122. package/dist/{requests-CrRiTgQA.mjs → requests-Cj15-yrI.mjs} +1 -1
  123. package/dist/{rollback-BsmQyj-Q.mjs → rollback-CYnkng7B.mjs} +2 -2
  124. package/dist/{route-types-CgtlFCDz.mjs → route-types-C6eAOmOj.mjs} +1 -1
  125. package/dist/runtime/auth.d.mts +1 -1
  126. package/dist/runtime/auth.mjs +1 -1
  127. package/dist/runtime/better-auth-mysql.d.mts +1 -1
  128. package/dist/runtime/better-auth-mysql.mjs +1 -1
  129. package/dist/runtime/better-auth-pg.d.mts +1 -1
  130. package/dist/runtime/better-auth-pg.mjs +1 -1
  131. package/dist/runtime/better-auth.d.mts +1 -1
  132. package/dist/runtime/better-auth.mjs +1 -1
  133. package/dist/runtime/client-react.d.mts +1 -1
  134. package/dist/runtime/client-solid.d.mts +1 -1
  135. package/dist/runtime/client-svelte.d.mts +1 -1
  136. package/dist/runtime/client-vue.d.mts +1 -1
  137. package/dist/runtime/client.d.mts +1 -1
  138. package/dist/runtime/handler.d.mts +1 -1
  139. package/dist/runtime/live-client.d.mts +1 -1
  140. package/dist/runtime/live-server.mjs +1 -1
  141. package/dist/runtime/live.d.mts +1 -1
  142. package/dist/runtime/live.mjs +1 -1
  143. package/dist/runtime/routing.d.mts +2 -2
  144. package/dist/runtime/routing.mjs +6 -5
  145. package/dist/runtime/validator.d.mts +1 -1
  146. package/dist/runtime/ws-server.d.mts +3 -3
  147. package/dist/runtime/ws-server.mjs +1 -1
  148. package/dist/runtime/ws.d.mts +1 -1
  149. package/dist/{scan-BJ3bj6aP.mjs → scan-4YOxDaw2.mjs} +2 -2
  150. package/dist/{secret-D0g5oBsP.mjs → secret-BSf7dgg_.mjs} +3 -3
  151. package/dist/{action-key-ByZ6DDld.mjs → url-DaehRGKR.mjs} +43 -1
  152. package/dist/{version-metadata-eUd6Ar_U.mjs → version-metadata-CeftH0fQ.mjs} +1 -1
  153. package/dist/{wrangler-k40T7XTQ.mjs → wrangler-B1gkT_wC.mjs} +3 -3
  154. package/dist/wrangler-fNGvPTlO.mjs +1 -0
  155. package/dist/{wrapper-CVMZarxf.mjs → wrapper-xJ4LP5A7.mjs} +3 -3
  156. package/dist/{ws--U7QicYy.d.mts → ws-C2zy0QBf.d.mts} +2 -2
  157. package/docs/guide/ai.md +1 -1
  158. package/docs/guide/app-types.md +1 -1
  159. package/docs/guide/auth.md +22 -27
  160. package/docs/guide/database/d1.md +4 -2
  161. package/docs/guide/database.md +29 -27
  162. package/docs/guide/deployment.md +2 -2
  163. package/docs/guide/edge/headers.md +3 -3
  164. package/docs/guide/edge/prerendering.md +5 -5
  165. package/docs/guide/edge/redirects.md +1 -1
  166. package/docs/guide/edge/revalidation.md +4 -2
  167. package/docs/guide/edge/rewrites.md +1 -1
  168. package/docs/guide/edge/static-assets.md +4 -0
  169. package/docs/guide/email/sending.md +4 -2
  170. package/docs/guide/live.md +1 -1
  171. package/docs/guide/pages-routing/actions-and-forms.md +25 -7
  172. package/docs/guide/pages-routing/errors.md +17 -9
  173. package/docs/guide/pages-routing/head.md +44 -1
  174. package/docs/guide/pages-routing/islands.md +3 -1
  175. package/docs/guide/pages-routing/layouts.md +2 -2
  176. package/docs/guide/pages-routing/loaders.md +3 -1
  177. package/docs/guide/pages-routing/markdown.md +5 -3
  178. package/docs/guide/pages-routing/overview.md +14 -21
  179. package/docs/guide/platform/administration/connected-apps.md +10 -3
  180. package/docs/guide/platform/administration/email.md +1 -1
  181. package/docs/guide/platform/administration/plans.md +34 -1
  182. package/docs/guide/platform/administration/projects.md +6 -2
  183. package/docs/guide/platform/installation/credentials.md +12 -10
  184. package/docs/guide/platform/installation/maintenance.md +7 -1
  185. package/docs/guide/platform/installation/setup.md +8 -7
  186. package/docs/guide/queues.md +1 -1
  187. package/docs/guide/server-routing.md +2 -2
  188. package/docs/guide/sse.md +1 -1
  189. package/docs/guide/ssg.md +17 -6
  190. package/docs/guide/storage.md +1 -1
  191. package/docs/guide/testing.md +9 -7
  192. package/docs/guide/type-safety.md +23 -21
  193. package/docs/integrations/cloudflare.md +6 -2
  194. package/docs/integrations/frameworks/nuxt.md +1 -1
  195. package/docs/integrations/hono.md +21 -0
  196. package/docs/integrations/nodejs-bun-deno.md +4 -4
  197. package/docs/reference/api/auth.md +22 -4
  198. package/docs/reference/api/database.md +2 -2
  199. package/docs/reference/api/pages.md +17 -13
  200. package/docs/reference/api/resources.md +1 -1
  201. package/docs/reference/api/rewrites.md +8 -4
  202. package/docs/reference/api.md +1 -1
  203. package/docs/reference/cli/deploy.md +4 -2
  204. package/docs/reference/cli/platform-config.md +3 -3
  205. package/docs/reference/cli/platform-users.md +58 -11
  206. package/docs/reference/cli.md +1 -1
  207. package/docs/reference/config.md +7 -3
  208. package/package.json +7 -7
  209. package/skills/void/SKILL.md +1 -1
  210. package/dist/client-D1Vz1Zep.mjs +0 -1
  211. package/dist/deploy-DMieisRu.mjs +0 -2
  212. package/dist/discover-1DJD4YXD.mjs +0 -1
  213. package/dist/gen-M5fNQKfH.mjs +0 -1
  214. package/dist/help-CItQVDL4.mjs +0 -1
  215. package/dist/load-user-env-CSwdofj0.mjs +0 -48
  216. package/dist/login-ZHsAm-I6.mjs +0 -1
  217. package/dist/migrate-BflbbZQK.mjs +0 -1
  218. package/dist/operator-cmd-D6qNuJ_z.mjs +0 -1
  219. package/dist/platform-args-DJvF1-kl.mjs +0 -1
  220. package/dist/prepare-a1_5usAn.mjs +0 -1
  221. package/dist/url-CuoEn0o3.mjs +0 -43
  222. package/dist/wrangler-R3kMdJfw.mjs +0 -1
@@ -1,22 +1,44 @@
1
1
  import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-uAAjlsiW.mjs";
2
2
  import { n as isConvertedResponse } from "./response-HmNjB30w.mjs";
3
- import { o as searchWithoutActionKey, r as hasActionKey } from "./action-key-ByZ6DDld.mjs";
4
- import { i as resolveHead, n as renderHeadToString, r as renderHtmlAttrs, t as renderBodyAttrs } from "./head-5XPcnG-j.mjs";
3
+ import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DaehRGKR.mjs";
4
+ import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-CWJhfUwV.mjs";
5
5
  import { a as serializePageData, o as escapeScriptJson } from "./serialize-Pf-CIQK_.mjs";
6
6
  import { PAGES_PROTOCOL_VERSION } from "@void/edge";
7
7
  // src/pages/not-found-context.ts
8
+ const loaderNotFound = /* @__PURE__ */ new WeakSet();
8
9
  const loaderBoundaries = /* @__PURE__ */ new WeakSet();
10
+ /** The loader already answered this URL with `c.notFound()`, so assets must not. */
9
11
  function handlesPageLoaderNotFound(c) {
12
+ return loaderNotFound.has(c);
13
+ }
14
+ /** The active loader's not-found boundary renders instead of the fallback. */
15
+ function ownsLoaderNotFoundBoundary(c) {
10
16
  return loaderBoundaries.has(c);
11
17
  }
12
- /** Defer only Void's app fallback while a loader can select its own boundary. */
13
- async function withLoaderNotFoundBoundary(c, load) {
14
- const alreadyHandled = loaderBoundaries.has(c);
15
- loaderBoundaries.add(c);
18
+ /**
19
+ * Record a loader's `c.notFound()` for the rest of the request.
20
+ *
21
+ * Hono resolves `c.notFound()` inside the loader call, so the marker has to be
22
+ * set before the fallback runs. It also has to outlive the loader: the loader
23
+ * returns the fallback's response, which must never be read as page props.
24
+ * Boundary ownership ends with the loader so outer middleware can render the
25
+ * root not-found page after `await next()`.
26
+ */
27
+ async function withLoaderNotFoundDecision(c, ownBoundary, load) {
28
+ const notFound = c.notFound;
29
+ const alreadyOwned = loaderBoundaries.has(c);
30
+ c.notFound = () => {
31
+ if (!loaderNotFound.has(c)) {
32
+ loaderNotFound.add(c);
33
+ if (ownBoundary) loaderBoundaries.add(c);
34
+ }
35
+ return notFound.call(c);
36
+ };
16
37
  try {
17
38
  return await load();
18
39
  } finally {
19
- if (!alreadyHandled) loaderBoundaries.delete(c);
40
+ c.notFound = notFound;
41
+ if (!alreadyOwned) loaderBoundaries.delete(c);
20
42
  }
21
43
  }
22
44
  // src/pages/protocol.ts
@@ -158,8 +180,16 @@ function pageJsonResponse(c, pageObj) {
158
180
  ...POWERED_BY
159
181
  }) });
160
182
  }
161
- function requestPathWithSearch(c) {
162
- return c.req.path + new URL(c.req.url).search;
183
+ /**
184
+ * The URL in the address bar, which a rewrite keeps while it serves another
185
+ * route. The path is decoded like c.req.path.
186
+ */
187
+ function requestPathWithSearch(c, withoutActionKey = false) {
188
+ const original = c.originalUrl?.();
189
+ const requestSearch = new URL(c.req.url).search;
190
+ if (!original) return c.req.path + (withoutActionKey ? searchWithoutActionKey(requestSearch) : requestSearch);
191
+ const search = withoutActionKey && original.search === requestSearch ? searchWithoutActionKey(original.search) : original.search;
192
+ return decodePagePath(original.pathname) + search;
163
193
  }
164
194
  function requestParams(c) {
165
195
  return c.req.param();
@@ -182,12 +212,12 @@ async function extractProps(result) {
182
212
  * 200s (file downloads, streams). JSON 200s are still extracted as props for
183
213
  * backward compat with loaders using c.json().
184
214
  */
185
- async function runLoader(handler, c, render, recover, recoverNotFound = false) {
215
+ async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = false) {
186
216
  if (!handler) return render({});
187
217
  return runPageHandler(handler, c, async (leaf) => {
188
218
  let result;
189
219
  try {
190
- result = recoverNotFound ? await withLoaderNotFoundBoundary(c, () => leaf(c)) : await leaf(c);
220
+ result = await withLoaderNotFoundDecision(c, ownsNotFoundBoundary, () => leaf(c));
191
221
  } catch (error) {
192
222
  const recovered = await recover?.(error);
193
223
  if (recovered) return recovered;
@@ -228,7 +258,7 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
228
258
  const shared = c.get("shared") ?? {};
229
259
  let head;
230
260
  try {
231
- head = resolveHead(configHead, c.get("headDefaults"), void 0);
261
+ head = resolveRequestHead(c, configHead, c.get("headDefaults"), void 0);
232
262
  serializePageData({
233
263
  shared,
234
264
  head
@@ -370,6 +400,14 @@ function asCloudContext(c) {
370
400
  async function handlePageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
371
401
  return runPageGet(handler, headFn, asCloudContext(c), componentId, renderFn, getAssetTags, configHead, options);
372
402
  }
403
+ /**
404
+ * Resolve the head for this request and make the crawler-only tags absolute.
405
+ * A prerender renders on a placeholder origin, so it keeps relative values.
406
+ */
407
+ function resolveRequestHead(c, configHead, middlewareHead, pageHead) {
408
+ const head = resolveHead(configHead, middlewareHead, pageHead);
409
+ return absolutizeHead(head, c.env?.__VOID_PRERENDER === "1" ? void 0 : c.originalUrl?.()?.href ?? c.req.url);
410
+ }
373
411
  async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
374
412
  const renderMode = options?.renderMode ?? "server";
375
413
  if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
@@ -378,8 +416,7 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
378
416
  try {
379
417
  const shared = c.get("shared") ?? {};
380
418
  const pageHead = headFn ? headFn(c, props) : void 0;
381
- const middlewareHead = c.get("headDefaults");
382
- const head = resolveHead(configHead, middlewareHead, pageHead);
419
+ const head = resolveRequestHead(c, configHead, c.get("headDefaults"), pageHead);
383
420
  if (renderMode !== "island") varyPagesResponse(c);
384
421
  const { immediateProps, deferredMap } = separateDeferred(props);
385
422
  const hasDeferred = Object.keys(deferredMap).length > 0;
@@ -473,15 +510,13 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
473
510
  const renderMode = options?.renderMode ?? "server";
474
511
  function buildMutationPageObj(props, errors) {
475
512
  const shared = c.get("shared") ?? {};
476
- const middlewareHead = c.get("headDefaults");
477
- const pageHead = headFn ? headFn(c, props) : void 0;
478
- const head = resolveHead(configHead, middlewareHead, pageHead);
513
+ const head = resolveRequestHead(c, configHead, c.get("headDefaults"), headFn ? headFn(c, props) : void 0);
479
514
  return {
480
515
  component: componentId,
481
516
  props,
482
517
  params: requestParams(c),
483
518
  shared,
484
- url: hasActionKey(c.req.raw) ? c.req.path + searchWithoutActionKey(new URL(c.req.url).search) : requestPathWithSearch(c),
519
+ url: requestPathWithSearch(c, hasActionKey(c.req.raw)),
485
520
  errors,
486
521
  ...head && { head }
487
522
  };
@@ -536,4 +571,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
536
571
  throw e;
537
572
  }
538
573
  }
539
- export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, handlePageMutation as r, flattenValidationErrors as t };
574
+ export { handlesPageLoaderNotFound as a, safeJsonStringify as i, handlePageGet as n, ownsLoaderNotFoundBoundary as o, handlePageMutation as r, flattenValidationErrors as t };
@@ -1,5 +1,5 @@
1
- import { n as CloudBindings, r as CloudContext } from "./handler-BO7Od-z9.mjs";
2
- import { n as HeadDescriptor, t as HeadConfig } from "./head-MeF_5M_3.mjs";
1
+ import { n as CloudBindings, r as CloudContext } from "./handler-6fzr_ikp.mjs";
2
+ import { n as HeadDescriptor, t as HeadConfig } from "./head-CVO92KEx.mjs";
3
3
  import { s as PageRenderMode, t as DevCssAsset } from "./types-IPut3_Yx.mjs";
4
4
  import { Context } from "hono";
5
5
  /** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
@@ -1 +1 @@
1
- export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-C3yiHdld.mjs";
1
+ export { f as isRealD1Id, p as isRealHyperdriveId } from "./provision-bgQTi5QZ.mjs";
@@ -1,8 +1,8 @@
1
1
  import { a as join, c as resolve$2, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
2
  import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
3
3
  import { n as scanWranglerDotenvKeys } from "./dotenv-CEI8hapP.mjs";
4
- import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DmTxZR-N.mjs";
5
- import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-k40T7XTQ.mjs";
4
+ import { l as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-wcnaQ5JG.mjs";
5
+ import { M as writeProvisionedWranglerConfig, _ as persistMaterializedWranglerConfig, s as assertNoDuplicateMembers, y as readProvisionedBindingEntry } from "./wrangler-B1gkT_wC.mjs";
6
6
  import { createRequire } from "node:module";
7
7
  import { closeSync, existsSync, fsyncSync, lstatSync, openSync, readFileSync, readlinkSync, realpathSync, renameSync, unlinkSync, writeSync } from "node:fs";
8
8
  import { isRecord } from "@void/deploy-core";
@@ -0,0 +1,80 @@
1
+ import { n as isSameOrigin } from "./url-DaehRGKR.mjs";
2
+ // src/pages/redirect.ts
3
+ const REDIRECT_HEADER = "X-VoidPages-Redirect";
4
+ const REDIRECT_STATUSES = /* @__PURE__ */ new Set([
5
+ 301,
6
+ 302,
7
+ 303,
8
+ 307,
9
+ 308
10
+ ]);
11
+ /** Opt-in transport: fetch hides redirect Location headers and drops fragments from response.url. */
12
+ function pagesRedirectResponse(request, response) {
13
+ if (!REDIRECT_STATUSES.has(response.status) || !response.headers.has("Location")) return response;
14
+ const headers = new Headers(response.headers);
15
+ headers.append("Vary", REDIRECT_HEADER);
16
+ if (request.headers.get(REDIRECT_HEADER) !== "manual") return new Response(response.body, {
17
+ status: response.status,
18
+ statusText: response.statusText,
19
+ headers
20
+ });
21
+ headers.set(REDIRECT_HEADER, String(response.status));
22
+ headers.set("Cache-Control", "no-store");
23
+ return new Response(response.body, {
24
+ status: 200,
25
+ headers
26
+ });
27
+ }
28
+ /** Follow negotiated redirects with HTTP method rules and origin checks. */
29
+ async function fetchPages(url, options, followGetRedirects = true) {
30
+ const headers = {
31
+ ...options.headers,
32
+ [REDIRECT_HEADER]: "manual"
33
+ };
34
+ const init = {
35
+ ...options,
36
+ headers
37
+ };
38
+ let redirectedTo;
39
+ for (let redirects = 0; redirects <= 20; redirects++) {
40
+ const response = await fetch(url.split("#")[0], init);
41
+ const status = Number(response.headers.get(REDIRECT_HEADER));
42
+ const location = response.headers.get("Location");
43
+ if (response.status !== 200 || !REDIRECT_STATUSES.has(status) || location === null) {
44
+ if (response.redirected) {
45
+ const destination = new URL(response.url);
46
+ const hash = url.indexOf("#");
47
+ if (hash !== -1) destination.hash = url.slice(hash);
48
+ redirectedTo = destination.href;
49
+ }
50
+ return {
51
+ response,
52
+ redirectedTo
53
+ };
54
+ }
55
+ await response.body?.cancel();
56
+ const base = new URL(url, window.location.origin + window.location.pathname + window.location.search);
57
+ const destination = new URL(location, response.url || base.href);
58
+ if (![
59
+ "http:",
60
+ "https:",
61
+ "capacitor:"
62
+ ].includes(destination.protocol)) throw new Error(`Void Pages: refusing to redirect to a ${destination.protocol} URL.`);
63
+ if (!location.includes("#")) destination.hash = base.hash;
64
+ redirectedTo = destination.href;
65
+ const method = (init.method ?? "GET").toUpperCase();
66
+ const get = status === 303 && method !== "GET" && method !== "HEAD" || (status === 301 || status === 302) && method === "POST";
67
+ if (!isSameOrigin(destination, window.location.origin) || !followGetRedirects && (get || method === "GET" || method === "HEAD")) return {
68
+ response,
69
+ redirectedTo
70
+ };
71
+ if (get) {
72
+ for (const name of Object.keys(headers)) if (/^content-(?:type|length|encoding|language|location)$/i.test(name)) delete headers[name];
73
+ init.method = "GET";
74
+ init.body = void 0;
75
+ }
76
+ url = destination.href;
77
+ }
78
+ throw new TypeError("Too many Pages redirects.");
79
+ }
80
+ export { pagesRedirectResponse as n, fetchPages as t };
@@ -1,6 +1,6 @@
1
1
  import { H as outro, L as log } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
3
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { f as import_picocolors, i as dim } from "./output-DNVILSz2.mjs";
5
5
  import { r as readProjectConfig } from "./project-CLwxcEdq.mjs";
6
6
  // src/cli/requests.ts
@@ -1,6 +1,6 @@
1
1
  import { A as confirm, H as outro, K as select, L as log, O as cancel, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
3
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
4
  import { c as formatRelativeTime, i as dim, m as printSuccess, o as formatCount, r as createSpinner } from "./output-DNVILSz2.mjs";
5
5
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
6
6
  // src/cli/rollback.ts
@@ -74,7 +74,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
74
74
  }
75
75
  }
76
76
  async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
77
- const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-DATekLwI.mjs");
77
+ const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-I4t3mt4R.mjs");
78
78
  const context = resolveCloudflareOperationContext(root);
79
79
  const status = await readCloudflareWorkerStatus(context);
80
80
  const deployedVersionIds = new Set(status.deployedVersionIds);
@@ -1,5 +1,5 @@
1
1
  import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { i as writeFileIfChanged } from "./project-tsconfig-nhnTWO_Y.mjs";
2
+ import { i as writeFileIfChanged } from "./project-tsconfig-MyRJgufB.mjs";
3
3
  import { existsSync, rmSync } from "node:fs";
4
4
  // src/codegen/binding-types.ts
5
5
  const bindingTypes = [
@@ -1,2 +1,2 @@
1
- import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-Bk9VGtQW.mjs";
1
+ import { a as InferAuthInstance, c as VoidAuthConfigContext, d as defineAuth, f as getAuth, h as requireAuth, i as AuthUser, l as VoidAuthTypes, m as getUser, n as AuthSession, o as InferAuthSession, p as getSession, r as AuthState, s as VoidAuthConfig, t as AuthInstance, u as authContext } from "../auth-CV9kXHKe.mjs";
2
2
  export { AuthInstance, AuthSession, AuthState, AuthUser, InferAuthInstance, InferAuthSession, VoidAuthConfig, VoidAuthConfigContext, VoidAuthTypes, authContext, defineAuth, getAuth, getSession, getUser, requireAuth };
@@ -1 +1 @@
1
- export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-DyWp-fSo.mjs";
1
+ export { t as authContext, n as defineAuth, r as getAuth, i as getSession, a as getUser, o as requireAuth } from "../auth-aMuFOZeI.mjs";
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
2
2
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
3
3
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
4
4
  export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
@@ -1,5 +1,5 @@
1
1
  import { i as mysqlMigrationRunner, t as applyMySqlAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
2
+ import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
3
3
  // src/runtime/better-auth-mysql.ts
4
4
  async function applyMigrations(env, migrationSchema) {
5
5
  const { createConnection } = await import("mysql2/promise");
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
2
2
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
3
3
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
4
4
  export declare const handleVoidAuthRequest: VoidAuthRuntimeApi["handleVoidAuthRequest"];
@@ -1,5 +1,5 @@
1
1
  import { a as pgMigrationRunner, n as applyPgAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
2
+ import { n as resolveConnectionString, t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
3
3
  import { t as disablePgPassFallback } from "../pg-DoyPxa_X.mjs";
4
4
  // src/runtime/better-auth-pg.ts
5
5
  async function applyMigrations(env, migrationSchema) {
@@ -1,4 +1,4 @@
1
- import { n as VoidAuthRuntimeApi } from "../better-auth-shared-CQFdtguU.mjs";
1
+ import { n as VoidAuthRuntimeApi } from "../better-auth-shared-ajs3LNrY.mjs";
2
2
  export declare const resolveVoidAuthOptions: VoidAuthRuntimeApi["resolveVoidAuthOptions"];
3
3
  export declare const resolveVoidAuthState: VoidAuthRuntimeApi["resolveVoidAuthState"];
4
4
  export declare const runVoidAuthMiddleware: VoidAuthRuntimeApi["runVoidAuthMiddleware"];
@@ -1,5 +1,5 @@
1
1
  import { r as applySqliteAuthMigrations } from "../auth-migrations-DDeifS3v.mjs";
2
- import { t as createVoidAuthRuntime } from "../better-auth-shared-CdVyCUou.mjs";
2
+ import { t as createVoidAuthRuntime } from "../better-auth-shared-C7LHvF4L.mjs";
3
3
  // src/runtime/better-auth.ts
4
4
  async function applyMigrations(env, migrationSchema) {
5
5
  const database = env.DB;
@@ -1,5 +1,5 @@
1
1
  import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
2
  import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  import { n as createAuthClient, t as auth } from "../auth-client-react-DvQLe5Zb.mjs";
4
- import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
2
  import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  import { n as createAuthClient, t as auth } from "../auth-client-solid-P9pEtKGp.mjs";
4
- import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
2
  import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  import { n as createAuthClient, t as auth } from "../auth-client-svelte-B5j8irT6.mjs";
4
- import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
2
  import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  import { n as createAuthClient, t as auth } from "../auth-client-vue-BEiAfavk.mjs";
4
- import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,5 +1,5 @@
1
1
  import { c as FetchError, s as fetch } from "../fetch-CbI6lNnk.mjs";
2
2
  import { t as fetchStream } from "../fetch-stream-DoED9atq.mjs";
3
3
  import { n as createAuthClient, t as auth } from "../auth-client-6-Ft9i9T.mjs";
4
- import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-Bk9VGtQW.mjs";
4
+ import { i as AuthUser, n as AuthSession, r as AuthState } from "../auth-CV9kXHKe.mjs";
5
5
  export { type AuthSession, type AuthState, type AuthUser, FetchError, FetchError as StreamError, auth, createAuthClient, fetch, fetchStream };
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-BO7Od-z9.mjs";
2
+ import { C as defer, E as ValidatorSlots, S as InferProps, T as HandlerInput, _ as defineQueue, a as CloudEnv, b as Deferred, c as QueueRetryOptions, d as TypedQueueHandler, f as VoidAssetRewriteError, g as defineMiddleware, h as defineHead, i as CloudContextVariables, l as RenderAssetTags, m as defineHandler, n as CloudBindings, o as QueueBatch, p as basicAuth, r as CloudContext, s as QueueMessage, t as BasicAuthOptions, u as TypedHandler, v as defineRender, w as ValidationError, y as defineScheduled } from "../handler-6fzr_ikp.mjs";
3
3
  export { BasicAuthOptions, CloudBindings, CloudContext, CloudContextVariables, CloudEnv, type Deferred, type HandlerInput, type InferProps, QueueBatch, QueueMessage, QueueRetryOptions, RenderAssetTags, TypedHandler, TypedQueueHandler, ValidationError, type ValidatorSlots, VoidAssetRewriteError, basicAuth, defer, defineHandler, defineHead, defineMiddleware, defineQueue, defineRender, defineScheduled };
@@ -1,4 +1,4 @@
1
- import { t as LiveClientEvent } from "../live-Kc55iuOQ.mjs";
1
+ import { t as LiveClientEvent } from "../live-DBybyDt0.mjs";
2
2
  import { n as RequestUrl } from "../route-url-C3JwYrER.mjs";
3
3
  export type LiveSubscribeOptions<Data = unknown> = {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-CYJ4KGoR.mjs";
1
+ import { a as connectionInstanceName, c as topicInstanceName, o as internalUrl, s as topicDigest, t as __getLiveBindingName } from "../live-Dw7NF1t2.mjs";
2
2
  import { n as eventStream } from "../sse-CxR30yMF.mjs";
3
3
  // src/runtime/live-server.ts
4
4
  const GENERATION_KEY = "connection:generation";
@@ -1,3 +1,3 @@
1
1
  /// <reference types="@cloudflare/workers-types" />
2
- import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-Kc55iuOQ.mjs";
2
+ import { _ as __getLiveBindingName, a as LiveControlErrorCode, b as defineLiveStream, c as LiveControlOptions, d as LiveHookContext, f as LiveLimits, g as LiveSubscribeHookContext, h as LiveStreamOptions, i as LiveControlError, l as LiveControlRequest, m as LiveStream, n as LiveConnectHookContext, o as LiveControlOperation, p as LivePublishOptions, r as LiveConnectOptions, s as LiveControlOperationResult, t as LiveClientEvent, u as LiveControlResponse, v as __setLiveBindingName, y as __setLiveDev } from "../live-DBybyDt0.mjs";
3
3
  export { LiveClientEvent, LiveConnectHookContext, LiveConnectOptions, LiveControlError, LiveControlErrorCode, LiveControlOperation, LiveControlOperationResult, LiveControlOptions, LiveControlRequest, LiveControlResponse, LiveHookContext, LiveLimits, LivePublishOptions, LiveStream, LiveStreamOptions, LiveSubscribeHookContext, __getLiveBindingName, __setLiveBindingName, __setLiveDev, defineLiveStream };
@@ -1 +1 @@
1
- export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-CYJ4KGoR.mjs";
1
+ export { t as __getLiveBindingName, n as __setLiveBindingName, r as __setLiveDev, i as defineLiveStream } from "../live-Dw7NF1t2.mjs";
@@ -1,5 +1,5 @@
1
- import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-BO7Od-z9.mjs";
2
- import { a as handlePageMutation, i as handlePageGet } from "../protocol-Cg2I81NA.mjs";
1
+ import { A as filterInternalBindings, M as ClientAssetTags, N as createClientAssetTags, O as createAssetFallback, P as createManifestLoader, j as prerenderPathsResponse, k as createWorkerFetch, r as CloudContext } from "../handler-6fzr_ikp.mjs";
2
+ import { a as handlePageMutation, i as handlePageGet } from "../protocol-YS3tbxWE.mjs";
3
3
  import { AsyncLocalStorage } from "node:async_hooks";
4
4
  import { Context, Hono, MiddlewareHandler, NotFoundHandler, TypedResponse } from "hono";
5
5
  import { RouteDestination, RouteUrlInput } from "void/routes";
@@ -1,11 +1,11 @@
1
- import { a as queryKey, i as markActionKey, n as actionKeySegment, o as searchWithoutActionKey, r as hasActionKey, s as searchWithoutPreservedQuery, t as PRESERVED_QUERY_HEADER } from "../action-key-ByZ6DDld.mjs";
1
+ import { a as hasActionKey, c as searchWithoutActionKey, i as actionKeySegment, l as searchWithoutPreservedQuery, o as markActionKey, r as PRESERVED_QUERY_HEADER, s as queryKey, t as decodePagePath } from "../url-DaehRGKR.mjs";
2
+ import { n as pagesRedirectResponse } from "../redirect-Dqb4fEc5.mjs";
2
3
  import { i as authDependentRequests, n as markStaticAsset, r as SHARED_CACHE_HEADERS, t as isUnchangedStaticAsset } from "../static-asset-marker-DsQKz6lt.mjs";
3
4
  import { t as VoidAssetRewriteError } from "../handler-C9SnmeW1.mjs";
4
5
  import { t as convertReturnValue } from "../response-HmNjB30w.mjs";
5
6
  import { r as toUrlString, t as interpolateRouteParams } from "../route-url-CfCR4oMj.mjs";
6
7
  import { n as createClientAssetTags, r as createManifestLoader, t as ASSET_EXTENSIONS } from "../routing-assets-DJIVOrCh.mjs";
7
- import { a as handlesPageLoaderNotFound, n as handlePageGet, r as handlePageMutation } from "../protocol-B1Tvc9-x.mjs";
8
- import { t as decodePagePath } from "../url-CuoEn0o3.mjs";
8
+ import { a as handlesPageLoaderNotFound, n as handlePageGet, o as ownsLoaderNotFoundBoundary, r as handlePageMutation } from "../protocol-IPSWHolJ.mjs";
9
9
  import { t as renderDefaultErrorPage } from "../error-pages-COVBnzK7.mjs";
10
10
  import { AsyncLocalStorage } from "node:async_hooks";
11
11
  import { compilePattern, matchPattern, matchPatternCaptures, mergeQueryIntoLocation, redirectToHttps, substituteParams } from "@void/edge";
@@ -246,11 +246,11 @@ function createPageMutationHandler(options) {
246
246
  function createPagesFallback(options) {
247
247
  const cachePolicy = createAssetCachePolicy(options.assetsDir);
248
248
  return async (c) => {
249
- if (handlesPageLoaderNotFound(c)) return c.newResponse(null, 404);
249
+ if (ownsLoaderNotFoundBoundary(c)) return c.newResponse(null, 404);
250
250
  const path = c.req.path;
251
251
  if (path === "/api" || path.startsWith("/api/") || c.req.method !== "GET" && c.req.method !== "HEAD") return c.text("Not Found", 404);
252
252
  const assets = c.env?.ASSETS;
253
- const assetResponse = assets && typeof assets.fetch === "function" ? await assets.fetch(c.req.raw) : options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
253
+ const assetResponse = handlesPageLoaderNotFound(c) ? new Response("Not Found", { status: 404 }) : assets && typeof assets.fetch === "function" ? await assets.fetch(c.req.raw) : options.routing.markNoMatch(c.req.raw, new Response("Not Found", { status: 404 }));
254
254
  const filePath = path.includes("/.") || path.substring(path.lastIndexOf("/") + 1).includes(".");
255
255
  const pageNeedsSlash = options.trailingSlash && !path.endsWith("/") && options.pagePatterns?.some((pattern) => pattern.test(decodePagePath(`${path}/`)));
256
256
  let directoryIndex = false;
@@ -1050,6 +1050,7 @@ function createRoutingRuntime(app, options = {}) {
1050
1050
  c.originalUrl = () => originalUrls.get(c.req.raw) ?? null;
1051
1051
  c.isRewritten = () => originalUrls.has(c.req.raw);
1052
1052
  await next();
1053
+ c.res = pagesRedirectResponse(c.req.raw, c.res);
1053
1054
  if (!trackAssetMisses) return;
1054
1055
  if (c.res.status === 404 && !isRouteMiss(c, c.res)) intentionalNotFoundRequests.add(c.req.raw);
1055
1056
  };
@@ -1,2 +1,2 @@
1
- import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-BO7Od-z9.mjs";
1
+ import { D as runValidation, E as ValidatorSlots, T as HandlerInput } from "../handler-6fzr_ikp.mjs";
2
2
  export { HandlerInput, ValidatorSlots, runValidation };
@@ -1,6 +1,6 @@
1
- import { r as AuthState } from "../auth-Bk9VGtQW.mjs";
2
- import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-CQFdtguU.mjs";
3
- import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws--U7QicYy.mjs";
1
+ import { r as AuthState } from "../auth-CV9kXHKe.mjs";
2
+ import { r as VoidAuthRuntimeOptions, t as VoidAuthEnv } from "../better-auth-shared-ajs3LNrY.mjs";
3
+ import { f as WebSocketInstanceKey, t as AnyWebSocketDefinition } from "../ws-C2zy0QBf.mjs";
4
4
  export type WebSocketRouteMeta = {
5
5
  name?: string;
6
6
  key?: WebSocketInstanceKey;
@@ -1,4 +1,4 @@
1
- import { t as authContext } from "../auth-DyWp-fSo.mjs";
1
+ import { t as authContext } from "../auth-aMuFOZeI.mjs";
2
2
  import { o as withRuntimeEnv } from "../env-DtKg5G26.mjs";
3
3
  // src/runtime/ws-server.ts
4
4
  function matchRoute(pattern, pathname) {
@@ -1,2 +1,2 @@
1
- import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws--U7QicYy.mjs";
1
+ import { a as RoomDefinition, c as VoidSocket, d as WebSocketConnection, f as WebSocketInstanceKey, h as defineWebSocket, i as RoomController, l as VoidSocketCloseEvent, m as defineRoom, n as ConnectCommonOptions, o as SocketContext, p as connect, r as RoomContext, s as SocketDefinition, t as AnyWebSocketDefinition, u as WebSocketBaseContext } from "../ws-C2zy0QBf.mjs";
2
2
  export { AnyWebSocketDefinition, ConnectCommonOptions, RoomContext, RoomController, RoomDefinition, SocketContext, SocketDefinition, VoidSocket, VoidSocketCloseEvent, WebSocketBaseContext, WebSocketConnection, WebSocketInstanceKey, connect, defineRoom, defineWebSocket };
@@ -1,8 +1,8 @@
1
1
  import { a as join, l as toSlash, n as dirname, r as extname, t as basename } from "./dist-DMYe8CZJ.mjs";
2
2
  import { t as glob } from "./dist-BWNkVq50.mjs";
3
- import { p as readConfig } from "./config-5oSQhZNj.mjs";
3
+ import { p as readConfig } from "./config-CzFdJYNA.mjs";
4
4
  import { i as voidWarn } from "./log-D9hwSySP.mjs";
5
- import { n as readProjectPaths } from "./project-paths-G0yut6Zz.mjs";
5
+ import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
6
6
  import { i as staticLiteral, n as readStaticExports, o as bindingNames, r as staticExports, t as mayExportAll } from "./static-exports-DFkzL-NX.mjs";
7
7
  import { n as isIdentifier, o as moduleExportName, r as isLiteral } from "./ast-Cv0JwXqb.mjs";
8
8
  import { t as MagicString } from "./dist-B6eN80gc.mjs";
@@ -1,7 +1,7 @@
1
1
  import { A as confirm, H as outro, L as log, O as cancel, U as password, tt as isCancel } from "./dist-STQXl8ck.mjs";
2
2
  import { c as getToken } from "./auth-CCk9Seol.mjs";
3
- import { r as PlatformClient } from "./client-SZPyj4X_.mjs";
4
- import { _ as validateSecretValues } from "./env-validation-BpCCQE_6.mjs";
3
+ import { r as PlatformClient } from "./client-D6w5x7hM.mjs";
4
+ import { _ as validateSecretValues } from "./env-validation-DeYNRp1d.mjs";
5
5
  import { m as printSuccess, o as formatCount, p as note } from "./output-DNVILSz2.mjs";
6
6
  import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-CLwxcEdq.mjs";
7
7
  import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-Da3OgCU1.mjs";
@@ -97,7 +97,7 @@ async function resolveSecretBackend(root, args) {
97
97
  }
98
98
  async function resolveCloudflareSecretBackend(root, args) {
99
99
  if (args.projectName) throw new Error("secret: --project selects a Void platform project and is not used for direct Cloudflare apps.");
100
- const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-DATekLwI.mjs");
100
+ const { deleteCloudflareSecret, listCloudflareSecrets, putCloudflareSecret, resolveCloudflareOperationContext, syncCloudflareSecrets } = await import("./cloudflare-operations-I4t3mt4R.mjs");
101
101
  const context = resolveCloudflareOperationContext(root);
102
102
  return {
103
103
  target: "Cloudflare Worker",
@@ -61,4 +61,46 @@ function searchWithoutPreservedQuery(search, preserved) {
61
61
  if (search === "?" + preserved) return "";
62
62
  return search.endsWith("&" + preserved) ? search.slice(0, -preserved.length - 1) : search;
63
63
  }
64
- export { queryKey as a, withPageQuery as c, markActionKey as i, actionKeySegment as n, searchWithoutActionKey as o, hasActionKey as r, searchWithoutPreservedQuery as s, PRESERVED_QUERY_HEADER as t };
64
+ // src/pages/url.ts
65
+ function isSameOrigin(url, origin) {
66
+ if (url.protocol === "capacitor:") {
67
+ const current = new URL(origin);
68
+ return current.protocol === "capacitor:" && url.host !== "" && url.host === current.host;
69
+ }
70
+ return url.origin === origin;
71
+ }
72
+ function isHexDigit(char) {
73
+ return char !== void 0 && (char >= "0" && char <= "9" || char >= "a" && char <= "f" || char >= "A" && char <= "F");
74
+ }
75
+ function tryDecodeURI(text) {
76
+ try {
77
+ return decodeURI(text);
78
+ } catch {
79
+ return text;
80
+ }
81
+ }
82
+ /**
83
+ * The path a page is matched on, decoded the way the server (Hono's getPath)
84
+ * decodes it: `/caf%C3%A9` becomes `/café`, while `%25`, reserved escapes such
85
+ * as `%2F` and malformed escapes stay encoded.
86
+ */
87
+ function decodePagePath(path) {
88
+ if (!path.includes("%")) return path;
89
+ const escaped = path.split("%25").join("%2525");
90
+ try {
91
+ return decodeURI(escaped);
92
+ } catch {}
93
+ let decoded = "";
94
+ let index = 0;
95
+ while (index < escaped.length) {
96
+ let end = index;
97
+ while (escaped[end] === "%" && isHexDigit(escaped[end + 1]) && isHexDigit(escaped[end + 2])) end += 3;
98
+ if (end === index) decoded += escaped[index++];
99
+ else {
100
+ decoded += tryDecodeURI(escaped.slice(index, end));
101
+ index = end;
102
+ }
103
+ }
104
+ return decoded;
105
+ }
106
+ export { hasActionKey as a, searchWithoutActionKey as c, actionKeySegment as i, searchWithoutPreservedQuery as l, isSameOrigin as n, markActionKey as o, PRESERVED_QUERY_HEADER as r, queryKey as s, decodePagePath as t, withPageQuery as u };
@@ -1,5 +1,5 @@
1
1
  import { a as join } from "./dist-DMYe8CZJ.mjs";
2
- import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-k40T7XTQ.mjs";
2
+ import { l as bindingNamesForField, p as findBindingNameOwner } from "./wrangler-B1gkT_wC.mjs";
3
3
  // src/shared/untrusted-env.ts
4
4
  /** Authentication inputs that Wrangler may consume from the environment. */
5
5
  const WRANGLER_AUTH_CREDENTIAL_ENV_VARS = [
@@ -1,7 +1,7 @@
1
1
  import { a as join, c as resolve, n as dirname, o as normalize, t as basename } from "./dist-DMYe8CZJ.mjs";
2
- import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-DtOGAbeB.mjs";
3
- import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-G0yut6Zz.mjs";
4
- import { h as validateConfig, p as readConfig } from "./config-5oSQhZNj.mjs";
2
+ import { a as persistCloudflareConfig, i as materializeCloudflareConfig, r as ignoreMaterializedCloudflareConfig } from "./cloudflare-config-PxbinLLE.mjs";
3
+ import { o as TYPED_CONFIG_FILE, s as loadTypedVoidConfigFile } from "./project-paths-CUhCPMpK.mjs";
4
+ import { h as validateConfig, p as readConfig } from "./config-CzFdJYNA.mjs";
5
5
  import { existsSync, readFileSync, writeFileSync } from "node:fs";
6
6
  import { parseSync } from "vite";
7
7
  import { appendSqliteClassMigration, isRecord } from "@void/deploy-core";
@@ -0,0 +1 @@
1
+ export { b as readRootWranglerConfig } from "./wrangler-B1gkT_wC.mjs";