void 1.12.1 → 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-BU1Fy_Bf.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-Duu2NvN5.mjs → auth-link-I4omV0pL.mjs} +6 -6
- package/dist/{auth-router-vgtOdb9j.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-BrChcpE3.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-D0V0o40j.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-BNPIjLkK.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-BgSbagIP.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-DcQNP40O.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-C8YpkGIP.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-CWFr-G2I.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-a7yOf2tH.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-CpszX-Ne.mjs → platform-auth-config-BbfNhjBc.mjs} +9 -9
- package/dist/{platform-auth-protection-DA6Tw8Og.mjs → platform-auth-protection-BHPV4MUf.mjs} +9 -8
- package/dist/{platform-auth-recovery-Cztrb1JC.mjs → platform-auth-recovery-DE0nArYy.mjs} +8 -7
- package/dist/{platform-cmd-m6Asj6nO.mjs → platform-cmd-CLRU3BRb.mjs} +11 -10
- package/dist/{platform-cmd-u1j88ggF.mjs → platform-cmd-Cs2LkT5L.mjs} +1 -1
- package/dist/{platform-discovery-CLxtixHJ.mjs → platform-discovery-CKeeeD82.mjs} +1 -1
- package/dist/{platform-domain-DJSznNTA.mjs → platform-domain-kn3WuKPG.mjs} +6 -5
- package/dist/{platform-lifecycle-BC-9p58d.mjs → platform-lifecycle-BoCEYy2w.mjs} +1 -1
- package/dist/{platform-lifecycle-GFeXv3NC.mjs → platform-lifecycle-CKwOg8wz.mjs} +244 -104
- package/dist/{platform-management-BwHkz46V.mjs → platform-management-CaSdFthX.mjs} +1 -1
- package/dist/{platform-management-DX1zINou.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-CnzBbudV.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 +11 -9
- 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-Do6FWqon.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-DECm3e9b.mjs +0 -1
- package/dist/migrate-C9aoWLvY.mjs +0 -1
- package/dist/operator-cmd-CVfK5U0B.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
package/README.md
CHANGED
|
@@ -40,6 +40,7 @@ Read the [Void documentation](https://void.cloud) online or use the Markdown gui
|
|
|
40
40
|
- [Database](https://void.cloud/guide/database) and [type safety](https://void.cloud/guide/type-safety)
|
|
41
41
|
- [Deployment](https://void.cloud/guide/deployment)
|
|
42
42
|
- [Framework integrations](https://void.cloud/integrations/frameworks/overview)
|
|
43
|
+
- [HTML templates](https://void.cloud/reference/api/html) (`void/html`), [JSX handlers](https://void.cloud/guide/server-routing#jsx-handlers) (`void/jsx`), and [image generation](https://void.cloud/guide/image-generation) (`void/image`)
|
|
43
44
|
- [API](https://void.cloud/reference/api) and [CLI](https://void.cloud/reference/cli) reference
|
|
44
45
|
- [Coding agents](https://void.cloud/integrations/agents)
|
|
45
46
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import { c as getToken, f as removeToken } from "./auth-
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { n as runLoginCommand } from "./login-
|
|
5
|
-
import { y as printSuccess } from "./output-
|
|
1
|
+
import { L as log } from "./dist-BngS28id.mjs";
|
|
2
|
+
import { c as getToken, f as removeToken } from "./auth-CeBmolb-.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
|
|
4
|
+
import { n as runLoginCommand } from "./login-DaugBfBG.mjs";
|
|
5
|
+
import { y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
6
6
|
import { execSync } from "node:child_process";
|
|
7
7
|
// src/cli/account-cmd.ts
|
|
8
8
|
async function runAccountCommand(root, args) {
|
|
9
9
|
switch (args.subcommand) {
|
|
10
10
|
case "login": return runLoginCommand(root);
|
|
11
|
-
case "link": return import("./auth-link-
|
|
11
|
+
case "link": return import("./auth-link-I4omV0pL.mjs").then(({ runAuthLink }) => runAuthLink(root, args.connectionId));
|
|
12
12
|
case "logout":
|
|
13
13
|
if (removeToken(root)) printSuccess("Logged out.");
|
|
14
14
|
else log.info("Not logged in.");
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { a as join, i as isAbsolute, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { c as scanWebSocketRoutesSync, d as
|
|
3
|
-
import { r as findVoidAuthConfig } from "./config-
|
|
4
|
-
import { n as findEnvFileForPaths } from "./env-types-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
2
|
+
import { c as scanWebSocketRoutesSync, d as listRouteFiles, i as inferProjectBindings, n as FRAMEWORK_SCAN_DIRS, p as needsApplicationDatabase, r as detectFramework, s as isWebSocketPatternFile, u as listConventionFiles } from "./plugin-inference-D5MjBVMB.mjs";
|
|
3
|
+
import { r as findVoidAuthConfig } from "./config-CUYGZqdN.mjs";
|
|
4
|
+
import { n as findEnvFileForPaths } from "./env-types-B33fEHRH.mjs";
|
|
5
|
+
import { g as resolveBindingNames, u as getDatabaseDialect } from "./config-KZAiI3gG.mjs";
|
|
6
|
+
import { c as bindingNames, i as readStaticExports, o as staticLiteral, p as globSync, r as mayExportAll, s as unwrapStaticExpression } from "./source-analysis-cache-Ccm_JSOl.mjs";
|
|
7
|
+
import { l as readResourceDefinition, r as scanWorkflowModules } from "./scan-D2ISAobj.mjs";
|
|
8
|
+
import { r as resourceNameWords } from "./resource-name-D_gw36kh.mjs";
|
|
9
|
+
import { n as collectMigrations } from "./collect-KC4cizWM.mjs";
|
|
10
|
+
import { g as parseRouteFilename, h as isRouteEnabledForEnvironment, m as compareRouteSpecificity, n as scanPages } from "./scan-BxhB4BA-.mjs";
|
|
11
|
+
import { i as resolveProjectPaths, n as readProjectPaths } from "./project-paths-BeAxxqGh.mjs";
|
|
11
12
|
import { i as voidWarn } from "./log-D9hwSySP.mjs";
|
|
12
13
|
import { n as compileEmailPattern, t as compareEmailRoutes } from "./email-pattern-bRna9MOJ.mjs";
|
|
13
14
|
import { r as isIdentifier, s as moduleExportName, t as asAstProgram } from "./ast-BkPQu7A0.mjs";
|
|
@@ -45,7 +46,7 @@ const MODULE_PATTERN = /\.(?:[cm]?[jt]s)$/;
|
|
|
45
46
|
function inferDurableResourceName(filePath) {
|
|
46
47
|
return filePath.replaceAll("\\", "/").split("/").at(-1)?.replace(MODULE_PATTERN, "") ?? "";
|
|
47
48
|
}
|
|
48
|
-
const DURABLE_HELPERS =
|
|
49
|
+
const DURABLE_HELPERS = ["defineDurableState", "defineDurableObject"];
|
|
49
50
|
function deriveDurableResourceIdentity(name) {
|
|
50
51
|
const parts = resourceNameWords(name);
|
|
51
52
|
const classBase = parts.map((part) => part[0].toUpperCase() + part.slice(1)).join("");
|
|
@@ -60,7 +61,7 @@ function scanDurableObjectModules(root) {
|
|
|
60
61
|
if (!existsSync(directory)) return [];
|
|
61
62
|
const modules = readdirSync(directory, { withFileTypes: true }).filter((entry) => entry.isFile() && MODULE_PATTERN.test(entry.name) && !entry.name.endsWith(".d.ts")).sort((a, b) => a.name.localeCompare(b.name)).map((entry) => {
|
|
62
63
|
const filePath = join(directory, entry.name);
|
|
63
|
-
const name = readResourceDefinition(filePath, readFileSync(filePath, "utf8"), DURABLE_HELPERS)?.name;
|
|
64
|
+
const name = readResourceDefinition(filePath, readFileSync(filePath, "utf8"), "void/durable", DURABLE_HELPERS)?.name;
|
|
64
65
|
const resourceName = name ?? inferDurableResourceName(entry.name);
|
|
65
66
|
if (resourceNameWords(resourceName).length === 0) throw new Error(`durable: cannot derive a name from durable-objects/${entry.name}.`);
|
|
66
67
|
return {
|
|
@@ -394,7 +395,7 @@ function assertSandboxNamespaceConfig(config, sandbox) {
|
|
|
394
395
|
async function getNativeWorkerSourceFiles(analysis) {
|
|
395
396
|
const { paths } = analysis;
|
|
396
397
|
const envFile = findEnvFileForPaths(analysis.root, paths);
|
|
397
|
-
const { pages } = await scanPages(analysis.root, {
|
|
398
|
+
const { pages, boundaries = [] } = await scanPages(analysis.root, {
|
|
398
399
|
paths,
|
|
399
400
|
trailingSlash: analysis.config.routing?.trailingSlash,
|
|
400
401
|
output: analysis.config.output,
|
|
@@ -405,12 +406,14 @@ async function getNativeWorkerSourceFiles(analysis) {
|
|
|
405
406
|
return [
|
|
406
407
|
...[...analysis.routes, ...analysis.websockets].flatMap((route) => isRouteEnabledForEnvironment(route, "dev") ? [join(paths.routesDir, route.filePath)] : []),
|
|
407
408
|
...pages.flatMap(({ serverPath }) => serverPath === null ? [] : [join(paths.pagesDir, serverPath)]),
|
|
409
|
+
...boundaries.flatMap(({ serverPath }) => serverPath === void 0 ? [] : [join(paths.pagesDir, serverPath)]),
|
|
408
410
|
...analysis.authConfigPath === null ? [] : [analysis.authConfigPath],
|
|
409
411
|
...analysis.middleware.map(({ filePath }) => join(paths.middlewareDir, filePath)),
|
|
410
412
|
...analysis.jobs.map(({ filePath }) => join(paths.cronsDir, filePath)),
|
|
411
413
|
...analysis.queues.map(({ filePath }) => join(paths.queuesDir, filePath)),
|
|
412
414
|
...emailFiles.map((filePath) => join(paths.emailDir, filePath)),
|
|
413
415
|
...analysis.durableObjects.map(({ filePath }) => filePath),
|
|
416
|
+
...analysis.workflows.map(({ filePath }) => filePath),
|
|
414
417
|
...envFile !== null ? [envFile] : []
|
|
415
418
|
];
|
|
416
419
|
}
|
|
@@ -423,12 +426,14 @@ function analyzeApplicationSync(root, options) {
|
|
|
423
426
|
const { config, environment } = options;
|
|
424
427
|
const paths = resolveProjectPaths(root, config);
|
|
425
428
|
const framework = detectFramework(root);
|
|
429
|
+
const workflows = scanWorkflowModules(root);
|
|
426
430
|
const scanDirs = config.inference?.scanDirs ?? (framework ? FRAMEWORK_SCAN_DIRS : void 0);
|
|
427
431
|
const inferred = inferProjectBindings(root, {
|
|
428
432
|
paths,
|
|
429
433
|
environment,
|
|
430
434
|
filterPages: !framework,
|
|
431
|
-
bindings: config.inference?.bindings
|
|
435
|
+
bindings: config.inference?.bindings,
|
|
436
|
+
hasWorkflows: workflows.length > 0
|
|
432
437
|
}, scanDirs);
|
|
433
438
|
const authConfigPath = findVoidAuthConfig(root, paths);
|
|
434
439
|
const authEnabled = inferred.needsAuth || authConfigPath !== null || config.auth !== void 0;
|
|
@@ -474,6 +479,7 @@ function analyzeApplicationSync(root, options) {
|
|
|
474
479
|
websockets,
|
|
475
480
|
allWebsockets,
|
|
476
481
|
durableObjects,
|
|
482
|
+
workflows,
|
|
477
483
|
email,
|
|
478
484
|
routes: scanRoutePatternsSync(root, paths, environment),
|
|
479
485
|
middleware: scanMiddlewareSync(root, paths),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as analyzeApplicationSync, u as scanRoutes } from "./application-analysis-
|
|
1
|
+
import { t as analyzeApplicationSync, u as scanRoutes } from "./application-analysis-BjEwHTV2.mjs";
|
|
2
2
|
// src/application-routing.ts
|
|
3
3
|
/** Complete route/page analysis using the same resource and handler inventories. */
|
|
4
4
|
async function completeApplicationAnalysis(analysis) {
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { parseArgs } from "node:util";
|
|
2
|
+
// src/cli/args.ts
|
|
3
|
+
function parseDeployArgs(args) {
|
|
4
|
+
let parsed;
|
|
5
|
+
try {
|
|
6
|
+
parsed = parseArgs({
|
|
7
|
+
args,
|
|
8
|
+
options: {
|
|
9
|
+
project: { type: "string" },
|
|
10
|
+
dir: { type: "string" },
|
|
11
|
+
spa: { type: "boolean" },
|
|
12
|
+
"skip-build": { type: "boolean" },
|
|
13
|
+
"skip-migrations": { type: "boolean" },
|
|
14
|
+
debug: { type: "boolean" },
|
|
15
|
+
platform: { type: "string" },
|
|
16
|
+
provision: { type: "boolean" },
|
|
17
|
+
"require-email": { type: "boolean" },
|
|
18
|
+
atomic: { type: "boolean" },
|
|
19
|
+
preview: { type: "string" },
|
|
20
|
+
json: { type: "boolean" }
|
|
21
|
+
},
|
|
22
|
+
allowPositionals: true,
|
|
23
|
+
strict: true,
|
|
24
|
+
tokens: true
|
|
25
|
+
});
|
|
26
|
+
} catch (error) {
|
|
27
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
28
|
+
if (message.includes("argument missing") || message.includes("argument is ambiguous")) {
|
|
29
|
+
const optionMatch = message.match(/Option '(--[a-z-]+)/);
|
|
30
|
+
if (optionMatch?.[1] === "--platform") throw new Error("deploy: --platform requires a value ('cloudflare' or 'void').", { cause: error });
|
|
31
|
+
if (optionMatch?.[1] === "--preview") throw new Error("deploy: --preview requires a name (for example --preview pr-64).", { cause: error });
|
|
32
|
+
throw new Error("deploy: --project requires a slug.", { cause: error });
|
|
33
|
+
}
|
|
34
|
+
const unknownOptionMatch = message.match(/Unknown option '([^']+)'/);
|
|
35
|
+
if (unknownOptionMatch) throw new Error(`deploy: Unknown option '${unknownOptionMatch[1]}'.`, { cause: error });
|
|
36
|
+
throw new Error(`deploy: ${message}.`, { cause: error });
|
|
37
|
+
}
|
|
38
|
+
const tokens = parsed.tokens ?? [];
|
|
39
|
+
if (tokens.filter((token) => token.kind === "option" && token.name === "project").length > 1) throw new Error("deploy: --project can only be specified once.");
|
|
40
|
+
if (tokens.filter((token) => token.kind === "option" && token.name === "platform").length > 1) throw new Error("deploy: --platform can only be specified once.");
|
|
41
|
+
if (parsed.positionals.length > 0) throw new Error(`deploy: Unexpected argument '${parsed.positionals[0]}'.`);
|
|
42
|
+
const projectValue = parsed.values.project;
|
|
43
|
+
const projectSlug = typeof projectValue === "string" ? projectValue : void 0;
|
|
44
|
+
if (typeof projectSlug === "string" && projectSlug.startsWith("-")) throw new Error("deploy: --project requires a slug.");
|
|
45
|
+
const dir = typeof parsed.values.dir === "string" ? parsed.values.dir : void 0;
|
|
46
|
+
const spa = parsed.values.spa === true ? true : void 0;
|
|
47
|
+
const skipBuild = parsed.values["skip-build"] === true ? true : void 0;
|
|
48
|
+
const debug = parsed.values.debug === true ? true : void 0;
|
|
49
|
+
const platformValue = typeof parsed.values.platform === "string" ? parsed.values.platform : void 0;
|
|
50
|
+
if (platformValue !== void 0 && platformValue !== "cloudflare" && platformValue !== "void") throw new Error("deploy: --platform must be 'cloudflare' or 'void'.");
|
|
51
|
+
const platform = platformValue;
|
|
52
|
+
const provision = parsed.values.provision === true ? true : void 0;
|
|
53
|
+
if (provision && platform !== "cloudflare") throw new Error("deploy: --provision requires --platform cloudflare.");
|
|
54
|
+
const requireEmail = parsed.values["require-email"] === true ? true : void 0;
|
|
55
|
+
const atomic = parsed.values.atomic === true ? true : void 0;
|
|
56
|
+
if (requireEmail && platform !== "cloudflare") throw new Error("deploy: --require-email requires --platform cloudflare.");
|
|
57
|
+
if (platform === "cloudflare") {
|
|
58
|
+
if (projectSlug !== void 0) throw new Error("deploy: --project is not supported with --platform cloudflare — this platform deploys to your own Cloudflare account and no Void project is involved.");
|
|
59
|
+
}
|
|
60
|
+
if (tokens.filter((token) => token.kind === "option" && token.name === "preview").length > 1) throw new Error("deploy: --preview can only be specified once.");
|
|
61
|
+
const preview = typeof parsed.values.preview === "string" ? parsed.values.preview : void 0;
|
|
62
|
+
const json = parsed.values.json === true ? true : void 0;
|
|
63
|
+
if (preview !== void 0) {
|
|
64
|
+
if (preview === "") throw new Error("deploy: --preview requires a name (for example --preview pr-64).");
|
|
65
|
+
if (platform !== "cloudflare") throw new Error("deploy: --preview requires --platform cloudflare.");
|
|
66
|
+
for (const [flag, set] of [
|
|
67
|
+
["--atomic", atomic],
|
|
68
|
+
["--provision", provision],
|
|
69
|
+
["--require-email", requireEmail]
|
|
70
|
+
]) if (set) throw new Error(`deploy: ${flag} cannot be combined with --preview.`);
|
|
71
|
+
}
|
|
72
|
+
if (json && preview === void 0) throw new Error("deploy: --json is available only with --preview.");
|
|
73
|
+
return {
|
|
74
|
+
preview,
|
|
75
|
+
json,
|
|
76
|
+
projectSlug,
|
|
77
|
+
dir,
|
|
78
|
+
spa,
|
|
79
|
+
skipBuild,
|
|
80
|
+
skipMigrations: parsed.values["skip-migrations"] === true ? true : void 0,
|
|
81
|
+
debug,
|
|
82
|
+
platform,
|
|
83
|
+
provision,
|
|
84
|
+
requireEmail,
|
|
85
|
+
atomic
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
export { parseDeployArgs as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as parseDeployArgs } from "./args-DrnTI35r.mjs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as join } from "./dist-DMYe8CZJ.mjs";
|
|
2
2
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
3
|
-
import { t as ensurePlatformAccessToken } from "./cf-access-
|
|
4
|
-
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-
|
|
5
|
-
import { a as readProjectPlatformUrl, r as readProjectConfig } from "./project-
|
|
3
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-B21j-nd6.mjs";
|
|
4
|
+
import { C as deleteKeyringPassword, T as writeKeyringPassword, c as normalizePlatformApiUrl, i as getActivePlatformConnection, s as listPlatformConnections, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-zHH3RiIm.mjs";
|
|
5
|
+
import { a as readProjectPlatformUrl, r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
6
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
7
7
|
import { isRecord } from "@void/deploy-core";
|
|
8
8
|
import { createHash, randomBytes } from "node:crypto";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as getApiUrl, s as getSiteDomain, p as runPlatformLogin } from "./auth-
|
|
1
|
+
export { a as getApiUrl, s as getSiteDomain, p as runPlatformLogin } from "./auth-CeBmolb-.mjs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { r as selectPlatformLoginMethod } from "./login-
|
|
5
|
-
import { f as formatUrl } from "./output-
|
|
6
|
-
import { t as discoverPlatform } from "./platform-cmd-
|
|
1
|
+
import { L as log } from "./dist-BngS28id.mjs";
|
|
2
|
+
import { a as getApiUrl, c as getToken, m as savePlatformToken, p as runPlatformLogin, u as openBrowser } from "./auth-CeBmolb-.mjs";
|
|
3
|
+
import { r as PlatformClient } from "./client-BEHI4UWn.mjs";
|
|
4
|
+
import { r as selectPlatformLoginMethod } from "./login-DaugBfBG.mjs";
|
|
5
|
+
import { f as formatUrl } from "./output-DhJgS6Ve.mjs";
|
|
6
|
+
import { t as discoverPlatform } from "./platform-cmd-CLRU3BRb.mjs";
|
|
7
7
|
// src/cli/auth-link.ts
|
|
8
8
|
async function runAuthLink(root, connectionId) {
|
|
9
9
|
const token = getToken(root);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-
|
|
3
|
-
import {
|
|
1
|
+
import { a as select } from "./interactive-prompts-EK0dilFu.mjs";
|
|
2
|
+
import { c as normalizePlatformApiUrl, s as listPlatformConnections } from "./platform-registry-zHH3RiIm.mjs";
|
|
3
|
+
import { tt as isCancel } from "./dist-BngS28id.mjs";
|
|
4
|
+
import { n as readDeploymentPlatform } from "./project-DC-BqHef.mjs";
|
|
4
5
|
// src/cli/auth-router.ts
|
|
5
6
|
async function chooseDestination(root, args, interactive) {
|
|
6
7
|
const saved = readDeploymentPlatform(root);
|
|
@@ -39,11 +40,11 @@ async function chooseDestination(root, args, interactive) {
|
|
|
39
40
|
async function runAuthRouter(root, args, interactive = Boolean(process.stdin.isTTY)) {
|
|
40
41
|
const destination = await chooseDestination(root, args, interactive);
|
|
41
42
|
if (destination.platform === "cloudflare") {
|
|
42
|
-
const { runCloudflareCommand } = await import("./cloudflare-cmd-
|
|
43
|
+
const { runCloudflareCommand } = await import("./cloudflare-cmd-DsSlXbNy.mjs");
|
|
43
44
|
await runCloudflareCommand(root, { subcommand: args.subcommand });
|
|
44
45
|
return;
|
|
45
46
|
}
|
|
46
|
-
const { runAccountCommand } = await import("./account-cmd-
|
|
47
|
+
const { runAccountCommand } = await import("./account-cmd-4fQiXYX7.mjs");
|
|
47
48
|
const subcommand = args.subcommand === "status" ? "whoami" : args.subcommand;
|
|
48
49
|
if (!destination.apiUrl) {
|
|
49
50
|
await runAccountCommand(root, { subcommand });
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as VoidAuthProvider, t as MySqlAuthDateType } from "./config-BdmM5ZzP.mjs";
|
|
2
2
|
import { r as AuthState, s as VoidAuthConfig } from "./index-CV9kXHKe.mjs";
|
|
3
3
|
import { Context } from "hono";
|
|
4
4
|
import { BetterAuthOptions, betterAuth } from "better-auth";
|
|
@@ -37,6 +37,7 @@ type VoidAuthMigrationSchema = {
|
|
|
37
37
|
type VoidAuthDialect = "sqlite" | "postgresql" | "mysql";
|
|
38
38
|
type VoidAuthRuntimeOptions = {
|
|
39
39
|
dialect: VoidAuthDialect;
|
|
40
|
+
authDateType?: MySqlAuthDateType;
|
|
40
41
|
providers: Array<VoidAuthProvider> | null;
|
|
41
42
|
userConfig?: VoidAuthConfig;
|
|
42
43
|
dev?: boolean;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { l as VoidPlatformSandbox } from "./index-BYcWajVp.mjs";
|
|
2
|
+
type AssetBinding = {
|
|
3
|
+
fetch: (request: Request) => Promise<Response>;
|
|
4
|
+
};
|
|
5
|
+
declare global {
|
|
6
|
+
interface VoidGeneratedEnvBindings {
|
|
7
|
+
readonly [key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Worker bindings shared by route handlers and Workflows.
|
|
12
|
+
*
|
|
13
|
+
* Augmented by the generated `.void/env.d.ts` so user-declared env keys
|
|
14
|
+
* become typed on `c.env`. The index signature keeps untyped access
|
|
15
|
+
* working for bindings that aren't in the schema (queues, custom
|
|
16
|
+
* bindings, etc.).
|
|
17
|
+
*/
|
|
18
|
+
interface CloudBindings extends VoidGeneratedEnvBindings {
|
|
19
|
+
DB: D1Database;
|
|
20
|
+
KV: KVNamespace;
|
|
21
|
+
STORAGE: R2Bucket;
|
|
22
|
+
AI: Ai;
|
|
23
|
+
SANDBOX: DurableObjectNamespace<VoidPlatformSandbox>;
|
|
24
|
+
/** Node, Bun and Deno targets serve static files through a provider that takes only a `Request`. */
|
|
25
|
+
ASSETS: AssetBinding;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
}
|
|
28
|
+
export { CloudBindings as n, AssetBinding as t };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { a as getRawRuntimeEnv } from "./raw-5rak34QN.mjs";
|
|
2
|
+
import { r as limitFromResponse } from "./limits-3I3VdX2E.mjs";
|
|
3
|
+
import { n as raw, t as html } from "./html-DPSOBDCh.mjs";
|
|
4
|
+
import { t as imageInputToString } from "./input-jcps6lAn.mjs";
|
|
5
|
+
// src/runtime/image/generate/browser-run/assets.ts
|
|
6
|
+
/** Encode in multiples of three so chunks concatenate without padding. */
|
|
7
|
+
function assetDataUrl(mediaType, bytes) {
|
|
8
|
+
let encoded = "";
|
|
9
|
+
for (let offset = 0; offset < bytes.length; offset += 12288) encoded += btoa(String.fromCharCode(...bytes.subarray(offset, offset + 12288)));
|
|
10
|
+
return `data:${mediaType};base64,${encoded}`;
|
|
11
|
+
}
|
|
12
|
+
// src/runtime/image/generate/browser-run/fonts.ts
|
|
13
|
+
/** CSS escapes also prevent a font name or URL from terminating the HTML style tag. */
|
|
14
|
+
function cssString(value) {
|
|
15
|
+
return `"${value.replaceAll(/["\\<\r\n\f]/g, (character) => `\\${character.charCodeAt(0).toString(16)} `)}"`;
|
|
16
|
+
}
|
|
17
|
+
const genericFamilyNames = /* @__PURE__ */ new Set([
|
|
18
|
+
"serif",
|
|
19
|
+
"sans-serif",
|
|
20
|
+
"monospace",
|
|
21
|
+
"cursive",
|
|
22
|
+
"fantasy"
|
|
23
|
+
]);
|
|
24
|
+
function browserFontFamily(font) {
|
|
25
|
+
return (typeof font === "string" ? [font] : font)?.map((name) => genericFamilyNames.has(name) ? name : cssString(name)).join(",") || "\"Roboto\",sans-serif";
|
|
26
|
+
}
|
|
27
|
+
function fontSource(data) {
|
|
28
|
+
if (!(data instanceof Uint8Array) && !(data instanceof ArrayBuffer)) {
|
|
29
|
+
if (!data || typeof data.url !== "string") throw new TypeError("void/image: Browser Run fonts require bytes or a URL.");
|
|
30
|
+
const url = new URL(data.url);
|
|
31
|
+
if (url.protocol !== "https:" || url.username || url.password) throw new TypeError("void/image: Browser Run font URLs must use HTTPS without credentials.");
|
|
32
|
+
return url.href;
|
|
33
|
+
}
|
|
34
|
+
const bytes = data instanceof Uint8Array ? data : new Uint8Array(data);
|
|
35
|
+
const signature = String.fromCharCode(...bytes.subarray(0, 4));
|
|
36
|
+
return assetDataUrl(signature === "wOF2" ? "font/woff2" : signature === "wOFF" ? "font/woff" : signature === "OTTO" ? "font/otf" : "font/ttf", bytes);
|
|
37
|
+
}
|
|
38
|
+
function browserFontCss(fonts) {
|
|
39
|
+
return (fonts ?? []).map(({ name, data, weight, style }) => {
|
|
40
|
+
if (weight !== void 0 && (!Number.isFinite(weight) || weight < 1 || weight > 1e3)) throw new TypeError("void/image: font weight must be between 1 and 1000.");
|
|
41
|
+
return `@font-face{font-family:${cssString(name)};src:url(${cssString(fontSource(data))});font-weight:${weight ?? "1 1000"};font-style:${style === "italic" ? "italic" : "normal"}}`;
|
|
42
|
+
}).join("");
|
|
43
|
+
}
|
|
44
|
+
// src/runtime/image/generate/browser-run/html.ts
|
|
45
|
+
async function imageDocument(input, { debug, lang, font }, fontCss) {
|
|
46
|
+
const element = await input;
|
|
47
|
+
if (element?.isEscaped !== true) {
|
|
48
|
+
if (typeof element === "string" || element instanceof String) throw new TypeError("Use the html template tag from void/html instead of a plain string.");
|
|
49
|
+
throw new TypeError("void/image: expected JSX or an escaped HTML template.");
|
|
50
|
+
}
|
|
51
|
+
const body = raw(await imageInputToString(element));
|
|
52
|
+
const fontPolicy = fontCss ? " font-src https: data:;" : "";
|
|
53
|
+
const styles = raw(`${fontCss}*{box-sizing:border-box}html,body{margin:0;width:100%;height:100%;overflow:hidden}body{font-family:${browserFontFamily(font)}}${debug ? "body *{outline:1px solid magenta}" : ""}`);
|
|
54
|
+
return String(html`<!doctype html>
|
|
55
|
+
<html lang="${lang ?? ""}">
|
|
56
|
+
<head>
|
|
57
|
+
<meta charset="utf-8" />
|
|
58
|
+
<meta
|
|
59
|
+
http-equiv="Content-Security-Policy"
|
|
60
|
+
content="default-src 'none'; style-src 'unsafe-inline'; img-src https: http: data:;${fontPolicy} base-uri 'none'; form-action 'none'"
|
|
61
|
+
/>
|
|
62
|
+
<style>
|
|
63
|
+
${styles}
|
|
64
|
+
</style>
|
|
65
|
+
</head>
|
|
66
|
+
<body>
|
|
67
|
+
${body}
|
|
68
|
+
</body>
|
|
69
|
+
</html>`);
|
|
70
|
+
}
|
|
71
|
+
// src/runtime/image/generate/browser-run/index.ts
|
|
72
|
+
/** The default renderer uses the Worker binding directly, without a browser SDK. */
|
|
73
|
+
const browserRunRenderer = async (input, options) => {
|
|
74
|
+
const { width, height } = options;
|
|
75
|
+
if (![width, height].every((size) => Number.isSafeInteger(size) && size > 0)) throw new TypeError("void/image: Browser Run requires positive integer dimensions.");
|
|
76
|
+
let browser;
|
|
77
|
+
let bindingName = "BROWSER";
|
|
78
|
+
try {
|
|
79
|
+
const env = getRawRuntimeEnv();
|
|
80
|
+
if (typeof env.__VOID_BROWSER_BINDING === "string") bindingName = env.__VOID_BROWSER_BINDING;
|
|
81
|
+
browser = env[bindingName];
|
|
82
|
+
} catch {}
|
|
83
|
+
if (typeof browser?.quickAction !== "function") throw new Error(`void/image: configure a Cloudflare Browser Run binding (cloudflare.browser, env.${bindingName}), or pass an explicit renderer.`);
|
|
84
|
+
const fontCss = browserFontCss(options.fonts);
|
|
85
|
+
const response = await browser.quickAction("screenshot", {
|
|
86
|
+
html: await imageDocument(input, options, fontCss),
|
|
87
|
+
viewport: {
|
|
88
|
+
width,
|
|
89
|
+
height,
|
|
90
|
+
deviceScaleFactor: 1
|
|
91
|
+
},
|
|
92
|
+
screenshotOptions: {
|
|
93
|
+
type: "png",
|
|
94
|
+
omitBackground: true
|
|
95
|
+
},
|
|
96
|
+
setJavaScriptEnabled: false,
|
|
97
|
+
gotoOptions: { waitUntil: fontCss ? "networkidle0" : "load" },
|
|
98
|
+
cacheTTL: 0
|
|
99
|
+
});
|
|
100
|
+
if (!response.ok) {
|
|
101
|
+
const limit = await limitFromResponse(response, "browser");
|
|
102
|
+
if (limit) throw limit;
|
|
103
|
+
throw new Error(`void/image: Browser Run screenshot failed (HTTP ${response.status})${await errorDetail(response)}.`);
|
|
104
|
+
}
|
|
105
|
+
const png = new Uint8Array(await response.arrayBuffer());
|
|
106
|
+
if (png.length < 24 || ![
|
|
107
|
+
137,
|
|
108
|
+
80,
|
|
109
|
+
78,
|
|
110
|
+
71,
|
|
111
|
+
13,
|
|
112
|
+
10,
|
|
113
|
+
26,
|
|
114
|
+
10
|
|
115
|
+
].every((byte, i) => png[i] === byte)) throw new Error("void/image: Browser Run did not return a PNG.");
|
|
116
|
+
return png;
|
|
117
|
+
};
|
|
118
|
+
/** Browser Run explains 4xx failures only in its JSON error body. */
|
|
119
|
+
async function errorDetail(response) {
|
|
120
|
+
const body = await response.json().catch(() => null);
|
|
121
|
+
const messages = (typeof body === "object" && body !== null && "errors" in body && Array.isArray(body.errors) ? body.errors : []).map((error) => typeof error === "object" && error !== null && "message" in error ? String(error.message) : "").filter(Boolean).join("; ");
|
|
122
|
+
return messages ? `: ${messages.length > 300 ? messages.slice(0, 300) + "…" : messages}` : "";
|
|
123
|
+
}
|
|
124
|
+
export { browserRunRenderer };
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { H as outro, L as log } from "./dist-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { n as PlatformApiError, r as PlatformClient } from "./client-
|
|
4
|
-
import { h as import_picocolors, o as dim, y as printSuccess } from "./output-
|
|
5
|
-
import { r as readProjectConfig } from "./project-
|
|
6
|
-
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
1
|
+
import { H as outro, L as log } from "./dist-BngS28id.mjs";
|
|
2
|
+
import { c as getToken } from "./auth-CeBmolb-.mjs";
|
|
3
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-BEHI4UWn.mjs";
|
|
4
|
+
import { h as import_picocolors, o as dim, y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
5
|
+
import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
|
+
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-s_FGWyr-.mjs";
|
|
7
7
|
import { appendFileSync, writeFileSync } from "node:fs";
|
|
8
8
|
// src/cli/build-cmd.ts
|
|
9
9
|
const POLL_MS = 1e3;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { L as log } from "./dist-
|
|
2
|
-
import { c as getToken } from "./auth-
|
|
3
|
-
import { r as PlatformClient } from "./client-
|
|
4
|
-
import { a as createSpinner, c as formatCount, y as printSuccess } from "./output-
|
|
5
|
-
import { r as readProjectConfig } from "./project-
|
|
6
|
-
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-
|
|
1
|
+
import { 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 { a as createSpinner, c as formatCount, y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
5
|
+
import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
|
+
import { a as resolveProjectBySlug, t as getRequestedProjectSlug } from "./resolve-project-s_FGWyr-.mjs";
|
|
7
7
|
// src/cli/cache.ts
|
|
8
8
|
async function runPurgeCacheCommand(root, projectSlug) {
|
|
9
9
|
console.log();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
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, tt as isCancel } from "./dist-BngS28id.mjs";
|
|
4
|
+
import { n as confirm } from "./interactive-prompts-EK0dilFu.mjs";
|
|
5
|
+
import { y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
6
|
+
import { r as readProjectConfig } from "./project-DC-BqHef.mjs";
|
|
6
7
|
// src/cli/cancel-deploy.ts
|
|
7
8
|
const ACTIVE_STATUSES = /* @__PURE__ */ new Set([
|
|
8
9
|
"pending",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
2
|
-
import { T as writeKeyringPassword, c as normalizePlatformApiUrl, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-
|
|
2
|
+
import { T as writeKeyringPassword, c as normalizePlatformApiUrl, u as platformCredentialAccount, w as readKeyringPassword } from "./platform-registry-zHH3RiIm.mjs";
|
|
3
3
|
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
4
4
|
import { spawnSync } from "node:child_process";
|
|
5
5
|
// src/cli/cf-access.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as join, c as resolve, i as isAbsolute, n as dirname, r as extname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-
|
|
2
|
+
import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-CsbQGzMf.mjs";
|
|
3
3
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
4
4
|
import { t as WORKER_CONDITIONS } from "./worker-conditions-CBZ0RYsZ.mjs";
|
|
5
5
|
import { copyFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, realpathSync, rmSync, symlinkSync, writeFileSync } from "node:fs";
|
|
@@ -106,7 +106,7 @@ function stagePackageContext(directory, projectRoot) {
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
/** Create a disposable cf Build Output tree from an existing Cloudflare Worker build. */
|
|
109
|
-
async function prepareCfBuildOutput(workerDirectory, accountId, mode, projectRoot = workerDirectory) {
|
|
109
|
+
async function prepareCfBuildOutput(workerDirectory, accountId, mode, projectRoot = workerDirectory, options = {}) {
|
|
110
110
|
const source = resolve(workerDirectory);
|
|
111
111
|
const hasNativeOutput = existsSync(getRootConfigPath(source));
|
|
112
112
|
if (!hasNativeOutput && existsSync(join(source, ".cloudflare/output"))) await readBuildOutput(source);
|
|
@@ -174,7 +174,7 @@ async function prepareCfBuildOutput(workerDirectory, accountId, mode, projectRoo
|
|
|
174
174
|
root: directory,
|
|
175
175
|
settings: typeof configuredAccountId === "string" ? { accountId: configuredAccountId } : {},
|
|
176
176
|
buildContext: {
|
|
177
|
-
isPreview:
|
|
177
|
+
isPreview: options.isPreview === true,
|
|
178
178
|
mode: mode ?? "production"
|
|
179
179
|
}
|
|
180
180
|
});
|
|
@@ -417,7 +417,7 @@ async function prepareBundledBuildOutput(options) {
|
|
|
417
417
|
main: entry.fileName,
|
|
418
418
|
assets: options.assets
|
|
419
419
|
}), { mode: 384 });
|
|
420
|
-
return await prepareCfBuildOutput(scratch, options.accountId, void 0, options.projectRoot);
|
|
420
|
+
return await prepareCfBuildOutput(scratch, options.accountId, void 0, options.projectRoot, { isPreview: options.isPreview });
|
|
421
421
|
} finally {
|
|
422
422
|
rmSync(scratch, {
|
|
423
423
|
recursive: true,
|
|
@@ -440,7 +440,8 @@ async function prepareCfStaticBuildOutput(options) {
|
|
|
440
440
|
...record(raw.assets),
|
|
441
441
|
directory: resolve(options.assetsDirectory)
|
|
442
442
|
},
|
|
443
|
-
accountId: options.accountId
|
|
443
|
+
accountId: options.accountId,
|
|
444
|
+
isPreview: options.isPreview
|
|
444
445
|
});
|
|
445
446
|
}
|
|
446
447
|
/** Bundle an adapter-produced Worker and copy only its public framework assets. */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as prepareCfBuildOutput } from "./cf-build-output-G-7Tdd8b.mjs";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isRecord } from "@void/deploy-core";
|
|
1
2
|
// src/cli/cf-command-values.ts
|
|
2
3
|
const CF_VERSION_SOURCE_MAX_OUTPUT_BYTES = 134217728;
|
|
3
4
|
/** Accept a cf positional only when it cannot be read as a flag or carry control characters. */
|
|
@@ -23,4 +24,26 @@ function readCfUploadOutput(result) {
|
|
|
23
24
|
workersDevUrl: output.match(/(https:\/\/[a-z0-9.-]+\.workers\.dev(?:\/[^\s]*)?)/i)?.[1]
|
|
24
25
|
};
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
+
/**
|
|
28
|
+
* Map the Preview record `cf previews deploy` prints as JSON on stdout to the stable Preview URL
|
|
29
|
+
* and the URL of this deployment. Anything unreadable gives undefined, so the deploy fails closed.
|
|
30
|
+
*/
|
|
31
|
+
function readCfPreviewDeployOutput(data) {
|
|
32
|
+
if (!isRecord(data) || typeof data.preview_id !== "string" || typeof data.preview_name !== "string" || typeof data.deployment_id !== "string") return;
|
|
33
|
+
const previewUrl = firstUrl(data.preview_urls);
|
|
34
|
+
const deploymentUrl = firstUrl(data.deployment_urls);
|
|
35
|
+
return {
|
|
36
|
+
previewId: data.preview_id,
|
|
37
|
+
previewName: data.preview_name,
|
|
38
|
+
deploymentId: data.deployment_id,
|
|
39
|
+
...previewUrl ? { previewUrl } : {},
|
|
40
|
+
...deploymentUrl ? { deploymentUrl } : {}
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
/** The first URL of a cf URL list, without a trailing slash. */
|
|
44
|
+
function firstUrl(urls) {
|
|
45
|
+
const url = Array.isArray(urls) ? urls[0] : void 0;
|
|
46
|
+
if (typeof url !== "string") return;
|
|
47
|
+
return url.endsWith("/") ? url.slice(0, -1) : url;
|
|
48
|
+
}
|
|
49
|
+
export { safePositional as a, readCfUploadOutput as i, isD1Bookmark as n, readCfPreviewDeployOutput as r, CF_VERSION_SOURCE_MAX_OUTPUT_BYTES as t };
|