void 1.12.2 → 1.13.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 (372) hide show
  1. package/README.md +1 -0
  2. package/dist/{account-cmd-CdJQba_Q.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
  3. package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
  4. package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
  5. package/dist/args-DrnTI35r.mjs +88 -0
  6. package/dist/args-MnQnqypt.mjs +1 -0
  7. package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
  8. package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
  9. package/dist/{auth-link-D9MWA_dj.mjs → auth-link-I4omV0pL.mjs} +6 -6
  10. package/dist/{auth-router-FskgTU3B.mjs → auth-router-CXq4q7bb.mjs} +6 -5
  11. package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
  12. package/dist/bindings-C7zOgxT3.d.mts +28 -0
  13. package/dist/browser-run-BKgZVwLk.mjs +124 -0
  14. package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
  15. package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
  16. package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
  17. package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
  18. package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
  19. package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
  20. package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
  21. package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
  22. package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
  23. package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
  24. package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
  25. package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
  26. package/dist/cli/cli.mjs +1 -1
  27. package/dist/cli/cloudflare-operation-process.mjs +111 -47
  28. package/dist/cli/env-schema-probe.mjs +3 -3
  29. package/dist/cli/json-command-process.d.mts +6 -0
  30. package/dist/cli/json-command-process.mjs +91 -0
  31. package/dist/{cli-main-DaLrQfPS.mjs → cli-main-CJTGhcYN.mjs} +84 -113
  32. package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
  33. package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
  34. package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
  35. package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
  36. package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
  37. package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
  38. package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
  39. package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
  40. package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
  41. package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
  42. package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
  43. package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
  44. package/dist/collect-Aam0GwAU.mjs +1 -0
  45. package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
  46. package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
  47. package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
  48. package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
  49. package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
  50. package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
  51. package/dist/config-entry.d.mts +1 -1
  52. package/dist/config-write-dKLINlm2.mjs +80 -0
  53. package/dist/{connect-WG4TcR_d.mjs → connect-Bqq3b9sX.mjs} +10 -9
  54. package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
  55. package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
  56. package/dist/{db-BSuWV1PI.mjs → db-B3eoVDNA.mjs} +50 -47
  57. package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
  58. package/dist/db-args-Cx1y4vZn.mjs +1 -0
  59. package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
  60. package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
  61. package/dist/deploy-DZ9j7MC4.mjs +2 -0
  62. package/dist/{deploy-DtJeunLF.mjs → deploy-UojYUEWr.mjs} +803 -1415
  63. package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
  64. package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
  65. package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
  66. package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
  67. package/dist/deploy.mjs +14 -10
  68. package/dist/discover-BZWVWeQs.mjs +1 -0
  69. package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
  70. package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
  71. package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
  72. package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
  73. package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
  74. package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
  75. package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
  76. package/dist/{email-DoDqRH6i.mjs → email-BBSDV0J5.mjs} +13 -12
  77. package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
  78. package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
  79. package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
  80. package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
  81. package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
  82. package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
  83. package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
  84. package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
  85. package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
  86. package/dist/gen-DaayFP9v.mjs +1 -0
  87. package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
  88. package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
  89. package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
  90. package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
  91. package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
  92. package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
  93. package/dist/help-DWGHmt_n.mjs +1 -0
  94. package/dist/html-5sfGLjiI.d.mts +3 -0
  95. package/dist/html-DPSOBDCh.mjs +1 -0
  96. package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
  97. package/dist/index-Cvqotnhc.d.mts +91 -0
  98. package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
  99. package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
  100. package/dist/index.d.mts +3 -2
  101. package/dist/index.mjs +536 -170
  102. package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
  103. package/dist/{init-B2VZ2Hut.mjs → init-DftAx3L4.mjs} +237 -88
  104. package/dist/input-jcps6lAn.mjs +64 -0
  105. package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
  106. package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
  107. package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
  108. package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
  109. package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
  110. package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
  111. package/dist/login-BJwPhV_S.mjs +1 -0
  112. package/dist/{login-jUBgfvzk.mjs → login-DaugBfBG.mjs} +6 -5
  113. package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
  114. package/dist/migrate-BHD46A31.mjs +1 -0
  115. package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
  116. package/dist/nitro.mjs +3 -3
  117. package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
  118. package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
  119. package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
  120. package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
  121. package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
  122. package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
  123. package/dist/{operator-cmd-wML5HNfS.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
  124. package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
  125. package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
  126. package/dist/output-OYwcEwok.mjs +1 -0
  127. package/dist/pages/client.d.mts +34 -20
  128. package/dist/pages/client.mjs +172 -74
  129. package/dist/pages/index.d.mts +11 -4
  130. package/dist/pages/index.mjs +5 -5
  131. package/dist/pages/islands-plugin.d.mts +2 -2
  132. package/dist/pages/islands-plugin.mjs +5 -3
  133. package/dist/pages/protocol.d.mts +3 -3
  134. package/dist/pages/protocol.mjs +3 -3
  135. package/dist/pages/serialize.d.mts +2 -2
  136. package/dist/pages/serialize.mjs +1 -1
  137. package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
  138. package/dist/platform-C3Q44RJ8.mjs +250 -0
  139. package/dist/platform-args-BSyVZESg.mjs +1 -0
  140. package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
  141. package/dist/{platform-auth-config-Bv3oQ2gE.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
  142. package/dist/{platform-auth-protection-OqzfhXwx.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
  143. package/dist/{platform-auth-recovery-rmIYjXST.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
  144. package/dist/{platform-cmd-D_4z2Ijv.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
  145. package/dist/{platform-cmd-B3rO4RhU.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
  146. package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
  147. package/dist/{platform-domain-CUq9odbd.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
  148. package/dist/{platform-lifecycle-DOSYo0UI.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
  149. package/dist/{platform-lifecycle-DuoVruij.mjs → platform-lifecycle-CKwOg8wz.mjs} +164 -72
  150. package/dist/{platform-management-D_gt3qLb.mjs → platform-management-CaSdFthX.mjs} +1 -1
  151. package/dist/{platform-management-MmO9IubR.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
  152. package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
  153. package/dist/{platform-recovery-P_FVslfd.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
  154. package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
  155. package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
  156. package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
  157. package/dist/prepare-CLl_TA_r.mjs +1 -0
  158. package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
  159. package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
  160. package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
  161. package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
  162. package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
  163. package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
  164. package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
  165. package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
  166. package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
  167. package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
  168. package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
  169. package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
  170. package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
  171. package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
  172. package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
  173. package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
  174. package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
  175. package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
  176. package/dist/resolve-project-Bob_rEi2.mjs +1 -0
  177. package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
  178. package/dist/resource-binding-5nI30acw.mjs +20 -0
  179. package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
  180. package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
  181. package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
  182. package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
  183. package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
  184. package/dist/routes-stub.d.mts +18 -2
  185. package/dist/routes-stub.mjs +1 -1
  186. package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
  187. package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
  188. package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
  189. package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
  190. package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
  191. package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
  192. package/dist/runtime/ai/index.mjs +1 -1
  193. package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
  194. package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
  195. package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
  196. package/dist/runtime/client/fetch-server.mjs +1 -1
  197. package/dist/runtime/client/fetch-stream.mjs +1 -1
  198. package/dist/runtime/client/fetch.mjs +1 -1
  199. package/dist/runtime/client/index.mjs +2 -2
  200. package/dist/runtime/client/react.mjs +2 -2
  201. package/dist/runtime/client/solid.mjs +2 -2
  202. package/dist/runtime/client/svelte.mjs +2 -2
  203. package/dist/runtime/client/vue.mjs +2 -2
  204. package/dist/runtime/durable/index.mjs +11 -26
  205. package/dist/runtime/env/runtime.d.mts +2 -10
  206. package/dist/runtime/handler/index.d.mts +3 -2
  207. package/dist/runtime/handler/index.mjs +2 -2
  208. package/dist/runtime/handler/validator.d.mts +1 -1
  209. package/dist/runtime/handler/validator.mjs +1 -1
  210. package/dist/runtime/html.d.mts +2 -0
  211. package/dist/runtime/html.mjs +1 -0
  212. package/dist/runtime/image/index.d.mts +103 -0
  213. package/dist/runtime/image/index.mjs +89 -0
  214. package/dist/runtime/jsx/index.d.mts +3 -0
  215. package/dist/runtime/jsx/index.mjs +2 -0
  216. package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
  217. package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
  218. package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
  219. package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
  220. package/dist/runtime/limits/index.mjs +1 -1
  221. package/dist/runtime/live/client.d.mts +2 -2
  222. package/dist/runtime/live/index.d.mts +1 -1
  223. package/dist/runtime/routing/index.d.mts +87 -4
  224. package/dist/runtime/routing/index.mjs +59 -20
  225. package/dist/runtime/routing/route-url.d.mts +2 -2
  226. package/dist/runtime/routing/route-url.mjs +1 -1
  227. package/dist/runtime/sandbox/index.mjs +1 -1
  228. package/dist/runtime/sse/client.d.mts +1 -1
  229. package/dist/runtime/workflows/entry.d.mts +8 -0
  230. package/dist/runtime/workflows/entry.mjs +49 -0
  231. package/dist/runtime/workflows/index.d.mts +3 -0
  232. package/dist/runtime/workflows/index.mjs +77 -0
  233. package/dist/runtime/ws/index.d.mts +1 -1
  234. package/dist/runtime/ws/index.mjs +2 -2
  235. package/dist/runtime/ws/room.d.mts +1 -1
  236. package/dist/runtime/ws/server.d.mts +2 -2
  237. package/dist/runtime-Db72hLY-.d.mts +11 -0
  238. package/dist/scan-BxhB4BA-.mjs +946 -0
  239. package/dist/scan-D2ISAobj.mjs +308 -0
  240. package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
  241. package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
  242. package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
  243. package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
  244. package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
  245. package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
  246. package/dist/standard-schema-DvMcZGMK.mjs +8 -0
  247. package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
  248. package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
  249. package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
  250. package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
  251. package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
  252. package/dist/validate-p9b3r1k4.mjs +1 -0
  253. package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
  254. package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
  255. package/dist/version-metadata-CEla0kgi.mjs +23 -0
  256. package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
  257. package/dist/wrangler-BT7qrzWc.mjs +1 -0
  258. package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
  259. package/docs/guide/ai.md +1 -1
  260. package/docs/guide/app-types.md +6 -23
  261. package/docs/guide/auth.md +2 -4
  262. package/docs/guide/database/d1.md +21 -67
  263. package/docs/guide/database/mysql.md +8 -0
  264. package/docs/guide/database/postgresql.md +2 -2
  265. package/docs/guide/database.md +1 -1
  266. package/docs/guide/deployment.md +18 -0
  267. package/docs/guide/edge/prerendering.md +3 -7
  268. package/docs/guide/edge/redirects.md +1 -1
  269. package/docs/guide/edge/revalidation.md +8 -17
  270. package/docs/guide/edge/rewrites.md +1 -1
  271. package/docs/guide/edge/static-assets.md +10 -22
  272. package/docs/guide/email/domains.md +3 -1
  273. package/docs/guide/email/receiving.md +2 -2
  274. package/docs/guide/email/sending.md +3 -1
  275. package/docs/guide/env-vars.md +2 -0
  276. package/docs/guide/image-generation.md +142 -0
  277. package/docs/guide/index.md +17 -15
  278. package/docs/guide/jobs.md +2 -4
  279. package/docs/guide/kv.md +1 -1
  280. package/docs/guide/og-images.md +83 -0
  281. package/docs/guide/pages-routing/actions-and-forms.md +6 -4
  282. package/docs/guide/pages-routing/errors.md +20 -4
  283. package/docs/guide/pages-routing/head.md +5 -5
  284. package/docs/guide/pages-routing/islands.md +4 -14
  285. package/docs/guide/pages-routing/markdown.md +2 -2
  286. package/docs/guide/pages-routing/overview.md +129 -15
  287. package/docs/guide/platform/administration/plans.md +47 -16
  288. package/docs/guide/platform/administration/projects.md +10 -0
  289. package/docs/guide/platform/administration/security-audits.md +76 -30
  290. package/docs/guide/platform/administration/zero-trust.md +1 -1
  291. package/docs/guide/platform/installation/ci.md +0 -4
  292. package/docs/guide/platform/installation/credentials.md +1 -1
  293. package/docs/guide/platform/installation/maintenance.md +10 -10
  294. package/docs/guide/platform/installation/prerequisites.md +3 -1
  295. package/docs/guide/platform/installation/setup.md +7 -15
  296. package/docs/guide/platform/installation/uninstall.md +6 -12
  297. package/docs/guide/project-collaboration.md +1 -4
  298. package/docs/guide/queues.md +6 -8
  299. package/docs/guide/quickstart.md +6 -8
  300. package/docs/guide/sandboxes.md +1 -1
  301. package/docs/guide/self-hosted-platform.md +4 -7
  302. package/docs/guide/server-routing.md +5 -3
  303. package/docs/guide/ssg.md +1 -1
  304. package/docs/guide/type-safety.md +74 -10
  305. package/docs/guide/websockets.md +5 -7
  306. package/docs/guide/workflows.md +122 -0
  307. package/docs/index.md +2 -3
  308. package/docs/integrations/agents.md +3 -16
  309. package/docs/integrations/cloudflare.md +98 -2
  310. package/docs/integrations/frameworks/analog.md +9 -11
  311. package/docs/integrations/frameworks/astro.md +16 -17
  312. package/docs/integrations/frameworks/nuxt.md +11 -13
  313. package/docs/integrations/frameworks/overview.md +18 -20
  314. package/docs/integrations/frameworks/react-router.md +55 -6
  315. package/docs/integrations/frameworks/sveltekit.md +8 -6
  316. package/docs/integrations/frameworks/tanstack-start.md +10 -6
  317. package/docs/integrations/hono.md +27 -12
  318. package/docs/integrations/nodejs-bun-deno.md +10 -2
  319. package/docs/reference/api/database.md +8 -10
  320. package/docs/reference/api/env.md +2 -2
  321. package/docs/reference/api/handlers.md +1 -1
  322. package/docs/reference/api/html.md +45 -0
  323. package/docs/reference/api/pages.md +118 -167
  324. package/docs/reference/api/rewrites.md +5 -5
  325. package/docs/reference/api/types.md +13 -6
  326. package/docs/reference/api/workflows.md +48 -0
  327. package/docs/reference/api.md +7 -1
  328. package/docs/reference/cli/database.md +22 -10
  329. package/docs/reference/cli/deploy.md +49 -4
  330. package/docs/reference/cli/domains.md +7 -3
  331. package/docs/reference/cli/email.md +3 -1
  332. package/docs/reference/cli/platform-installation.md +9 -53
  333. package/docs/reference/cli/platform-security.md +36 -8
  334. package/docs/reference/cli/platform-users.md +11 -1
  335. package/docs/reference/cli/platform-zero-trust.md +1 -1
  336. package/docs/reference/cli/project.md +52 -11
  337. package/docs/reference/cli/setup.md +8 -10
  338. package/docs/reference/cli.md +49 -47
  339. package/docs/reference/config.md +22 -8
  340. package/docs/reference/resource-inference.md +8 -1
  341. package/docs/reference/structure.md +5 -0
  342. package/package.json +52 -25
  343. package/schema.json +20 -1
  344. package/skills/void/SKILL.md +60 -54
  345. package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
  346. package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
  347. package/dist/cli/db-execute-process.d.mts +0 -2
  348. package/dist/cli/db-execute-process.mjs +0 -57
  349. package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
  350. package/dist/collect-B6nlSnsb.mjs +0 -1
  351. package/dist/db-args-BvMwAber.mjs +0 -1
  352. package/dist/deploy-GT4CW5fs.mjs +0 -2
  353. package/dist/discover-D2KGP3cR.mjs +0 -1
  354. package/dist/entry-Bwb9ev8K.mjs +0 -113
  355. package/dist/gen-vhBDHs3q.mjs +0 -1
  356. package/dist/help-fKPzcTJv.mjs +0 -1
  357. package/dist/isr-config-DiTnL9Tb.mjs +0 -115
  358. package/dist/login-BbSQTZ6d.mjs +0 -1
  359. package/dist/migrate-C9aoWLvY.mjs +0 -1
  360. package/dist/operator-cmd-jnjzuJKX.mjs +0 -1
  361. package/dist/output-D7K9TWIA.mjs +0 -1
  362. package/dist/platform-args-CMwMoiLp.mjs +0 -1
  363. package/dist/prepare-DcwigRUS.mjs +0 -1
  364. package/dist/providers-D5P8j_8D.d.mts +0 -5
  365. package/dist/resolve-project-YsTH-U9I.mjs +0 -1
  366. package/dist/static-exports-s7P86Ngp.mjs +0 -354
  367. package/dist/validate-CZYUIfR-.mjs +0 -1
  368. package/dist/wrangler-Dq269bjx.mjs +0 -1
  369. package/docs/guide/platform/development/local.md +0 -120
  370. package/docs/guide/platform/development/runtime.md +0 -115
  371. package/docs/guide/platform/development/schema-ci.md +0 -44
  372. package/docs/guide/platform-development.md +0 -16
@@ -1,20 +1,21 @@
1
1
  import { t as __commonJSMin } from "./rolldown-runtime-uD8oG6U2.mjs";
2
- import { A as confirm, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
3
2
  import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
4
- import { c as getToken, u as openBrowser } from "./auth-CqwJwItO.mjs";
5
- import { n as PlatformApiError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
6
- import { n as cleanBlock, r as cleanLine } from "./output-BZLnu0z8.mjs";
3
+ import { c as getToken, u as openBrowser } from "./auth-CeBmolb-.mjs";
4
+ import { n as PlatformApiError, r as PlatformClient } from "./client-BEHI4UWn.mjs";
5
+ import { n as confirm } from "./interactive-prompts-EK0dilFu.mjs";
6
+ import { tt as isCancel } from "./dist-BngS28id.mjs";
7
+ import { n as cleanBlock, r as cleanLine } from "./output-DhJgS6Ve.mjs";
7
8
  import { a as join } from "./dist-DMYe8CZJ.mjs";
8
9
  import { o as uploadAssetsToR2, t as DirectR2PutError } from "./direct-r2-upload-DFXLWfXV.mjs";
9
- import { r as readProjectConfig } from "./project-dh9431bN.mjs";
10
- import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-8WZ3iVmr.mjs";
11
- import { n as securityFindingsSarif, t as sarifToolVersion } from "./security-sarif-ClyYwtAW.mjs";
10
+ import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
11
+ import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-s_FGWyr-.mjs";
12
+ import { n as securityFindingsSarif, t as sarifToolVersion } from "./security-sarif-DzTIqNwZ.mjs";
12
13
  import { closeSync, lstatSync, openSync, readFileSync, readSync } from "node:fs";
13
14
  import { createHash } from "node:crypto";
14
15
  import { execFileSync } from "node:child_process";
15
- import { securityPickProblemNote } from "@void/platform/security-models";
16
- import { securityTraceLines } from "@void/platform/security-policy";
17
16
  import { gzipSync } from "node:zlib";
17
+ import { securityPickProblemNote } from "@void/platform/security-models";
18
+ import { SECURITY_ERRORS, securityTraceLines } from "@void/platform/security-policy";
18
19
  import { SECURITY_LOCAL_CHECK_LIMITS, isSecurityLocalTreePath, securityInputFilter, securityLocalTreeTar } from "@void/platform/security-local-check";
19
20
  // ../../node_modules/.pnpm/ci-info@4.5.0/node_modules/ci-info/vendors.json
20
21
  var require_vendors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
@@ -560,7 +561,8 @@ const SEVERITY_LABEL = {
560
561
  */
561
562
  function checkResultLines(slug, view, options = {}) {
562
563
  const { check, result } = view;
563
- const head = [`${slug} · local check ${cleanLine(check.id)}`, ` ${cleanLine(check.status)}${check.statusReason ? ` (${cleanLine(check.statusReason)})` : ""}${check.coverageLabel ? ` · ${cleanLine(check.coverageLabel)}` : ""} · ${plural(check.filesScanned, "file")}${check.model ? ` · ${cleanLine(check.model)}` : ""}`];
564
+ const reason = check.statusReason === "spend_cap" ? "spend limit reached" : check.statusReason;
565
+ const head = [`${slug} · local check ${cleanLine(check.id)}`, ` ${cleanLine(check.status)}${reason ? ` (${cleanLine(reason)})` : ""}${check.coverageLabel ? ` · ${cleanLine(check.coverageLabel)}` : ""} · ${plural(check.filesScanned, "file")}${check.model ? ` · ${cleanLine(check.model)}` : ""}`];
564
566
  if (!ENDED_WITH_RESULT.has(check.status)) return head;
565
567
  if (result === null) return [...head, options.fresh ? " The result is missing." : " The result is no longer stored (results are kept for 30 days)."];
566
568
  const confirmed = result.findings.filter((finding) => finding.verdict === "confirmed");
@@ -709,7 +711,7 @@ function budgetSkipCopy(cause, budget, model, projectId) {
709
711
  };
710
712
  const resets = `Resets ${day(budget.resetsAt)}.`;
711
713
  const reserve = typeof budget.scanReserveUsd === "number" ? budget.scanReserveUsd : null;
712
- const oneScan = `one scan with ${cleanLine(model ?? "this model")} can cost${reserve === null ? "" : ` up to ${usd(reserve)},`}`;
714
+ const oneScan = `one scan with ${cleanLine(model ?? "this model")} needs${reserve === null ? "" : ` ${usd(reserve)},`}`;
713
715
  const cheaper = "pick a cheaper model: void project security model";
714
716
  if (cause === "platform_cap") return {
715
717
  ...none,
@@ -777,7 +779,9 @@ function scanStatusCopy(status, projectId) {
777
779
  case "failed": return lastScan.failureCause === "installation" ? "Not scanned: a platform problem (your platform admin can see it in the admin panel)." : `Last scan failed (${reason}). ${next}`;
778
780
  case "timed_out": return `Last scan failed (timed out). ${next}`;
779
781
  case "refused": return `Refused by ${cleanLine(lastScan.model ?? "the scan model")} (category: ${cleanLine(lastScan.refusalCategory ?? "unknown")}). The next deploy is scanned again. To switch model: void project security model <id>`;
780
- case "incomplete": return reason.startsWith("budget") ? `Last scan stopped early: the monthly scan budget ran out. Confirmed findings it found are kept. ${next}` : `Last scan was partial (${reason}). Confirmed findings it found are kept. ${next}`;
782
+ case "incomplete":
783
+ if (reason === "spend_cap") return `Last scan reached its spend limit. Confirmed findings are kept. ${next}`;
784
+ return reason.startsWith("budget") ? `Last scan stopped early: the monthly scan budget ran out. Confirmed findings it found are kept. ${next}` : `Last scan was partial (${reason}). Confirmed findings it found are kept. ${next}`;
781
785
  case "superseded": return "Replaced by the scan of a newer deploy.";
782
786
  case "canceled": return `Canceled by a platform admin. ${next}`;
783
787
  case "skipped":
@@ -858,8 +862,9 @@ function formatStatus(slug, status, projectId) {
858
862
  if (urgent.count === 0) lines.push(row("Urgent", "none open"));
859
863
  else lines.push(row("Urgent", `${urgent.count} open (${urgentCounts(urgent)}) · oldest ${day(urgent.oldestFirstSeenAt)} → void project security list --urgent`));
860
864
  const reason = cleanLine(policy.reason);
865
+ const byRule = policy.override === "always" || policy.override === "never";
861
866
  if (policy.mode === "disabled") lines.push(row("Policy", reason));
862
- else if (policy.applies) lines.push(row("Policy", `applies: ${reason}${policy.mode === "public" ? " (Public projects only)" : ""}`));
867
+ else if (policy.applies) lines.push(row("Policy", `applies: ${reason}${policy.mode === "public" && !byRule ? " (Public projects only)" : ""}`));
863
868
  else lines.push(row("Policy", `does not apply: ${reason}`));
864
869
  lines.push(row("Model", `${cleanLine(model.id ?? "none")} (${modelSource(model)})`));
865
870
  if (model.thirdParty && model.id) lines.push(cont("Run by a third-party provider, not Cloudflare. Its usage policy applies and it may refuse."));
@@ -871,7 +876,7 @@ function formatStatus(slug, status, projectId) {
871
876
  if (!lastScan) lines.push(row("Last scan", policy.applies && policy.mode !== "disabled" ? "none yet. The first scan runs after your next deploy and reviews the whole app." : "none"));
872
877
  else {
873
878
  const parts = [
874
- cleanLine(lastScan.status + (lastScan.statusReason ? ` (${lastScan.statusReason})` : "")),
879
+ formatScanState(lastScan),
875
880
  lastScan.deploymentId ? cleanLine(lastScan.deploymentId) : null,
876
881
  duration(lastScan),
877
882
  lastScan.coverageLabel ? cleanLine(lastScan.coverageLabel) : null
@@ -896,24 +901,36 @@ function formatStatus(slug, status, projectId) {
896
901
  }
897
902
  return lines;
898
903
  }
904
+ /** `false_positive` → `false positive`, as the resolve message and the security page say it. */
905
+ function words(value) {
906
+ return cleanLine(value).split("_").join(" ");
907
+ }
899
908
  function findingState(finding) {
900
- if (finding.state === "resolved") return finding.resolution ? `resolved (${cleanLine(finding.resolution).split("_").join("-")})` : "resolved";
909
+ if (finding.state === "resolved") return finding.resolution ? `resolved (${words(finding.resolution)})` : "resolved";
901
910
  return finding.verdict === "needs_validation" ? "lead" : "open";
902
911
  }
912
+ /** Pads every cell but the last of each row to its column's widest value. */
913
+ function columns(rows) {
914
+ const widths = [];
915
+ for (const cells of rows) cells.forEach((cell, index) => {
916
+ widths[index] = Math.max(widths[index] ?? 0, cell.length);
917
+ });
918
+ return rows.map((cells) => cells.map((cell, index) => index === cells.length - 1 ? cell : cell.padEnd(widths[index] ?? 0)).join(" ").trimEnd());
919
+ }
903
920
  function formatFindingList(findings) {
904
- return findings.map((finding) => {
921
+ return columns(findings.map((finding) => {
905
922
  const place = finding.file ? `${cleanLine(finding.file)}${finding.line ? `:${finding.line}` : ""}` : "";
923
+ const title = finding.title === void 0 ? "" : cleanLine(finding.title);
906
924
  return [
907
- cleanLine(finding.id).padEnd(7),
908
- cleanLine(finding.severity ?? "-").padEnd(14),
909
- findingState(finding).padEnd(26),
910
- finding.title === void 0 ? "" : cleanLine(finding.title),
911
- place ? `(${place})` : ""
912
- ].join(" ").trimEnd();
913
- });
925
+ cleanLine(finding.id),
926
+ cleanLine(finding.severity ?? "-"),
927
+ findingState(finding),
928
+ [title, place ? `(${place})` : ""].filter(Boolean).join(" ")
929
+ ];
930
+ }));
914
931
  }
915
932
  function indent(text) {
916
- return cleanBlock(text).split("\n").map((line) => ` ${line}`);
933
+ return cleanBlock(text).split("\n").map((line) => line.trim() === "" ? "" : ` ${line}`);
917
934
  }
918
935
  function formatFinding(finding, events) {
919
936
  const lines = [`${cleanLine(finding.id)} ${cleanLine(finding.severity ?? "-")} ${findingState(finding)}${finding.urgent ? " (urgent)" : ""}`];
@@ -947,22 +964,26 @@ function formatFinding(finding, events) {
947
964
  for (const event of events) {
948
965
  const who = event.actor ?? event.actorKind;
949
966
  const role = event.formerMember ? "former member" : event.actorRole ? cleanLine(event.actorRole) : null;
950
- lines.push(` ${stamp(event.createdAt)} · ${cleanLine(event.action)}${event.resolution ? ` (${cleanLine(event.resolution).split("_").join("-")})` : ""}${event.severityFrom && event.severityTo ? ` (${cleanLine(event.severityFrom)} → ${cleanLine(event.severityTo)})` : ""} · ${cleanLine(who)}${role ? ` (${role})` : ""}`);
951
- if (event.comment) lines.push(...indent(event.comment).map((line) => ` ${line}`));
967
+ lines.push(` ${stamp(event.createdAt)} · ${words(event.action)}${event.resolution ? ` (${words(event.resolution)})` : ""}${event.severityFrom && event.severityTo ? ` (${cleanLine(event.severityFrom)} → ${cleanLine(event.severityTo)})` : ""} · ${cleanLine(who)}${role ? ` (${role})` : ""}`);
968
+ if (event.comment) lines.push(...indent(event.comment).map((line) => line === "" ? "" : ` ${line}`));
952
969
  }
953
970
  }
954
971
  return lines;
955
972
  }
973
+ function formatScanState(scan) {
974
+ const reason = scan.statusReason === "spend_cap" ? "scan spend limit reached" : scan.statusReason;
975
+ return cleanLine(scan.status + (reason ? ` (${reason})` : ""));
976
+ }
956
977
  function formatScans(scans) {
957
- return scans.map((scan) => [
958
- day(scan.createdAt).padEnd(7),
959
- cleanLine(scan.status + (scan.statusReason ? ` (${scan.statusReason})` : "")).padEnd(24),
960
- cleanLine(scan.deploymentId ?? "-").padEnd(12),
961
- cleanLine(scan.trigger).padEnd(9),
978
+ return columns(scans.map((scan) => [
979
+ day(scan.createdAt),
980
+ formatScanState(scan),
981
+ cleanLine(scan.deploymentId ?? "-"),
982
+ cleanLine(scan.trigger),
962
983
  duration(scan) ?? "-",
963
984
  scan.meteredUsd === null ? "" : usd(scan.meteredUsd),
964
985
  scan.model ? cleanLine(scan.model) : ""
965
- ].join(" ").trimEnd());
986
+ ]));
966
987
  }
967
988
  async function resolveTarget(root, args) {
968
989
  const token = getToken(root);
@@ -1010,17 +1031,26 @@ function noticeOf(error) {
1010
1031
  return null;
1011
1032
  }
1012
1033
  }
1034
+ function isModelNotAllowed(error) {
1035
+ if (!(error instanceof PlatformApiError)) return false;
1036
+ try {
1037
+ return JSON.parse(error.body).error === SECURITY_ERRORS.modelNotAllowed.code;
1038
+ } catch {
1039
+ return false;
1040
+ }
1041
+ }
1013
1042
  function severityChangeLine(id, level, result) {
1014
1043
  if (!result.changed) return result.severityEdited ? `${id} is already ${level}. Nothing changed.` : `${id} already uses the scan severity (${level}). Nothing changed.`;
1015
1044
  if (!result.severityEdited) return `✓ ${id} uses the scan severity again: ${level}.`;
1016
1045
  const scans = result.scanSeverity ? cleanLine(result.scanSeverity) : null;
1017
1046
  return `✓ ${id} severity set to ${level}${scans && scans !== level ? ` (scans said ${scans})` : ""}. Later scans keep it.`;
1018
1047
  }
1019
- /** The rescan cost confirm (spec §13.4 rescan rule): what it runs and what it can cost. */
1048
+ /** The rescan cost confirm (spec §13.4 rescan rule): what it runs and its estimated cost. */
1020
1049
  function rescanConfirmLines(preview) {
1021
1050
  const id = cleanLine(preview.deploymentId);
1022
1051
  const model = cleanLine(preview.model ?? "the scan model");
1023
- const cost = typeof preview.worstCaseUsd === "number" ? ` It can cost up to ${usd(preview.worstCaseUsd)}.` : "";
1052
+ const estimate = preview.estimatedUsd ?? preview.worstCaseUsd;
1053
+ const cost = typeof estimate === "number" ? ` Estimated cost: up to ${usd(estimate)}.` : "";
1024
1054
  const whole = preview.clientAssets ? "This reviews the whole app, and the sources of its client bundles." : "This reviews the whole app.";
1025
1055
  const lines = [preview.alreadyScanned ? `Live deployment ${id} was already scanned. Run a full scan with ${model}? ${whole}${cost}` : `Run a full scan of live deployment ${id} with ${model}? ${whole}${cost}`];
1026
1056
  const budget = preview.budget;
@@ -1115,7 +1145,7 @@ async function runProjectSecurityCommand(root, args, deps = {}) {
1115
1145
  const results = [];
1116
1146
  const lines = [];
1117
1147
  let lastRequest;
1118
- let failed = 0;
1148
+ const failed = [];
1119
1149
  for (const id of args.ids) try {
1120
1150
  const result = await client.resolveProjectSecurityFinding(projectId, id, {
1121
1151
  reason: args.reason,
@@ -1126,16 +1156,17 @@ async function runProjectSecurityCommand(root, args, deps = {}) {
1126
1156
  lastRequest = result.publicRequest ?? lastRequest;
1127
1157
  lines.push(`✓ ${cleanLine(result.id)} resolved (${reasonLabel(result.resolution)}).${args.reason === "fixed" ? " The next scan will check that the fix holds." : ""}`);
1128
1158
  } catch (error) {
1129
- failed++;
1130
- const message = error instanceof Error ? error.message : String(error);
1159
+ failed.push(id);
1160
+ const raw = error instanceof Error ? error.message : String(error);
1131
1161
  results.push({
1132
1162
  ok: false,
1133
1163
  id,
1134
- error: message
1164
+ error: raw
1135
1165
  });
1136
- lines.push(`✖ ${id}: ${cleanLine(message)}`);
1166
+ const message = cleanLine(raw);
1167
+ lines.push(`✖ ${message.startsWith(`${id} `) ? message : `${id}: ${message}`}`);
1137
1168
  }
1138
- if (failed < args.ids.length) {
1169
+ if (failed.length < args.ids.length) {
1139
1170
  const status = await statusAfterChange(client, projectId);
1140
1171
  const open = status?.urgent.findings ?? [];
1141
1172
  const describe = (id) => {
@@ -1148,7 +1179,7 @@ async function runProjectSecurityCommand(root, args, deps = {}) {
1148
1179
  else if (status && status.urgent.count > 0) lines.push(` Still open and urgent: ${open.map((finding) => describe(finding.id)).join(", ")}${status.urgent.more > 0 ? `, and ${status.urgent.more} more` : ""}.`);
1149
1180
  }
1150
1181
  print(args, { results }, lines);
1151
- if (failed > 0) throw new Error(`project: ${failed} of ${args.ids.length} findings were not resolved.`);
1182
+ if (failed.length > 0) throw new Error(`project: Not resolved: ${failed.join(", ")}.`);
1152
1183
  return;
1153
1184
  }
1154
1185
  if (args.action === "scans") {
@@ -1181,13 +1212,15 @@ async function runProjectSecurityCommand(root, args, deps = {}) {
1181
1212
  }
1182
1213
  if (args.action === "model") {
1183
1214
  if (args.change === "show") {
1184
- const { model } = await client.getProjectSecurity(projectId);
1215
+ const { model, modelChoices } = await client.getProjectSecurity(projectId);
1216
+ const choices = modelChoices?.choices.map((choice) => cleanLine(choice.id)) ?? [];
1185
1217
  const lines = [
1186
1218
  `${slug} · security model`,
1187
1219
  row("Model", `${cleanLine(model.id ?? "none")} (${modelSource(model)})`),
1188
- row("Asked for", cleanLine(model.requested)),
1220
+ model.requested === model.id ? null : row("Asked for", cleanLine(model.requested)),
1189
1221
  model.thirdParty || model.pendingDefault || model.pickProblem === "notice" ? row("Notice", model.noticeAccepted ? "provider notice accepted" : "provider notice not accepted") : null,
1190
- "Change: void project security model <id> or void project security model --default"
1222
+ ...choices.map((id, index) => index === 0 ? row("Choices", id) : cont(id)),
1223
+ row("Change", "void project security model <id> or void project security model --default")
1191
1224
  ].filter((line) => line !== null);
1192
1225
  print(args, { model }, lines);
1193
1226
  return;
@@ -1203,7 +1236,14 @@ async function runProjectSecurityCommand(root, args, deps = {}) {
1203
1236
  result = await set(args.acceptNotice ? 0 : void 0);
1204
1237
  } catch (error) {
1205
1238
  const notice = noticeOf(error);
1206
- if (!notice) throw error;
1239
+ if (!notice) {
1240
+ if (!args.json && isModelNotAllowed(error)) {
1241
+ const { modelChoices } = await client.getProjectSecurity(projectId);
1242
+ const ids = modelChoices?.choices.map((choice) => cleanLine(choice.id)) ?? [];
1243
+ if (ids.length > 0) throw new Error(`${error.message} Models you can pick: ${ids.join(", ")}.`, { cause: error });
1244
+ }
1245
+ throw error;
1246
+ }
1207
1247
  const text = notice.notice.map(cleanLine);
1208
1248
  if (!args.acceptNotice) {
1209
1249
  if (!args.json) console.log([
@@ -1302,7 +1342,8 @@ async function runSecurityCheck(root, client, projectId, slug, args, deps) {
1302
1342
  const model = cleanLine(preview.model);
1303
1343
  const lines = ["", ...checkSummaryLines(slug, tree)];
1304
1344
  if (preview.notice) lines.push("", ...preview.notice.map((line) => ` ${cleanLine(line)}`));
1305
- lines.push("", ` The code goes to the platform and is reviewed by ${model}.${typeof preview.worstCaseUsd === "number" ? ` It can cost up to ${usd(preview.worstCaseUsd)}; monthly caps apply.` : " Monthly caps apply."}`, " The result is not saved as project findings. The platform keeps it for 30 days.");
1345
+ const estimate = preview.estimatedUsd ?? preview.worstCaseUsd;
1346
+ lines.push("", ` The code goes to the platform and is reviewed by ${model}.${typeof estimate === "number" ? ` Estimated cost: up to ${usd(estimate)}; monthly caps apply.` : " Monthly caps apply."}`, " The result is not saved as project findings. The platform keeps it for 30 days.");
1306
1347
  log(lines);
1307
1348
  if (!args.yes && !await askYesNo(deps, `Send these files for a security check with ${model}?`)) {
1308
1349
  console.log("Nothing was sent.");
@@ -1,9 +1,9 @@
1
- import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken, i as getAccountCredential } from "./auth-CqwJwItO.mjs";
3
- import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
- import { b as sanitizeTerminalText, c as formatCount, f as formatUrl, g as note, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
- import { r as readProjectConfig } from "./project-dh9431bN.mjs";
6
- import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-8WZ3iVmr.mjs";
1
+ import { H as outro, L as log } from "./dist-BngS28id.mjs";
2
+ import { c as getToken, i as getAccountCredential } from "./auth-CeBmolb-.mjs";
3
+ import { c as parsePlatformErrorBody, l as platformErrorMessage, n as PlatformApiError, r as PlatformClient } from "./client-BEHI4UWn.mjs";
4
+ import { b as sanitizeTerminalText, c as formatCount, f as formatUrl, g as note, y as printSuccess } from "./output-DhJgS6Ve.mjs";
5
+ import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
6
+ import { r as requireProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-s_FGWyr-.mjs";
7
7
  // src/cli/project-team.ts
8
8
  function clean(value) {
9
9
  return (value ?? "—").replaceAll(/[\u0000-\u001f\u007f]/g, " ");
@@ -1,9 +1,9 @@
1
- import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
2
- import { c as getToken } from "./auth-CqwJwItO.mjs";
3
- import { r as PlatformClient } from "./client-DE2m2ldh.mjs";
4
- import { S as tablePrefix, o as dim, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
- import { r as readProjectConfig } from "./project-dh9431bN.mjs";
6
- import { r as requireProjectBySlug } from "./resolve-project-8WZ3iVmr.mjs";
1
+ import { H as outro, L as log } from "./dist-BngS28id.mjs";
2
+ import { c as getToken } from "./auth-CeBmolb-.mjs";
3
+ import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
4
+ import { S as tablePrefix, o as dim, y as printSuccess } from "./output-DhJgS6Ve.mjs";
5
+ import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
6
+ import { r as requireProjectBySlug } from "./resolve-project-s_FGWyr-.mjs";
7
7
  // src/cli/project-token.ts
8
8
  async function resolveTarget(root, args) {
9
9
  const humanToken = getToken(root);
@@ -1,5 +1,5 @@
1
1
  import { a as join, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
2
- import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
2
+ import { n as readProjectPaths } from "./project-paths-BeAxxqGh.mjs";
3
3
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
4
4
  // src/codegen/write-if-changed.ts
5
5
  function writeFileIfChanged(path, content) {
@@ -1,8 +1,8 @@
1
- import { H as outro, L as log } from "./dist-Cr_xGE_K.mjs";
1
+ import { H as outro, L as log } from "./dist-BngS28id.mjs";
2
2
  import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
3
- import { n as PlatformApiError } from "./client-DE2m2ldh.mjs";
4
- import { b as sanitizeTerminalText, g as note, r as cleanLine, y as printSuccess } from "./output-BZLnu0z8.mjs";
5
- import { a as day, d as publicRequestLines, p as resolveTarget, t as askYesNo, u as isInteractive } from "./project-security-CY_aahvW.mjs";
3
+ import { n as PlatformApiError } from "./client-BEHI4UWn.mjs";
4
+ import { b as sanitizeTerminalText, g as note, r as cleanLine, y as printSuccess } from "./output-DhJgS6Ve.mjs";
5
+ import { a as day, d as publicRequestLines, p as resolveTarget, t as askYesNo, u as isInteractive } from "./project-security-BWTd6cTU.mjs";
6
6
  import { t as OPEN_PUBLIC_REQUEST_STATES } from "./security-api-types-CU7zQtr_.mjs";
7
7
  // src/cli/project-zero-trust.ts
8
8
  function isOpenRequest(request) {
@@ -1,9 +1,9 @@
1
- import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-CtcAvyI7.mjs";
1
+ import { a as executeComposedHandler, i as separateDeferred, n as DEFERRED, o as getHandlerComposition, t as ValidationError } from "./validation-error-EKI0wMWX.mjs";
2
2
  import { n as isConvertedResponse } from "./response-CyXsGfOy.mjs";
3
- import { a as hasActionKey, c as searchWithoutActionKey, t as decodePagePath } from "./url-DBQluotE.mjs";
3
+ import { a as isPlainObject, c as hasActionKey, d as searchWithoutActionKey, t as decodePagePath } from "./url-DAQ1c3lh.mjs";
4
4
  import { n as pagesBuildId } from "./build-id-4IV4hC1-.mjs";
5
5
  import { a as resolveHead, i as renderHtmlAttrs, n as renderBodyAttrs, r as renderHeadToString, t as absolutizeHead } from "./head-BwQ5kgqt.mjs";
6
- import { a as serializePageData, o as escapeScriptJson } from "./serialize-BmB4BfKu.mjs";
6
+ import { c as serializePageData, l as escapeScriptJson } from "./serialize-nW4IeEBI.mjs";
7
7
  import { PAGES_BUILD_HEADER, PAGES_PROTOCOL_VERSION, buildHeaders, isStaleBuild } from "@void/edge";
8
8
  // src/pages/not-found-context.ts
9
9
  const loaderNotFound = /* @__PURE__ */ new WeakSet();
@@ -146,9 +146,9 @@ function attachRenderErrorAssetTags(error, assetTags) {
146
146
  });
147
147
  throw error;
148
148
  }
149
- async function renderWithAssetTags(renderFn, pageObj, assetTags, requestUrl) {
149
+ async function renderWithAssetTags(renderFn, pageObj, assetTags, request) {
150
150
  try {
151
- return await renderFn(pageObj, assetTags, requestUrl);
151
+ return await renderFn(pageObj, assetTags, request.req.url, request.req);
152
152
  } catch (error) {
153
153
  attachRenderErrorAssetTags(error, assetTags);
154
154
  }
@@ -171,7 +171,7 @@ function renderClientOnlyPage(pageObj, assetTags, renderFn) {
171
171
  async function renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags) {
172
172
  const assetTags = prepareAssetTags(await getAssetTags(c.req.raw, c.env, componentId));
173
173
  return {
174
- html: renderMode === "client" ? renderClientOnlyPage(pageObj, assetTags, renderFn) : await renderWithAssetTags(renderFn, pageObj, assetTags, c.req.url),
174
+ html: renderMode === "client" ? renderClientOnlyPage(pageObj, assetTags, renderFn) : await renderWithAssetTags(renderFn, pageObj, assetTags, c),
175
175
  assetTags
176
176
  };
177
177
  }
@@ -202,6 +202,20 @@ function requestPathWithSearch(c, withoutActionKey = false) {
202
202
  function requestParams(c) {
203
203
  return c.req.param();
204
204
  }
205
+ function exposedLoaderQuery(query, schema) {
206
+ if (schema && query?.schema !== schema) throw new TypeError("pages: exposeQuery requires the loader to validate with the exported query schema.");
207
+ const validated = query?.value;
208
+ if (isPlainObject(validated)) return validated;
209
+ if (typeof validated === "function" || validated !== null && typeof validated === "object" && !Array.isArray(validated)) throw new TypeError("pages: exposeQuery requires the query schema to return a plain object.");
210
+ }
211
+ /** Fail in dev with the reason, instead of a 500 from page serialization. */
212
+ function assertSerializableQuery(componentId, query) {
213
+ try {
214
+ serializePageData({ query });
215
+ } catch (cause) {
216
+ throw new Error(`pages: '${componentId}' sets exposeQuery, but a value its query schema returned cannot be serialized. Keep class instances and functions out of the schema's output, or leave exposeQuery off.`, { cause });
217
+ }
218
+ }
205
219
  /** Extract props from a handler result, handling Response wrapping from withValidator */
206
220
  async function extractProps(result) {
207
221
  if (result instanceof Response) {
@@ -220,20 +234,36 @@ async function extractProps(result) {
220
234
  * 200s (file downloads, streams). JSON 200s are still extracted as props for
221
235
  * backward compat with loaders using c.json().
222
236
  */
223
- async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = false) {
237
+ async function runLoader(handler, c, render, recover, options) {
224
238
  if (!handler) return render({});
225
239
  return runPageHandler(handler, c, async (leaf) => {
226
240
  let result;
241
+ let validatedQuery;
242
+ let queryUrl;
243
+ if (options?.withoutActionKey) {
244
+ const url = new URL(c.req.url);
245
+ url.search = searchWithoutActionKey(url.search);
246
+ queryUrl = url.href;
247
+ }
248
+ const validation = {
249
+ queryUrl,
250
+ onQuery: options?.exposeQuery ? (schema, value) => {
251
+ validatedQuery = {
252
+ schema,
253
+ value
254
+ };
255
+ } : void 0
256
+ };
227
257
  try {
228
- result = await withLoaderNotFoundDecision(c, ownsNotFoundBoundary, () => leaf(c));
258
+ result = await withLoaderNotFoundDecision(c, options?.ownsNotFoundBoundary === true, () => leaf(c, validation));
229
259
  } catch (error) {
230
- const recovered = await recover?.(error);
260
+ const recovered = await recover?.(error, void 0, validatedQuery);
231
261
  if (recovered) return recovered;
232
262
  throw error;
233
263
  }
234
264
  if (result instanceof Response && !isConvertedResponse(result)) {
235
265
  if (result.status === 404 && !result.headers.get("Content-Disposition")?.includes("attachment")) {
236
- const recovered = await recover?.(void 0, result);
266
+ const recovered = await recover?.(void 0, result, validatedQuery);
237
267
  if (recovered) return recovered;
238
268
  }
239
269
  const contentType = result.headers.get("content-type") || "";
@@ -243,17 +273,20 @@ async function runLoader(handler, c, render, recover, ownsNotFoundBoundary = fal
243
273
  try {
244
274
  props = await extractProps(result);
245
275
  } catch (error) {
246
- const recovered = await recover?.(error);
276
+ const recovered = await recover?.(error, void 0, validatedQuery);
247
277
  if (recovered) return recovered;
248
278
  throw error;
249
279
  }
250
- return render(props);
280
+ return render(props, validatedQuery);
251
281
  });
252
282
  }
253
283
  function isRecoverableHttpException(error) {
254
284
  const exception = error;
255
285
  return !!exception && typeof exception.getResponse === "function" && !exception.res && typeof exception.status === "number" && exception.status >= 400 && exception.status < 600;
256
286
  }
287
+ function isPageResponseError(error) {
288
+ return !!error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
289
+ }
257
290
  /** Recover HTTP failures outside the loader leaf without executing application code again. */
258
291
  async function recoverPageHttpException(error, c, renderFn, getAssetTags, configHead, options) {
259
292
  if (!isRecoverableHttpException(error) || c.finalized) return;
@@ -261,9 +294,38 @@ async function recoverPageHttpException(error, c, renderFn, getAssetTags, config
261
294
  if (options?.renderMode !== "island" && needsPageReload(context)) return legacyPageResponse(context);
262
295
  return renderPageFailure(context, error, void 0, renderFn, getAssetTags, configHead, options);
263
296
  }
297
+ /**
298
+ * The head for one boundary render: its `.server` companion's head() merged with the config
299
+ * and middleware head, with the built-in title when none is set. An error page must still
300
+ * render when that file fails, so any failure (import, head(), reading what it returned, or
301
+ * a value the page payload or HTML head can't hold) is logged and the default head applies.
302
+ */
303
+ async function boundaryPageHead(c, load, props, configHead, middlewareHead, defaultHead, defaultTitle) {
304
+ const build = (declared, resolved = defaultHead) => ({
305
+ ...resolved,
306
+ title: resolved?.title ?? resolveHead(configHead, middlewareHead, {
307
+ ...declared,
308
+ title: defaultTitle
309
+ })?.title
310
+ });
311
+ if (load) try {
312
+ const declared = (await load()).head?.(c, props);
313
+ if (declared) {
314
+ const head = build(declared, resolveRequestHead(c, configHead, middlewareHead, declared));
315
+ serializePageData({ head });
316
+ renderHeadToString(head);
317
+ renderHtmlAttrs(head);
318
+ renderBodyAttrs(head);
319
+ return head;
320
+ }
321
+ } catch (failure) {
322
+ console.error(failure);
323
+ }
324
+ return build(void 0);
325
+ }
264
326
  /** Recover one completed GET operation without replaying its middleware or loader. */
265
- async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options) {
266
- const httpError = error && typeof error === "object" && "getResponse" in error && typeof error.getResponse === "function";
327
+ async function renderPageFailure(c, error, original, renderFn, getAssetTags, configHead, options, validatedQuery) {
328
+ const httpError = isPageResponseError(error);
267
329
  const explicit = httpError ? error.getResponse() : original;
268
330
  const recoverHttpError = isRecoverableHttpException(error);
269
331
  if (explicit && (!recoverHttpError && explicit.status !== 404 || explicit.headers.has("Content-Disposition"))) return;
@@ -288,24 +350,32 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
288
350
  } catch (cause) {
289
351
  throw new Error("Unable to render Pages error boundary", { cause });
290
352
  }
353
+ const url = requestPathWithSearch(c);
354
+ let query;
355
+ if (validatedQuery) try {
356
+ const capturedQuery = exposedLoaderQuery(validatedQuery, options?.querySchema);
357
+ if (capturedQuery) {
358
+ serializePageData({ query: capturedQuery });
359
+ query = capturedQuery;
360
+ }
361
+ } catch {}
291
362
  const attempted = /* @__PURE__ */ new Set();
292
363
  for (const component of candidates) {
293
364
  if (!component || attempted.has(component)) continue;
294
365
  attempted.add(component);
366
+ const props = { error: {
367
+ status,
368
+ message
369
+ } };
295
370
  const page = {
296
371
  component,
297
- props: { error: {
298
- status,
299
- message
300
- } },
372
+ props,
301
373
  shared,
302
374
  params: requestParams(c),
303
- url: requestPathWithSearch(c),
375
+ ...query && { query },
376
+ url,
304
377
  errors: null,
305
- head: {
306
- ...head,
307
- title: head?.title ?? resolveHead(configHead, middlewareHead, { title: status === 404 ? "Not Found" : recoverHttpError && status !== 500 ? message : "Internal Server Error" })?.title
308
- }
378
+ head: await boundaryPageHead(c, options?.boundaries?.loadHeads?.[component], props, configHead, middlewareHead, head, status === 404 ? "Not Found" : recoverHttpError && status !== 500 ? message : "Internal Server Error")
309
379
  };
310
380
  try {
311
381
  let response;
@@ -351,7 +421,7 @@ async function renderPageFailure(c, error, original, renderFn, getAssetTags, con
351
421
  */
352
422
  function runPageHandler(handler, c, endpoint) {
353
423
  const composition = getHandlerComposition(handler);
354
- return composition ? executeComposedHandler(c, composition.middlewares, () => endpoint(composition.leaf)) : endpoint(handler);
424
+ return composition ? executeComposedHandler(c, composition.middlewares, () => endpoint(composition.leaf)) : endpoint((context) => handler(context));
355
425
  }
356
426
  /** Flatten withValidator's { issues: [{ slot, issues: [{ message, path }] }] } into { field: message } */
357
427
  function flattenValidationErrors(body) {
@@ -437,8 +507,8 @@ function resolveRequestHead(c, configHead, middlewareHead, pageHead) {
437
507
  async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
438
508
  const renderMode = options?.renderMode ?? "server";
439
509
  if (renderMode !== "island" && needsPageReload(c)) return legacyPageResponse(c);
440
- const recover = (error, response) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options);
441
- return runLoader(handler, c, async (props) => {
510
+ const recover = (error, response, validatedQuery) => renderPageFailure(c, error, response, renderFn, getAssetTags, configHead, options, validatedQuery);
511
+ return runLoader(handler, c, async (props, validatedQuery) => {
442
512
  try {
443
513
  const shared = c.get("shared") ?? {};
444
514
  const pageHead = headFn ? headFn(c, props) : void 0;
@@ -449,12 +519,15 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
449
519
  if (hasDeferred && (options?.boundaries?.notFound || options?.boundaries?.errors.length)) c.header("Cache-Control", "no-store");
450
520
  const deferredKeys = {};
451
521
  for (const [group, { keys }] of Object.entries(deferredMap)) for (const key of keys) deferredKeys[key] = group;
522
+ const url = requestPathWithSearch(c);
523
+ const query = exposedLoaderQuery(validatedQuery, options?.querySchema);
452
524
  const pageObj = {
453
525
  component: componentId,
454
526
  props: immediateProps,
455
527
  params: requestParams(c),
528
+ ...query && { query },
456
529
  shared,
457
- url: requestPathWithSearch(c),
530
+ url,
458
531
  errors: null,
459
532
  ...head && { head },
460
533
  ...hasDeferred && {
@@ -462,6 +535,7 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
462
535
  deferredKeys
463
536
  }
464
537
  };
538
+ if (options?.dev && query) assertSerializableQuery(componentId, query);
465
539
  if (renderMode !== "island" && isPagesRequest(c)) {
466
540
  if (c.req.header("purpose") === "prefetch" && hasDeferred) {
467
541
  const resolvedProps = { ...immediateProps };
@@ -509,11 +583,14 @@ async function runPageGet(handler, headFn, c, componentId, renderFn, getAssetTag
509
583
  return `\n<script>(function(e){window.__rejectDeferred?window.__rejectDeferred(${g},e):(window.__deferredQueue??=[]).push([${g},0,e])})(${safeJsonStringify(error)})<\/script>`;
510
584
  }, assetTags);
511
585
  } catch (error) {
512
- const recovered = await recover(error);
586
+ const recovered = await recover(error, void 0, validatedQuery);
513
587
  if (recovered) return recovered;
514
588
  throw error;
515
589
  }
516
- }, recover, options?.boundaries?.notFound !== void 0);
590
+ }, recover, {
591
+ ownsNotFoundBoundary: options?.boundaries?.notFound !== void 0,
592
+ exposeQuery: options?.exposeQuery
593
+ });
517
594
  }
518
595
  function isSameOriginAction(request) {
519
596
  const origin = new URL(request.url).origin;
@@ -536,30 +613,38 @@ async function handlePageMutation(mutationHandler, getHandler, headFn, c, compon
536
613
  async function runPageMutation(mutationHandler, getHandler, headFn, c, componentId, renderFn, getAssetTags, configHead, options) {
537
614
  if (!isSameOriginAction(c.req.raw)) return new Response("Cross-origin page actions are not allowed.", { status: 403 });
538
615
  const renderMode = options?.renderMode ?? "server";
539
- function buildMutationPageObj(props, errors) {
616
+ function buildMutationPageObj(props, errors, validatedQuery) {
540
617
  const shared = c.get("shared") ?? {};
541
618
  const head = resolveRequestHead(c, configHead, c.get("headDefaults"), headFn ? headFn(c, props) : void 0);
542
- return {
619
+ const url = requestPathWithSearch(c, hasActionKey(c.req.raw));
620
+ const query = exposedLoaderQuery(validatedQuery, options?.querySchema);
621
+ const page = {
543
622
  component: componentId,
544
623
  props,
545
624
  params: requestParams(c),
625
+ ...query && { query },
546
626
  shared,
547
- url: requestPathWithSearch(c, hasActionKey(c.req.raw)),
627
+ url,
548
628
  errors,
549
629
  ...head && { head }
550
630
  };
631
+ if (options?.dev && query) assertSerializableQuery(componentId, query);
632
+ return page;
551
633
  }
552
634
  const rerenderErrors = /* @__PURE__ */ new WeakSet();
553
635
  /** Re-run the GET loader and respond with the page, optionally carrying validation errors. */
554
636
  async function respondWithPage(errors) {
555
637
  if (needsPageReload(c)) return legacyPageResponse(c, errors);
556
638
  try {
557
- return await runLoader(getHandler, c, async (props) => {
558
- const pageObj = buildMutationPageObj(stripDeferred(props), errors);
639
+ return await runLoader(getHandler, c, async (props, validatedQuery) => {
640
+ const pageObj = buildMutationPageObj(stripDeferred(props), errors, validatedQuery);
559
641
  varyPagesResponse(c);
560
642
  if (isPagesRequest(c)) return pageJsonResponse(c, pageObj);
561
643
  const { html, assetTags } = await renderPageHtml(c, pageObj, componentId, renderMode, renderFn, getAssetTags);
562
644
  return renderedResponse(c, html, "text/html; charset=utf-8", assetTags);
645
+ }, void 0, {
646
+ exposeQuery: options?.exposeQuery,
647
+ withoutActionKey: options?.exposeQuery && hasActionKey(c.req.raw)
563
648
  });
564
649
  } catch (e) {
565
650
  if (e instanceof Error) rerenderErrors.add(e);
@@ -599,4 +684,4 @@ async function runPageMutation(mutationHandler, getHandler, headFn, c, component
599
684
  throw e;
600
685
  }
601
686
  }
602
- export { safeJsonStringify as a, recoverPageHttpException as i, handlePageGet as n, handlesPageLoaderNotFound as o, handlePageMutation as r, ownsLoaderNotFoundBoundary as s, flattenValidationErrors as t };
687
+ export { recoverPageHttpException as a, ownsLoaderNotFoundBoundary as c, isPageResponseError as i, handlePageGet as n, safeJsonStringify as o, handlePageMutation as r, handlesPageLoaderNotFound as s, flattenValidationErrors as t };