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,17 +1,18 @@
|
|
|
1
|
-
import { A as confirm, H as outro, K as select, L as log, U as password, X as text$1, tt as isCancel, z as multiselect } from "./dist-Cr_xGE_K.mjs";
|
|
2
1
|
import { a as join, c as resolve, n as dirname } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
+
import { a as select, i as password, n as confirm, o as text$1, r as multiselect } from "./interactive-prompts-EK0dilFu.mjs";
|
|
3
3
|
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
4
|
-
import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-
|
|
4
|
+
import { a as createSpinner, f as formatUrl, g as note, h as import_picocolors, i as cliCommandName, p as getErrorMessage, y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
5
5
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
6
|
-
import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-
|
|
7
|
-
import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
6
|
+
import { _ as resolvePinnedApiBaseUrl, o as createDefaultRunWrangler } from "./provision-CQykn8gu.mjs";
|
|
7
|
+
import { a as platformManagementSetupPage, c as platformSetupLink, d as planWritesDns, i as platformInstallCommandArguments, l as platformSetupPages, n as formatPlatformSetupPlan, o as platformPromptAnswer, r as openPlatformSetupPage, s as platformSetupFieldHelp, t as formatPlatformInstallCommand, u as planCreatesZone } from "./platform-setup-DwYITHfY.mjs";
|
|
8
|
+
import { H as outro, L as log, tt as isCancel } from "./dist-BngS28id.mjs";
|
|
9
|
+
import { o as runCloudflareAuthCommand } from "./cloudflare-auth-iOgRurWm.mjs";
|
|
10
|
+
import { d as resolveCloudflareOperationArgv } from "./cloudflare-process-DFNpqV_m.mjs";
|
|
11
|
+
import { S as writePendingInstallationSecrets, a as latestPlatformWorkerCutoverGeneration, c as normalizePlatformApiUrl, d as platformRegistryDirectory, f as platformWorkerSecretUpdateIntentState, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, n as assertPlatformInstallationSlugAvailable, o as listInstallationManifests, p as promoteInstallationSecrets, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-zHH3RiIm.mjs";
|
|
11
12
|
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
12
|
-
import { t as ensurePlatformAccessToken } from "./cf-access-
|
|
13
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-B21j-nd6.mjs";
|
|
13
14
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
14
|
-
import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-
|
|
15
|
+
import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-BnocJDC_.mjs";
|
|
15
16
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
16
17
|
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
17
18
|
import { fileURLToPath } from "node:url";
|
|
@@ -21,7 +22,7 @@ import { createHash, createHmac, randomBytes, randomUUID } from "node:crypto";
|
|
|
21
22
|
import { tmpdir } from "node:os";
|
|
22
23
|
import { stripVTControlCharacters } from "node:util";
|
|
23
24
|
import { readFile } from "node:fs/promises";
|
|
24
|
-
import { cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, readCloudflareTriggerConfig, readCloudflareVersionMigrationTag, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
|
|
25
|
+
import { cloudflareCommandDiagnostic, cloudflareVersionAnnotation, encodeCloudflareVersionMessage, parseCloudflareVersionMessage, readCloudflareTriggerConfig, readCloudflareVersionMigrationTag, resolveCloudflareVersionMessage, stabilizeCloudflareVersionTriggers } from "@void/deploy-cloudflare";
|
|
25
26
|
import { createServer, request } from "node:http";
|
|
26
27
|
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
27
28
|
import { createDefaultPlanCatalog, parsePlatformPlanCatalog } from "@void/platform/plans";
|
|
@@ -1778,7 +1779,9 @@ function secretReference(name) {
|
|
|
1778
1779
|
}
|
|
1779
1780
|
/** Only scoped credentials for the reviewed platform origins enter the process environment. */
|
|
1780
1781
|
function activatePlatformAccessCredentials(encoded, origins) {
|
|
1781
|
-
if (
|
|
1782
|
+
if (encoded) process.env.VOID_ACCESS_CREDENTIALS = mergePlatformAccessCredentials(encoded, origins);
|
|
1783
|
+
}
|
|
1784
|
+
function mergePlatformAccessCredentials(encoded, origins) {
|
|
1782
1785
|
const entries = JSON.parse(encoded);
|
|
1783
1786
|
if (!entries || typeof entries !== "object" || Array.isArray(entries)) throw new Error("platform: Invalid saved Access credentials.");
|
|
1784
1787
|
const allowed = new Set(origins.map((origin) => new URL(origin).origin));
|
|
@@ -1789,7 +1792,7 @@ function activatePlatformAccessCredentials(encoded, origins) {
|
|
|
1789
1792
|
}
|
|
1790
1793
|
const current = process.env.VOID_ACCESS_CREDENTIALS ? JSON.parse(process.env.VOID_ACCESS_CREDENTIALS) : {};
|
|
1791
1794
|
if (!current || typeof current !== "object" || Array.isArray(current)) throw new Error("platform: VOID_ACCESS_CREDENTIALS must contain an origin-keyed object.");
|
|
1792
|
-
|
|
1795
|
+
return JSON.stringify({
|
|
1793
1796
|
...current,
|
|
1794
1797
|
...entries
|
|
1795
1798
|
});
|
|
@@ -4274,9 +4277,8 @@ function readActivePlatformWorkerDeployment(response) {
|
|
|
4274
4277
|
*/
|
|
4275
4278
|
async function platformWorkerVersionHasTriggerRecord(readCloudflare, accountId, workerName, versionId) {
|
|
4276
4279
|
const version = await readCloudflare(`/accounts/${encodeURIComponent(accountId)}/workers/scripts/${encodeURIComponent(workerName)}/versions/${encodeURIComponent(versionId)}`);
|
|
4277
|
-
const
|
|
4278
|
-
|
|
4279
|
-
return parseCloudflareVersionMessage(typeof message === "string" ? message : null)?.schema === 2;
|
|
4280
|
+
const resolved = await resolveCloudflareVersionMessage(cloudflareVersionAnnotation(version), versionId, () => readCloudflare(`/accounts/${encodeURIComponent(accountId)}/workers/workers/${encodeURIComponent(workerName)}/versions/${encodeURIComponent(versionId)}?include=modules`));
|
|
4281
|
+
return parseCloudflareVersionMessage(resolved)?.schema === 2;
|
|
4280
4282
|
}
|
|
4281
4283
|
async function readPlatformWorkerDeployments(configPath, accountId, workerName, runner = runPlatformWrangler) {
|
|
4282
4284
|
const result = await runner({
|
|
@@ -4379,9 +4381,12 @@ async function readPlatformWorkerVersionSnapshot(configPath, accountId, workerNa
|
|
|
4379
4381
|
const ownershipBindings = Array.isArray(bindings) ? bindings.filter((binding) => binding && typeof binding === "object" && binding.name === "PLATFORM_OWNERSHIP_MARKER" && binding.type === "plain_text" && typeof binding.text === "string") : [];
|
|
4380
4382
|
if (ownershipBindings.length !== 1 || ownershipBindings[0].text !== expectedOwnershipMarker) throw new PlatformWorkerOwnershipError(`platform: Active Worker version ${versionId} for ${workerName} does not belong to this installation.`);
|
|
4381
4383
|
await validateCurrentVersion?.();
|
|
4382
|
-
const
|
|
4383
|
-
|
|
4384
|
-
|
|
4384
|
+
const resolved = await resolveCloudflareVersionMessage(cloudflareVersionAnnotation(value), versionId, {
|
|
4385
|
+
configPath,
|
|
4386
|
+
workerName,
|
|
4387
|
+
runWrangler: platformWorkerCommandRunner(accountId, process.cwd(), runner)
|
|
4388
|
+
});
|
|
4389
|
+
const metadata = parseCloudflareVersionMessage(resolved);
|
|
4385
4390
|
if (metadata?.schema !== 2 && unrecordedTriggerConfig) return {
|
|
4386
4391
|
migrationTag: readCloudflareVersionMigrationTag(value),
|
|
4387
4392
|
triggerConfig: unrecordedTriggerConfig,
|
|
@@ -5839,6 +5844,8 @@ async function enableInstallationServices(input) {
|
|
|
5839
5844
|
...state.manifest,
|
|
5840
5845
|
deployment: plan.deployment,
|
|
5841
5846
|
deploymentExecution: runtime.deploymentExecution,
|
|
5847
|
+
managedWorkflows: runtime.managedWorkflows ?? 0,
|
|
5848
|
+
schemaVersion: runtime.managedWorkflows === 1 ? 2 : 1,
|
|
5842
5849
|
platformVersion: version,
|
|
5843
5850
|
runtime: runtimeProvenance,
|
|
5844
5851
|
safetyProtocols: runtime.safetyProtocols,
|
|
@@ -5864,8 +5871,14 @@ async function verifyHealthException(access, app, destination) {
|
|
|
5864
5871
|
const policy = policies[0];
|
|
5865
5872
|
if (policies.length !== 1 || policy?.decision !== "bypass" || JSON.stringify(policy.include) !== "[{\"everyone\":{}}]" || policy.require !== void 0 && (!Array.isArray(policy.require) || policy.require.length > 0) || policy.exclude !== void 0 && (!Array.isArray(policy.exclude) || policy.exclude.length > 0)) throw new Error(`platform: The Access policy for ${destination} does not match the reserved health-check exception.`);
|
|
5866
5873
|
}
|
|
5874
|
+
function verifyPlatformAccessHealthChecks(input) {
|
|
5875
|
+
return reconcilePlatformAccessHealthChecks(input);
|
|
5876
|
+
}
|
|
5867
5877
|
/** Keep the same path-only exception used by project Zero Trust available during bootstrap. */
|
|
5868
|
-
|
|
5878
|
+
function ensurePlatformAccessHealthChecks(input) {
|
|
5879
|
+
return reconcilePlatformAccessHealthChecks(input, input.save);
|
|
5880
|
+
}
|
|
5881
|
+
async function reconcilePlatformAccessHealthChecks(input, writeCheckpoint) {
|
|
5869
5882
|
const appAccess = !input.manifest.steps.some((step) => step.key === "app-access-initialized:v1") && input.checkpoint.appAccessSetupJson ? parsePlatformAppAccessSetup(JSON.parse(input.checkpoint.appAccessSetupJson)) : null;
|
|
5870
5883
|
if (appAccess && appAccess.accountId !== input.plan.account.id) throw new Error("platform: App access recovery belongs to another Cloudflare account.");
|
|
5871
5884
|
if (!input.plan.deployment.authentication.accessProtection && !appAccess?.managed) return;
|
|
@@ -5888,7 +5901,7 @@ async function ensurePlatformAccessHealthChecks(input) {
|
|
|
5888
5901
|
resources: {}
|
|
5889
5902
|
};
|
|
5890
5903
|
if (!state || state.version !== 1 || state.accountId !== accountId || input.manifest.account.id !== accountId || state.installationId !== input.manifest.id || state.installationId !== input.plan.installationId || state.nonce !== nonce || !state.resources || typeof state.resources !== "object" || Array.isArray(state.resources)) throw new Error("platform: Access health recovery data belongs to a different installation.");
|
|
5891
|
-
const save = () =>
|
|
5904
|
+
const save = () => writeCheckpoint?.(JSON.stringify(state));
|
|
5892
5905
|
const inventory = await access.list("apps");
|
|
5893
5906
|
for (const { key, destination } of platformAccessHealthTargets(input.plan)) {
|
|
5894
5907
|
const expected = {
|
|
@@ -5924,6 +5937,7 @@ async function ensurePlatformAccessHealthChecks(input) {
|
|
|
5924
5937
|
if (!recorded?.id) {
|
|
5925
5938
|
if (spec.mode !== "create") throw new Error(`platform: Configure an Access exception limited to ${destination}, then resume. Void's private probe token still protects this endpoint.`);
|
|
5926
5939
|
if (inventory.some((app) => app.name === name)) throw new Error("platform: An Access health application with this installation identity already exists. Inspect it before resuming.");
|
|
5940
|
+
if (!writeCheckpoint) continue;
|
|
5927
5941
|
recorded = {
|
|
5928
5942
|
name,
|
|
5929
5943
|
fingerprint,
|
|
@@ -6000,7 +6014,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
|
|
|
6000
6014
|
}
|
|
6001
6015
|
const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
|
|
6002
6016
|
if (existingWorkers.length) {
|
|
6003
|
-
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-
|
|
6017
|
+
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-BHPV4MUf.mjs");
|
|
6004
6018
|
await verifyProtectionWorkerOrigins({
|
|
6005
6019
|
request: input.client.request.bind(input.client),
|
|
6006
6020
|
listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
|
|
@@ -6020,10 +6034,7 @@ function withAuthentication(deployment, authentication) {
|
|
|
6020
6034
|
}
|
|
6021
6035
|
});
|
|
6022
6036
|
}
|
|
6023
|
-
|
|
6024
|
-
const { state, releaseDatabaseLock, runtime, authenticationProtocolTransition, now, dependencies } = input;
|
|
6025
|
-
const { workerSecretUpdateIntent } = state;
|
|
6026
|
-
const liveAuthentication = await releaseDatabaseLock.readAuthenticationState?.();
|
|
6037
|
+
function applyInstallationAuthentication({ state, runtime, authenticationProtocolTransition }, liveAuthentication) {
|
|
6027
6038
|
if (liveAuthentication) {
|
|
6028
6039
|
state.authenticationEnforcementActive = liveAuthentication.sessionsRequired;
|
|
6029
6040
|
if (liveAuthentication.sessionsRequired && runtime.authenticationProtocolVersion !== 1) throw new Error("platform: This runtime cannot enforce the active authentication configuration. Use an authentication-compatible runtime.");
|
|
@@ -6048,12 +6059,56 @@ async function prepareInstallationAuthentication(input) {
|
|
|
6048
6059
|
configurable: true
|
|
6049
6060
|
})
|
|
6050
6061
|
};
|
|
6062
|
+
}
|
|
6063
|
+
async function verifyInstallationAccessSetup({ state, dependencies }, liveAuthentication) {
|
|
6064
|
+
const protection = liveAuthentication ? liveAuthentication.protection : state.secrets.authenticationSetupJson ? parsePlatformAuthenticationSetup(JSON.parse(state.secrets.authenticationSetupJson)).protection : null;
|
|
6065
|
+
if (!protection) throw new Error("platform: The active Access protection configuration is unavailable. Restore its database and encrypted setup checkpoint before maintenance.");
|
|
6066
|
+
dependencies.onProgress?.("Verifying current Access policies and protected origins");
|
|
6067
|
+
await (dependencies.verifyAccessProtection ?? verifyInstalledPlatformAccessProtection)({
|
|
6068
|
+
client: dependencies.client,
|
|
6069
|
+
manifest: state.manifest,
|
|
6070
|
+
plan: state.plan,
|
|
6071
|
+
dashboardUrl: platformDashboardUrl(state.plan.deployment),
|
|
6072
|
+
protection,
|
|
6073
|
+
checkpoint: secretCheckpoint(state.secrets, state.workerSecretUpdateIntent)
|
|
6074
|
+
});
|
|
6075
|
+
}
|
|
6076
|
+
function installationAccessCredentials(state) {
|
|
6077
|
+
if (!state.secrets.accessCredentialsJson) return;
|
|
6078
|
+
const credentials = JSON.parse(state.secrets.accessCredentialsJson);
|
|
6079
|
+
if (!credentials || typeof credentials !== "object" || Array.isArray(credentials)) throw new Error("platform: Invalid saved Access credentials.");
|
|
6080
|
+
const origins = [state.plan.apiUrl, state.plan.proxyUrl];
|
|
6081
|
+
return mergePlatformAccessCredentials(JSON.stringify(Object.fromEntries(Object.entries(credentials).filter(([origin]) => origins.includes(origin)))), origins);
|
|
6082
|
+
}
|
|
6083
|
+
async function preflightInstallationAuthentication(input, lock) {
|
|
6084
|
+
const liveAuthentication = await lock.readAuthenticationState?.() ?? null;
|
|
6085
|
+
const preview = {
|
|
6086
|
+
...input,
|
|
6087
|
+
state: { ...input.state }
|
|
6088
|
+
};
|
|
6089
|
+
applyInstallationAuthentication(preview, liveAuthentication);
|
|
6090
|
+
installationAccessCredentials(preview.state);
|
|
6091
|
+
checkpointAuthenticationResources(preview.state.manifest, preview.state.secrets, preview.state.manifest.updatedAt);
|
|
6092
|
+
if (preview.state.plan.deployment.authentication.accessProtection) {
|
|
6093
|
+
await verifyInstallationAccessSetup(preview, liveAuthentication);
|
|
6094
|
+
if (!input.dependencies.prepareHealthAccess) await verifyPlatformAccessHealthChecks({
|
|
6095
|
+
client: preview.dependencies.client,
|
|
6096
|
+
manifest: preview.state.manifest,
|
|
6097
|
+
plan: preview.state.plan,
|
|
6098
|
+
checkpoint: secretCheckpoint(preview.state.secrets, preview.state.workerSecretUpdateIntent)
|
|
6099
|
+
});
|
|
6100
|
+
}
|
|
6101
|
+
return liveAuthentication;
|
|
6102
|
+
}
|
|
6103
|
+
async function prepareInstallationAuthentication(input) {
|
|
6104
|
+
const { state, releaseDatabaseLock, runtime, now, dependencies, checkedAuthentication } = input;
|
|
6105
|
+
const { authenticationProtocolTransition } = input;
|
|
6106
|
+
const { workerSecretUpdateIntent } = state;
|
|
6107
|
+
const liveAuthentication = checkedAuthentication === void 0 ? await releaseDatabaseLock.readAuthenticationState?.() : checkedAuthentication;
|
|
6108
|
+
applyInstallationAuthentication(input, liveAuthentication);
|
|
6051
6109
|
const activateAccessCredentials = () => {
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
if (!credentials || typeof credentials !== "object" || Array.isArray(credentials)) throw new Error("platform: Invalid saved Access credentials.");
|
|
6055
|
-
const origins = [state.plan.apiUrl, state.plan.proxyUrl];
|
|
6056
|
-
activatePlatformAccessCredentials(JSON.stringify(Object.fromEntries(Object.entries(credentials).filter(([origin]) => origins.includes(origin)))), origins);
|
|
6110
|
+
const credentials = installationAccessCredentials(state);
|
|
6111
|
+
if (credentials !== void 0) process.env.VOID_ACCESS_CREDENTIALS = credentials;
|
|
6057
6112
|
};
|
|
6058
6113
|
activateAccessCredentials();
|
|
6059
6114
|
state.manifest = checkpointAuthenticationResources(state.manifest, state.secrets, now());
|
|
@@ -6154,19 +6209,7 @@ async function prepareInstallationAuthentication(input) {
|
|
|
6154
6209
|
});
|
|
6155
6210
|
}
|
|
6156
6211
|
}
|
|
6157
|
-
if (state.plan.deployment.authentication.accessProtection)
|
|
6158
|
-
const protection = liveAuthentication ? liveAuthentication.protection : state.secrets.authenticationSetupJson ? parsePlatformAuthenticationSetup(JSON.parse(state.secrets.authenticationSetupJson)).protection : null;
|
|
6159
|
-
if (!protection) throw new Error("platform: The active Access protection configuration is unavailable. Restore its database and encrypted setup checkpoint before maintenance.");
|
|
6160
|
-
dependencies.onProgress?.("Verifying current Access policies and protected origins");
|
|
6161
|
-
await (dependencies.verifyAccessProtection ?? verifyInstalledPlatformAccessProtection)({
|
|
6162
|
-
client: dependencies.client,
|
|
6163
|
-
manifest: state.manifest,
|
|
6164
|
-
plan: state.plan,
|
|
6165
|
-
dashboardUrl: platformDashboardUrl(state.plan.deployment),
|
|
6166
|
-
protection,
|
|
6167
|
-
checkpoint: secretCheckpoint(state.secrets, workerSecretUpdateIntent)
|
|
6168
|
-
});
|
|
6169
|
-
}
|
|
6212
|
+
if (checkedAuthentication === void 0 && state.plan.deployment.authentication.accessProtection) await verifyInstallationAccessSetup(input, liveAuthentication);
|
|
6170
6213
|
if (state.plan.deployment.authentication.accessProtection || appAccessSetupRequired && state.secrets.appAccessSetupJson && JSON.parse(state.secrets.appAccessSetupJson).managed === true) {
|
|
6171
6214
|
dependencies.onProgress?.("Preparing Access for authenticated platform health checks");
|
|
6172
6215
|
try {
|
|
@@ -6470,10 +6513,13 @@ async function assertProjectZeroTrustAllowsUninstall(read, options = {}) {
|
|
|
6470
6513
|
].join("\n"));
|
|
6471
6514
|
}
|
|
6472
6515
|
// src/cli/platform-installer-database.ts
|
|
6516
|
+
function platformDatabaseSchemaStep(database) {
|
|
6517
|
+
return `database-schema:${database.schemaDigest}`;
|
|
6518
|
+
}
|
|
6473
6519
|
async function preparePlatformDatabaseSchema(manifest, runtime, runtimeDirectory, sourcePlatformVersion, hadPriorWorkers, plan, dependencies, releaseDatabaseLock, now, writeRemoteInstallationCheckpoint, onManifestChange) {
|
|
6474
6520
|
dependencies.onProgress?.("Checking the platform database schema");
|
|
6475
6521
|
const rollbackDatabase = dependencies.databaseRollbackSource;
|
|
6476
|
-
const migrationStep =
|
|
6522
|
+
const migrationStep = platformDatabaseSchemaStep(runtime.database);
|
|
6477
6523
|
if (rollbackDatabase) {
|
|
6478
6524
|
const verifyDatabase = releaseDatabaseLock.verifyDatabase;
|
|
6479
6525
|
if (!verifyDatabase) throw new Error("platform: The PostgreSQL lifecycle lock cannot verify the forward-only rollback schema.");
|
|
@@ -6702,18 +6748,21 @@ async function inspectPlatformDatabaseStateConnection(client, database) {
|
|
|
6702
6748
|
schemaDigest: platformDatabaseSchemaDigest(database.lineage, applied)
|
|
6703
6749
|
};
|
|
6704
6750
|
}
|
|
6705
|
-
async function
|
|
6706
|
-
verifyPlatformDatabaseArtifacts(runtimeDirectory, database);
|
|
6751
|
+
async function inspectPlatformDatabaseUpgrade(client, database, sourcePlatformVersion, hasPriorWorkers) {
|
|
6707
6752
|
const before = await inspectPlatformDatabaseStateConnection(client, database);
|
|
6708
6753
|
if (before.pendingMigrations.length === 0) {
|
|
6709
6754
|
if (before.schemaDigest !== database.schemaDigest) throw new Error("platform: PostgreSQL schema digest does not match the packaged runtime.");
|
|
6710
|
-
|
|
6711
|
-
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6715
|
-
|
|
6716
|
-
if (
|
|
6755
|
+
} else if (hasPriorWorkers && !database.rollbackSafeFrom.some((entry) => entry.platformVersion === sourcePlatformVersion && entry.schemaDigest === before.schemaDigest)) throw new Error(`platform: Void Platform ${sourcePlatformVersion ?? "unknown"} cannot safely roll back after migrating database schema ${before.schemaDigest} to this release. Upgrade through a supported intermediate version or install into a fresh database.`);
|
|
6756
|
+
return before;
|
|
6757
|
+
}
|
|
6758
|
+
async function preparePlatformDatabaseConnection(client, runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers) {
|
|
6759
|
+
verifyPlatformDatabaseArtifacts(runtimeDirectory, database);
|
|
6760
|
+
const before = await inspectPlatformDatabaseUpgrade(client, database, sourcePlatformVersion, hasPriorWorkers);
|
|
6761
|
+
if (before.pendingMigrations.length === 0) return {
|
|
6762
|
+
appliedMigrations: 0,
|
|
6763
|
+
previousSchemaDigest: before.schemaDigest,
|
|
6764
|
+
schemaDigest: before.schemaDigest
|
|
6765
|
+
};
|
|
6717
6766
|
await client.query("BEGIN");
|
|
6718
6767
|
try {
|
|
6719
6768
|
await client.query("CREATE SCHEMA IF NOT EXISTS \"drizzle\"");
|
|
@@ -6827,8 +6876,14 @@ async function acquirePlatformDatabaseLifecycleLockConnection(client, installati
|
|
|
6827
6876
|
])).rows.length !== 1) throw new Error("platform: The PostgreSQL database ownership claim changed unexpectedly.");
|
|
6828
6877
|
release.authoritativeManifest = manifest;
|
|
6829
6878
|
};
|
|
6879
|
+
release.preflightDatabaseUpgrade = async (runtimeDirectory, database, manifest, hasPriorWorkers) => {
|
|
6880
|
+
const schemaStep = platformDatabaseSchemaStep(database);
|
|
6881
|
+
if (manifest.steps.some((step) => step.key === schemaStep)) await verifyPlatformDatabaseConnection(client, runtimeDirectory, database);
|
|
6882
|
+
else await inspectPlatformDatabaseUpgrade(client, database, manifest.platformVersion, hasPriorWorkers);
|
|
6883
|
+
};
|
|
6830
6884
|
release.prepareDatabase = (runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers) => preparePlatformDatabaseConnection(client, runtimeDirectory, database, sourcePlatformVersion, hasPriorWorkers);
|
|
6831
6885
|
release.prepareSandboxDrain = (requiredAdmissionProtocol) => preparePlatformSandboxDrainConnection(client, requiredAdmissionProtocol);
|
|
6886
|
+
release.assertWorkflowRollbackSafe = () => assertWorkflowRollbackSafe(client);
|
|
6832
6887
|
release.verifyDatabase = (runtimeDirectory, database) => verifyPlatformDatabaseConnection(client, runtimeDirectory, database);
|
|
6833
6888
|
return release;
|
|
6834
6889
|
}
|
|
@@ -7017,6 +7072,15 @@ async function claimPlatformDatabaseConnection(client, installationId, ownership
|
|
|
7017
7072
|
throw error;
|
|
7018
7073
|
}
|
|
7019
7074
|
}
|
|
7075
|
+
/** Older runtimes cannot run an existing Workflow, clean up its owner, or parse a catalog saved with Workflow limits. */
|
|
7076
|
+
async function assertWorkflowRollbackSafe(client) {
|
|
7077
|
+
if ((await client.query(`SELECT
|
|
7078
|
+
EXISTS (SELECT 1 FROM resources WHERE type='workflow')
|
|
7079
|
+
OR EXISTS (SELECT 1 FROM project_cleanup_jobs WHERE kind='cf-resource' AND payload->>'type'='workflow')
|
|
7080
|
+
OR EXISTS (SELECT 1 FROM platform_settings, LATERAL jsonb_array_elements(value->'plans') plan
|
|
7081
|
+
WHERE key='plans:catalog' AND (plan->'limits') ?| ARRAY['workflowsPerProject','workflowSchedulesPerProject','workflowMaxConcurrentInstances'])
|
|
7082
|
+
AS in_use`)).rows[0]?.in_use !== false) throw new Error("platform: This installation has Workflow resources or saved Workflow plan limits. Choose a rollback runtime that supports managed Workflows.");
|
|
7083
|
+
}
|
|
7020
7084
|
// src/cli/platform-install-provisioning.ts
|
|
7021
7085
|
async function provisionInstallationServices(input) {
|
|
7022
7086
|
const { state, now, releaseDatabaseLock, dependencies, writeRemoteInstallationCheckpoint, checkpointOperation, externalHyperdriveOriginHash, runtime, runtimeDirectory, sourcePlatformVersion, hadPriorWorkers } = input;
|
|
@@ -7571,11 +7635,38 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7571
7635
|
workerDeploymentCommitted: false,
|
|
7572
7636
|
authenticationEnforcementActive: false
|
|
7573
7637
|
};
|
|
7638
|
+
const assertSecretUpdateAuthority = () => assertPlatformWorkerSecretUpdateAuthority({
|
|
7639
|
+
explicitUpdates: explicitWorkerSecretUpdates,
|
|
7640
|
+
localIntent: state.secrets.pendingWorkerSecretUpdateIntent,
|
|
7641
|
+
manifest: state.manifest,
|
|
7642
|
+
requiresEmailSigningSecret: state.manifest.deployment.capabilities.email || state.plan.deployment.capabilities.email
|
|
7643
|
+
});
|
|
7644
|
+
const upgradePreflightLock = dependencies.upgradePreflightLock;
|
|
7645
|
+
const authenticationInput = {
|
|
7646
|
+
state,
|
|
7647
|
+
runtime,
|
|
7648
|
+
authenticationProtocolTransition,
|
|
7649
|
+
dependencies
|
|
7650
|
+
};
|
|
7651
|
+
let checkedAuthentication;
|
|
7652
|
+
const checkWorkflowCompatibility = async (lock) => {
|
|
7653
|
+
if (runtime.managedWorkflows !== 1 && (state.manifest.managedWorkflows === 1 || dependencies.databaseRollbackSource?.manifest.managedWorkflows === 1)) {
|
|
7654
|
+
if (!lock.assertWorkflowRollbackSafe) throw new Error("platform: Cannot check Workflow state on the platform database.");
|
|
7655
|
+
await lock.assertWorkflowRollbackSafe();
|
|
7656
|
+
}
|
|
7657
|
+
};
|
|
7658
|
+
if (upgradePreflightLock) {
|
|
7659
|
+
await checkWorkflowCompatibility(upgradePreflightLock);
|
|
7660
|
+
assertSecretUpdateAuthority();
|
|
7661
|
+
assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, upgradePreflightLock.requiredSafetyProtocols);
|
|
7662
|
+
await upgradePreflightLock.preflightDatabaseUpgrade?.(runtimeDirectory, runtime.database, state.manifest, hadPriorWorkers);
|
|
7663
|
+
checkedAuthentication = await preflightInstallationAuthentication(authenticationInput, upgradePreflightLock);
|
|
7664
|
+
}
|
|
7574
7665
|
const pendingSecrets = secretCheckpoint(state.secrets, state.workerSecretUpdateIntent);
|
|
7575
7666
|
writePendingInstallationSecrets(state.manifest, {
|
|
7576
7667
|
...pendingSecrets,
|
|
7577
7668
|
databaseClaimState: "claiming"
|
|
7578
|
-
});
|
|
7669
|
+
}, void 0, dependencies.onFirstWrite);
|
|
7579
7670
|
dependencies.onProgress?.("Preparing the platform database");
|
|
7580
7671
|
try {
|
|
7581
7672
|
await (dependencies.claimDatabase ?? claimPlatformDatabase)(state.secrets.databaseUrl, state.manifest.id, state.manifest.ownershipNonce);
|
|
@@ -7599,13 +7690,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7599
7690
|
await releaseDatabaseLock();
|
|
7600
7691
|
throw new Error("platform: This installation changed on another host. Local state was refreshed; rerun the command to review a current plan.");
|
|
7601
7692
|
}
|
|
7602
|
-
try {
|
|
7603
|
-
|
|
7604
|
-
|
|
7605
|
-
localIntent: state.secrets.pendingWorkerSecretUpdateIntent,
|
|
7606
|
-
manifest: state.manifest,
|
|
7607
|
-
requiresEmailSigningSecret: state.manifest.deployment.capabilities.email || state.plan.deployment.capabilities.email
|
|
7608
|
-
});
|
|
7693
|
+
if (!upgradePreflightLock) try {
|
|
7694
|
+
await checkWorkflowCompatibility(releaseDatabaseLock);
|
|
7695
|
+
assertSecretUpdateAuthority();
|
|
7609
7696
|
} catch (error) {
|
|
7610
7697
|
await releaseDatabaseLock();
|
|
7611
7698
|
throw error;
|
|
@@ -7627,7 +7714,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7627
7714
|
};
|
|
7628
7715
|
let operationStarted = false;
|
|
7629
7716
|
try {
|
|
7630
|
-
assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, releaseDatabaseLock.requiredSafetyProtocols);
|
|
7717
|
+
if (!upgradePreflightLock) assertPlatformRuntimeSafety(runtime, state.manifest.safetyProtocols, releaseDatabaseLock.requiredSafetyProtocols);
|
|
7631
7718
|
if (existing) await dependencies.verifyExistingOwnership?.(state.manifest, authoritative !== null && authoritative !== void 0);
|
|
7632
7719
|
const action = dependencies.operation ?? (existing ? "upgrade" : "install");
|
|
7633
7720
|
const previousOperation = state.manifest.operation;
|
|
@@ -7650,12 +7737,10 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7650
7737
|
};
|
|
7651
7738
|
await checkpointOperation("preparing");
|
|
7652
7739
|
await prepareInstallationAuthentication({
|
|
7653
|
-
|
|
7740
|
+
...authenticationInput,
|
|
7654
7741
|
releaseDatabaseLock,
|
|
7655
|
-
|
|
7656
|
-
|
|
7657
|
-
now,
|
|
7658
|
-
dependencies
|
|
7742
|
+
checkedAuthentication,
|
|
7743
|
+
now
|
|
7659
7744
|
});
|
|
7660
7745
|
const provisioned = await provisionInstallationServices({
|
|
7661
7746
|
state,
|
|
@@ -7861,6 +7946,8 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
7861
7946
|
...state.manifest,
|
|
7862
7947
|
deployment: state.plan.deployment,
|
|
7863
7948
|
deploymentExecution: runtime.deploymentExecution,
|
|
7949
|
+
managedWorkflows: runtime.managedWorkflows ?? 0,
|
|
7950
|
+
schemaVersion: runtime.managedWorkflows === 1 ? 2 : 1,
|
|
7864
7951
|
platformVersion: version,
|
|
7865
7952
|
runtime: runtimeProvenance,
|
|
7866
7953
|
updatedAt: now(),
|
|
@@ -8717,7 +8804,7 @@ const assertNewNameAvailable = (slug) => {
|
|
|
8717
8804
|
};
|
|
8718
8805
|
async function runPlatformLifecycleCommand(commandArgs) {
|
|
8719
8806
|
if (commandArgs.subcommand === "domain") {
|
|
8720
|
-
const { runPlatformDomainCommand } = await import("./platform-domain-
|
|
8807
|
+
const { runPlatformDomainCommand } = await import("./platform-domain-kn3WuKPG.mjs");
|
|
8721
8808
|
await runPlatformDomainCommand(commandArgs);
|
|
8722
8809
|
return;
|
|
8723
8810
|
}
|
|
@@ -8726,7 +8813,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8726
8813
|
const credential = await resolvePlatformCloudflareCredential();
|
|
8727
8814
|
const client = new PlatformCloudflareClient(credential.token, { credential: platformOperatorCredentialLabel(credential) });
|
|
8728
8815
|
const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
|
|
8729
|
-
const { recoverPlatformInstallations } = await import("./platform-recovery-
|
|
8816
|
+
const { recoverPlatformInstallations } = await import("./platform-recovery-PwJ54AIZ.mjs");
|
|
8730
8817
|
const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
|
|
8731
8818
|
if (recovered.length === 0) {
|
|
8732
8819
|
log.info(`No recoverable Void platform installations were found in ${accountId}.`);
|
|
@@ -8737,7 +8824,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8737
8824
|
return;
|
|
8738
8825
|
}
|
|
8739
8826
|
if (commandArgs.subcommand !== "install") {
|
|
8740
|
-
const { runInstalledPlatformCommand } = await import("./platform-management-
|
|
8827
|
+
const { runInstalledPlatformCommand } = await import("./platform-management-CaSdFthX.mjs");
|
|
8741
8828
|
await runInstalledPlatformCommand(commandArgs);
|
|
8742
8829
|
return;
|
|
8743
8830
|
}
|
|
@@ -8853,6 +8940,11 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8853
8940
|
const accounts = await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client));
|
|
8854
8941
|
const accountId = existing ? existing.account.id : await selectAccount(accounts, args.account);
|
|
8855
8942
|
if (existing && args.account && await selectAccount(accounts, args.account) !== existing.account.id) throw new Error("platform: The installation belongs to a different Cloudflare account.");
|
|
8943
|
+
try {
|
|
8944
|
+
await withPlatformProgress("Checking Workers for Platforms", () => client.listDispatchNamespaces(accountId));
|
|
8945
|
+
} catch (error) {
|
|
8946
|
+
if (error instanceof PlatformCloudflarePrerequisiteError) throw error;
|
|
8947
|
+
}
|
|
8856
8948
|
const recorded = existing?.deployment;
|
|
8857
8949
|
if (existing && recorded && isPlatformSetupDraft(existing) && (args.applicationDomain && normalizeApplicationDomain(args.applicationDomain) !== recorded.application.baseDomain || args.zone && normalizeApplicationDomain(args.zone) !== recorded.application.zoneName || args.workersDev && !!recorded.application.zoneName || args.controlPlaneDomain && normalizeApplicationDomain(args.controlPlaneDomain) !== recorded.controlPlane.apiHostname || args.dedicatedZone && !recorded.application.dedicatedZone)) throw new Error("platform: These options differ from the saved setup. Resume its recorded configuration or choose another installation name.");
|
|
8858
8950
|
let workersDev = !!recorded?.application.workersDev && !recorded.application.zoneName || args.workersDev === true;
|
|
@@ -8906,7 +8998,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8906
8998
|
progress?.stop("Read the saved installation.");
|
|
8907
8999
|
progress = void 0;
|
|
8908
9000
|
if (authoritative) {
|
|
8909
|
-
const { selectAuthoritativePlatformManifest } = await import("./platform-management-
|
|
9001
|
+
const { selectAuthoritativePlatformManifest } = await import("./platform-management-CaSdFthX.mjs");
|
|
8910
9002
|
const selected = selectAuthoritativePlatformManifest(existing, authoritative);
|
|
8911
9003
|
authoritativeProvisionIntents = true;
|
|
8912
9004
|
if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
|
|
@@ -9399,7 +9491,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
9399
9491
|
})).actions.filter((action) => action.kind === "worker"),
|
|
9400
9492
|
revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
|
|
9401
9493
|
verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
|
|
9402
|
-
const { verifyPlatformInstallationOwnership } = await import("./platform-management-
|
|
9494
|
+
const { verifyPlatformInstallationOwnership } = await import("./platform-management-CaSdFthX.mjs");
|
|
9403
9495
|
const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
|
|
9404
9496
|
const previous = manifest.resources.find((resource) => resource.key === action.key);
|
|
9405
9497
|
return action.action === "create" && previous && previous.name !== action.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
export { l as runInstalledPlatformCommand, u as selectAuthoritativePlatformManifest, f as verifyPlatformInstallationOwnership } from "./platform-management-fyrsq2Ra.mjs";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { f as formatUrl, g as note, h as import_picocolors, y as printSuccess } from "./output-
|
|
4
|
-
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-
|
|
1
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-B21j-nd6.mjs";
|
|
2
|
+
import { a as select, n as confirm } from "./interactive-prompts-EK0dilFu.mjs";
|
|
3
|
+
import { f as formatUrl, g as note, h as import_picocolors, y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
4
|
+
import { $ as PlatformCloudflareApiError, B as r2BucketConfigHash, C as assertProjectZeroTrustAllowsUninstall, D as createPlatformHealthProbeToken, E as loadPlatformRuntime, F as formatPlatformInstallPlan, G as assertPlatformOperatorCredentialCanApplyPlan, H as revalidatePlatformInstallAction, I as hasProvisionIntentStep, J as verifyPlatformCloudflareCredential, K as platformOperatorCredentialLabel, L as legacyResourceConfigHash, N as createPlatformInstallPlan, O as createPlatformInstallationSecrets, P as dnsRecordConfigHash, R as matchesRecordedR2Fingerprint, S as readPlatformProjectZeroTrustState, T as readPlatformDatabase, U as platformDatabaseNameFromOwnerUrl, V as resourceMarkerProblem, W as turnOffInstalledProjectZeroTrust, Y as activatePlatformAccessCredentials, _ as deletePlatformSecurityScanner, a as createPlatformProgress, at as verifyPlatformRuntimeTokenEmailPermissions, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as PlatformCloudflareClient, f as readLoginReplacementFile, g as assertPlatformSecurityAuditsSupported, h as installPlatform, it as hyperdriveOriginMatches, j as platformTrafficAttachmentWorker, k as resolveBootstrapGitHubId, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as hyperdriveOriginConfigHash, o as withPlatformProgress, ot as verifyPlatformRuntimeTokenPermissions, p as replacePendingInstallationAuthentication, q as resolvePlatformCloudflareCredential, rt as hyperdriveOriginFromConnectionString, s as findPlatformWorkerOutsideChanges, st as PLATFORM_WORKERS_PERMISSION, t as assertNoninteractivePlatformMutationAcknowledged, tt as PlatformRuntimeTokenEmailPermissionError, u as uploadPlatformWorkerOutsideChanges, v as acquirePlatformDatabaseLifecycleLock, w as formatZeroTrustApplications, x as readPlatformProjectSlugs, z as platformAdoptionIntentHash } from "./platform-lifecycle-CKwOg8wz.mjs";
|
|
5
|
+
import { H as outro, L as log, tt as isCancel } from "./dist-BngS28id.mjs";
|
|
5
6
|
import { a as r2ErrorCode, i as isR2CredentialRejection, n as R2_CREDENTIALS_DOCS_URL, r as R2_MALFORMED_CREDENTIAL_ERROR_CODES } from "./direct-r2-upload-DFXLWfXV.mjs";
|
|
6
|
-
import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-
|
|
7
|
+
import { S as writePendingInstallationSecrets, _ as removePlatformConnectionForInstallation, g as removeInstallationRecoverySecrets, h as readPendingInstallationSecrets, m as readInstallationRecoverySecrets, o as listInstallationManifests, t as acquirePlatformLifecycleLock, v as resolveInstallationManifest, x as writeInstallationManifest } from "./platform-registry-zHH3RiIm.mjs";
|
|
7
8
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
8
|
-
import { r as assertPlatformStorageSupported } from "./platform-args-
|
|
9
|
+
import { r as assertPlatformStorageSupported } from "./platform-args-BnocJDC_.mjs";
|
|
9
10
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
10
11
|
import { createHash, createHmac } from "node:crypto";
|
|
11
12
|
import { setTimeout } from "node:timers/promises";
|
|
@@ -762,6 +763,8 @@ async function runInstalledPlatformCommand(args, dependencies = {}) {
|
|
|
762
763
|
const rollbackSourceRuntime = args.subcommand === "rollback" ? loadPlatformRuntime(args.fromRuntime) : null;
|
|
763
764
|
let progress;
|
|
764
765
|
let reportResult;
|
|
766
|
+
let upgradeWritten = false;
|
|
767
|
+
let savedManifest;
|
|
765
768
|
const execute = async (manifest, databaseLock, databaseCheckpointExists = false) => {
|
|
766
769
|
if (args.subcommand === "rollback") {
|
|
767
770
|
if (!runtime || !rollbackSourceRuntime) throw new Error("platform: Both runtimes are required to check rollback compatibility.");
|
|
@@ -984,6 +987,7 @@ async function runInstalledPlatformCommand(args, dependencies = {}) {
|
|
|
984
987
|
const result = await installPlatform(plan, secrets, installation, {
|
|
985
988
|
acquireDatabaseLifecycleLock: async () => Object.assign(async () => {}, {
|
|
986
989
|
checkpoint: databaseLock?.checkpoint,
|
|
990
|
+
assertWorkflowRollbackSafe: databaseLock?.assertWorkflowRollbackSafe,
|
|
987
991
|
liftProjectZeroTrustFence: databaseLock?.liftProjectZeroTrustFence,
|
|
988
992
|
prepareDatabase: databaseLock?.prepareDatabase,
|
|
989
993
|
prepareSandboxDrain: databaseLock?.prepareSandboxDrain,
|
|
@@ -1004,6 +1008,12 @@ async function runInstalledPlatformCommand(args, dependencies = {}) {
|
|
|
1004
1008
|
})
|
|
1005
1009
|
} : {},
|
|
1006
1010
|
databaseRollbackSource: rollbackSourceRuntime ?? void 0,
|
|
1011
|
+
...args.subcommand === "upgrade" ? {
|
|
1012
|
+
upgradePreflightLock: databaseLock,
|
|
1013
|
+
onFirstWrite: () => {
|
|
1014
|
+
upgradeWritten = true;
|
|
1015
|
+
}
|
|
1016
|
+
} : {},
|
|
1007
1017
|
onProgress: (message) => {
|
|
1008
1018
|
markPhase(message);
|
|
1009
1019
|
progress?.message(message);
|
|
@@ -1086,6 +1096,7 @@ async function runInstalledPlatformCommand(args, dependencies = {}) {
|
|
|
1086
1096
|
const authoritative = releaseDatabase.authoritativeManifest;
|
|
1087
1097
|
const databaseCheckpointExists = authoritative !== null && authoritative !== void 0;
|
|
1088
1098
|
const currentManifest = selectAuthoritativePlatformManifest(current, authoritative);
|
|
1099
|
+
savedManifest = currentManifest;
|
|
1089
1100
|
if (authoritative && JSON.stringify(authoritative) !== JSON.stringify(current)) writeInstallationManifest(authoritative);
|
|
1090
1101
|
if (!authoritative) await releaseDatabase.checkpoint?.(currentManifest);
|
|
1091
1102
|
await execute(currentManifest, releaseDatabase, databaseCheckpointExists);
|
|
@@ -1095,15 +1106,17 @@ async function runInstalledPlatformCommand(args, dependencies = {}) {
|
|
|
1095
1106
|
reportResult?.();
|
|
1096
1107
|
markPhase("complete");
|
|
1097
1108
|
} catch (error) {
|
|
1098
|
-
const
|
|
1099
|
-
|
|
1109
|
+
const operation = savedManifest?.operation;
|
|
1110
|
+
const interruptedOperation = operation !== void 0 && operation.phase !== "complete";
|
|
1111
|
+
const needsRecovery = args.subcommand === "upgrade" ? upgradeWritten || interruptedOperation || savedManifest?.status === "failed" : progress !== void 0;
|
|
1112
|
+
if (needsRecovery) progress?.error(`Platform ${args.subcommand} failed.`);
|
|
1113
|
+
else progress?.clear();
|
|
1100
1114
|
progress = void 0;
|
|
1101
|
-
if (
|
|
1102
|
-
"Traffic may remain paused. Inspect the saved state before continuing:",
|
|
1103
|
-
|
|
1104
|
-
"
|
|
1105
|
-
|
|
1106
|
-
].join("\n"), "Recovery");
|
|
1115
|
+
if (needsRecovery && args.subcommand !== "uninstall" && args.subcommand !== "disable") {
|
|
1116
|
+
const guidance = ["Traffic may remain paused. Inspect the saved state before continuing:", `void platform status ${commandArgument(manifest.id)}`];
|
|
1117
|
+
if (args.subcommand !== "upgrade" || upgradeWritten || interruptedOperation && operation.action === "upgrade" && operation.toVersion === runtime?.manifest.platformVersion && operation.runtimeManifestSha256 === runtime.manifestSha256) guidance.push("After resolving the error, resume with the same runtime:", platformLifecycleResumeCommand(args, manifest.id));
|
|
1118
|
+
note(guidance.join("\n"), "Recovery");
|
|
1119
|
+
}
|
|
1107
1120
|
throw error;
|
|
1108
1121
|
} finally {
|
|
1109
1122
|
try {
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { tt as isCancel } from "./dist-BngS28id.mjs";
|
|
2
|
+
import { a as select, n as confirm, o as text } from "./interactive-prompts-EK0dilFu.mjs";
|
|
3
|
+
import { a as utcTime } from "./operator-ai-logging-4Nvs6Ut3.mjs";
|
|
4
|
+
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-DtRMGXYY.mjs";
|
|
5
|
+
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-BG0VIMMM.mjs";
|
|
6
|
+
import { y as printSuccess } from "./output-DhJgS6Ve.mjs";
|
|
6
7
|
import { stripVTControlCharacters } from "node:util";
|
|
7
8
|
import { readFile } from "node:fs/promises";
|
|
8
9
|
import { formatPlanSecurityCap, parsePlanSecurityCapInput, planSecurityCap, readPlanSecurityCaps, readStoredPlanSecurityCap } from "@void/platform/security-policy";
|
|
@@ -48,6 +49,11 @@ const limitLabels = {
|
|
|
48
49
|
retainedDeployments: "Retained Worker deployments",
|
|
49
50
|
sandboxRuntimeSecondsPerMonth: "Sandbox runtime per billing month (seconds)",
|
|
50
51
|
sandboxMaxConcurrentInstances: "Concurrent Sandbox instances",
|
|
52
|
+
workflowsPerProject: "Workflow definitions per project",
|
|
53
|
+
workflowSchedulesPerProject: "Recurring Workflow schedules per project",
|
|
54
|
+
workflowMaxConcurrentInstances: "Concurrent Workflow instances per project",
|
|
55
|
+
browserRuntimeSecondsPerMonth: "Browser Run time per billing month (seconds)",
|
|
56
|
+
browserRequestsPer10Seconds: "Browser Run requests per app in 10 seconds (0, 1 or 300)",
|
|
51
57
|
concurrentBuilds: "Concurrent builds",
|
|
52
58
|
buildTimeoutMinutes: "Build timeout (minutes)"
|
|
53
59
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
2
|
-
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
3
|
-
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
4
|
-
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-
|
|
2
|
+
import { N as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-CKwOg8wz.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, f as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-fyrsq2Ra.mjs";
|
|
4
|
+
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-zHH3RiIm.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
7
7
|
async function recoverPlatformInstallations(client, accountId, verifyEndpoint = verifyInstallationEndpoint, selector = "") {
|
|
@@ -283,9 +283,10 @@ function resolveInstallationManifest(selector, directory = platformRegistryDirec
|
|
|
283
283
|
if (manifests.length !== 1) throw new Error(manifests.length === 0 ? `platform: No local installation matches ${JSON.stringify(selector)}.` : "platform: Multiple local installations match; specify an installation id.");
|
|
284
284
|
return manifests[0];
|
|
285
285
|
}
|
|
286
|
-
function writePendingInstallationSecrets(manifest, secrets, directory = platformRegistryDirectory()) {
|
|
286
|
+
function writePendingInstallationSecrets(manifest, secrets, directory = platformRegistryDirectory(), onWritten) {
|
|
287
287
|
const manifestPath = installationManifestPath(manifest.account.id, manifest.id, directory);
|
|
288
288
|
writeEncryptedRecoveryMaterial(manifest, "pending", manifestPath.replace(/\.json$/, ".secrets.enc"), secrets, directory);
|
|
289
|
+
onWritten?.();
|
|
289
290
|
rmSync(manifestPath.replace(/\.json$/, ".secrets"), { force: true });
|
|
290
291
|
}
|
|
291
292
|
function readPendingInstallationSecrets(manifest, directory = platformRegistryDirectory()) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { L as log, tt as isCancel } from "./dist-
|
|
2
|
-
import { u as openBrowser } from "./auth-
|
|
3
|
-
import { h as import_picocolors, u as formatLink } from "./output-
|
|
1
|
+
import { L as log, tt as isCancel } from "./dist-BngS28id.mjs";
|
|
2
|
+
import { u as openBrowser } from "./auth-CeBmolb-.mjs";
|
|
3
|
+
import { h as import_picocolors, u as formatLink } from "./output-DhJgS6Ve.mjs";
|
|
4
4
|
// src/cli/platform-plan-writes.ts
|
|
5
5
|
function planCreatesZone(plan) {
|
|
6
6
|
return plan.actions.some((action) => action.kind === "zone" && action.action === "create");
|