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.
- package/README.md +1 -0
- package/dist/{account-cmd-CdJQba_Q.mjs → account-cmd-4fQiXYX7.mjs} +6 -6
- package/dist/{application-analysis-DVeN8yoi.mjs → application-analysis-BjEwHTV2.mjs} +19 -13
- package/dist/{application-routing-KKw4Y84h.mjs → application-routing-COCfD2yc.mjs} +1 -1
- package/dist/args-DrnTI35r.mjs +88 -0
- package/dist/args-MnQnqypt.mjs +1 -0
- package/dist/{auth-CqwJwItO.mjs → auth-CeBmolb-.mjs} +3 -3
- package/dist/{auth-A7cZ8aXA.mjs → auth-CvaDxOMi.mjs} +1 -1
- package/dist/{auth-link-D9MWA_dj.mjs → auth-link-I4omV0pL.mjs} +6 -6
- package/dist/{auth-router-FskgTU3B.mjs → auth-router-CXq4q7bb.mjs} +6 -5
- package/dist/{better-auth-shared-BS3pDQbT.d.mts → better-auth-shared-CrIkcN8I.d.mts} +2 -1
- package/dist/bindings-C7zOgxT3.d.mts +28 -0
- package/dist/browser-run-BKgZVwLk.mjs +124 -0
- package/dist/{build-cmd-B7OJ0U5R.mjs → build-cmd-Biz6u4rn.mjs} +6 -6
- package/dist/{cache-wSpi3aeM.mjs → cache-WkLMUrjQ.mjs} +6 -6
- package/dist/{cancel-deploy-DMWzkAlb.mjs → cancel-deploy-BRsrmyTk.mjs} +6 -5
- package/dist/{cf-access-DHklo7Rg.mjs → cf-access-B21j-nd6.mjs} +1 -1
- package/dist/{cf-build-output-Cso7Vh-t.mjs → cf-build-output-G-7Tdd8b.mjs} +6 -5
- package/dist/cf-build-output-Qc43LWzE.mjs +1 -0
- package/dist/{cf-command-values-5BPBRc9Z.mjs → cf-command-values-cUnJwCyG.mjs} +24 -1
- package/dist/{cf-config-migrate-D271BTiw.mjs → cf-config-migrate-CsbQGzMf.mjs} +200 -94
- package/dist/cf-user-agent-HHTRzfud.mjs +15 -0
- package/dist/cf-version-api-BWHMVtzw.mjs +1 -0
- package/dist/cf-version-api-XEEK2B9A.mjs +856 -0
- package/dist/cf-worker-settings-DJKdy97k.mjs +127 -0
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +111 -47
- package/dist/cli/env-schema-probe.mjs +3 -3
- package/dist/cli/json-command-process.d.mts +6 -0
- package/dist/cli/json-command-process.mjs +91 -0
- package/dist/{cli-main-DaLrQfPS.mjs → cli-main-CJTGhcYN.mjs} +84 -113
- package/dist/{client-eLZwqkPH.mjs → client-0um7Lzze.mjs} +1 -1
- package/dist/{client-DE2m2ldh.mjs → client-BEHI4UWn.mjs} +14 -8
- package/dist/{cloudflare-auth-eWfhdZCk.mjs → cloudflare-auth-iOgRurWm.mjs} +1 -1
- package/dist/{cloudflare-cmd-SsFlJe2B.mjs → cloudflare-cmd-DsSlXbNy.mjs} +5 -5
- package/dist/{cloudflare-config-D9UFH_A5.mjs → cloudflare-config-KPHKf57C.mjs} +2 -2
- package/dist/{cloudflare-connect-BgpHcSg3.mjs → cloudflare-connect-bEtneBjT.mjs} +5 -4
- package/dist/{cloudflare-operations-ByjFGats.mjs → cloudflare-operations-BmICrRnm.mjs} +1 -1
- package/dist/{cloudflare-operations-BIRQkYwL.mjs → cloudflare-operations-D-9psgPQ.mjs} +19 -11
- package/dist/cloudflare-preview-8eLSQPdO.mjs +1 -0
- package/dist/cloudflare-preview-BaeU-m74.mjs +112 -0
- package/dist/{cloudflare-process-60r4Z2Zf.mjs → cloudflare-process-DFNpqV_m.mjs} +57 -29
- package/dist/cloudflare-user-output-DFbD0l4l.mjs +36 -0
- package/dist/collect-Aam0GwAU.mjs +1 -0
- package/dist/{collect-rNLybAnF.mjs → collect-KC4cizWM.mjs} +6 -1
- package/dist/{config-DA6ZbLXO.d.mts → config-BdmM5ZzP.d.mts} +12 -2
- package/dist/{config-BFX5ZB1J.mjs → config-CUYGZqdN.mjs} +2 -2
- package/dist/{config-BSoW3QCB.mjs → config-C_UjzkVS.mjs} +3 -3
- package/dist/{config-DtjrUtPo.mjs → config-Ge-MytMU.mjs} +1 -1
- package/dist/{config-Dv5jri1-.mjs → config-KZAiI3gG.mjs} +32 -6
- package/dist/config-entry.d.mts +1 -1
- package/dist/config-write-dKLINlm2.mjs +80 -0
- package/dist/{connect-WG4TcR_d.mjs → connect-Bqq3b9sX.mjs} +10 -9
- package/dist/{create-project-CbuDH5Hv.mjs → create-project-MXoP_rte.mjs} +1 -1
- package/dist/{create-project-8FdN6D2i.mjs → create-project-T-9AIQDe.mjs} +7 -6
- package/dist/{db-BSuWV1PI.mjs → db-B3eoVDNA.mjs} +50 -47
- package/dist/{db-args-CiQVg8SJ.mjs → db-args-BcvTZ8KE.mjs} +1 -1
- package/dist/db-args-Cx1y4vZn.mjs +1 -0
- package/dist/{db-types-B4Cf9dzR.mjs → db-types-BpgXVtQZ.mjs} +1 -1
- package/dist/{delete-WtLEfap2.mjs → delete-Cf6SroAw.mjs} +7 -6
- package/dist/deploy-DZ9j7MC4.mjs +2 -0
- package/dist/{deploy-DtJeunLF.mjs → deploy-UojYUEWr.mjs} +803 -1415
- package/dist/{deploy-managed-static-BWBsxOww.mjs → deploy-managed-static-DV_OmTWf.mjs} +54 -393
- package/dist/{deploy-security-notice-IRGy6Edf.mjs → deploy-security-notice-3jX71IeP.mjs} +6 -4
- package/dist/deploy-summary-Dkl0zvQy.mjs +377 -0
- package/dist/{deploy-transport-BKP_oV9q.mjs → deploy-transport-4ISWxx8n.mjs} +4 -3
- package/dist/deploy.mjs +14 -10
- package/dist/discover-BZWVWeQs.mjs +1 -0
- package/dist/{discover-IcspacCg.mjs → discover-BeFs7OPS.mjs} +1 -1
- package/dist/{dispatch-DIhDA3NI.mjs → dispatch-BUKbPdqb.mjs} +7 -7
- package/dist/{dist-Cr_xGE_K.mjs → dist-BngS28id.mjs} +6 -6
- package/dist/{dist-C47zy_kJ.mjs → dist-x99fIj4n.mjs} +1 -1
- package/dist/{domain-mweyYXSw.mjs → domain-BK6NWkWK.mjs} +7 -7
- package/dist/{drizzle-BJDMPrj7.mjs → drizzle-CnSbVeiZ.mjs} +12 -13
- package/dist/{drizzle-CQ5jWuDL.mjs → drizzle-CrkwVwK8.mjs} +1 -1
- package/dist/{email-DoDqRH6i.mjs → email-BBSDV0J5.mjs} +13 -12
- package/dist/{email-cloudflare-DeYH3Ke7.mjs → email-cloudflare-C-guKEbz.mjs} +10 -8
- package/dist/{env-DaAoYR2-.mjs → env-BVnKiGYJ.mjs} +8 -8
- package/dist/{env-EjHqc7m9.mjs → env-CU2tMDdO.mjs} +6 -1
- package/dist/{env-types-D2hBodXP.mjs → env-types-B33fEHRH.mjs} +1 -1
- package/dist/{env-validation-j9pjCDfA.mjs → env-validation-BnAsx6gz.mjs} +1 -1
- package/dist/{env-validation-D-v5_CWL.mjs → env-validation-SXsjd6-Z.mjs} +4 -4
- package/dist/{fetch-CiEsvjpP.mjs → fetch-DL7OCgwB.mjs} +1 -1
- package/dist/{fetch-stream-BIG5lHW6.mjs → fetch-stream-DEilLTCc.mjs} +2 -2
- package/dist/{gen-aOtHhZLD.mjs → gen-BxuIN1bz.mjs} +10 -9
- package/dist/gen-DaayFP9v.mjs +1 -0
- package/dist/{generate-Dq2Bgw75.mjs → generate-Ck-L3e0e.mjs} +1 -1
- package/dist/{generate-C3ZAqCy-.mjs → generate-t1dDUYZZ.mjs} +1 -1
- package/dist/{github-cmd-BR19Ffdz.mjs → github-cmd-B7U9Hjmi.mjs} +7 -6
- package/dist/{handler-DCrDLzw2.mjs → handler-2wAywJgj.mjs} +11 -9
- package/dist/{headers-DqBsjDxg.mjs → headers-DPI4MDGC.mjs} +1 -1
- package/dist/{help-DvClCzqL.mjs → help-Bgiu5PMX.mjs} +36 -4
- package/dist/help-DWGHmt_n.mjs +1 -0
- package/dist/html-5sfGLjiI.d.mts +3 -0
- package/dist/html-DPSOBDCh.mjs +1 -0
- package/dist/{index-Dn2mkPr2.d.mts → index-CqF8_p9C.d.mts} +5 -105
- package/dist/index-Cvqotnhc.d.mts +91 -0
- package/dist/{index-BQ5qYiAw.d.mts → index-DAinHkj8.d.mts} +1 -1
- package/dist/{index-8cAgNdb6.d.mts → index-lnEWwVAS.d.mts} +1 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.mjs +536 -170
- package/dist/{info-P6MBiVJi.mjs → info-7COlpAfY.mjs} +32 -20
- package/dist/{init-B2VZ2Hut.mjs → init-DftAx3L4.mjs} +237 -88
- package/dist/input-jcps6lAn.mjs +64 -0
- package/dist/interactive-prompts-EK0dilFu.mjs +43 -0
- package/dist/{limits-BCoQLpn3.mjs → limits-3I3VdX2E.mjs} +4 -1
- package/dist/{link-Dyz9IGcM.mjs → link-C3WMNFTG.mjs} +7 -7
- package/dist/{list-VGYBMjmx.mjs → list-K4EGVUZN.mjs} +9 -9
- package/dist/{load-user-env-B8qC0Q2Y.mjs → load-user-env-uMmQJ-Th.mjs} +1 -1
- package/dist/{local-d1-CYOYkVwO.mjs → local-d1-BtLCVC1p.mjs} +2 -2
- package/dist/login-BJwPhV_S.mjs +1 -0
- package/dist/{login-jUBgfvzk.mjs → login-DaugBfBG.mjs} +6 -5
- package/dist/{logs-kS1wuR4b.mjs → logs-BR2szdN5.mjs} +6 -6
- package/dist/migrate-BHD46A31.mjs +1 -0
- package/dist/{migrate-BNZL1hee.mjs → migrate-Dtlg8fC6.mjs} +7 -7
- package/dist/nitro.mjs +3 -3
- package/dist/{node-DVJWfV6s.mjs → node-BbKlLpHa.mjs} +5 -5
- package/dist/{operator-ai-logging-DD0n6zc2.mjs → operator-ai-logging-4Nvs6Ut3.mjs} +5 -5
- package/dist/{operator-args-nvetCWuz.mjs → operator-args-DWvqq3Ws.mjs} +31 -15
- package/dist/{operator-auth-DMvn-y9X.mjs → operator-auth-DtRMGXYY.mjs} +2 -2
- package/dist/{operator-client-dFNnXfyB.mjs → operator-client-BG0VIMMM.mjs} +2 -2
- package/dist/operator-cmd-CR3Q9k4c.mjs +1 -0
- package/dist/{operator-cmd-wML5HNfS.mjs → operator-cmd-D4YcMKO-.mjs} +9 -9
- package/dist/{operator-security-D5MToU0p.mjs → operator-security-nVLo8vDt.mjs} +11 -5
- package/dist/{output-BZLnu0z8.mjs → output-DhJgS6Ve.mjs} +1 -1
- package/dist/output-OYwcEwok.mjs +1 -0
- package/dist/pages/client.d.mts +34 -20
- package/dist/pages/client.mjs +172 -74
- package/dist/pages/index.d.mts +11 -4
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +2 -2
- package/dist/pages/islands-plugin.mjs +5 -3
- package/dist/pages/protocol.d.mts +3 -3
- package/dist/pages/protocol.mjs +3 -3
- package/dist/pages/serialize.d.mts +2 -2
- package/dist/pages/serialize.mjs +1 -1
- package/dist/parse-filename-DIPUjoCh.d.mts +2 -0
- package/dist/platform-C3Q44RJ8.mjs +250 -0
- package/dist/platform-args-BSyVZESg.mjs +1 -0
- package/dist/{platform-args-CvZSuhYS.mjs → platform-args-BnocJDC_.mjs} +1 -1
- package/dist/{platform-auth-config-Bv3oQ2gE.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
- package/dist/{platform-auth-protection-OqzfhXwx.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
- package/dist/{platform-auth-recovery-rmIYjXST.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
- package/dist/{platform-cmd-D_4z2Ijv.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
- package/dist/{platform-cmd-B3rO4RhU.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
- package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
- package/dist/{platform-domain-CUq9odbd.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
- package/dist/{platform-lifecycle-DOSYo0UI.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
- package/dist/{platform-lifecycle-DuoVruij.mjs → platform-lifecycle-CKwOg8wz.mjs} +164 -72
- package/dist/{platform-management-D_gt3qLb.mjs → platform-management-CaSdFthX.mjs} +1 -1
- package/dist/{platform-management-MmO9IubR.mjs → platform-management-fyrsq2Ra.mjs} +27 -14
- package/dist/{platform-plans-config-DiydtNKY.mjs → platform-plans-config-BSI-6Inu.mjs} +11 -5
- package/dist/{platform-recovery-P_FVslfd.mjs → platform-recovery-PwJ54AIZ.mjs} +3 -3
- package/dist/{platform-registry-DHH6fivm.mjs → platform-registry-zHH3RiIm.mjs} +2 -1
- package/dist/{platform-setup-Lph9i-rh.mjs → platform-setup-DwYITHfY.mjs} +3 -3
- package/dist/{plugin-inference-COlq96WJ.mjs → plugin-inference-D5MjBVMB.mjs} +60 -142
- package/dist/prepare-CLl_TA_r.mjs +1 -0
- package/dist/{prepare-WvijE289.mjs → prepare-DZEs5AGr.mjs} +3 -3
- package/dist/{prepare-co1o1FFd.mjs → prepare-DhVzN7CB.mjs} +14 -12
- package/dist/{project-uXKua1it.mjs → project-BXpm-vgG.mjs} +1 -1
- package/dist/{project-dh9431bN.mjs → project-DC-BqHef.mjs} +1 -1
- package/dist/{project-cmd-BWJTplpc.mjs → project-cmd-BKN3qT4R.mjs} +31 -21
- package/dist/{project-paths-2ENfCCih.mjs → project-paths-BeAxxqGh.mjs} +1 -1
- package/dist/{project-security-BV1xfj1K.mjs → project-security-B-SHxprt.mjs} +1 -1
- package/dist/{project-security-CY_aahvW.mjs → project-security-BWTd6cTU.mjs} +87 -46
- package/dist/{project-team-BlIFXlmT.mjs → project-team-jcn9reIB.mjs} +6 -6
- package/dist/{project-token-CMsB7I1-.mjs → project-token-BHkBKtzt.mjs} +6 -6
- package/dist/{project-tsconfig-BOA4ym99.mjs → project-tsconfig-LjgxDdj_.mjs} +1 -1
- package/dist/{project-zero-trust-BI6pdpx4.mjs → project-zero-trust-2t_qI6xa.mjs} +4 -4
- package/dist/{protocol-4rEnumif.mjs → protocol-DhMbnxzy.mjs} +120 -35
- package/dist/{protocol-ERy-n3jf.d.mts → protocol-wG7JP5Mm.d.mts} +27 -4
- package/dist/{provision-DFv7SJDn.mjs → provision-C04aXE3a.mjs} +1 -1
- package/dist/{provision-Bh44omGA.mjs → provision-CQykn8gu.mjs} +8 -4
- package/dist/{redirect-Dyvuil0Q.mjs → redirect-DjyA_hx_.mjs} +1 -1
- package/dist/{requests-CfmJxNYg.mjs → requests-BznxnxTT.mjs} +5 -5
- package/dist/resolve-project-Bob_rEi2.mjs +1 -0
- package/dist/{resolve-project-8WZ3iVmr.mjs → resolve-project-s_FGWyr-.mjs} +2 -2
- package/dist/resource-binding-5nI30acw.mjs +20 -0
- package/dist/{resource-name-DlJ9QXzg.mjs → resource-name-D_gw36kh.mjs} +5 -1
- package/dist/{rollback-DL5HuAsM.mjs → rollback-CLiINtpt.mjs} +25 -14
- package/dist/{route-types-CSed9-Dp.mjs → route-types-DxvqN5bL.mjs} +59 -9
- package/dist/{route-url-B41eQ8QI.mjs → route-url-CRC8yR_2.mjs} +2 -3
- package/dist/{route-url-Bd6IX-JZ.d.mts → route-url-zDfC-7DD.d.mts} +33 -5
- package/dist/routes-stub.d.mts +18 -2
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-CeguHWJx.mjs → runner-CnUrhc8H.mjs} +1 -1
- package/dist/{runner-mysql-DOjbj-N1.mjs → runner-mysql-CW6bFa67.mjs} +1 -1
- package/dist/{runner-mysql-D549vGGm.mjs → runner-mysql-DSLGFOlC.mjs} +1 -1
- package/dist/{runner-pg-Buzw17hl.mjs → runner-pg-BcGF7iBR.mjs} +1 -1
- package/dist/{runner-pg-DMJquR3d.mjs → runner-pg-OeP0JpEo.mjs} +1 -1
- package/dist/{runner-Bf94YVJK.mjs → runner-rnXCGa20.mjs} +1 -1
- package/dist/runtime/ai/index.mjs +1 -1
- package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
- package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
- package/dist/runtime/client/fetch-server.mjs +1 -1
- package/dist/runtime/client/fetch-stream.mjs +1 -1
- package/dist/runtime/client/fetch.mjs +1 -1
- package/dist/runtime/client/index.mjs +2 -2
- package/dist/runtime/client/react.mjs +2 -2
- package/dist/runtime/client/solid.mjs +2 -2
- package/dist/runtime/client/svelte.mjs +2 -2
- package/dist/runtime/client/vue.mjs +2 -2
- package/dist/runtime/durable/index.mjs +11 -26
- package/dist/runtime/env/runtime.d.mts +2 -10
- package/dist/runtime/handler/index.d.mts +3 -2
- package/dist/runtime/handler/index.mjs +2 -2
- package/dist/runtime/handler/validator.d.mts +1 -1
- package/dist/runtime/handler/validator.mjs +1 -1
- package/dist/runtime/html.d.mts +2 -0
- package/dist/runtime/html.mjs +1 -0
- package/dist/runtime/image/index.d.mts +103 -0
- package/dist/runtime/image/index.mjs +89 -0
- package/dist/runtime/jsx/index.d.mts +3 -0
- package/dist/runtime/jsx/index.mjs +2 -0
- package/dist/runtime/jsx/jsx-dev-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-dev-runtime.mjs +2 -0
- package/dist/runtime/jsx/jsx-runtime.d.mts +1 -0
- package/dist/runtime/jsx/jsx-runtime.mjs +2 -0
- package/dist/runtime/limits/index.mjs +1 -1
- package/dist/runtime/live/client.d.mts +2 -2
- package/dist/runtime/live/index.d.mts +1 -1
- package/dist/runtime/routing/index.d.mts +87 -4
- package/dist/runtime/routing/index.mjs +59 -20
- package/dist/runtime/routing/route-url.d.mts +2 -2
- package/dist/runtime/routing/route-url.mjs +1 -1
- package/dist/runtime/sandbox/index.mjs +1 -1
- package/dist/runtime/sse/client.d.mts +1 -1
- package/dist/runtime/workflows/entry.d.mts +8 -0
- package/dist/runtime/workflows/entry.mjs +49 -0
- package/dist/runtime/workflows/index.d.mts +3 -0
- package/dist/runtime/workflows/index.mjs +77 -0
- package/dist/runtime/ws/index.d.mts +1 -1
- package/dist/runtime/ws/index.mjs +2 -2
- package/dist/runtime/ws/room.d.mts +1 -1
- package/dist/runtime/ws/server.d.mts +2 -2
- package/dist/runtime-Db72hLY-.d.mts +11 -0
- package/dist/scan-BxhB4BA-.mjs +946 -0
- package/dist/scan-D2ISAobj.mjs +308 -0
- package/dist/{secret-C-WBaUSS.mjs → secret-Ck9N5xbU.mjs} +9 -8
- package/dist/{security-sarif-ClyYwtAW.mjs → security-sarif-DzTIqNwZ.mjs} +1 -1
- package/dist/{serialize-DN-envGQ.d.mts → serialize-Dr9B-0yV.d.mts} +10 -1
- package/dist/{serialize-BmB4BfKu.mjs → serialize-nW4IeEBI.mjs} +23 -2
- package/dist/{skills-C-csz78e.mjs → skills-BR7YHAF7.mjs} +1 -1
- package/dist/{scan-Ct_SEzH4.mjs → source-analysis-cache-Ccm_JSOl.mjs} +340 -902
- package/dist/standard-schema-DvMcZGMK.mjs +8 -0
- package/dist/{subcommand-prompt-B4LOLosl.mjs → subcommand-prompt-AFf2LcrC.mjs} +2 -2
- package/dist/{types-FDH6NuY1.d.mts → types-RYVujNS6.d.mts} +4 -2
- package/dist/{version-metadata-DqgLa6gc.mjs → untrusted-env-4oW0TdBP.mjs} +1 -23
- package/dist/{url-DBQluotE.mjs → url-DAQ1c3lh.mjs} +45 -1
- package/dist/{validate-CtBWCzez.mjs → validate-B1PsQ_mt.mjs} +1 -1
- package/dist/validate-p9b3r1k4.mjs +1 -0
- package/dist/{validation-error-CtcAvyI7.mjs → validation-error-EKI0wMWX.mjs} +2 -2
- package/dist/{validator-Dfh9kCDm.mjs → validator-JJcf9E48.mjs} +5 -8
- package/dist/version-metadata-CEla0kgi.mjs +23 -0
- package/dist/{wrangler-DVe5KV5G.mjs → wrangler-AyMfdVJK.mjs} +34 -69
- package/dist/wrangler-BT7qrzWc.mjs +1 -0
- package/dist/{wrapper-CcMYpOS8.mjs → wrapper-DPlTBVOx.mjs} +5 -5
- package/docs/guide/ai.md +1 -1
- package/docs/guide/app-types.md +6 -23
- package/docs/guide/auth.md +2 -4
- package/docs/guide/database/d1.md +21 -67
- package/docs/guide/database/mysql.md +8 -0
- package/docs/guide/database/postgresql.md +2 -2
- package/docs/guide/database.md +1 -1
- package/docs/guide/deployment.md +18 -0
- package/docs/guide/edge/prerendering.md +3 -7
- package/docs/guide/edge/redirects.md +1 -1
- package/docs/guide/edge/revalidation.md +8 -17
- package/docs/guide/edge/rewrites.md +1 -1
- package/docs/guide/edge/static-assets.md +10 -22
- package/docs/guide/email/domains.md +3 -1
- package/docs/guide/email/receiving.md +2 -2
- package/docs/guide/email/sending.md +3 -1
- package/docs/guide/env-vars.md +2 -0
- package/docs/guide/image-generation.md +142 -0
- package/docs/guide/index.md +17 -15
- package/docs/guide/jobs.md +2 -4
- package/docs/guide/kv.md +1 -1
- package/docs/guide/og-images.md +83 -0
- package/docs/guide/pages-routing/actions-and-forms.md +6 -4
- package/docs/guide/pages-routing/errors.md +20 -4
- package/docs/guide/pages-routing/head.md +5 -5
- package/docs/guide/pages-routing/islands.md +4 -14
- package/docs/guide/pages-routing/markdown.md +2 -2
- package/docs/guide/pages-routing/overview.md +129 -15
- package/docs/guide/platform/administration/plans.md +47 -16
- package/docs/guide/platform/administration/projects.md +10 -0
- package/docs/guide/platform/administration/security-audits.md +76 -30
- package/docs/guide/platform/administration/zero-trust.md +1 -1
- package/docs/guide/platform/installation/ci.md +0 -4
- package/docs/guide/platform/installation/credentials.md +1 -1
- package/docs/guide/platform/installation/maintenance.md +10 -10
- package/docs/guide/platform/installation/prerequisites.md +3 -1
- package/docs/guide/platform/installation/setup.md +7 -15
- package/docs/guide/platform/installation/uninstall.md +6 -12
- package/docs/guide/project-collaboration.md +1 -4
- package/docs/guide/queues.md +6 -8
- package/docs/guide/quickstart.md +6 -8
- package/docs/guide/sandboxes.md +1 -1
- package/docs/guide/self-hosted-platform.md +4 -7
- package/docs/guide/server-routing.md +5 -3
- package/docs/guide/ssg.md +1 -1
- package/docs/guide/type-safety.md +74 -10
- package/docs/guide/websockets.md +5 -7
- package/docs/guide/workflows.md +122 -0
- package/docs/index.md +2 -3
- package/docs/integrations/agents.md +3 -16
- package/docs/integrations/cloudflare.md +98 -2
- package/docs/integrations/frameworks/analog.md +9 -11
- package/docs/integrations/frameworks/astro.md +16 -17
- package/docs/integrations/frameworks/nuxt.md +11 -13
- package/docs/integrations/frameworks/overview.md +18 -20
- package/docs/integrations/frameworks/react-router.md +55 -6
- package/docs/integrations/frameworks/sveltekit.md +8 -6
- package/docs/integrations/frameworks/tanstack-start.md +10 -6
- package/docs/integrations/hono.md +27 -12
- package/docs/integrations/nodejs-bun-deno.md +10 -2
- package/docs/reference/api/database.md +8 -10
- package/docs/reference/api/env.md +2 -2
- package/docs/reference/api/handlers.md +1 -1
- package/docs/reference/api/html.md +45 -0
- package/docs/reference/api/pages.md +118 -167
- package/docs/reference/api/rewrites.md +5 -5
- package/docs/reference/api/types.md +13 -6
- package/docs/reference/api/workflows.md +48 -0
- package/docs/reference/api.md +7 -1
- package/docs/reference/cli/database.md +22 -10
- package/docs/reference/cli/deploy.md +49 -4
- package/docs/reference/cli/domains.md +7 -3
- package/docs/reference/cli/email.md +3 -1
- package/docs/reference/cli/platform-installation.md +9 -53
- package/docs/reference/cli/platform-security.md +36 -8
- package/docs/reference/cli/platform-users.md +11 -1
- package/docs/reference/cli/platform-zero-trust.md +1 -1
- package/docs/reference/cli/project.md +52 -11
- package/docs/reference/cli/setup.md +8 -10
- package/docs/reference/cli.md +49 -47
- package/docs/reference/config.md +22 -8
- package/docs/reference/resource-inference.md +8 -1
- package/docs/reference/structure.md +5 -0
- package/package.json +52 -25
- package/schema.json +20 -1
- package/skills/void/SKILL.md +60 -54
- package/dist/cf-build-output-Wpk_e5CI.mjs +0 -1
- package/dist/cf-worker-settings-BBdlhm9U.mjs +0 -41
- package/dist/cli/db-execute-process.d.mts +0 -2
- package/dist/cli/db-execute-process.mjs +0 -57
- package/dist/cloudflare-user-output-CCR99eQY.mjs +0 -19
- package/dist/collect-B6nlSnsb.mjs +0 -1
- package/dist/db-args-BvMwAber.mjs +0 -1
- package/dist/deploy-GT4CW5fs.mjs +0 -2
- package/dist/discover-D2KGP3cR.mjs +0 -1
- package/dist/entry-Bwb9ev8K.mjs +0 -113
- package/dist/gen-vhBDHs3q.mjs +0 -1
- package/dist/help-fKPzcTJv.mjs +0 -1
- package/dist/isr-config-DiTnL9Tb.mjs +0 -115
- package/dist/login-BbSQTZ6d.mjs +0 -1
- package/dist/migrate-C9aoWLvY.mjs +0 -1
- package/dist/operator-cmd-jnjzuJKX.mjs +0 -1
- package/dist/output-D7K9TWIA.mjs +0 -1
- package/dist/platform-args-CMwMoiLp.mjs +0 -1
- package/dist/prepare-DcwigRUS.mjs +0 -1
- package/dist/providers-D5P8j_8D.d.mts +0 -5
- package/dist/resolve-project-YsTH-U9I.mjs +0 -1
- package/dist/static-exports-s7P86Ngp.mjs +0 -354
- package/dist/validate-CZYUIfR-.mjs +0 -1
- package/dist/wrangler-Dq269bjx.mjs +0 -1
- package/docs/guide/platform/development/local.md +0 -120
- package/docs/guide/platform/development/runtime.md +0 -115
- package/docs/guide/platform/development/schema-ci.md +0 -44
- package/docs/guide/platform-development.md +0 -16
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as CloudContext } from "./index-CqF8_p9C.mjs";
|
|
2
|
+
import { t as StandardSchemaV1 } from "./standard-schema-CuDawHOC.mjs";
|
|
3
|
+
import { n as CloudBindings } from "./bindings-C7zOgxT3.mjs";
|
|
2
4
|
import { n as HeadDescriptor, t as HeadConfig } from "./head-fUp8n_QJ.mjs";
|
|
3
|
-
import { s as PageRenderMode, t as DevCssAsset } from "./types-
|
|
5
|
+
import { s as PageRenderMode, t as DevCssAsset } from "./types-RYVujNS6.mjs";
|
|
4
6
|
import { Context } from "hono";
|
|
7
|
+
import { HTTPException } from "hono/http-exception";
|
|
5
8
|
/** Escape characters that are unsafe inside inline <script> tags to prevent XSS. */
|
|
6
9
|
declare function safeJsonStringify(value: unknown): string;
|
|
7
10
|
type PageObject = {
|
|
@@ -10,6 +13,8 @@ type PageObject = {
|
|
|
10
13
|
component: string;
|
|
11
14
|
props: Record<string, unknown>;
|
|
12
15
|
params: Record<string, string>;
|
|
16
|
+
/** The loader's validated query when the page opts into sharing it. */
|
|
17
|
+
query?: Record<string, unknown>;
|
|
13
18
|
shared: Record<string, unknown>;
|
|
14
19
|
url: string;
|
|
15
20
|
errors: Record<string, string> | null;
|
|
@@ -22,15 +27,32 @@ type PageObject = {
|
|
|
22
27
|
type PageRenderResult = string | ReadableStream<Uint8Array>;
|
|
23
28
|
type PageHandler = ((c: CloudContext) => unknown | Promise<unknown>) | undefined;
|
|
24
29
|
type PageHeadHandler = ((c: CloudContext, props: Record<string, unknown>) => HeadConfig | undefined) | undefined;
|
|
30
|
+
type BoundaryHeadHandler = (c: CloudContext, props: {
|
|
31
|
+
error: {
|
|
32
|
+
status: number;
|
|
33
|
+
message: string;
|
|
34
|
+
};
|
|
35
|
+
}) => HeadConfig | undefined;
|
|
25
36
|
type PageRequestContext = Context | CloudContext;
|
|
26
37
|
type PageRenderOptions = {
|
|
27
38
|
renderMode?: PageRenderMode;
|
|
28
39
|
/** Dev server build: rejected deferred props keep their raw error message. */
|
|
29
40
|
dev?: boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Whether the page publishes the query its loader validated. Off unless the
|
|
43
|
+
* page sets `export const exposeQuery = true`, since a schema's output can be
|
|
44
|
+
* data the loader never chose to send.
|
|
45
|
+
*/
|
|
46
|
+
exposeQuery?: boolean;
|
|
47
|
+
querySchema?: StandardSchemaV1;
|
|
30
48
|
boundaries?: {
|
|
31
49
|
notFound?: string;
|
|
32
50
|
notFoundErrors?: Array<string>;
|
|
33
51
|
errors: Array<string>;
|
|
52
|
+
/** Loads a boundary's `.server` companion, by plan id. Added at runtime, never serialized. */
|
|
53
|
+
loadHeads?: Readonly<Record<string, () => Promise<{
|
|
54
|
+
head?: BoundaryHeadHandler;
|
|
55
|
+
}>>>;
|
|
34
56
|
};
|
|
35
57
|
};
|
|
36
58
|
type AssetTags = {
|
|
@@ -40,8 +62,9 @@ type AssetTags = {
|
|
|
40
62
|
devCss?: Array<DevCssAsset>;
|
|
41
63
|
devCssNonce?: string;
|
|
42
64
|
};
|
|
43
|
-
type RenderPage = (pageObj: PageObject, assetTags: AssetTags, requestUrl: string) => Promise<PageRenderResult>;
|
|
65
|
+
type RenderPage = (pageObj: PageObject, assetTags: AssetTags, requestUrl: string, request: CloudContext["req"]) => Promise<PageRenderResult>;
|
|
44
66
|
type GetAssetTags = (req: Request, env: CloudBindings, componentId: string) => Promise<AssetTags>;
|
|
67
|
+
declare function isPageResponseError(error: unknown): error is Pick<HTTPException, "getResponse">;
|
|
45
68
|
/** Recover HTTP failures outside the loader leaf without executing application code again. */
|
|
46
69
|
declare function recoverPageHttpException(error: unknown, c: PageRequestContext, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response | undefined>;
|
|
47
70
|
interface FormValidationErrors {
|
|
@@ -53,4 +76,4 @@ declare function flattenValidationErrors(body: unknown): FormValidationErrors;
|
|
|
53
76
|
declare function handlePageGet(handler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
54
77
|
/** Handle POST/PUT/PATCH/DELETE page request — run mutation, then re-run GET or redirect */
|
|
55
78
|
declare function handlePageMutation(mutationHandler: PageHandler, getHandler: PageHandler, headFn: PageHeadHandler, c: PageRequestContext, componentId: string, renderFn: RenderPage, getAssetTags: GetAssetTags, configHead?: HeadConfig, options?: PageRenderOptions): Promise<Response>;
|
|
56
|
-
export { handlePageMutation as a, handlePageGet as i, PageRenderResult as n,
|
|
79
|
+
export { handlePageMutation as a, safeJsonStringify as c, handlePageGet as i, PageRenderResult as n, isPageResponseError as o, flattenValidationErrors as r, recoverPageHttpException as s, PageObject as t };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { d as isRealD1Id, f as isRealHyperdriveId } from "./provision-
|
|
1
|
+
export { d as isRealD1Id, f as isRealHyperdriveId } from "./provision-CQykn8gu.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-BG6RQavH.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { d as resolveCloudflareOperationArgv, n as decodeCloudflareOperationResult, r as encodeCloudflareOperation } from "./cloudflare-process-DFNpqV_m.mjs";
|
|
5
|
+
import { g as persistMaterializedWranglerConfig, j as writeProvisionedWranglerConfig, o as assertNoDuplicateMembers, v as readProvisionedBindingEntry } from "./wrangler-AyMfdVJK.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";
|
|
@@ -469,7 +469,7 @@ function createDefaultRunWrangler(root, options) {
|
|
|
469
469
|
const [command, ...prefix] = launcher;
|
|
470
470
|
const isWindows = process.platform === "win32";
|
|
471
471
|
const teardownDeadlineMs = options?.signalTeardownDeadlineMs ?? confirmGraceMs + SIGNAL_TEARDOWN_DEADLINE_MARGIN_MS;
|
|
472
|
-
|
|
472
|
+
const execute = (args, opts, argv) => new Promise((resolvePromise, rejectPromise) => {
|
|
473
473
|
const parallelWorkerUpload = options?.parallelWorkerUpload === true && args.type === "versions.upload";
|
|
474
474
|
const interactive = (args.type === "versions.upload" || args.type === "worker.deploy") && args.interactive === true;
|
|
475
475
|
if (activeTeardown !== void 0) {
|
|
@@ -480,7 +480,7 @@ function createDefaultRunWrangler(root, options) {
|
|
|
480
480
|
rejectPromise(/* @__PURE__ */ new Error("provision: refusing to spawn a Cloudflare operation process — another one is already active in this process (only two immutable Worker uploads may overlap; all other Cloudflare commands and provisions remain sequential)."));
|
|
481
481
|
return;
|
|
482
482
|
}
|
|
483
|
-
const child = spawn(command, [...prefix, ...
|
|
483
|
+
const child = spawn(command, [...prefix, ...argv], {
|
|
484
484
|
cwd: opts.cwd ?? root,
|
|
485
485
|
shell: false,
|
|
486
486
|
env: {
|
|
@@ -706,6 +706,10 @@ function createDefaultRunWrangler(root, options) {
|
|
|
706
706
|
options?.onSpawnedChild?.(child);
|
|
707
707
|
if (opts.input !== void 0) child.stdin?.end(opts.input);
|
|
708
708
|
});
|
|
709
|
+
return async (args, opts) => {
|
|
710
|
+
using files = new DisposableStack();
|
|
711
|
+
return await execute(args, opts, encodeCloudflareOperation(args, files));
|
|
712
|
+
};
|
|
709
713
|
}
|
|
710
714
|
/**
|
|
711
715
|
* Normalize a finished child into a {@link RunWranglerResult}. A signal, a spawn error or a
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { H as outro, L as log } from "./dist-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { h as import_picocolors, o as dim } from "./output-
|
|
5
|
-
import { r as readProjectConfig } from "./project-
|
|
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 { h as import_picocolors, o as dim } from "./output-DhJgS6Ve.mjs";
|
|
5
|
+
import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
6
|
// src/cli/requests.ts
|
|
7
7
|
async function runRequestsCommand(root, range, status) {
|
|
8
8
|
console.log();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { n as inferDefaultSlug } from "./resolve-project-s_FGWyr-.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
1
|
+
import { L as log } from "./dist-BngS28id.mjs";
|
|
2
2
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
3
|
-
import { r as readProjectConfig } from "./project-
|
|
3
|
+
import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
4
4
|
import { readFileSync } from "node:fs";
|
|
5
5
|
// src/cli/resolve-project.ts
|
|
6
6
|
function getRequestedProjectSlug(options) {
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { a as requireRuntimeBinding } from "./runtime-C_VPIJBF.mjs";
|
|
2
|
+
// src/runtime/resource-binding.ts
|
|
3
|
+
/** Connect a file-based definition to the binding selected by the generated Worker. */
|
|
4
|
+
function createResourceBinding(definition, directory, helper) {
|
|
5
|
+
const prefix = directory === "workflows" ? "workflows" : "durable";
|
|
6
|
+
const noun = helper === "defineDurableState()" ? "state definition" : "definition";
|
|
7
|
+
let binding;
|
|
8
|
+
return {
|
|
9
|
+
bind(name, resourceName) {
|
|
10
|
+
if (definition.name !== resourceName) throw new Error(`${prefix}: name must be statically discoverable in ${helper}. Run void info to inspect this definition.`);
|
|
11
|
+
if (binding && binding !== name) throw new Error(`${prefix}: ${noun} is already bound to '${binding}' and cannot also bind to '${name}'.`);
|
|
12
|
+
binding = name;
|
|
13
|
+
},
|
|
14
|
+
get() {
|
|
15
|
+
if (!binding) throw new Error(`${prefix}: this ${noun} is not bound. Default-export it from a file in ${directory}/.`);
|
|
16
|
+
return requireRuntimeBinding(binding);
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export { createResourceBinding as t };
|
|
@@ -2,9 +2,13 @@
|
|
|
2
2
|
function resourceNameWords(value) {
|
|
3
3
|
return value.split(/[^a-zA-Z0-9]+/).filter(Boolean);
|
|
4
4
|
}
|
|
5
|
+
/** Workflow resource names can start with a digit because the generated class adds a prefix. */
|
|
6
|
+
function isWorkflowName(value) {
|
|
7
|
+
return typeof value === "string" && /[a-zA-Z0-9]/.test(value);
|
|
8
|
+
}
|
|
5
9
|
function isResourceName(value) {
|
|
6
10
|
if (typeof value !== "string") return false;
|
|
7
11
|
const words = resourceNameWords(value);
|
|
8
12
|
return words.length > 0 && /^[a-zA-Z]/.test(words[0]);
|
|
9
13
|
}
|
|
10
|
-
export {
|
|
14
|
+
export { isWorkflowName as n, resourceNameWords as r, isResourceName as t };
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
1
|
+
import { c as getToken } from "./auth-CeBmolb-.mjs";
|
|
2
|
+
import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
|
|
3
|
+
import { H as outro, L as log, O as cancel, tt as isCancel } from "./dist-BngS28id.mjs";
|
|
4
|
+
import { a as select, n as confirm } from "./interactive-prompts-EK0dilFu.mjs";
|
|
5
|
+
import { a as createSpinner, c as formatCount, d as formatRelativeTime, o as dim, y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
6
|
+
import { n as readDeploymentPlatform, r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
7
|
// src/cli/rollback.ts
|
|
7
8
|
async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
8
9
|
console.log();
|
|
@@ -78,7 +79,7 @@ async function runRollbackCommand(root, deployId, explicitPlatform) {
|
|
|
78
79
|
}
|
|
79
80
|
}
|
|
80
81
|
async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
81
|
-
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareOperationContext } = await import("./cloudflare-operations-
|
|
82
|
+
const { activateCloudflareExistingVersion, readCloudflareWorkerStatus, resolveCloudflareWorkerVersion, resolveCloudflareOperationContext } = await import("./cloudflare-operations-BmICrRnm.mjs");
|
|
82
83
|
const context = resolveCloudflareOperationContext(root);
|
|
83
84
|
const status = await readCloudflareWorkerStatus(context);
|
|
84
85
|
const deployedVersionIds = new Set(status.deployedVersionIds);
|
|
@@ -101,11 +102,14 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
|
101
102
|
if (!target) {
|
|
102
103
|
const result = await select({
|
|
103
104
|
message: "Select a version to roll back to:",
|
|
104
|
-
options: candidates.map((version) =>
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
105
|
+
options: candidates.map((version) => {
|
|
106
|
+
const count = version.metadata?.migrations?.length ?? version.metadata?.migrationSummary?.count;
|
|
107
|
+
return {
|
|
108
|
+
value: version.id,
|
|
109
|
+
label: `${version.id} ${dim(version.createdAt ? formatRelativeTime(version.createdAt) : "")}`,
|
|
110
|
+
hint: count !== void 0 ? formatCount(count, "migration") : "migration state unknown"
|
|
111
|
+
};
|
|
112
|
+
})
|
|
109
113
|
});
|
|
110
114
|
if (isCancel(result)) {
|
|
111
115
|
cancel("Rollback cancelled.");
|
|
@@ -118,11 +122,18 @@ async function runCloudflareRollback(root, deployId, restorePlatformFlag) {
|
|
|
118
122
|
}
|
|
119
123
|
target = selected;
|
|
120
124
|
}
|
|
121
|
-
const
|
|
125
|
+
const active = status.versions.find((version) => version.id === status.activeVersionId);
|
|
126
|
+
target = await resolveCloudflareWorkerVersion(context, target);
|
|
127
|
+
const current = active && await resolveCloudflareWorkerVersion(context, active);
|
|
122
128
|
if (target.metadata?.schema !== 2 || current?.metadata?.schema !== 2 || target.metadata.triggerConfig.preserve || current.metadata.triggerConfig.preserve) log.info("This rollback keeps the current domains, routes, and schedules. The selected version has no complete trigger snapshot.");
|
|
123
129
|
if (!current?.metadata?.migrations || !target.metadata?.migrations) {
|
|
124
|
-
|
|
125
|
-
|
|
130
|
+
const { cloudflareMigrationSummary } = await import("@void/deploy-cloudflare");
|
|
131
|
+
const currentHistory = cloudflareMigrationSummary(current?.metadata);
|
|
132
|
+
const targetHistory = cloudflareMigrationSummary(target.metadata);
|
|
133
|
+
if (!currentHistory || !targetHistory || currentHistory.digest !== targetHistory.digest) {
|
|
134
|
+
log.warn(currentHistory && targetHistory ? `The versions have different migration histories (current: ${currentHistory.count}, selected: ${targetHistory.count}). The older code will run against the current database schema.` : "Void migration metadata is unavailable for one of these versions. Database migrations are forward-only and will not be reverted.");
|
|
135
|
+
await confirmRollbackOrExit();
|
|
136
|
+
}
|
|
126
137
|
} else {
|
|
127
138
|
const targetSet = new Set(target.metadata.migrations);
|
|
128
139
|
await confirmUnrevertedMigrations(current.metadata.migrations.filter((migration) => !targetSet.has(migration)), "version", restorePlatformFlag);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { o as writeFileIfChanged } from "./project-tsconfig-
|
|
2
|
+
import { o as writeFileIfChanged } from "./project-tsconfig-LjgxDdj_.mjs";
|
|
3
3
|
import { existsSync, rmSync } from "node:fs";
|
|
4
4
|
// src/codegen/binding-types.ts
|
|
5
5
|
const bindingTypes = [
|
|
@@ -177,8 +177,8 @@ const managedBindings = /* @__PURE__ */ new Set([
|
|
|
177
177
|
"SANDBOX",
|
|
178
178
|
"ASSETS"
|
|
179
179
|
]);
|
|
180
|
-
/** Generate types for
|
|
181
|
-
function generateBindingTypes(config) {
|
|
180
|
+
/** Generate types for configured bindings and local Workflow entrypoints. */
|
|
181
|
+
function generateBindingTypes(config, workflows = []) {
|
|
182
182
|
if (config.target && config.target !== "cloudflare") return null;
|
|
183
183
|
const bindings = /* @__PURE__ */ new Map();
|
|
184
184
|
for (const [path, nameField, type] of bindingTypes) {
|
|
@@ -186,24 +186,31 @@ function generateBindingTypes(config) {
|
|
|
186
186
|
for (const field of path.split(".")) value = value && typeof value === "object" ? value[field] : void 0;
|
|
187
187
|
for (const entry of Array.isArray(value) ? value : [value]) {
|
|
188
188
|
const name = entry && typeof entry === "object" ? entry[nameField] : void 0;
|
|
189
|
-
if (typeof name === "string" && !managedBindings.has(name)) bindings.set(name, type);
|
|
189
|
+
if (typeof name === "string" && !managedBindings.has(name)) bindings.set(name, ` ${JSON.stringify(name)}: ${type};`);
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
+
for (const { bindingName, relativePath } of workflows) {
|
|
193
|
+
const params = `NativeWorkflowParams<typeof import(${JSON.stringify("../workflows/" + relativePath)}).default.class>`;
|
|
194
|
+
const field = ` ${JSON.stringify(bindingName)}: WorkflowBinding<${params}>;`;
|
|
195
|
+
const directive = /\.(?:[cm]?js|jsx)$/.test(relativePath) ? " // @ts-ignore JavaScript workflows can lack declarations when allowJs is disabled.\n" : "";
|
|
196
|
+
bindings.set(bindingName, directive + field);
|
|
197
|
+
}
|
|
192
198
|
if (bindings.size === 0) return null;
|
|
193
199
|
return [
|
|
194
200
|
"// Auto-generated by void — do not edit",
|
|
195
201
|
"export {};",
|
|
202
|
+
...workflows.length ? ["import type { NativeWorkflowParams, WorkflowBinding } from \"void/workflows\";"] : [],
|
|
196
203
|
"declare global {",
|
|
197
204
|
" interface VoidGeneratedEnvBindings {",
|
|
198
|
-
...[...bindings].sort(([a], [b]) => a.localeCompare(b)).map(([
|
|
205
|
+
...[...bindings].sort(([a], [b]) => a.localeCompare(b)).map(([, field]) => field),
|
|
199
206
|
" }",
|
|
200
207
|
"}",
|
|
201
208
|
""
|
|
202
209
|
].join("\n");
|
|
203
210
|
}
|
|
204
|
-
function syncBindingTypes(root, config) {
|
|
211
|
+
function syncBindingTypes(root, config, workflows = []) {
|
|
205
212
|
const path = join(root, ".void", "bindings.d.ts");
|
|
206
|
-
const dts = generateBindingTypes(config);
|
|
213
|
+
const dts = generateBindingTypes(config, workflows);
|
|
207
214
|
if (dts) writeFileIfChanged(path, dts);
|
|
208
215
|
else rmSync(path, { force: true });
|
|
209
216
|
}
|
|
@@ -293,6 +300,49 @@ function encodeRoutePattern(pattern) {
|
|
|
293
300
|
}).join("/");
|
|
294
301
|
}
|
|
295
302
|
/**
|
|
303
|
+
* One PageQueryMap entry per page whose loader could validate its query.
|
|
304
|
+
*
|
|
305
|
+
* The schema is read from the page server's exported `query` value, not from
|
|
306
|
+
* the loader. A page server reaches `void/routes` through `void`, so reading
|
|
307
|
+
* the loader's inferred type from there would make it refer to itself and
|
|
308
|
+
* TypeScript would infer `any` for the handler. A schema value has no such
|
|
309
|
+
* dependency.
|
|
310
|
+
*
|
|
311
|
+
* A `.dev` + `.prod` pair accepts inputs valid in both environments and can
|
|
312
|
+
* return either environment's output.
|
|
313
|
+
*/
|
|
314
|
+
function pageQueryEntry(importPath) {
|
|
315
|
+
const module = `typeof import(${JSON.stringify(importPath)})`;
|
|
316
|
+
return {
|
|
317
|
+
input: `PageQueryInputOf<PageQuerySchema<${module}>>`,
|
|
318
|
+
output: `PageQueryOutputForPage<${module}>`
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
function pageQueryLines(pages, pagesDir, outDir) {
|
|
322
|
+
if (!pagesDir) return [];
|
|
323
|
+
const typedPatterns = new Set(pages.flatMap((page) => page.serverPath !== null && page.methods.includes("loader") ? [page.pattern] : []));
|
|
324
|
+
if (typedPatterns.size === 0) return [];
|
|
325
|
+
const entriesByPattern = /* @__PURE__ */ new Map();
|
|
326
|
+
for (const page of pages) {
|
|
327
|
+
if (!typedPatterns.has(page.pattern)) continue;
|
|
328
|
+
const entry = page.serverPath !== null && page.methods.includes("loader") ? pageQueryEntry(relative(outDir, `${pagesDir}/${page.serverPath}`)) : {
|
|
329
|
+
input: "unknown",
|
|
330
|
+
output: "RawPageQuery"
|
|
331
|
+
};
|
|
332
|
+
const entries = entriesByPattern.get(page.pattern);
|
|
333
|
+
if (entries) entries.push(entry);
|
|
334
|
+
else entriesByPattern.set(page.pattern, [entry]);
|
|
335
|
+
}
|
|
336
|
+
const lines = [" export interface PageQueryMap {"];
|
|
337
|
+
for (const [pattern, entries] of entriesByPattern) {
|
|
338
|
+
const input = entries.map((entry) => entry.input).reduce((left, right) => `SharedPageQueryInput<${left}, ${right}>`);
|
|
339
|
+
lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: {`, ` input: PageQueryInputFallback<${input}>;`, ` output: ${entries.map(({ output }) => output).join(" | ")};`, " };");
|
|
340
|
+
legacyRouteAlias(lines, "PageQueryMap", pattern);
|
|
341
|
+
}
|
|
342
|
+
lines.push(" }");
|
|
343
|
+
return lines;
|
|
344
|
+
}
|
|
345
|
+
/**
|
|
296
346
|
* Generate .void/routes.d.ts content.
|
|
297
347
|
*
|
|
298
348
|
* Uses `typeof import(...)` so TypeScript resolves all types.
|
|
@@ -300,7 +350,7 @@ function encodeRoutePattern(pattern) {
|
|
|
300
350
|
*/
|
|
301
351
|
function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
|
|
302
352
|
const lines = [];
|
|
303
|
-
lines.push("// Auto-generated by void — do not edit", "export {}", "type StandardSchemaV1<Input = unknown, Output = Input> = {", " readonly \"~standard\": {", " readonly version: 1;", " readonly vendor: string;", " readonly validate: (value: unknown) => unknown;", " readonly types?: { readonly input: Input; readonly output: Output } | undefined;", " };", "};", "declare namespace StandardSchemaV1 {", " type InferInput<Schema extends StandardSchemaV1> = NonNullable<", " Schema[\"~standard\"][\"types\"]", " >[\"input\"];", " type InferOutput<Schema extends StandardSchemaV1> = NonNullable<", " Schema[\"~standard\"][\"types\"]", " >[\"output\"];", "}", "", "type JsonOmitted = undefined | Function | symbol;", "type SerializeArrayElement<T> = T extends JsonOmitted ? null : Serialize<T>;", "type SerializeArray<T extends readonly unknown[]> =", " { [K in keyof T]: SerializeArrayElement<T[K]> } extends infer A", " ? A extends readonly unknown[] ? A", " : T extends unknown[] ? Array<SerializeArrayElement<T[number]>>", " : ReadonlyArray<SerializeArrayElement<T[number]>>", " : never;", "type JsonOptionalKeys<T> = {", " [K in keyof T]-?: Extract<T[K], JsonOmitted> extends never ? never : K;", "}[keyof T];", "type SerializeObject<T> = {", " [K in keyof T as K extends symbol ? never : T[K] extends JsonOmitted ? never : K]: Serialize<T[K]>;", "};", "", "type Serialize<T> =", " T extends Response ? never :", " T extends Date ? string :", " T extends bigint ? never :", " T extends JsonOmitted ? never :", " T extends readonly unknown[] ? SerializeArray<T> :", " T extends object ? SerializeObject<Omit<T, JsonOptionalKeys<T>> & Partial<Pick<T, JsonOptionalKeys<T>>>> :", " T;", "", "type ExtractInput<V> = {", " [K in keyof V as V[K] extends StandardSchemaV1 ? K : never]:", " V[K] extends StandardSchemaV1 ? StandardSchemaV1.InferInput<V[K]> : never;", "};", "", "type ExtractOutput<S> =", " S extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<S> : never;", "", "type RouteParams<P extends readonly string[]> =", " P extends readonly [] ? Record<string, never> : { [K in P[number]]: string };", "", "declare module \"void/routes\" {", " export interface RouteMap {}", " export interface WebSocketRouteMap {}", " export interface PageActionMap {}", "", " export type RoutePath = keyof RoutePathMap & string;", " export type RouteQueryValue = string | number | boolean | null | undefined;", " export type RouteQuery = Record<string, RouteQueryValue | ReadonlyArray<RouteQueryValue>>;", "
|
|
353
|
+
lines.push("// Auto-generated by void — do not edit", "export {}", "type StandardSchemaV1<Input = unknown, Output = Input> = {", " readonly \"~standard\": {", " readonly version: 1;", " readonly vendor: string;", " readonly validate: (value: unknown) => unknown;", " readonly types?: { readonly input: Input; readonly output: Output } | undefined;", " };", "};", "declare namespace StandardSchemaV1 {", " type InferInput<Schema extends StandardSchemaV1> = NonNullable<", " Schema[\"~standard\"][\"types\"]", " >[\"input\"];", " type InferOutput<Schema extends StandardSchemaV1> = NonNullable<", " Schema[\"~standard\"][\"types\"]", " >[\"output\"];", "}", "", "type JsonOmitted = undefined | Function | symbol;", "type SerializeArrayElement<T> = T extends JsonOmitted ? null : Serialize<T>;", "type SerializeArray<T extends readonly unknown[]> =", " { [K in keyof T]: SerializeArrayElement<T[K]> } extends infer A", " ? A extends readonly unknown[] ? A", " : T extends unknown[] ? Array<SerializeArrayElement<T[number]>>", " : ReadonlyArray<SerializeArrayElement<T[number]>>", " : never;", "type JsonOptionalKeys<T> = {", " [K in keyof T]-?: Extract<T[K], JsonOmitted> extends never ? never : K;", "}[keyof T];", "type SerializeObject<T> = {", " [K in keyof T as K extends symbol ? never : T[K] extends JsonOmitted ? never : K]: Serialize<T[K]>;", "};", "", "type Serialize<T> =", " T extends Response ? never :", " T extends Date ? string :", " T extends bigint ? never :", " T extends JsonOmitted ? never :", " T extends readonly unknown[] ? SerializeArray<T> :", " T extends object ? SerializeObject<Omit<T, JsonOptionalKeys<T>> & Partial<Pick<T, JsonOptionalKeys<T>>>> :", " T;", "", "type ExtractInput<V> = {", " [K in keyof V as V[K] extends StandardSchemaV1 ? K : never]:", " V[K] extends StandardSchemaV1 ? StandardSchemaV1.InferInput<V[K]> : never;", "};", "", "type ExtractOutput<S> =", " S extends StandardSchemaV1 ? StandardSchemaV1.InferOutput<S> : never;", "", "type RouteParams<P extends readonly string[]> =", " P extends readonly [] ? Record<string, never> : { [K in P[number]]: string };", "", "declare module \"void/routes\" {", " export interface RouteMap {}", " export interface WebSocketRouteMap {}", " export interface PageActionMap {}", "", " export type RoutePath = keyof RoutePathMap & string;", " export type RouteQueryValue = string | number | boolean | null | undefined;", " export type RouteQuery = Record<string, RouteQueryValue | ReadonlyArray<RouteQueryValue>>;", " type PageQuerySchema<M> = M extends { query: infer S } ? Extract<S, StandardSchemaV1> : never;", " type RouteQueryItemOf<T> = unknown extends T ? RouteQueryValue : T extends RouteQueryValue ? T : string;", " type RepeatableQueryItem = NonNullable<RouteQueryValue>;", " type RouteQueryArrayLength<Item, Input> = [Item] extends [never] ? (undefined extends Input ? readonly [] : never)", " : [Item] extends [Input]", " ? undefined extends Input ? ReadonlyArray<RepeatableQueryItem>", " : readonly [RepeatableQueryItem, ...Array<RepeatableQueryItem>]", " : readonly [RepeatableQueryItem, RepeatableQueryItem, ...Array<RepeatableQueryItem>] |", " readonly [Extract<Input, RepeatableQueryItem>] | (undefined extends Input ? readonly [] : never);", " type RouteQueryArrayOf<T extends readonly unknown[], Input> =", " { readonly [K in keyof T]: NonNullable<RouteQueryItemOf<T[K]>> } &", " RouteQueryArrayLength<NonNullable<RouteQueryItemOf<T[number]>>, Input>;", " type RouteQueryValueOf<T, Optional, Input = T> = unknown extends T", " ? RouteQueryValue | ReadonlyArray<RouteQueryValue>", " : T extends readonly unknown[] ? RouteQueryArrayOf<T, Input | (Optional extends true ? undefined : never)>", " : T extends null ? Optional extends true ? null : never : RouteQueryItemOf<T>;", " type RouteQueryFieldsOf<I> = I extends readonly unknown[] ? never", " : I extends object ? keyof I extends never ? Record<string, never>", " : { [K in keyof I]: RouteQueryValueOf<I[K], {} extends Pick<I, K> ? true : false> } : never;", " type PageQueryInputOf<S> = [S] extends [never] ? unknown", " : S extends StandardSchemaV1", " ? unknown extends StandardSchemaV1.InferInput<S> ? unknown : RouteQueryFieldsOf<StandardSchemaV1.InferInput<S>>", " : unknown;", " type RequiredQueryKeys<T> = { [K in keyof T]-?: {} extends Pick<T, K> ? never : K }[keyof T];", " type SharedPageQueryFields<A, B, K extends keyof A & keyof B = keyof A & keyof B> =", " [Exclude<RequiredQueryKeys<A>, keyof B> | Exclude<RequiredQueryKeys<B>, keyof A>] extends [never]", " ? [K] extends [never] ? Record<string, never> : Pick<A & B, K> & { [Key in K]?: A[Key] & B[Key] }", " : never;", " type SharedPageQueryInput<A, B> = unknown extends A ? B : unknown extends B ? A", " : A extends object ? B extends object ? SharedPageQueryFields<A, B> : never : never;", " type RawPageQuery = Record<string, string | Array<string>>;", " type PageQueryRecordOf<T> = unknown extends T ? Record<string, unknown>", " : T extends readonly unknown[] ? RawPageQuery : T extends object ? T : RawPageQuery;", " type PageQueryOutputOf<S> = S extends StandardSchemaV1 ? PageQueryRecordOf<StandardSchemaV1.InferOutput<S>> : never;", " type PageQueryOutputForPage<M> = M extends { exposeQuery: infer Expose }", " ? true extends Expose", " ? PageQueryOutputFallback<PageQueryOutputOf<PageQuerySchema<M>>> | ([Expose] extends [true] ? never : RawPageQuery)", " : RawPageQuery", " : RawPageQuery;", " type PageQueryInputFallback<T> = unknown extends T ? RouteQuery : T;", " type PageQueryOutputFallback<T> = [T] extends [never] ? RawPageQuery : T;", " type RouteQueryOptionsForPath<P> = P extends keyof PageQueryMap", " ? {} extends PageQueryMap[P]['input']", " ? { query?: PageQueryMap[P]['input'] }", " : { query: PageQueryMap[P]['input'] }", " : { query?: RouteQuery };", " type QueryShape<Q> = Q extends object ? [Q, Required<Q>, keyof Q] : Q;", " type QueryContract<Options> = Options extends { query?: infer Q }", " ? [Options, QueryShape<Q>]", " : never;", " type DifferentQueryPaths<P, Contracts> = P extends RoutePath", " ? [Contracts] extends [QueryContract<RouteQueryOptionsForPath<P>>] ? never : P", " : never;", " type RouteQueryOptions<P, Options = RouteQueryOptionsForPath<P>> =", " [DifferentQueryPaths<P, QueryContract<Options>>] extends [never] ? Options", " : [Extract<Options, { query: unknown }>] extends [never] ? { query?: never } : { query: never };", " export type RouteOptions<P extends RoutePath> = {", " hash?: string;", " query?: RouteQueryOptionsForPath<P>['query'];", " } & RouteQueryOptions<P> & ([RoutePathMap[P]] extends [never]", " ? { params?: never }", " : { params: { [K in RoutePathMap[P] & string]: string | number } });", " export type RouteUrlArgs<P extends RoutePath> = {} extends RouteOptions<P>", " ? [options?: RouteOptions<P>]", " : [options: RouteOptions<P>];", " export type RouteDestination<P extends RoutePath = RoutePath> = P extends RoutePath", " ? { pathname: P } & RouteOptions<P>", " : never;", " type RouteUrlSegment<S extends string> = S extends `:${string}` | `[${string}]` | \"*\" ? string : S;", " type CheckedRoutePath<P extends string> = P extends `/${infer Segment}/${infer Rest}`", " ? Rest extends \"\"", " ? string extends RouteUrlSegment<Segment> ? never : P", " : P", " : P extends `/${infer Segment}`", " ? string extends RouteUrlSegment<Segment> ? never : P", " : P;", " type RouteSegmentsUrl<P extends string> = P extends `${infer Segment}/${infer Rest}`", " ? `${RouteUrlSegment<Segment>}/${RouteSegmentsUrl<Rest>}`", " : RouteUrlSegment<P>;", " type RoutePatternUrl<P extends string> = P extends `${infer Prefix}/${\"*\" | \"[...]\"}/`", " ? `${RouteSegmentsUrl<Prefix>}/` | `${RouteSegmentsUrl<Prefix>}/${string}/`", " : P extends `${infer Prefix}/${\"*\" | \"[...]\"}`", " ? (Prefix extends \"\" ? \"/\" : RouteSegmentsUrl<Prefix>) | `${RouteSegmentsUrl<Prefix>}/${string}`", " : RouteSegmentsUrl<P>;", " type EncodedRoutePath = EncodedRoutePathMap[keyof EncodedRoutePathMap] & string;", " type RoutePathUrl = RoutePatternUrl<CheckedRoutePath<RoutePath | EncodedRoutePath>>;", " type BuiltRouteUrl = string & { readonly __voidRouteUrl: true };", " type RouteUrlBase = BuiltRouteUrl | RoutePathUrl;", " type TypedRoutes = RouteTypesConfig extends { typedRoutes: true } ? true : false;", " export type RouteUrl = TypedRoutes extends true", " ? RouteUrlBase | `${RouteUrlBase}${\"?\" | \"#\"}${string}`", " : string;", " export type Href = TypedRoutes extends true", " ? RouteUrl | `${\"?\" | \"#\"}${string}` | `${\"http://\" | \"https://\" | \"mailto:\" | \"tel:\"}${string}`", " : string;", " export type RouteUrlInput = Href | URL | RouteDestination;", " export function routeUrl<P extends RoutePath>(", " path: P,", " ...args: RouteUrlArgs<P>", " ): RouteUrl;", "", " export interface RouteTypesConfig {");
|
|
304
354
|
if (options.typedRoutes) lines.push(" typedRoutes: true;");
|
|
305
355
|
lines.push(" }", "", " export interface RoutePathMap {");
|
|
306
356
|
const paths = /* @__PURE__ */ new Map();
|
|
@@ -332,7 +382,7 @@ function generateRouteTypes(scan, routesDir, outDir, pagesDir, options = {}) {
|
|
|
332
382
|
lines.push(` ${JSON.stringify(publicRoutePattern(pattern))}: ${names};`);
|
|
333
383
|
legacyRouteAlias(lines, "PagePathMap", pattern);
|
|
334
384
|
}
|
|
335
|
-
lines.push(" }", " export type PagePath = keyof PagePathMap & string;", " export type PageParams<P extends PagePath> = P extends PagePath", " ? { [K in Exclude<PagePathMap[P], \"*\"> & string]: string }", " : never;", "", " export interface EncodedRoutePathMap {");
|
|
385
|
+
lines.push(" }", " export type PagePath = keyof PagePathMap & string;", " export type PageParams<P extends PagePath> = P extends PagePath", " ? { [K in Exclude<PagePathMap[P], \"*\"> & string]: string }", " : never;", "", " export interface PageQueryMap {}", " export type PageQueryInput<P> = P extends keyof PageQueryMap", " ? PageQueryMap[P]['input']", " : RouteQuery;", " export type PageQuery<P> = P extends keyof PageQueryMap", " ? [PageQueryMap[P]['output']] extends [never]", " ? Record<string, string | Array<string>>", " : PageQueryMap[P]['output']", " : Record<string, string | Array<string>>;", "", ...pageQueryLines(scan.pages.pages, pagesDir, outDir), "", " export interface EncodedRoutePathMap {");
|
|
336
386
|
for (const pattern of paths.keys()) {
|
|
337
387
|
const publicPattern = publicRoutePattern(pattern);
|
|
338
388
|
const encoded = encodeRoutePattern(publicPattern);
|
|
@@ -32,9 +32,8 @@ function interpolateRouteParams(path, params, requireParams = false) {
|
|
|
32
32
|
if (replaced.startsWith("//") && !pathname.startsWith("//")) throw new TypeError(`Route param "${leadingName ?? ""}" would make the request path start with "//", which changes the request host.`);
|
|
33
33
|
return replaced + suffix;
|
|
34
34
|
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return buildRouteUrl(path, args[0]);
|
|
35
|
+
function routeUrl(path, options) {
|
|
36
|
+
return buildRouteUrl(path, options);
|
|
38
37
|
}
|
|
39
38
|
function toUrlString(value) {
|
|
40
39
|
if (typeof value === "string") return value;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EncodedRoutePathMap, RoutePathMap, RouteTypesConfig } from "void/routes";
|
|
1
|
+
import { EncodedRoutePathMap, PageQueryMap, RoutePathMap, RouteTypesConfig } from "void/routes";
|
|
2
2
|
/** Expand complete route tokens without changing query strings or fragments. */
|
|
3
3
|
declare function interpolateRouteParams(path: string, params?: Record<string, string>, requireParams?: boolean): string;
|
|
4
4
|
/** Known page, HTTP and WebSocket route patterns. */
|
|
@@ -28,20 +28,48 @@ type Href$1 = TypedRoutes extends true ? RouteUrl$1 | `${"?" | "#"}${string}` |
|
|
|
28
28
|
type RequestUrl = TypedRoutes extends true ? RouteUrl$1 | `${"http://" | "https://"}${string}` : string;
|
|
29
29
|
type RouteQueryValue = string | number | boolean | null | undefined;
|
|
30
30
|
type RouteQuery = Record<string, RouteQueryValue | ReadonlyArray<RouteQueryValue>>;
|
|
31
|
-
|
|
31
|
+
/**
|
|
32
|
+
* The page's own query, read from the schema its server file exports. A page
|
|
33
|
+
* without one keeps accepting any `RouteQuery`.
|
|
34
|
+
*/
|
|
35
|
+
type RouteQueryOptionsForPath<P> = P extends keyof PageQueryMap ? Record<never, never> extends PageQueryMap[P]["input"] ? {
|
|
36
|
+
query?: PageQueryMap[P]["input"];
|
|
37
|
+
} : {
|
|
38
|
+
query: PageQueryMap[P]["input"];
|
|
39
|
+
} : {
|
|
32
40
|
query?: RouteQuery;
|
|
41
|
+
};
|
|
42
|
+
type QueryShape<Q> = Q extends object ? [Q, Required<Q>, keyof Q] : Q;
|
|
43
|
+
type QueryContract<Options> = Options extends {
|
|
44
|
+
query?: infer Q;
|
|
45
|
+
} ? [Options, QueryShape<Q>] : never;
|
|
46
|
+
type DifferentQueryPaths<P, Contracts> = P extends RoutePath ? [Contracts] extends [QueryContract<RouteQueryOptionsForPath<P>>] ? never : P : never;
|
|
47
|
+
type RouteQueryOptions<P, Options = RouteQueryOptionsForPath<P>> = [DifferentQueryPaths<P, QueryContract<Options>>] extends [never] ? Options : [Extract<Options, {
|
|
48
|
+
query: unknown;
|
|
49
|
+
}>] extends [never] ? {
|
|
50
|
+
query?: never;
|
|
51
|
+
} : {
|
|
52
|
+
query: never;
|
|
53
|
+
};
|
|
54
|
+
type RouteOptions<P extends RoutePath> = {
|
|
33
55
|
hash?: string;
|
|
34
|
-
|
|
56
|
+
query?: RouteQueryOptionsForPath<P>["query"];
|
|
57
|
+
} & RouteQueryOptions<P> & ([RoutePathMap[P]] extends [never] ? {
|
|
35
58
|
params?: never;
|
|
36
59
|
} : {
|
|
37
60
|
params: { [K in RoutePathMap[P] & string]: string | number; };
|
|
38
61
|
});
|
|
62
|
+
/**
|
|
63
|
+
* The options `routeUrl()` requires for `P`. Required as soon as a route param
|
|
64
|
+
* or the page's query schema has a required key.
|
|
65
|
+
*/
|
|
66
|
+
type RouteUrlArgs<P extends RoutePath> = Record<never, never> extends RouteOptions<P> ? [options?: RouteOptions<P>] : [options: RouteOptions<P>];
|
|
39
67
|
type RouteDestination$1<P extends RoutePath = RoutePath> = P extends RoutePath ? {
|
|
40
68
|
pathname: P;
|
|
41
69
|
} & RouteOptions<P> : never;
|
|
42
70
|
type RouteUrlInput$1 = Href$1 | URL | RouteDestination$1;
|
|
43
71
|
/** Build a relative URL from a known route pattern. */
|
|
44
|
-
declare function routeUrl<P extends RoutePath>(path: P, ...args:
|
|
72
|
+
declare function routeUrl<P extends RoutePath>(path: P, ...args: RouteUrlArgs<P>): RouteUrl$1;
|
|
45
73
|
/** @internal Convert navigation inputs to URL strings without requiring an origin. */
|
|
46
74
|
declare function toUrlString(value: RouteUrlInput$1): string;
|
|
47
|
-
export { RoutePath as a, RouteUrl$1 as c,
|
|
75
|
+
export { RoutePath as a, RouteUrl$1 as c, TypedRoutes as d, interpolateRouteParams as f, RouteOptions as i, RouteUrlArgs as l, toUrlString as m, RequestUrl as n, RouteQuery as o, routeUrl as p, RouteDestination$1 as r, RouteQueryValue as s, Href$1 as t, RouteUrlInput$1 as u };
|
package/dist/routes-stub.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as RoutePath, c as RouteUrl,
|
|
1
|
+
import { a as RoutePath, c as RouteUrl, i as RouteOptions, l as RouteUrlArgs, o as RouteQuery, p as routeUrl, r as RouteDestination, s as RouteQueryValue, t as Href, u as RouteUrlInput } from "./route-url-zDfC-7DD.mjs";
|
|
2
2
|
/** Known URL patterns and their parameter names, augmented by .void/routes.d.ts. */
|
|
3
3
|
export interface RoutePathMap {}
|
|
4
4
|
/** Page URL patterns and their parameter names, augmented by .void/routes.d.ts. */
|
|
@@ -10,6 +10,22 @@ export type PagePath = keyof PagePathMap & string;
|
|
|
10
10
|
* catch-all has no param. A union of patterns gives a union of params.
|
|
11
11
|
*/
|
|
12
12
|
export type PageParams<P extends PagePath> = P extends PagePath ? { [K in Exclude<PagePathMap[P], "*"> & string]: string; } : never;
|
|
13
|
+
/**
|
|
14
|
+
* Query schema per page, augmented by .void/routes.d.ts when the page loader
|
|
15
|
+
* calls `defineHandler.withValidator({ query })`.
|
|
16
|
+
*
|
|
17
|
+
* `input` is what a link to the page may pass, `output` is what the page reads
|
|
18
|
+
* after validation, so defaults and coercions differ between the two.
|
|
19
|
+
*/
|
|
20
|
+
export interface PageQueryMap {}
|
|
21
|
+
/** Query values a link or navigation to `P` accepts. Untyped pages take `RouteQuery`. */
|
|
22
|
+
export type PageQueryInput<P> = P extends keyof PageQueryMap ? PageQueryMap[P]["input"] : RouteQuery;
|
|
23
|
+
/**
|
|
24
|
+
* Query values the page at `P` reads. The loader's schema has already run, so
|
|
25
|
+
* defaults are applied and coercions are done. Pages without a query schema
|
|
26
|
+
* expose the request's raw query string values.
|
|
27
|
+
*/
|
|
28
|
+
export type PageQuery<P> = P extends keyof PageQueryMap ? [PageQueryMap[P]["output"]] extends [never] ? Record<string, string | Array<string>> : PageQueryMap[P]["output"] : Record<string, string | Array<string>>;
|
|
13
29
|
/** Percent-encoded spellings of patterns with encoded fixed segments, augmented by .void/routes.d.ts. */
|
|
14
30
|
export interface EncodedRoutePathMap {}
|
|
15
31
|
/** Route type options, augmented by .void/routes.d.ts when `routing.typedRoutes` is on. */
|
|
@@ -73,4 +89,4 @@ type PageActionUrl<K extends string, P> = P extends {
|
|
|
73
89
|
} ? `${K}?${keyof A & string}${"" | `&${string}`}` : never;
|
|
74
90
|
/** Valid useForm URLs — single-action pages + "page?name" combos + default actions */
|
|
75
91
|
export type ActionUrl = { [K in keyof PageActionMap]: PageActionUrl<K & string, PageActionMap[K]>; }[keyof PageActionMap];
|
|
76
|
-
export { type Href, type RouteDestination, type RouteOptions, type RoutePath, type RouteQuery, type RouteQueryValue, type RouteUrl, type RouteUrlInput, routeUrl };
|
|
92
|
+
export { type Href, type RouteDestination, type RouteOptions, type RoutePath, type RouteQuery, type RouteQueryValue, type RouteUrl, type RouteUrlArgs, type RouteUrlInput, routeUrl };
|
package/dist/routes-stub.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { n as routeUrl } from "./route-url-
|
|
1
|
+
export { n as routeUrl } from "./route-url-CRC8yR_2.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, n as dirname } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
3
3
|
import { n as hasPackageDependency, r as readNearestPackageJson } from "./package-json-4xUI3xLz.mjs";
|
|
4
|
-
import {
|
|
4
|
+
import { n as collectMigrations } from "./collect-KC4cizWM.mjs";
|
|
5
5
|
import { r as classifyMigration } from "./plan-BOD70XGS.mjs";
|
|
6
6
|
import { existsSync, mkdirSync } from "node:fs";
|
|
7
7
|
import { createHash, createHmac } from "node:crypto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-
|
|
1
|
+
export { t as applyMySqlMigrations, n as applyPendingMySqlMigrations, r as getMySqlAppliedMigrations, i as readMySqlAppliedMigrations, a as runMySqlMigrations, o as toMySqlClient, s as withMySqlMigrationLock, c as withMySqlMigrationLockAt } from "./runner-mysql-DSLGFOlC.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as readMySqlMigrationLease, i as mySqlMigrationLockName, r as mySqlMigrationLockError } from "./mysql-lock-D8xtnI-D.mjs";
|
|
2
2
|
import { n as splitMySqlMigrationSql } from "./mysql-sql-BIE7bc4Z.mjs";
|
|
3
|
-
import {
|
|
3
|
+
import { n as collectMigrations } from "./collect-KC4cizWM.mjs";
|
|
4
4
|
// src/migrations/runner-mysql.ts
|
|
5
5
|
async function readMySqlAppliedMigrations(client) {
|
|
6
6
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as applyPgMigrations, n as getPgAppliedMigrations, r as readPgAppliedMigrations, i as runPgMigrations } from "./runner-pg-
|
|
1
|
+
export { t as applyPgMigrations, n as getPgAppliedMigrations, r as readPgAppliedMigrations, i as runPgMigrations } from "./runner-pg-BcGF7iBR.mjs";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as getApplicationTables, n as getAppliedMigrations, r as getMiniflareDatabasePath, i as openSqliteDatabase, a as runMigrations } from "./runner-
|
|
1
|
+
export { t as getApplicationTables, n as getAppliedMigrations, r as getMiniflareDatabasePath, i as openSqliteDatabase, a as runMigrations } from "./runner-CnUrhc8H.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as bytesToBase64 } from "../../base64-DwTR12ej.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "../../cf-access-DmkKPcAI.mjs";
|
|
3
3
|
import { a as getRawRuntimeEnv } from "../../raw-5rak34QN.mjs";
|
|
4
|
-
import { r as limitFromResponse, t as UsageLimit } from "../../limits-
|
|
4
|
+
import { r as limitFromResponse, t as UsageLimit } from "../../limits-3I3VdX2E.mjs";
|
|
5
5
|
// src/runtime/ai/types.ts
|
|
6
6
|
/** Maps provider prefix to expected env var name for the API key */
|
|
7
7
|
const PROVIDER_KEY_MAP = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-CrIkcN8I.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,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-CrIkcN8I.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,4 +1,4 @@
|
|
|
1
|
-
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-
|
|
1
|
+
import { n as VoidAuthRuntimeApi } from "../../better-auth-shared-CrIkcN8I.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,4 +1,4 @@
|
|
|
1
|
-
import { t as createRouteFetch } from "../../fetch-
|
|
1
|
+
import { t as createRouteFetch } from "../../fetch-DL7OCgwB.mjs";
|
|
2
2
|
import { t as FetchError } from "../../fetch-error-EXhBRoxI.mjs";
|
|
3
3
|
// src/runtime/client/fetch-server.ts
|
|
4
4
|
/** Keep local calls in the app while using the browser client's request and error handling. */
|