void 1.9.0 → 1.10.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/dist/{account-cmd-BEMOdwtl.mjs → account-cmd-CZhbDfp4.mjs} +3 -3
- package/dist/{application-analysis-3VVsflWZ.mjs → application-analysis-Do1WaGAY.mjs} +81 -7
- package/dist/{application-routing-CJRlXCc2.mjs → application-routing-DrOFahHO.mjs} +1 -1
- package/dist/{routing-assets-DJIVOrCh.mjs → assets-DZBd7yqh.mjs} +1 -1
- package/dist/{auth-aMuFOZeI.mjs → auth-YtP6K4J3.mjs} +1 -1
- package/dist/{auth-link-B1IynRW5.mjs → auth-link-DFQTA1jN.mjs} +3 -3
- package/dist/{auth-router-DVaWJdRB.mjs → auth-router-BOiaDmcQ.mjs} +2 -2
- package/dist/{base64-ikl9yBy3.mjs → base64-DwTR12ej.mjs} +1 -1
- package/dist/{better-auth-shared-ajs3LNrY.d.mts → better-auth-shared-BqsMzU14.d.mts} +1 -1
- package/dist/{better-auth-shared-C7LHvF4L.mjs → better-auth-shared-DRHo5FoG.mjs} +116 -20
- package/dist/{build-cmd-Dq8tdqQG.mjs → build-cmd-BCiXgjn9.mjs} +1 -1
- package/dist/{cache-DGMnskX7.mjs → cache-CUulshOu.mjs} +1 -1
- package/dist/{cancel-deploy-96S5hD1E.mjs → cancel-deploy-BHGZo6KC.mjs} +1 -1
- package/dist/cf-build-output-D3_x71H6.mjs +1 -0
- package/dist/{cf-build-output-CWNOH-KA.mjs → cf-build-output-bBx1gDll.mjs} +27 -16
- package/dist/{cf-config-migrate-Bb-EdAQq.mjs → cf-config-migrate-CHtnM3_C.mjs} +21 -3
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +3 -2
- package/dist/cli/env-schema-probe.d.mts +1 -1
- package/dist/cli/env-schema-probe.mjs +2 -2
- package/dist/{cli-main-CQRLxZAu.mjs → cli-main-hM7rhIbB.mjs} +27 -27
- package/dist/{client-66c0RLDM.mjs → client-BEYbgqZw.mjs} +1 -1
- package/dist/{auth-client-DwCdwKbw.mjs → client-Ypa4Immo.mjs} +1 -1
- package/dist/{client-D6w5x7hM.mjs → client-aIv5UQf3.mjs} +3 -3
- package/dist/{auth-client-react-CJdeErvM.mjs → client-react-B-ZqH8Ao.mjs} +1 -1
- package/dist/{auth-client-solid-BRvgvp6h.mjs → client-solid-D2PSeKLm.mjs} +1 -1
- package/dist/{auth-client-svelte-BSqUCEed.mjs → client-svelte-DbJbN7Ey.mjs} +1 -1
- package/dist/{auth-client-vue-CPkbRtOO.mjs → client-vue-PBawsrwk.mjs} +1 -1
- package/dist/{cloudflare-cmd-BuuHUM4z.mjs → cloudflare-cmd-DLcgInCa.mjs} +1 -1
- package/dist/{cloudflare-config-PxbinLLE.mjs → cloudflare-config-BfEfIEuY.mjs} +1 -1
- package/dist/{cloudflare-connect-D1QOosLd.mjs → cloudflare-connect-CMcKtA02.mjs} +1 -1
- package/dist/{cloudflare-operations-I4t3mt4R.mjs → cloudflare-operations-C5RTQNnh.mjs} +1 -1
- package/dist/{cloudflare-operations-G5AObYzF.mjs → cloudflare-operations-DLhn_Bom.mjs} +4 -4
- package/dist/{config-DlWQ_hIJ.mjs → config-CbKmMpHK.mjs} +1 -1
- package/dist/{config-C1DPf8EK.mjs → config-CtkCfPpv.mjs} +1 -1
- package/dist/{config-CCWVY7DY.d.mts → config-DuiDZbq7.d.mts} +3 -2
- package/dist/config-entry.d.mts +1 -1
- package/dist/{config-CzFdJYNA.mjs → config-qgt863GH.mjs} +7 -2
- package/dist/{connect-4uImOwut.mjs → connect-DM3yCNPG.mjs} +4 -4
- package/dist/{sandbox-container-BuxhwCgt.mjs → container-CR_tqFtd.mjs} +1 -1
- package/dist/{sandbox-container-CZFZdMso.d.mts → container-D584jUxY.d.mts} +1 -1
- package/dist/{create-project-BaUzZnLZ.mjs → create-project-BkVGXGNt.mjs} +1 -1
- package/dist/{create-project-CQMyzTvK.mjs → create-project-C-hNdYvD.mjs} +1 -1
- package/dist/{migration-handler-DCehTlWs.mjs → d1-handler-C1LH2K2s.mjs} +1 -1
- package/dist/{db-DEpDeDsi.mjs → db-DQAi7Ckr.mjs} +23 -23
- package/dist/{delete-BVD2kI82.mjs → delete-BtVnPGO2.mjs} +1 -1
- package/dist/{deploy-Dyeo5soA.mjs → deploy-Cs93Af-d.mjs} +32 -31
- package/dist/{deploy-managed-static-Kn73R83A.mjs → deploy-managed-static-CZIx3cc1.mjs} +20 -11
- package/dist/deploy-rUunHBNJ.mjs +2 -0
- package/dist/{deploy-transport-BpKBs_KR.mjs → deploy-transport-DT-ALuDj.mjs} +2 -2
- package/dist/deploy.mjs +7 -6
- package/dist/{dev-inbox-CUUS6iUg.mjs → dev-inbox-BiamQEAa.mjs} +2 -2
- package/dist/{dispatch-BBfb519j.mjs → dispatch-DPEuEblR.mjs} +1 -1
- package/dist/{domain-BTIdyUVk.mjs → domain-cOhYYiHU.mjs} +2 -2
- package/dist/{email-DvrS-I0U.mjs → email-CnnDqvXV.mjs} +7 -7
- package/dist/{email-cloudflare-DAGpgzY1.mjs → email-cloudflare-CCIoQueP.mjs} +4 -4
- package/dist/email-pattern-BYr-EFq5.mjs +91 -0
- package/dist/{env-D7vORwpn.mjs → env-5bphL5mV.mjs} +3 -3
- package/dist/env-registry-BbCdIOXP.mjs +10 -0
- package/dist/{env-validation-DeYNRp1d.mjs → env-validation-DfJ9Fzfa.mjs} +2 -2
- package/dist/{env-validation-DKDcpxbt.mjs → env-validation-ly_Q9Kgd.mjs} +1 -1
- package/dist/{error-pages-COVBnzK7.mjs → error-pages-QNeBXiRR.mjs} +6 -6
- package/dist/{fetch-CAIVkLvW.mjs → fetch-DdK9eGin.mjs} +3 -3
- package/dist/{fetch-error-DmlRM6e4.mjs → fetch-error-EXhBRoxI.mjs} +1 -1
- package/dist/{fetch-stream-6Op0qlLd.mjs → fetch-stream-DQAavFdm.mjs} +4 -4
- package/dist/gen-BQ7itmK7.mjs +1 -0
- package/dist/{gen-DimkGNve.mjs → gen-CjcH6DJS.mjs} +4 -3
- package/dist/{github-cmd-D-zs6VQr.mjs → github-cmd-CVDLb51-.mjs} +1 -1
- package/dist/{handler-C9SnmeW1.mjs → handler-w_FAiIRu.mjs} +5 -5
- package/dist/{head-CWJhfUwV.mjs → head-0o0QoREY.mjs} +1 -1
- package/dist/{headers-Q0kZDpk8.mjs → headers-Cyr87J6Z.mjs} +1 -1
- package/dist/{help-Cgdcd-SG.mjs → help-B1cH8518.mjs} +8 -1
- package/dist/help-Ld6XFol7.mjs +1 -0
- package/dist/{env-helpers-Dj_SIwPu.mjs → helpers-_OdpnjkJ.mjs} +1 -1
- package/dist/{inbound-C2H6Dzz1.mjs → inbound--OF7zkwX.mjs} +4 -4
- package/dist/{sandbox-DE1WsxuB.d.mts → index-BESZTC1z.d.mts} +2 -2
- package/dist/{ws-C2zy0QBf.d.mts → index-BTmhCDbw.d.mts} +36 -7
- package/dist/{handler-6fzr_ikp.d.mts → index-BXdP39qx.d.mts} +4 -6
- package/dist/{live-DBybyDt0.d.mts → index-CmqHYj2R.d.mts} +2 -2
- package/dist/index.d.mts +4 -4
- package/dist/index.mjs +68 -49
- package/dist/{info-BbxQ34kk.mjs → info-BE3snw2_.mjs} +4 -4
- package/dist/{init-zyRj3QRw.mjs → init-BrS5MAiJ.mjs} +67 -42
- package/dist/{limits-CrHLm5Tk.mjs → limits-BCoQLpn3.mjs} +1 -1
- package/dist/{link-DAFXuIER.mjs → link-BbzyrCBD.mjs} +2 -2
- package/dist/{list-BTIcC3W9.mjs → list-DmppHjVc.mjs} +2 -2
- package/dist/{live-Dw7NF1t2.mjs → live-DvtxTUhW.mjs} +5 -5
- package/dist/{load-user-env-ztmIyiLx.mjs → load-user-env-BltIJLtl.mjs} +1 -1
- package/dist/{local-d1-BnVb7Fem.mjs → local-d1-DLxsKmkw.mjs} +1 -1
- package/dist/login-C-n1rA0s.mjs +1 -0
- package/dist/{login-DOE-MkeK.mjs → login-Cihxnu7m.mjs} +2 -2
- package/dist/{logs-CUsjihc3.mjs → logs-BCgLeLNd.mjs} +2 -2
- package/dist/migrate-CKn30rmw.mjs +1 -0
- package/dist/{migrate-DtoKdGas.mjs → migrate-DOK67gE-.mjs} +3 -3
- package/dist/{auth-migrations-DDeifS3v.mjs → migrations-ByS7r3HV.mjs} +1 -1
- package/dist/{mime-CtP6-qAF.mjs → mime-BGoZ8ZLL.mjs} +1 -1
- package/dist/{mysql-migration-sql-CI9VTwjt.mjs → mysql-sql-SlpS6OMg.mjs} +3 -3
- package/dist/nitro.mjs +3 -3
- package/dist/{node-D9dPyUr0.mjs → node-qXD3FbIU.mjs} +2 -2
- package/dist/{operator-ai-logging-DFTEp81Z.mjs → operator-ai-logging-CNuX5uKg.mjs} +1 -1
- package/dist/operator-cmd-BnLoIO2A.mjs +1 -0
- package/dist/{operator-cmd-CQOQrUiO.mjs → operator-cmd-D0vSUVle.mjs} +4 -4
- package/dist/pages/client.d.mts +4 -4
- package/dist/pages/client.mjs +4 -4
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +3 -3
- package/dist/pages/index.mjs +5 -5
- package/dist/pages/islands-plugin.d.mts +1 -1
- package/dist/pages/islands-plugin.mjs +1 -1
- package/dist/pages/prefetch.d.mts +1 -1
- package/dist/pages/prefetch.mjs +1 -1
- package/dist/pages/protocol.d.mts +3 -3
- package/dist/pages/protocol.mjs +3 -3
- package/dist/{pg-DoyPxa_X.mjs → pgpass-CEtnBOZO.mjs} +1 -1
- package/dist/{platform-args-DtpHS_75.mjs → platform-args-DQSMW4EP.mjs} +24 -5
- package/dist/platform-args-Rgp86xa7.mjs +1 -0
- package/dist/{platform-auth-config-fLwIS5VG.mjs → platform-auth-config-V2ifSLQ-.mjs} +4 -4
- package/dist/{platform-auth-protection-BTRI_YwD.mjs → platform-auth-protection-BybVCUzi.mjs} +2 -2
- package/dist/{platform-auth-recovery-DPK2Mvmo.mjs → platform-auth-recovery-kH1-h8Ch.mjs} +2 -2
- package/dist/{platform-cmd-BLy5uCa-.mjs → platform-cmd-B1jtqXnu.mjs} +1 -1
- package/dist/{platform-cmd-HS_FSthn.mjs → platform-cmd-BHWdh1Hx.mjs} +5 -5
- package/dist/{platform-domain-CHpcq_qg.mjs → platform-domain-DB_KpVhg.mjs} +2 -2
- package/dist/{platform-lifecycle-B6LUBwjS.mjs → platform-lifecycle-BoOTmH6H.mjs} +1 -1
- package/dist/{platform-lifecycle-D2RS7DE0.mjs → platform-lifecycle-C6fUuj4y.mjs} +146 -71
- package/dist/{platform-management-C-T0ch4y.mjs → platform-management-7Bf_OgS5.mjs} +1 -1
- package/dist/{platform-management-d3ETv3Dw.mjs → platform-management-B8-pOxoJ.mjs} +9 -2
- package/dist/{platform-plans-config-B7yJQKf7.mjs → platform-plans-config-iczSDkQK.mjs} +1 -1
- package/dist/{platform-recovery-DS5CAsly.mjs → platform-recovery-ZAXin6WK.mjs} +2 -2
- package/dist/{platform-setup-Casiffqj.mjs → platform-setup-CpcHLI-0.mjs} +1 -0
- package/dist/{plugin-inference-DZHmVe1f.mjs → plugin-inference-BGamcCqB.mjs} +1 -2
- package/dist/{prefetch-Dx2jIbtg.mjs → prefetch-C_OUvg5g.mjs} +4 -0
- package/dist/{prefetch-NdNeubbH.d.mts → prefetch-UINRrqL4.d.mts} +1 -0
- package/dist/{prepare-AVM4Hj3T.mjs → prepare-BrAkXTTB.mjs} +3 -3
- package/dist/prepare-CI7_C9Xf.mjs +1 -0
- package/dist/{prepare-DMk8NAO-.mjs → prepare-Cjt6EM0d.mjs} +1 -1
- package/dist/{project-cmd-TQKAOTMV.mjs → project-cmd-wtCuc8Ln.mjs} +15 -15
- package/dist/{project-team-B1OKeb-T.mjs → project-team-CZFvPIJ-.mjs} +1 -1
- package/dist/{project-token-RW_wpmN-.mjs → project-token-C3TxkWeC.mjs} +1 -1
- package/dist/{project-zero-trust-TNc66p0_.mjs → project-zero-trust-DrRyAHW1.mjs} +1 -1
- package/dist/{protocol-YS3tbxWE.d.mts → protocol-BlAiF-hc.d.mts} +5 -3
- package/dist/{email-protocol-DTs_TjCS.mjs → protocol-ChF3kDjf.mjs} +1 -1
- package/dist/{protocol-IPSWHolJ.mjs → protocol-W5EQcIzN.mjs} +43 -22
- package/dist/{provision-bgQTi5QZ.mjs → provision-CknEbPuw.mjs} +3 -2
- package/dist/{provision-BLdkpFT4.mjs → provision-DdWqRmmr.mjs} +1 -1
- package/dist/{env-public-DtJL_hZq.d.mts → public-B80SwOFp.d.mts} +14 -9
- package/dist/{env-raw-e8qgqAzQ.mjs → raw-7pQirZpQ.mjs} +1 -1
- package/dist/raw-CtfNvKyY.d.mts +3 -0
- package/dist/{requests-Cj15-yrI.mjs → requests-FaA9M3RX.mjs} +1 -1
- package/dist/{response-HmNjB30w.mjs → response-CyXsGfOy.mjs} +1 -1
- package/dist/{rollback-CYnkng7B.mjs → rollback-DM6pZ23Y.mjs} +2 -2
- package/dist/{route-types-C6eAOmOj.mjs → route-types-CrODgORq.mjs} +36 -6
- package/dist/{route-url-CfCR4oMj.mjs → route-url-BBdkU7rb.mjs} +1 -1
- package/dist/{route-url-C3JwYrER.d.mts → route-url-Di1kB8D_.d.mts} +6 -2
- package/dist/routes-stub.d.mts +1 -3
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-mysql-BXfcQQj3.mjs → runner-mysql-CJ-HyqxV.mjs} +1 -1
- package/dist/{runner-mysql-CHvEg_sy.mjs → runner-mysql-C_PrAUTm.mjs} +1 -1
- package/dist/runtime/{ai.mjs → ai/index.mjs} +6 -6
- package/dist/runtime/{better-auth.d.mts → auth/better-auth-d1.d.mts} +1 -1
- package/dist/runtime/{better-auth.mjs → auth/better-auth-d1.mjs} +3 -3
- package/dist/runtime/{better-auth-mysql.d.mts → auth/better-auth-mysql.d.mts} +1 -1
- package/dist/runtime/{better-auth-mysql.mjs → auth/better-auth-mysql.mjs} +3 -3
- package/dist/runtime/{better-auth-pg.d.mts → auth/better-auth-postgres.d.mts} +1 -1
- package/dist/runtime/{better-auth-pg.mjs → auth/better-auth-postgres.mjs} +4 -4
- package/dist/runtime/auth/client-react.d.mts +2 -0
- package/dist/runtime/auth/client-react.mjs +1 -0
- package/dist/runtime/auth/client-solid.d.mts +2 -0
- package/dist/runtime/auth/client-solid.mjs +1 -0
- package/dist/runtime/auth/client-svelte.d.mts +2 -0
- package/dist/runtime/auth/client-svelte.mjs +1 -0
- package/dist/runtime/auth/client-vue.d.mts +2 -0
- package/dist/runtime/auth/client-vue.mjs +1 -0
- package/dist/runtime/auth/client.d.mts +2 -0
- package/dist/runtime/auth/client.mjs +1 -0
- package/dist/runtime/{auth.d.mts → auth/index.d.mts} +1 -1
- package/dist/runtime/auth/index.mjs +1 -0
- package/dist/runtime/{fetch-server.d.mts → client/fetch-server.d.mts} +1 -1
- package/dist/runtime/{fetch-server.mjs → client/fetch-server.mjs} +3 -3
- package/dist/runtime/client/fetch-stream.d.mts +3 -0
- package/dist/runtime/client/fetch-stream.mjs +3 -0
- package/dist/runtime/{fetch.d.mts → client/fetch.d.mts} +1 -1
- package/dist/runtime/client/fetch.mjs +3 -0
- package/dist/runtime/client/index.d.mts +5 -0
- package/dist/runtime/client/index.mjs +5 -0
- package/dist/runtime/client/react.d.mts +5 -0
- package/dist/runtime/client/react.mjs +5 -0
- package/dist/runtime/client/solid.d.mts +5 -0
- package/dist/runtime/client/solid.mjs +5 -0
- package/dist/runtime/client/svelte.d.mts +5 -0
- package/dist/runtime/client/svelte.mjs +5 -0
- package/dist/runtime/client/vue.d.mts +5 -0
- package/dist/runtime/client/vue.mjs +5 -0
- package/dist/runtime/{db.mjs → db/index.mjs} +2 -2
- package/dist/runtime/{migration-handler.d.mts → db/migrations/d1-handler.d.mts} +1 -1
- package/dist/runtime/{migration-handler.mjs → db/migrations/d1-handler.mjs} +1 -1
- package/dist/runtime/{migration-handler-mysql.d.mts → db/migrations/mysql-handler.d.mts} +1 -1
- package/dist/runtime/{migration-handler-mysql.mjs → db/migrations/mysql-handler.mjs} +2 -2
- package/dist/runtime/{migration-handler-pg.d.mts → db/migrations/postgres-handler.d.mts} +1 -1
- package/dist/runtime/{migration-handler-pg.mjs → db/migrations/postgres-handler.mjs} +2 -2
- package/dist/runtime/{seed.mjs → db/seed.mjs} +1 -1
- package/dist/runtime/{durable.mjs → durable/index.mjs} +3 -3
- package/dist/runtime/{email.d.mts → email/index.d.mts} +1 -1
- package/dist/runtime/{email.mjs → email/index.mjs} +6 -6
- package/dist/runtime/{email-protocol.mjs → email/protocol.mjs} +1 -1
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/{env-public-client.d.mts → env/public-client.d.mts} +1 -1
- package/dist/runtime/{env-public-client.mjs → env/public-client.mjs} +2 -2
- package/dist/runtime/env/public.d.mts +4 -0
- package/dist/runtime/{env-public.mjs → env/public.mjs} +144 -75
- package/dist/runtime/{env.d.mts → env/runtime.d.mts} +1 -2
- package/dist/runtime/{env.mjs → env/runtime.mjs} +1 -1
- package/dist/runtime/{handler.d.mts → handler/index.d.mts} +1 -1
- package/dist/runtime/{handler.mjs → handler/index.mjs} +2 -2
- package/dist/runtime/{response.mjs → handler/response.mjs} +1 -1
- package/dist/runtime/handler/validator.d.mts +2 -0
- package/dist/runtime/handler/validator.mjs +1 -0
- package/dist/runtime/{isr.mjs → isr/index.mjs} +2 -2
- package/dist/runtime/{kv.mjs → kv/index.mjs} +2 -2
- package/dist/runtime/{limits.d.mts → limits/index.d.mts} +1 -1
- package/dist/runtime/{limits.mjs → limits/index.mjs} +1 -1
- package/dist/runtime/{live-client.d.mts → live/client.d.mts} +2 -2
- package/dist/runtime/{live-client.mjs → live/client.mjs} +1 -1
- package/dist/runtime/{live.d.mts → live/index.d.mts} +1 -1
- package/dist/runtime/live/index.mjs +1 -0
- package/dist/runtime/{live-server.mjs → live/server.mjs} +3 -3
- package/dist/runtime/{log.mjs → log/index.mjs} +1 -1
- package/dist/runtime/queues/index.d.mts +2 -0
- package/dist/runtime/{queues.mjs → queues/index.mjs} +2 -2
- package/dist/runtime/remote/binding-handler.mjs +1 -1
- package/dist/runtime/remote/index.mjs +1 -1
- package/dist/runtime/{routing.d.mts → routing/index.d.mts} +7 -2
- package/dist/runtime/{routing.mjs → routing/index.mjs} +51 -17
- package/dist/runtime/{route-url.d.mts → routing/route-url.d.mts} +1 -1
- package/dist/runtime/{route-url.mjs → routing/route-url.mjs} +1 -1
- package/dist/runtime/{sandbox-container.d.mts → sandbox/container.d.mts} +1 -1
- package/dist/runtime/{sandbox-container.mjs → sandbox/container.mjs} +1 -1
- package/dist/runtime/{sandbox.d.mts → sandbox/index.d.mts} +2 -2
- package/dist/runtime/{sandbox.mjs → sandbox/index.mjs} +5 -5
- package/dist/runtime/{sse-client.d.mts → sse/client.d.mts} +1 -1
- package/dist/runtime/{sse-client.mjs → sse/client.mjs} +1 -1
- package/dist/runtime/sse/index.mjs +1 -0
- package/dist/runtime/{storage.mjs → storage/index.mjs} +2 -2
- package/dist/runtime/ws/index.d.mts +2 -0
- package/dist/runtime/{ws.mjs → ws/index.mjs} +3 -3
- package/dist/runtime/ws/room.d.mts +30 -0
- package/dist/runtime/ws/room.mjs +37 -0
- package/dist/runtime/{ws-server.d.mts → ws/server.d.mts} +18 -3
- package/dist/runtime/ws/server.mjs +1 -0
- package/dist/{env-DtKg5G26.mjs → runtime-zDDinDI5.mjs} +2 -2
- package/dist/{dist-BWNkVq50.mjs → scan-tDExXbA1.mjs} +978 -11
- package/dist/{secret-BSf7dgg_.mjs → secret-DDNLIQOT.mjs} +3 -3
- package/dist/{runtime/ws-server.mjs → server-CfUbeOjx.mjs} +60 -19
- package/dist/{sse-CxR30yMF.mjs → sse-BXnTfcf3.mjs} +1 -1
- package/dist/{static-asset-marker-DsQKz6lt.mjs → static-asset-marker-lxYeKvFP.mjs} +2 -2
- package/dist/{types-IPut3_Yx.d.mts → types-FDH6NuY1.d.mts} +0 -5
- package/dist/{validation-error-uAAjlsiW.mjs → validation-error-CtcAvyI7.mjs} +1 -1
- package/dist/{validator-8-NZs2Xr.mjs → validator-Duafcnh7.mjs} +1 -1
- package/dist/{version-metadata-CeftH0fQ.mjs → version-metadata-DEmItNdS.mjs} +1 -1
- package/dist/{wrangler-B1gkT_wC.mjs → wrangler-D1zq1rXr.mjs} +20 -3
- package/dist/wrangler-DM3GOqck.mjs +1 -0
- package/dist/{wrapper-xJ4LP5A7.mjs → wrapper-C2gMY432.mjs} +11 -6
- package/docs/guide/ai.md +3 -2
- package/docs/guide/auth.md +20 -13
- package/docs/guide/database.md +0 -7
- package/docs/guide/email/sending.md +0 -1
- package/docs/guide/pages-routing/errors.md +23 -1
- package/docs/guide/pages-routing/head.md +15 -10
- package/docs/guide/pages-routing/loaders.md +19 -0
- package/docs/guide/pages-routing/markdown.md +14 -10
- package/docs/guide/pages-routing/view-transitions.md +0 -16
- package/docs/guide/platform/administration/plans.md +13 -13
- package/docs/guide/platform/administration/projects.md +14 -4
- package/docs/guide/platform/installation/ci.md +5 -2
- package/docs/guide/platform/installation/maintenance.md +5 -2
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/setup.md +12 -0
- package/docs/guide/queues.md +9 -5
- package/docs/guide/storage.md +0 -4
- package/docs/guide/type-safety.md +18 -12
- package/docs/guide/websockets.md +72 -1
- package/docs/integrations/frameworks/overview.md +7 -0
- package/docs/integrations/hono.md +4 -3
- package/docs/reference/api/auth.md +8 -8
- package/docs/reference/api/deploy.md +1 -1
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/platform-config.md +33 -7
- package/docs/reference/cli/platform-installation.md +4 -1
- package/docs/reference/cli/platform-users.md +48 -35
- package/docs/reference/cli.md +2 -2
- package/docs/reference/config.md +13 -1
- package/package.json +165 -160
- package/schema.json +12 -1
- package/dist/cf-build-output-DUZnAeZ1.mjs +0 -1
- package/dist/deploy-Dr_Qamzw.mjs +0 -2
- package/dist/email-BHY72ixO.mjs +0 -165
- package/dist/gen-DmEeVEs4.mjs +0 -1
- package/dist/help-Cp3K5m1w.mjs +0 -1
- package/dist/login-DBs8JuSl.mjs +0 -1
- package/dist/migrate-BYhoIK9R.mjs +0 -1
- package/dist/operator-cmd-xCACDtT1.mjs +0 -1
- package/dist/platform-args-DSi4_M8n.mjs +0 -1
- package/dist/prepare-BSXKz6m8.mjs +0 -1
- package/dist/runtime/auth-client-react.d.mts +0 -2
- package/dist/runtime/auth-client-react.mjs +0 -1
- package/dist/runtime/auth-client-solid.d.mts +0 -2
- package/dist/runtime/auth-client-solid.mjs +0 -1
- package/dist/runtime/auth-client-svelte.d.mts +0 -2
- package/dist/runtime/auth-client-svelte.mjs +0 -1
- package/dist/runtime/auth-client-vue.d.mts +0 -2
- package/dist/runtime/auth-client-vue.mjs +0 -1
- package/dist/runtime/auth-client.d.mts +0 -2
- package/dist/runtime/auth-client.mjs +0 -1
- package/dist/runtime/auth.mjs +0 -1
- package/dist/runtime/client-react.d.mts +0 -5
- package/dist/runtime/client-react.mjs +0 -5
- package/dist/runtime/client-solid.d.mts +0 -5
- package/dist/runtime/client-solid.mjs +0 -5
- package/dist/runtime/client-svelte.d.mts +0 -5
- package/dist/runtime/client-svelte.mjs +0 -5
- package/dist/runtime/client-vue.d.mts +0 -5
- package/dist/runtime/client-vue.mjs +0 -5
- package/dist/runtime/client.d.mts +0 -5
- package/dist/runtime/client.mjs +0 -5
- package/dist/runtime/env-public.d.mts +0 -4
- package/dist/runtime/fetch-stream.d.mts +0 -3
- package/dist/runtime/fetch-stream.mjs +0 -3
- package/dist/runtime/fetch.mjs +0 -3
- package/dist/runtime/live.mjs +0 -1
- package/dist/runtime/queues.d.mts +0 -2
- package/dist/runtime/sse.mjs +0 -1
- package/dist/runtime/validator.d.mts +0 -2
- package/dist/runtime/validator.mjs +0 -1
- package/dist/runtime/ws.d.mts +0 -2
- package/dist/scan-4YOxDaw2.mjs +0 -970
- package/dist/wrangler-fNGvPTlO.mjs +0 -1
- /package/dist/{auth-client-6-Ft9i9T.d.mts → client-6-Ft9i9T.d.mts} +0 -0
- /package/dist/{auth-client-react-DvQLe5Zb.d.mts → client-react-DvQLe5Zb.d.mts} +0 -0
- /package/dist/{auth-client-solid-P9pEtKGp.d.mts → client-solid-P9pEtKGp.d.mts} +0 -0
- /package/dist/{auth-client-svelte-B5j8irT6.d.mts → client-svelte-B5j8irT6.d.mts} +0 -0
- /package/dist/{auth-client-vue-BEiAfavk.d.mts → client-vue-BEiAfavk.d.mts} +0 -0
- /package/dist/{migration-handler-D8mDx3Ew.d.mts → d1-handler-D8mDx3Ew.d.mts} +0 -0
- /package/dist/{env-helpers-U56xuFgL.d.mts → helpers-U56xuFgL.d.mts} +0 -0
- /package/dist/{auth-CV9kXHKe.d.mts → index-CV9kXHKe.d.mts} +0 -0
- /package/dist/{queues-DdM42xXW.d.mts → index-DdM42xXW.d.mts} +0 -0
- /package/dist/{limits-_xIf5z_P.d.mts → index-_xIf5z_P.d.mts} +0 -0
- /package/dist/runtime/{ai.d.mts → ai/index.d.mts} +0 -0
- /package/dist/runtime/{db.d.mts → db/index.d.mts} +0 -0
- /package/dist/runtime/{db-mysql.d.mts → db/mysql.d.mts} +0 -0
- /package/dist/runtime/{db-mysql.mjs → db/mysql.mjs} +0 -0
- /package/dist/runtime/{db-pg.d.mts → db/postgres.d.mts} +0 -0
- /package/dist/runtime/{db-pg.mjs → db/postgres.mjs} +0 -0
- /package/dist/runtime/{schema-d1.d.mts → db/schema/d1.d.mts} +0 -0
- /package/dist/runtime/{schema-d1.mjs → db/schema/d1.mjs} +0 -0
- /package/dist/runtime/{schema-mysql.d.mts → db/schema/mysql.d.mts} +0 -0
- /package/dist/runtime/{schema-mysql.mjs → db/schema/mysql.mjs} +0 -0
- /package/dist/runtime/{schema-pg.d.mts → db/schema/postgres.d.mts} +0 -0
- /package/dist/runtime/{schema-pg.mjs → db/schema/postgres.mjs} +0 -0
- /package/dist/runtime/{seed.d.mts → db/seed.d.mts} +0 -0
- /package/dist/runtime/{drizzle-arktype.d.mts → db/validators/drizzle-arktype.d.mts} +0 -0
- /package/dist/runtime/{drizzle-arktype.mjs → db/validators/drizzle-arktype.mjs} +0 -0
- /package/dist/runtime/{drizzle-valibot.d.mts → db/validators/drizzle-valibot.d.mts} +0 -0
- /package/dist/runtime/{drizzle-valibot.mjs → db/validators/drizzle-valibot.mjs} +0 -0
- /package/dist/runtime/{drizzle-zod.d.mts → db/validators/drizzle-zod.d.mts} +0 -0
- /package/dist/runtime/{drizzle-zod.mjs → db/validators/drizzle-zod.mjs} +0 -0
- /package/dist/runtime/{durable.d.mts → durable/index.d.mts} +0 -0
- /package/dist/runtime/{email-protocol.d.mts → email/protocol.d.mts} +0 -0
- /package/dist/runtime/{response.d.mts → handler/response.d.mts} +0 -0
- /package/dist/runtime/{isr.d.mts → isr/index.d.mts} +0 -0
- /package/dist/runtime/{kv.d.mts → kv/index.d.mts} +0 -0
- /package/dist/runtime/{live-server.d.mts → live/server.d.mts} +0 -0
- /package/dist/runtime/{log.d.mts → log/index.d.mts} +0 -0
- /package/dist/runtime/{sse.d.mts → sse/index.d.mts} +0 -0
- /package/dist/runtime/{storage.d.mts → storage/index.d.mts} +0 -0
|
@@ -2,15 +2,15 @@ import { A as confirm, H as outro, K as select, L as log, U as password, X as te
|
|
|
2
2
|
import { a as join, c as resolve, n as dirname } from "./dist-DMYe8CZJ.mjs";
|
|
3
3
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, n as cliCommandName, p as note, r as createSpinner, u as getErrorMessage } from "./output-DNVILSz2.mjs";
|
|
4
4
|
import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
|
|
5
|
-
import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-
|
|
6
|
-
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-
|
|
5
|
+
import { o as createDefaultRunWrangler, v as resolvePinnedApiBaseUrl } from "./provision-CknEbPuw.mjs";
|
|
6
|
+
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-CpcHLI-0.mjs";
|
|
7
7
|
import { o as runCloudflareAuthCommand } from "./cloudflare-auth-pNvmT6kL.mjs";
|
|
8
8
|
import { l as resolveCloudflareOperationArgv } from "./cloudflare-process-wcnaQ5JG.mjs";
|
|
9
9
|
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-DZ_2Xuqd.mjs";
|
|
10
10
|
import { t as ensurePlatformAccessToken } from "./cf-access-Dnyw8KFY.mjs";
|
|
11
11
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
12
|
+
import { r as assertPlatformStorageSupported, t as parsePlatformArgs } from "./platform-args-DQSMW4EP.mjs";
|
|
12
13
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
13
|
-
import { t as parsePlatformArgs } from "./platform-args-DtpHS_75.mjs";
|
|
14
14
|
import { copyFileSync, cpSync, existsSync, lstatSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { isRecord } from "@void/deploy-core";
|
|
@@ -966,15 +966,20 @@ function hyperdriveOriginFromConnectionString(value) {
|
|
|
966
966
|
function hyperdriveOriginConfigHash(origin) {
|
|
967
967
|
return createHash("sha256").update(JSON.stringify({
|
|
968
968
|
database: origin.database,
|
|
969
|
-
|
|
970
|
-
|
|
969
|
+
...origin.serviceId !== void 0 ? { serviceId: origin.serviceId.toLowerCase() } : {
|
|
970
|
+
host: origin.host.toLowerCase(),
|
|
971
|
+
port: origin.port
|
|
972
|
+
},
|
|
971
973
|
scheme: "postgresql",
|
|
972
974
|
user: origin.user,
|
|
973
|
-
...origin.accessClientId ? { accessClientId: origin.accessClientId } : {}
|
|
975
|
+
...origin.serviceId === void 0 && origin.accessClientId ? { accessClientId: origin.accessClientId } : {}
|
|
974
976
|
})).digest("hex");
|
|
975
977
|
}
|
|
978
|
+
function hyperdriveOriginLocationMatches(live, expected) {
|
|
979
|
+
return expected.serviceId !== void 0 ? live.serviceId?.toLowerCase() === expected.serviceId.toLowerCase() : live.host?.toLowerCase() === expected.host.toLowerCase();
|
|
980
|
+
}
|
|
976
981
|
function hyperdriveOriginMatches(live, expected) {
|
|
977
|
-
return live.database === expected.database && live.host.toLowerCase() === expected.host.toLowerCase() && live.port === expected.port && live.accessClientId === expected.accessClientId && live.scheme === expected.scheme && (live.user === null || live.user === expected.user);
|
|
982
|
+
return live.serviceId === void 0 && live.database === expected.database && live.host.toLowerCase() === expected.host.toLowerCase() && live.port === expected.port && live.accessClientId === expected.accessClientId && live.scheme === expected.scheme && (live.user === null || live.user === expected.user);
|
|
978
983
|
}
|
|
979
984
|
function parseHyperdriveConfig(value) {
|
|
980
985
|
const origin = value.origin;
|
|
@@ -982,21 +987,35 @@ function parseHyperdriveConfig(value) {
|
|
|
982
987
|
const record = origin;
|
|
983
988
|
const scheme = requiredString(record.scheme, "Hyperdrive origin scheme").toLowerCase();
|
|
984
989
|
if (scheme !== "postgres" && scheme !== "postgresql") throw new Error(`platform: Unsupported Hyperdrive origin scheme ${JSON.stringify(scheme)}.`);
|
|
985
|
-
const
|
|
986
|
-
|
|
987
|
-
|
|
990
|
+
const database = {
|
|
991
|
+
database: requiredString(record.database, "Hyperdrive origin database"),
|
|
992
|
+
scheme: "postgresql",
|
|
993
|
+
user: typeof record.user === "string" && record.user ? record.user : null
|
|
994
|
+
};
|
|
995
|
+
let parsedOrigin;
|
|
996
|
+
if (record.service_id != null) {
|
|
997
|
+
const serviceId = requiredString(record.service_id, "Hyperdrive origin service ID");
|
|
998
|
+
if (record.host != null || record.port != null || record.access_client_id != null) throw new Error("platform: Cloudflare Hyperdrive config mixes Workers VPC and host origin fields.");
|
|
999
|
+
parsedOrigin = {
|
|
1000
|
+
...database,
|
|
1001
|
+
serviceId
|
|
1002
|
+
};
|
|
1003
|
+
} else {
|
|
1004
|
+
const accessClientId = typeof record.access_client_id === "string" && record.access_client_id ? record.access_client_id : void 0;
|
|
1005
|
+
const port = accessClientId && record.port == null ? null : typeof record.port === "number" || typeof record.port === "string" ? Number(record.port) : NaN;
|
|
1006
|
+
if (port !== null && (!Number.isInteger(port) || port <= 0 || port > 65535)) throw new Error("platform: Cloudflare Hyperdrive config has an invalid origin port.");
|
|
1007
|
+
parsedOrigin = {
|
|
1008
|
+
...database,
|
|
1009
|
+
host: requiredString(record.host, "Hyperdrive origin host").toLowerCase(),
|
|
1010
|
+
port,
|
|
1011
|
+
...accessClientId ? { accessClientId } : {}
|
|
1012
|
+
};
|
|
1013
|
+
}
|
|
988
1014
|
return {
|
|
989
1015
|
id: requiredString(value.id, "Hyperdrive id"),
|
|
990
1016
|
name: requiredString(value.name, "Hyperdrive name"),
|
|
991
1017
|
cachingDisabled: !!value.caching && typeof value.caching === "object" && !Array.isArray(value.caching) && value.caching.disabled === true,
|
|
992
|
-
origin:
|
|
993
|
-
...accessClientId ? { accessClientId } : {},
|
|
994
|
-
database: requiredString(record.database, "Hyperdrive origin database"),
|
|
995
|
-
host: requiredString(record.host, "Hyperdrive origin host").toLowerCase(),
|
|
996
|
-
port,
|
|
997
|
-
scheme: "postgresql",
|
|
998
|
-
user: typeof record.user === "string" && record.user ? record.user : null
|
|
999
|
-
}
|
|
1018
|
+
origin: parsedOrigin
|
|
1000
1019
|
};
|
|
1001
1020
|
}
|
|
1002
1021
|
// src/cli/platform-access-provision.ts
|
|
@@ -2155,7 +2174,7 @@ async function prepareInstallationAppAccess(input) {
|
|
|
2155
2174
|
try {
|
|
2156
2175
|
return await access.get("organizations");
|
|
2157
2176
|
} catch (error) {
|
|
2158
|
-
if (error instanceof PlatformCloudflareApiError && error.status === 404) return null;
|
|
2177
|
+
if (error instanceof PlatformCloudflareApiError && (error.status === 404 || choice === "public" && error.status === 403 && error.message.startsWith("Cloudflare API error: access.api.error.not_enabled:"))) return null;
|
|
2159
2178
|
throw error;
|
|
2160
2179
|
}
|
|
2161
2180
|
};
|
|
@@ -2366,12 +2385,15 @@ function readPlatformHyperdriveSelection(checkpoint) {
|
|
|
2366
2385
|
} catch {
|
|
2367
2386
|
throw new Error("platform: The saved Hyperdrive selection is invalid.");
|
|
2368
2387
|
}
|
|
2388
|
+
return parsePlatformHyperdriveSelection(value);
|
|
2389
|
+
}
|
|
2390
|
+
function parsePlatformHyperdriveSelection(value) {
|
|
2369
2391
|
const selected = value;
|
|
2370
2392
|
const nonempty = (value) => typeof value === "string" && value.trim() !== "";
|
|
2371
|
-
if (!selected || typeof selected !== "object" || Array.isArray(selected) || !nonempty(selected.id) || !nonempty(selected.host) || !nonempty(selected.user) || selected.name !== void 0 && (typeof selected.name !== "string" || !selected.name) || selected.database !== void 0 && (typeof selected.database !== "string" || !selected.database)) throw new Error("platform: The saved Hyperdrive selection is invalid.");
|
|
2393
|
+
if (!selected || typeof selected !== "object" || Array.isArray(selected) || !nonempty(selected.id) || (nonempty(selected.serviceId) ? selected.host !== void 0 : selected.serviceId !== void 0 || !nonempty(selected.host)) || !nonempty(selected.user) || selected.name !== void 0 && (typeof selected.name !== "string" || !selected.name) || selected.database !== void 0 && (typeof selected.database !== "string" || !selected.database)) throw new Error("platform: The saved Hyperdrive selection is invalid.");
|
|
2372
2394
|
return {
|
|
2373
2395
|
id: selected.id,
|
|
2374
|
-
host: selected.host,
|
|
2396
|
+
...selected.serviceId !== void 0 ? { serviceId: selected.serviceId } : { host: selected.host },
|
|
2375
2397
|
user: selected.user,
|
|
2376
2398
|
...selected.name ? { name: selected.name } : {},
|
|
2377
2399
|
...selected.database ? { database: selected.database } : {}
|
|
@@ -2393,9 +2415,9 @@ function platformDatabaseNameFromOwnerUrl(databaseUrl) {
|
|
|
2393
2415
|
/** Pin an externally managed Hyperdrive without treating the owner URL as its runtime origin. */
|
|
2394
2416
|
function verifyExternalPlatformHyperdrive(input) {
|
|
2395
2417
|
const { config, expected } = input;
|
|
2396
|
-
const database = platformDatabaseNameFromOwnerUrl(input.databaseUrl);
|
|
2418
|
+
const database = input.databaseUrl === void 0 ? void 0 : platformDatabaseNameFromOwnerUrl(input.databaseUrl);
|
|
2397
2419
|
const hash = hyperdriveOriginConfigHash(config.origin);
|
|
2398
|
-
if (config.id !== expected.id || config.name !== expected.name || config.origin
|
|
2420
|
+
if (config.id !== expected.id || expected.name !== void 0 && config.name !== expected.name || !hyperdriveOriginLocationMatches(config.origin, expected) || config.origin.user !== expected.user || database !== void 0 && config.origin.database !== database || expected.database !== void 0 && config.origin.database !== expected.database || input.recordedHash && input.recordedHash !== hash) throw new Error("platform: The externally managed Hyperdrive does not match the expected database origin.");
|
|
2399
2421
|
if (config.cachingDisabled !== true) throw new Error("platform: Disable SQL result caching on the externally managed Hyperdrive before installing.");
|
|
2400
2422
|
return hash;
|
|
2401
2423
|
}
|
|
@@ -2613,6 +2635,7 @@ async function createPlatformInstallPlan(client, input, existing, options) {
|
|
|
2613
2635
|
if (capabilities.email && options?.includeEmailGateway !== false && !enableEmail) throw new Error("platform: Email-enabled installations require VOID_EMAIL_SENDER_DOMAIN and VOID_EMAIL_SHARED_ZONE_ID before deploying this runtime.");
|
|
2614
2636
|
if (input.appAccess && input.appAccess !== "public" && input.controlPlaneDomain.toLowerCase().replace(/\.$/, "").endsWith(`.${input.applicationDomain.toLowerCase()}`)) throw new Error("platform: The API hostname must be outside the app Access wildcard. Use the application domain apex or workers.dev for the API, then plan again.");
|
|
2615
2637
|
const runtimeLogs = input.runtimeLogs === void 0 ? existing?.deployment.runtimeLogs : input.runtimeLogs === "minimal" ? "minimal" : void 0;
|
|
2638
|
+
const storageLocationHint = input.storageLocation === void 0 ? existing?.deployment.storageLocationHint : input.storageLocation === "automatic" ? void 0 : input.storageLocation;
|
|
2616
2639
|
const deployment = createPlatformDeploymentManifest({
|
|
2617
2640
|
authentication: input.authentication ?? existing?.deployment.authentication,
|
|
2618
2641
|
appAccess: input.appAccess ?? existing?.deployment.appAccess,
|
|
@@ -2635,7 +2658,8 @@ async function createPlatformInstallPlan(client, input, existing, options) {
|
|
|
2635
2658
|
...normalizedEmailSenderDomain ? { emailSenderDomain: normalizedEmailSenderDomain } : {},
|
|
2636
2659
|
installationSlug,
|
|
2637
2660
|
resources: existing?.deployment.resources ?? createPlatformResourceNames(installationSlug),
|
|
2638
|
-
...runtimeLogs ? { runtimeLogs } : {}
|
|
2661
|
+
...runtimeLogs ? { runtimeLogs } : {},
|
|
2662
|
+
...storageLocationHint ? { storageLocationHint } : {}
|
|
2639
2663
|
});
|
|
2640
2664
|
const { emailSharedZoneId: configuredEmailZone, emailSenderDomain: configuredSenderDomain, ...deploymentWithoutEmailZone } = deployment;
|
|
2641
2665
|
const { emailSharedZoneId: recordedEmailZone, emailSenderDomain: recordedSenderDomain, ...existingWithoutEmailZone } = existing?.deployment ?? deployment;
|
|
@@ -2669,9 +2693,14 @@ async function createPlatformInstallPlan(client, input, existing, options) {
|
|
|
2669
2693
|
}
|
|
2670
2694
|
} : existingWithCustomDomains;
|
|
2671
2695
|
const comparable = (value) => {
|
|
2672
|
-
if (!options?.allowRuntimeLogsChange) return JSON.stringify(value);
|
|
2673
|
-
const
|
|
2674
|
-
|
|
2696
|
+
if (!options?.allowRuntimeLogsChange && !options?.allowStorageLocationChange) return JSON.stringify(value);
|
|
2697
|
+
const comparableValue = { ...value };
|
|
2698
|
+
if (options?.allowRuntimeLogsChange) delete comparableValue.runtimeLogs;
|
|
2699
|
+
if (options?.allowStorageLocationChange) delete comparableValue.storageLocationHint;
|
|
2700
|
+
return JSON.stringify({
|
|
2701
|
+
...comparableValue,
|
|
2702
|
+
schemaVersion: void 0
|
|
2703
|
+
});
|
|
2675
2704
|
};
|
|
2676
2705
|
if (existing && (comparable(existingWithEmail) !== comparable(deploymentWithoutEmailZone) || recordedEmailZone !== void 0 && recordedEmailZone !== configuredEmailZone || recordedSenderDomain !== void 0 && recordedSenderDomain !== configuredSenderDomain)) throw new Error(`platform: --resume inputs do not match installation ${existing.id}. Use its recorded configuration.`);
|
|
2677
2706
|
const names = deployment.resources;
|
|
@@ -3272,6 +3301,7 @@ function formatPlatformInstallPlan(plan, previous) {
|
|
|
3272
3301
|
custom: "Selected Access policy"
|
|
3273
3302
|
}[plan.deployment.appAccess]}`] : [],
|
|
3274
3303
|
...runtimeLogs !== previousRuntimeLogs ? [`${import_picocolors.default.bold("Runtime logs:")} ${runtimeLogs} (was ${previousRuntimeLogs})`] : plan.deployment.runtimeLogs ? [`${import_picocolors.default.bold("Runtime logs:")} ${plan.deployment.runtimeLogs}`] : [],
|
|
3304
|
+
...plan.deployment.storageLocationHint || previous?.storageLocationHint ? [`${import_picocolors.default.bold("New bucket location:")} ${plan.deployment.storageLocationHint ?? "automatic"}`] : [],
|
|
3275
3305
|
`${import_picocolors.default.bold("Login callback:")} ${plan.apiUrl}/auth/callback`,
|
|
3276
3306
|
`${import_picocolors.default.bold("Database:")} ${plan.externalHyperdrive?.database || "PostgreSQL"} via Hyperdrive ${plan.deployment.resources.hyperdrive}`,
|
|
3277
3307
|
""
|
|
@@ -5692,7 +5722,7 @@ async function verifyInstalledPlatformAccessProtection(input) {
|
|
|
5692
5722
|
}
|
|
5693
5723
|
const existingWorkers = input.plan.actions.filter((action) => action.kind === "worker" && action.action === "update").map((action) => action.name);
|
|
5694
5724
|
if (existingWorkers.length) {
|
|
5695
|
-
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-
|
|
5725
|
+
const { verifyProtectionWorkerOrigins } = await import("./platform-auth-protection-BybVCUzi.mjs");
|
|
5696
5726
|
await verifyProtectionWorkerOrigins({
|
|
5697
5727
|
request: input.client.request.bind(input.client),
|
|
5698
5728
|
listWorkerDomains: input.client.listWorkerDomains.bind(input.client),
|
|
@@ -6853,6 +6883,7 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
6853
6883
|
const runtime = resolvedRuntime.manifest;
|
|
6854
6884
|
if (plan.deployment.appAccess && runtime.appAccessSetup !== 1) throw new Error("platform: This runtime does not support the installation’s app access setup.");
|
|
6855
6885
|
assertPlatformRuntimeLogsSupported(plan.deployment, runtime);
|
|
6886
|
+
assertPlatformStorageSupported(plan.deployment, runtime);
|
|
6856
6887
|
const hasEmailGatewayArtifact = runtime.artifacts.emailGateway !== void 0;
|
|
6857
6888
|
if (existing?.steps.some((step) => step.key === "private-previews-initialized:v1") && runtime.privatePreviews !== 1) throw new Error("platform: This installation has private previews. Use a runtime with private preview support.");
|
|
6858
6889
|
if (runtime.emailProtocolVersion !== 1 && plan.deployment.capabilities.email) throw new Error("platform: This runtime cannot serve enabled platform email without email protocol version 1.");
|
|
@@ -6883,9 +6914,9 @@ async function installPlatform(plan, secrets, existing, dependencies) {
|
|
|
6883
6914
|
config: live,
|
|
6884
6915
|
databaseUrl: secrets.databaseUrl,
|
|
6885
6916
|
expected: {
|
|
6917
|
+
...plan.externalHyperdrive ?? live.origin,
|
|
6886
6918
|
id: hyperdriveAction.id,
|
|
6887
6919
|
name: hyperdriveAction.name,
|
|
6888
|
-
host: plan.externalHyperdrive?.host ?? live.origin.host,
|
|
6889
6920
|
user: plan.externalHyperdrive?.user ?? live.origin.user ?? ""
|
|
6890
6921
|
},
|
|
6891
6922
|
...recordedHyperdrive ? { recordedHash: recordedHyperdrive.configHash } : {}
|
|
@@ -7924,19 +7955,23 @@ function parseSavedPlan(value) {
|
|
|
7924
7955
|
const args = parsePlatformArgs(record.arguments);
|
|
7925
7956
|
if (args.subcommand !== "install" || args.plan || args.resume || args.yes || !args.account || !args.name || !args.displayName) throw new Error("Saved plans must contain installation choices without mutation approval.");
|
|
7926
7957
|
if (typeof record.accountName !== "string" || !record.accountName || typeof record.savedAt !== "string" || !Number.isFinite(Date.parse(record.savedAt))) throw new Error("Invalid installation plan metadata.");
|
|
7958
|
+
const externalHyperdrive = record.externalHyperdrive === void 0 ? void 0 : parsePlatformHyperdriveSelection(record.externalHyperdrive);
|
|
7959
|
+
if (externalHyperdrive && externalHyperdrive.id !== args.hyperdrive) throw new Error("Saved Hyperdrive selection does not match the plan.");
|
|
7927
7960
|
return {
|
|
7928
7961
|
id: planId(args),
|
|
7929
7962
|
args,
|
|
7930
7963
|
accountName: record.accountName,
|
|
7931
|
-
savedAt: record.savedAt
|
|
7964
|
+
savedAt: record.savedAt,
|
|
7965
|
+
...externalHyperdrive ? { externalHyperdrive } : {}
|
|
7932
7966
|
};
|
|
7933
7967
|
}
|
|
7934
|
-
function savePlatformInstallChoices(arguments_, accountName, directory = platformRegistryDirectory()) {
|
|
7968
|
+
function savePlatformInstallChoices(arguments_, accountName, directory = platformRegistryDirectory(), externalHyperdrive) {
|
|
7935
7969
|
const record = {
|
|
7936
7970
|
schemaVersion: 1,
|
|
7937
7971
|
arguments: arguments_,
|
|
7938
7972
|
accountName,
|
|
7939
|
-
savedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
7973
|
+
savedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
7974
|
+
externalHyperdrive
|
|
7940
7975
|
};
|
|
7941
7976
|
const plan = parseSavedPlan(record);
|
|
7942
7977
|
mkdirSync(directory, {
|
|
@@ -7946,6 +7981,28 @@ function savePlatformInstallChoices(arguments_, accountName, directory = platfor
|
|
|
7946
7981
|
writeFileAtomic(join(directory, `plan-${plan.id}.json`), JSON.stringify(record, null, 2) + "\n", 384);
|
|
7947
7982
|
return plan;
|
|
7948
7983
|
}
|
|
7984
|
+
function readSavedPlatformInstallPlan(path, id) {
|
|
7985
|
+
try {
|
|
7986
|
+
const plan = parseSavedPlan(JSON.parse(readFileSync(path, "utf8")));
|
|
7987
|
+
if (id !== plan.id) throw new Error("Plan identity does not match its file.");
|
|
7988
|
+
return plan;
|
|
7989
|
+
} catch (error) {
|
|
7990
|
+
if (error.code === "ENOENT") throw error;
|
|
7991
|
+
throw new Error(`platform: Invalid saved installation plan ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
7992
|
+
}
|
|
7993
|
+
}
|
|
7994
|
+
function findSavedPlatformInstallPlan(account, name, directory = platformRegistryDirectory()) {
|
|
7995
|
+
const id = planId({
|
|
7996
|
+
account,
|
|
7997
|
+
name
|
|
7998
|
+
});
|
|
7999
|
+
try {
|
|
8000
|
+
return readSavedPlatformInstallPlan(join(directory, `plan-${id}.json`), id);
|
|
8001
|
+
} catch (error) {
|
|
8002
|
+
if (error.code === "ENOENT") return;
|
|
8003
|
+
throw error;
|
|
8004
|
+
}
|
|
8005
|
+
}
|
|
7949
8006
|
function listSavedPlatformInstallPlans(directory = platformRegistryDirectory()) {
|
|
7950
8007
|
let entries;
|
|
7951
8008
|
try {
|
|
@@ -7954,16 +8011,7 @@ function listSavedPlatformInstallPlans(directory = platformRegistryDirectory())
|
|
|
7954
8011
|
if (error.code === "ENOENT") return [];
|
|
7955
8012
|
throw error;
|
|
7956
8013
|
}
|
|
7957
|
-
return entries.filter((entry) => entry.isFile() && /^plan-[a-f0-9]{64}\.json$/.test(entry.name)).map((entry) =>
|
|
7958
|
-
const path = join(directory, entry.name);
|
|
7959
|
-
try {
|
|
7960
|
-
const plan = parseSavedPlan(JSON.parse(readFileSync(path, "utf8")));
|
|
7961
|
-
if (entry.name !== `plan-${plan.id}.json`) throw new Error("Plan identity does not match its file.");
|
|
7962
|
-
return plan;
|
|
7963
|
-
} catch (error) {
|
|
7964
|
-
throw new Error(`platform: Invalid saved installation plan ${path}: ${error instanceof Error ? error.message : String(error)}`);
|
|
7965
|
-
}
|
|
7966
|
-
}).sort((left, right) => right.savedAt.localeCompare(left.savedAt) || left.id.localeCompare(right.id));
|
|
8014
|
+
return entries.filter((entry) => entry.isFile() && /^plan-[a-f0-9]{64}\.json$/.test(entry.name)).map((entry) => readSavedPlatformInstallPlan(join(directory, entry.name), entry.name.slice(5, -5))).sort((left, right) => right.savedAt.localeCompare(left.savedAt) || left.id.localeCompare(right.id));
|
|
7967
8015
|
}
|
|
7968
8016
|
function removeSavedPlatformInstallPlan(args, directory = platformRegistryDirectory()) {
|
|
7969
8017
|
rmSync(join(directory, `plan-${planId(args)}.json`), { force: true });
|
|
@@ -8035,7 +8083,7 @@ function resolvePlatformInstallDatabaseUrl(checkpoint, manifest = null) {
|
|
|
8035
8083
|
}
|
|
8036
8084
|
async function runPlatformLifecycleCommand(commandArgs) {
|
|
8037
8085
|
if (commandArgs.subcommand === "domain") {
|
|
8038
|
-
const { runPlatformDomainCommand } = await import("./platform-domain-
|
|
8086
|
+
const { runPlatformDomainCommand } = await import("./platform-domain-DB_KpVhg.mjs");
|
|
8039
8087
|
await runPlatformDomainCommand(commandArgs);
|
|
8040
8088
|
return;
|
|
8041
8089
|
}
|
|
@@ -8043,7 +8091,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8043
8091
|
log.step("Preparing platform discovery");
|
|
8044
8092
|
const client = new PlatformCloudflareClient((await resolvePlatformCloudflareCredential()).token);
|
|
8045
8093
|
const accountId = await selectAccount(await withPlatformProgress("Reading Cloudflare accounts", () => readAccounts(client)), commandArgs.account);
|
|
8046
|
-
const { recoverPlatformInstallations } = await import("./platform-recovery-
|
|
8094
|
+
const { recoverPlatformInstallations } = await import("./platform-recovery-ZAXin6WK.mjs");
|
|
8047
8095
|
const recovered = await withPlatformProgress("Discovering platform installations", () => recoverPlatformInstallations(client, accountId, void 0, commandArgs.selector));
|
|
8048
8096
|
if (recovered.length === 0) {
|
|
8049
8097
|
log.info(`No recoverable Void platform installations were found in ${accountId}.`);
|
|
@@ -8054,7 +8102,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8054
8102
|
return;
|
|
8055
8103
|
}
|
|
8056
8104
|
if (commandArgs.subcommand !== "install") {
|
|
8057
|
-
const { runInstalledPlatformCommand } = await import("./platform-management-
|
|
8105
|
+
const { runInstalledPlatformCommand } = await import("./platform-management-7Bf_OgS5.mjs");
|
|
8058
8106
|
await runInstalledPlatformCommand(commandArgs);
|
|
8059
8107
|
return;
|
|
8060
8108
|
}
|
|
@@ -8066,6 +8114,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8066
8114
|
let existing = args.resume ? resolveInstallationManifest(args.name) : null;
|
|
8067
8115
|
let selectedInstall = false;
|
|
8068
8116
|
let selectedDraft = false;
|
|
8117
|
+
let reuseSavedPlan = !args.plan;
|
|
8069
8118
|
let installationName = args.name;
|
|
8070
8119
|
const { input: installationSlug, credential: operatorCredential } = await resolvePlatformCloudflareCredentialWithInput(async () => {
|
|
8071
8120
|
let requestedName = args.name;
|
|
@@ -8083,7 +8132,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8083
8132
|
if (!args.resume && process.stdin.isTTY) {
|
|
8084
8133
|
const installs = resumableInstalls().filter((manifest) => !args.name || manifest.deployment.installationSlug === normalizeInstallationSlug(args.name));
|
|
8085
8134
|
const manifests = listInstallationManifests();
|
|
8086
|
-
const savedPlans = !args.applicationDomain && !args.workersDev && !args.zone && !args.displayName && !args.hyperdrive && !args.controlPlaneDomain && !args.noControlPlaneDomain && !args.authConfig && !args.loginMethods && !args.runtime && args.accessProtection === void 0 && args.appAccess === void 0 && !args.dedicatedZoneSpecified && args.dashboardUrl === void 0 && !args.customDomains && args.runtimeLogs === void 0 ? listSavedPlatformInstallPlans().filter((saved) => (!args.name || saved.args.name === normalizeInstallationSlug(args.name)) && (!args.account || saved.args.account === args.account || saved.accountName.toLowerCase() === args.account.toLowerCase()) && !manifests.some((manifest) => manifest.status !== "uninstalled" && manifest.account.id === saved.args.account && manifest.deployment.installationSlug === saved.args.name)) : [];
|
|
8135
|
+
const savedPlans = !args.applicationDomain && !args.workersDev && !args.zone && !args.displayName && !args.hyperdrive && !args.controlPlaneDomain && !args.noControlPlaneDomain && !args.authConfig && !args.loginMethods && !args.runtime && args.accessProtection === void 0 && args.appAccess === void 0 && !args.dedicatedZoneSpecified && args.dashboardUrl === void 0 && !args.customDomains && args.runtimeLogs === void 0 && args.storageLocation === void 0 ? listSavedPlatformInstallPlans().filter((saved) => (!args.name || saved.args.name === normalizeInstallationSlug(args.name)) && (!args.account || saved.args.account === args.account || saved.accountName.toLowerCase() === args.account.toLowerCase()) && !manifests.some((manifest) => manifest.status !== "uninstalled" && manifest.account.id === saved.args.account && manifest.deployment.installationSlug === saved.args.name)) : [];
|
|
8087
8136
|
if (installs.length > 0 || savedPlans.length > 0) {
|
|
8088
8137
|
const choice = await select({
|
|
8089
8138
|
message: "Continue a previous platform install?",
|
|
@@ -8105,10 +8154,13 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8105
8154
|
]
|
|
8106
8155
|
});
|
|
8107
8156
|
if (isCancel(choice) || typeof choice === "symbol") throw new Error("platform: Cancelled.");
|
|
8108
|
-
if (choice === "new")
|
|
8109
|
-
|
|
8157
|
+
if (choice === "new") {
|
|
8158
|
+
reuseSavedPlan = false;
|
|
8159
|
+
requestedName = "";
|
|
8160
|
+
} else if (choice.startsWith("plan:")) {
|
|
8110
8161
|
const saved = savedPlans.find((plan) => `plan:${plan.id}` === choice);
|
|
8111
8162
|
if (!saved) throw new Error("platform: The selected plan is no longer available.");
|
|
8163
|
+
reuseSavedPlan = true;
|
|
8112
8164
|
args = {
|
|
8113
8165
|
...saved.args,
|
|
8114
8166
|
plan: args.plan,
|
|
@@ -8224,7 +8276,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8224
8276
|
progress?.stop("Read the saved installation.");
|
|
8225
8277
|
progress = void 0;
|
|
8226
8278
|
if (authoritative) {
|
|
8227
|
-
const { selectAuthoritativePlatformManifest } = await import("./platform-management-
|
|
8279
|
+
const { selectAuthoritativePlatformManifest } = await import("./platform-management-7Bf_OgS5.mjs");
|
|
8228
8280
|
const selected = selectAuthoritativePlatformManifest(existing, authoritative);
|
|
8229
8281
|
authoritativeProvisionIntents = true;
|
|
8230
8282
|
if (!args.plan && JSON.stringify(selected) !== JSON.stringify(existing)) writeInstallationManifest(selected);
|
|
@@ -8232,30 +8284,29 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8232
8284
|
if (selectedInstall && !isPlatformInstallInProgress(existing)) throw new Error(`platform: Installation ${existing.id} is no longer unfinished. Run \`void platform status ${existing.id}\` to inspect it.`);
|
|
8233
8285
|
}
|
|
8234
8286
|
}
|
|
8235
|
-
const savedHyperdrive = readPlatformHyperdriveSelection(checkpoint);
|
|
8236
|
-
const requestedHyperdriveId = args.hyperdrive || savedHyperdrive?.id;
|
|
8237
|
-
const recordedHyperdrive = existing?.resources.find((resource) => resource.key === "hyperdrive");
|
|
8238
|
-
if (savedHyperdrive && requestedHyperdriveId !== savedHyperdrive.id || recordedHyperdrive && requestedHyperdriveId && (requestedHyperdriveId === "create" ? recordedHyperdrive.ownership === "adopted" : recordedHyperdrive.id !== requestedHyperdriveId) || savedHyperdrive && recordedHyperdrive && (recordedHyperdrive.ownership !== "adopted" || recordedHyperdrive.id !== savedHyperdrive.id)) throw new Error("platform: The selected Hyperdrive differs from the saved installation. Resume with its original Hyperdrive.");
|
|
8239
8287
|
const externalHyperdriveId = process.env.VOID_PLATFORM_HYPERDRIVE_ID?.trim() || "";
|
|
8288
|
+
const selectedHyperdriveId = args.hyperdrive || externalHyperdriveId;
|
|
8289
|
+
const savedPlanHyperdrive = !existing && reuseSavedPlan && selectedHyperdriveId && selectedHyperdriveId !== "create" ? findSavedPlatformInstallPlan(accountId, installationSlug)?.externalHyperdrive : void 0;
|
|
8290
|
+
const checkpointHyperdrive = readPlatformHyperdriveSelection(checkpoint);
|
|
8291
|
+
const savedHyperdrive = checkpointHyperdrive ?? (savedPlanHyperdrive?.id === selectedHyperdriveId ? savedPlanHyperdrive : void 0);
|
|
8292
|
+
const requestedHyperdriveId = args.hyperdrive || checkpointHyperdrive?.id;
|
|
8293
|
+
const recordedHyperdrive = existing?.resources.find((resource) => resource.key === "hyperdrive");
|
|
8294
|
+
if (checkpointHyperdrive && requestedHyperdriveId !== checkpointHyperdrive.id || recordedHyperdrive && requestedHyperdriveId && (requestedHyperdriveId === "create" ? recordedHyperdrive.ownership === "adopted" : recordedHyperdrive.id !== requestedHyperdriveId) || savedHyperdrive && recordedHyperdrive && (recordedHyperdrive.ownership !== "adopted" || recordedHyperdrive.id !== savedHyperdrive.id)) throw new Error("platform: The selected Hyperdrive differs from the saved installation. Resume with its original Hyperdrive.");
|
|
8240
8295
|
const externalHyperdriveHost = process.env.VOID_PLATFORM_HYPERDRIVE_ORIGIN_HOST?.trim() || "";
|
|
8296
|
+
const serviceId = process.env.VOID_PLATFORM_HYPERDRIVE_ORIGIN_SERVICE_ID?.trim().toLowerCase() || "";
|
|
8241
8297
|
const externalHyperdriveUser = process.env.VOID_PLATFORM_HYPERDRIVE_ORIGIN_USER?.trim() || "";
|
|
8242
|
-
if (
|
|
8243
|
-
|
|
8244
|
-
externalHyperdriveHost,
|
|
8245
|
-
externalHyperdriveUser
|
|
8246
|
-
].some(Boolean) && ![
|
|
8247
|
-
externalHyperdriveId,
|
|
8248
|
-
externalHyperdriveHost,
|
|
8249
|
-
externalHyperdriveUser
|
|
8250
|
-
].every(Boolean)) throw new Error("platform: VOID_PLATFORM_HYPERDRIVE_ID, VOID_PLATFORM_HYPERDRIVE_ORIGIN_HOST, and VOID_PLATFORM_HYPERDRIVE_ORIGIN_USER must be set together.");
|
|
8298
|
+
if (externalHyperdriveHost && serviceId) throw new Error("platform: Specify either a Hyperdrive origin host or a Workers VPC service ID.");
|
|
8299
|
+
if ((externalHyperdriveId || externalHyperdriveHost || serviceId || externalHyperdriveUser) && !(externalHyperdriveId && (externalHyperdriveHost || serviceId) && externalHyperdriveUser)) throw new Error("platform: Set VOID_PLATFORM_HYPERDRIVE_ID and VOID_PLATFORM_HYPERDRIVE_ORIGIN_USER with either VOID_PLATFORM_HYPERDRIVE_ORIGIN_HOST or VOID_PLATFORM_HYPERDRIVE_ORIGIN_SERVICE_ID.");
|
|
8251
8300
|
let externalHyperdrive = externalHyperdriveId ? {
|
|
8252
8301
|
id: externalHyperdriveId,
|
|
8253
|
-
host: externalHyperdriveHost,
|
|
8302
|
+
...serviceId ? { serviceId } : { host: externalHyperdriveHost },
|
|
8254
8303
|
user: externalHyperdriveUser
|
|
8255
8304
|
} : void 0;
|
|
8256
8305
|
if (requestedHyperdriveId && externalHyperdrive && requestedHyperdriveId !== externalHyperdrive.id) throw new Error("platform: --hyperdrive conflicts with VOID_PLATFORM_HYPERDRIVE_ID.");
|
|
8257
|
-
if (savedHyperdrive && externalHyperdrive && (savedHyperdrive
|
|
8258
|
-
if (
|
|
8306
|
+
if (savedHyperdrive && externalHyperdrive && (!hyperdriveOriginLocationMatches(savedHyperdrive, externalHyperdrive) || savedHyperdrive.user !== externalHyperdrive.user)) throw new Error("platform: The Hyperdrive origin differs from the saved installation.");
|
|
8307
|
+
if (checkpointHyperdrive) externalHyperdrive = recordedHyperdrive ? checkpointHyperdrive : void 0;
|
|
8308
|
+
else if (savedHyperdrive) externalHyperdrive = savedHyperdrive;
|
|
8309
|
+
const configuredServiceOrigin = externalHyperdrive?.serviceId !== void 0 ? externalHyperdrive : void 0;
|
|
8259
8310
|
if (!externalHyperdrive && requestedHyperdriveId !== "create" && (process.stdin.isTTY || requestedHyperdriveId) && (!existing || isPlatformSetupDraft(existing) || requestedHyperdriveId) && !recordedHyperdrive) {
|
|
8260
8311
|
const suggestedName = existing?.deployment.resources.hyperdrive ?? createPlatformResourceNames(installationSlug).hyperdrive;
|
|
8261
8312
|
const configurations = await client.listHyperdriveConfigs(accountId);
|
|
@@ -8298,11 +8349,10 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8298
8349
|
if (!selected) throw new Error("platform: The selected Hyperdrive is no longer available.");
|
|
8299
8350
|
const live = await client.getHyperdriveConfig(accountId, selected.id);
|
|
8300
8351
|
if (live.id !== selected.id || live.name !== selected.name || !live.origin.user) throw new Error(`platform: Could not verify the database user for existing Hyperdrive ${selected.name}.`);
|
|
8301
|
-
if (savedHyperdrive && (live.origin
|
|
8352
|
+
if (savedHyperdrive && (!hyperdriveOriginLocationMatches(live.origin, savedHyperdrive) || live.origin.user !== savedHyperdrive.user || savedHyperdrive.name && live.name !== savedHyperdrive.name || savedHyperdrive.database && live.origin.database !== savedHyperdrive.database) || existing && !isPlatformSetupDraft(existing) && live.name !== existing.deployment.resources.hyperdrive) throw new Error("platform: The Hyperdrive origin or name differs from the saved installation.");
|
|
8302
8353
|
if (!requestedHyperdriveId) note([
|
|
8303
8354
|
`${import_picocolors.default.bold("Database:")} ${live.origin.database}`,
|
|
8304
|
-
`${import_picocolors.default.bold("Host:")} ${live.origin.host}`,
|
|
8305
|
-
`${import_picocolors.default.bold("Port:")} ${live.origin.port ?? "configured by Cloudflare Tunnel"}`,
|
|
8355
|
+
...live.origin.serviceId !== void 0 ? [`${import_picocolors.default.bold("Workers VPC service:")} ${live.origin.serviceId}`] : [`${import_picocolors.default.bold("Host:")} ${live.origin.host}`, `${import_picocolors.default.bold("Port:")} ${live.origin.port ?? "configured by Cloudflare Tunnel"}`],
|
|
8306
8356
|
`${import_picocolors.default.bold("User:")} ${live.origin.user}`,
|
|
8307
8357
|
`${import_picocolors.default.bold("SQL result caching:")} ${live.cachingDisabled ? "disabled" : "enabled"}`
|
|
8308
8358
|
].join("\n"), import_picocolors.default.bold(`Existing Hyperdrive ${live.name}`));
|
|
@@ -8311,11 +8361,33 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8311
8361
|
id: live.id,
|
|
8312
8362
|
name: live.name,
|
|
8313
8363
|
database: live.origin.database,
|
|
8314
|
-
host: live.origin.host,
|
|
8364
|
+
...live.origin.serviceId !== void 0 ? { serviceId: live.origin.serviceId } : { host: live.origin.host },
|
|
8315
8365
|
user: live.origin.user
|
|
8316
8366
|
};
|
|
8367
|
+
if (externalHyperdrive.serviceId !== void 0) verifyExternalPlatformHyperdrive({
|
|
8368
|
+
config: live,
|
|
8369
|
+
databaseUrl: databaseUrl || void 0,
|
|
8370
|
+
expected: externalHyperdrive
|
|
8371
|
+
});
|
|
8317
8372
|
}
|
|
8318
8373
|
}
|
|
8374
|
+
if (configuredServiceOrigin) {
|
|
8375
|
+
const live = await client.getHyperdriveConfig(accountId, configuredServiceOrigin.id);
|
|
8376
|
+
verifyExternalPlatformHyperdrive({
|
|
8377
|
+
config: live,
|
|
8378
|
+
databaseUrl: databaseUrl || void 0,
|
|
8379
|
+
expected: {
|
|
8380
|
+
...configuredServiceOrigin,
|
|
8381
|
+
name: recordedHyperdrive?.name ?? configuredServiceOrigin.name
|
|
8382
|
+
},
|
|
8383
|
+
recordedHash: recordedHyperdrive?.configHash
|
|
8384
|
+
});
|
|
8385
|
+
externalHyperdrive = {
|
|
8386
|
+
...configuredServiceOrigin,
|
|
8387
|
+
name: live.name,
|
|
8388
|
+
database: live.origin.database
|
|
8389
|
+
};
|
|
8390
|
+
}
|
|
8319
8391
|
const authenticationSelection = await selectInstallationAuthentication(args.authConfig, existing?.deployment.authentication, args);
|
|
8320
8392
|
const appAccess = await selectInstallationAppAccess(authenticationSelection, existing?.deployment, args.appAccess);
|
|
8321
8393
|
while (!existing && process.stdin.isTTY && !args.controlPlaneDomain && appAccess && appAccess !== "public" && controlPlaneDomain.toLowerCase().replace(/\.$/, "").endsWith(`.${applicationDomain.toLowerCase()}`)) {
|
|
@@ -8338,6 +8410,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8338
8410
|
...process.env.VOID_EMAIL_SENDER_DOMAIN ? { emailSenderDomain: process.env.VOID_EMAIL_SENDER_DOMAIN } : {},
|
|
8339
8411
|
installationSlug,
|
|
8340
8412
|
...args.runtimeLogs !== void 0 ? { runtimeLogs: args.runtimeLogs } : {},
|
|
8413
|
+
...args.storageLocation !== void 0 ? { storageLocation: args.storageLocation } : {},
|
|
8341
8414
|
zoneName,
|
|
8342
8415
|
...workersDev ? { workersDev: true } : {}
|
|
8343
8416
|
};
|
|
@@ -8350,6 +8423,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8350
8423
|
};
|
|
8351
8424
|
let plan = await withPlatformProgress("Preparing installation plan", () => createPlatformInstallPlan(client, planInput, existing, planOptions));
|
|
8352
8425
|
assertPlatformRuntimeLogsSupported(plan.deployment, runtime.manifest);
|
|
8426
|
+
assertPlatformStorageSupported(plan.deployment, runtime.manifest);
|
|
8353
8427
|
const commandOptions = {
|
|
8354
8428
|
commandName: cliCommandName(),
|
|
8355
8429
|
accountId,
|
|
@@ -8367,6 +8441,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8367
8441
|
authentication: authenticationSelection.authentication,
|
|
8368
8442
|
hyperdrive: !existing || isPlatformSetupDraft(existing) || externalHyperdrive && !recordedHyperdrive ? externalHyperdrive?.id ?? "create" : void 0,
|
|
8369
8443
|
runtime: args.runtime,
|
|
8444
|
+
...!existing && plan.deployment.storageLocationHint ? { storageLocation: plan.deployment.storageLocationHint } : {},
|
|
8370
8445
|
...!existing && plan.deployment.runtimeLogs ? { runtimeLogs: "minimal" } : {},
|
|
8371
8446
|
...existing ? { resumeId: existing.id } : {},
|
|
8372
8447
|
yes: args.yes || process.stdin.isTTY !== true
|
|
@@ -8376,7 +8451,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8376
8451
|
runtime: args.runtime ? resolve(args.runtime) : "",
|
|
8377
8452
|
...args.authConfig ? { authConfig: resolve(args.authConfig) } : {},
|
|
8378
8453
|
yes: false
|
|
8379
|
-
}).slice(2), plan.account.name);
|
|
8454
|
+
}).slice(2), plan.account.name, void 0, externalHyperdrive?.serviceId ? externalHyperdrive : void 0);
|
|
8380
8455
|
note(formatPlatformInstallPlan(plan), import_picocolors.default.bold(args.plan ? "Read-only installation plan" : "Installation plan"));
|
|
8381
8456
|
note(formatPlatformRuntime(runtime), import_picocolors.default.bold("Platform runtime"));
|
|
8382
8457
|
const managementAccess = process.env.VOID_PLATFORM_ACCESS_SETUP_TOKEN ? void 0 : platformManagementAccessForAuthentication(authenticationSelection, accountId, checkpoint);
|
|
@@ -8672,7 +8747,7 @@ async function runPlatformLifecycleCommand(commandArgs) {
|
|
|
8672
8747
|
})).actions.filter((action) => action.kind === "worker"),
|
|
8673
8748
|
revalidateBeforeWorkerDeploy: (manifest, action) => revalidatePlatformInstallAction(client, plan, manifest, action),
|
|
8674
8749
|
verifyExistingOwnership: async (manifest, databaseCheckpointExists) => {
|
|
8675
|
-
const { verifyPlatformInstallationOwnership } = await import("./platform-management-
|
|
8750
|
+
const { verifyPlatformInstallationOwnership } = await import("./platform-management-7Bf_OgS5.mjs");
|
|
8676
8751
|
const retainedReplacementKeys = new Set(plan.actions.filter((action) => {
|
|
8677
8752
|
const previous = manifest.resources.find((resource) => resource.key === action.key);
|
|
8678
8753
|
return action.action === "create" && previous && previous.name !== action.name;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-
|
|
1
|
+
export { c as runInstalledPlatformCommand, l as selectAuthoritativePlatformManifest, d as verifyPlatformInstallationOwnership } from "./platform-management-B8-pOxoJ.mjs";
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { A as confirm, H as outro, K as select, L as log, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
2
|
import { t as ensurePlatformAccessToken } from "./cf-access-Dnyw8KFY.mjs";
|
|
3
3
|
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note } from "./output-DNVILSz2.mjs";
|
|
4
|
-
import { $ as hyperdriveOriginConfigHash, B as revalidatePlatformInstallAction, C as readPlatformDatabase, D as resolveBootstrapGitHubId, E as createPlatformInstallationSecrets, F as legacyResourceConfigHash, G as verifyPlatformCloudflareCredential, H as turnOffInstalledProjectZeroTrust, I as matchesRecordedR2Fingerprint, K as activatePlatformAccessCredentials, L as platformAdoptionIntentHash, M as dnsRecordConfigHash, N as formatPlatformInstallPlan, P as hasProvisionIntentStep, Q as PlatformRuntimeTokenEmailPermissionError, R as r2BucketConfigHash, S as formatZeroTrustApplications, T as createPlatformHealthProbeToken, U as assertPlatformOperatorCredentialCanApplyPlan, V as platformDatabaseNameFromOwnerUrl, W as resolvePlatformCloudflareCredential, X as PlatformCloudflareApiError, Z as PlatformCloudflareClient, a as createPlatformProgress, b as readPlatformProjectZeroTrustState, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as hyperdriveOriginFromConnectionString, f as readLoginReplacementFile, g as acquirePlatformDatabaseLifecycleLock, h as installPlatform, j as createPlatformInstallPlan, k as platformTrafficAttachmentWorker, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as verifyPlatformRuntimeTokenEmailPermissions, o as withPlatformProgress, p as replacePendingInstallationAuthentication, rt as verifyPlatformRuntimeTokenPermissions, s as findPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as hyperdriveOriginMatches, u as uploadPlatformWorkerOutsideChanges, w as loadPlatformRuntime, x as assertProjectZeroTrustAllowsUninstall, y as readPlatformProjectSlugs, z as resourceMarkerProblem } from "./platform-lifecycle-
|
|
4
|
+
import { $ as hyperdriveOriginConfigHash, B as revalidatePlatformInstallAction, C as readPlatformDatabase, D as resolveBootstrapGitHubId, E as createPlatformInstallationSecrets, F as legacyResourceConfigHash, G as verifyPlatformCloudflareCredential, H as turnOffInstalledProjectZeroTrust, I as matchesRecordedR2Fingerprint, K as activatePlatformAccessCredentials, L as platformAdoptionIntentHash, M as dnsRecordConfigHash, N as formatPlatformInstallPlan, P as hasProvisionIntentStep, Q as PlatformRuntimeTokenEmailPermissionError, R as r2BucketConfigHash, S as formatZeroTrustApplications, T as createPlatformHealthProbeToken, U as assertPlatformOperatorCredentialCanApplyPlan, V as platformDatabaseNameFromOwnerUrl, W as resolvePlatformCloudflareCredential, X as PlatformCloudflareApiError, Z as PlatformCloudflareClient, a as createPlatformProgress, b as readPlatformProjectZeroTrustState, c as formatPlatformWorkerOutsideChanges, d as authenticationSetupRequestHash, et as hyperdriveOriginFromConnectionString, f as readLoginReplacementFile, g as acquirePlatformDatabaseLifecycleLock, h as installPlatform, j as createPlatformInstallPlan, k as platformTrafficAttachmentWorker, l as reviewPlatformWorkerOutsideChanges, m as REMOTE_INSTALLATION_MANIFEST_KEY, n as resolvePlatformInstallDatabaseUrl, nt as verifyPlatformRuntimeTokenEmailPermissions, o as withPlatformProgress, p as replacePendingInstallationAuthentication, rt as verifyPlatformRuntimeTokenPermissions, s as findPlatformWorkerOutsideChanges, t as assertNoninteractivePlatformMutationAcknowledged, tt as hyperdriveOriginMatches, u as uploadPlatformWorkerOutsideChanges, w as loadPlatformRuntime, x as assertProjectZeroTrustAllowsUninstall, y as readPlatformProjectSlugs, z as resourceMarkerProblem } from "./platform-lifecycle-C6fUuj4y.mjs";
|
|
5
5
|
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-DZ_2Xuqd.mjs";
|
|
6
6
|
import { i as updateProjectWorkerRuntimeLogs, n as assertPlatformRuntimeLogsSupported, r as shouldUpdateProjectWorkerRuntimeLogs } from "./platform-runtime-logs-CdJGnk3f.mjs";
|
|
7
|
+
import { r as assertPlatformStorageSupported } from "./platform-args-DQSMW4EP.mjs";
|
|
7
8
|
import { PLATFORM_DISABLED_KEY, PLATFORM_DISABLED_VALUE, PLATFORM_R2_OWNERSHIP_MARKER_KEY, parsePlatformInstallationManifest, recordInstallationResource, recordInstallationStep, setInstallationDesiredState, transitionInstallation } from "@void/platform";
|
|
8
9
|
import { setTimeout } from "node:timers/promises";
|
|
9
10
|
// src/cli/platform-teardown.ts
|
|
@@ -626,6 +627,7 @@ function platformLifecycleResumeCommand(args, installationId) {
|
|
|
626
627
|
if ("dashboardUrl" in args && args.dashboardUrl) command.push("--dashboard-url", commandArgument(args.dashboardUrl));
|
|
627
628
|
if ("customDomains" in args && args.customDomains) command.push("--custom-domains");
|
|
628
629
|
if ("runtimeLogs" in args && args.runtimeLogs) command.push("--runtime-logs", args.runtimeLogs);
|
|
630
|
+
if ("storageLocation" in args && args.storageLocation) command.push("--storage-location", args.storageLocation);
|
|
629
631
|
if (args.yes) command.push("--yes");
|
|
630
632
|
return command.join(" ");
|
|
631
633
|
}
|
|
@@ -718,6 +720,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
718
720
|
controlPlaneDomain: deployment.controlPlane.apiHostname ?? "",
|
|
719
721
|
...args.subcommand !== "rollback" && args.dashboardUrl !== void 0 ? { dashboardUrl: args.dashboardUrl } : {},
|
|
720
722
|
...args.subcommand !== "rollback" && args.customDomains ? { customDomains: true } : {},
|
|
723
|
+
...args.subcommand === "upgrade" && args.storageLocation !== void 0 ? { storageLocation: args.storageLocation } : {},
|
|
721
724
|
...args.subcommand === "upgrade" && args.runtimeLogs !== void 0 ? { runtimeLogs: args.runtimeLogs } : {},
|
|
722
725
|
dedicatedZone: deployment.application.dedicatedZone,
|
|
723
726
|
displayName: deployment.displayName,
|
|
@@ -731,9 +734,11 @@ async function runInstalledPlatformCommand(args) {
|
|
|
731
734
|
includeEmailGateway: runtime.manifest.artifacts.emailGateway !== void 0,
|
|
732
735
|
enableSandbox: runtime.manifest.safetyProtocols.sandboxDrain >= 3,
|
|
733
736
|
deploymentExecution: runtime.manifest.deploymentExecution === 1,
|
|
734
|
-
allowRuntimeLogsChange: args.subcommand === "upgrade"
|
|
737
|
+
allowRuntimeLogsChange: args.subcommand === "upgrade",
|
|
738
|
+
allowStorageLocationChange: args.subcommand === "upgrade"
|
|
735
739
|
}));
|
|
736
740
|
assertPlatformRuntimeLogsSupported(plan.deployment, runtime.manifest);
|
|
741
|
+
assertPlatformStorageSupported(plan.deployment, runtime.manifest);
|
|
737
742
|
markPhase("plan");
|
|
738
743
|
note(formatPlatformInstallPlan(plan, manifest.deployment), args.subcommand === "upgrade" ? "Upgrade plan" : args.subcommand === "rollback" ? "Rollback plan" : args.subcommand === "enable" ? "Enable plan" : "Repair plan");
|
|
739
744
|
note([
|
|
@@ -981,6 +986,7 @@ async function runInstalledPlatformCommand(args) {
|
|
|
981
986
|
}
|
|
982
987
|
function assertPlatformRollbackCompatibility(installation, target, source) {
|
|
983
988
|
if (target.manifest.emailProtocolVersion !== 1 && (installation.deployment.capabilities.email || installation.resources.some((resource) => resource.key === "email-gateway-worker" && resource.state === "ready"))) throw new Error("platform: The rollback target predates the email gateway and cannot safely replace this installation. Use a runtime with email protocol version 1.");
|
|
989
|
+
assertPlatformStorageSupported(installation.deployment, target.manifest);
|
|
984
990
|
if (installation.deployment.runtimeLogs && target.manifest.runtimeLogs !== 1) throw new Error("platform: The rollback target cannot keep runtime logs minimal. Run `void platform upgrade --runtime-logs full` first, then roll back.");
|
|
985
991
|
if (!installation.runtime) throw new Error("platform: The installed runtime has no artifact provenance, so post-success rollback cannot identify its compatibility manifest.");
|
|
986
992
|
if (source.manifest.platformVersion !== installation.platformVersion || source.manifestSha256 !== installation.runtime.manifestSha256) throw new Error("platform: --from-runtime does not exactly match the installed runtime artifact digest. Supply the runtime used by the current successful deployment.");
|
|
@@ -1472,6 +1478,7 @@ async function verifyPlatformMutationOwnership(client, manifest, targetKeys, opt
|
|
|
1472
1478
|
if (exists) {
|
|
1473
1479
|
const legacyHash = legacyResourceConfigHash(resource.kind, resource.name);
|
|
1474
1480
|
const malformedLegacyHash = !/^[a-f0-9]{64}$/.test(resource.configHash);
|
|
1481
|
+
if (live.origin.serviceId !== void 0 && resource.ownership !== "adopted") throw ownershipError(`hyperdrive ${resource.name} changed to a Workers VPC origin`);
|
|
1475
1482
|
if (options.databaseUrl && resource.ownership !== "adopted") {
|
|
1476
1483
|
const expected = hyperdriveOriginFromConnectionString(options.databaseUrl);
|
|
1477
1484
|
if (!hyperdriveOriginMatches(live.origin, expected)) throw ownershipError(`hyperdrive ${resource.name} targets a different PostgreSQL origin than this installation's pinned database`);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { A as confirm, K as select, X as text, tt as isCancel } from "./dist-STQXl8ck.mjs";
|
|
2
|
-
import { a as utcTime } from "./operator-ai-logging-
|
|
2
|
+
import { a as utcTime } from "./operator-ai-logging-CNuX5uKg.mjs";
|
|
3
3
|
import { a as resolveOperatorOrigin, r as readOperatorToken } from "./operator-auth-CD3pap65.mjs";
|
|
4
4
|
import { n as OperatorClient, r as OperatorClientError } from "./operator-client-XvXTkea6.mjs";
|
|
5
5
|
import { m as printSuccess } from "./output-DNVILSz2.mjs";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as cfAccessHeaders } from "./cf-access-pejlJmuy.mjs";
|
|
2
|
-
import { j as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-
|
|
3
|
-
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-
|
|
2
|
+
import { j as createPlatformInstallPlan, m as REMOTE_INSTALLATION_MANIFEST_KEY } from "./platform-lifecycle-C6fUuj4y.mjs";
|
|
3
|
+
import { a as recoverDurablyMarkedProvisionIntents, d as verifyPlatformInstallationOwnership, r as isPlatformManifestMonotonicExtension } from "./platform-management-B8-pOxoJ.mjs";
|
|
4
4
|
import { o as listInstallationManifests, t as acquirePlatformLifecycleLock, x as writeInstallationManifest, y as savePlatformConnection } from "./platform-registry-DZ_2Xuqd.mjs";
|
|
5
5
|
import { parsePlatformInstallationManifest, setInstallationEndpoints } from "@void/platform";
|
|
6
6
|
// src/cli/platform-recovery.ts
|
|
@@ -281,6 +281,7 @@ function platformInstallCommandArguments(options) {
|
|
|
281
281
|
flag("--dashboard-url", options.dashboardUrl ?? "");
|
|
282
282
|
flag("--runtime", options.runtime);
|
|
283
283
|
flag("--runtime-logs", options.runtimeLogs ?? "");
|
|
284
|
+
flag("--storage-location", options.storageLocation ?? "");
|
|
284
285
|
if (options.yes) parts.push("--yes");
|
|
285
286
|
return parts;
|
|
286
287
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { a as join, l as toSlash, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import {
|
|
2
|
+
import { _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, x as globSync, y as parseWebSocketFilename } from "./scan-tDExXbA1.mjs";
|
|
3
3
|
import { a as unwrapStaticExpression, c as walk, i as staticLiteral, s as bindingResolver } from "./static-exports-DFkzL-NX.mjs";
|
|
4
4
|
import { a as isObjectExpression, i as isMemberExpression, n as isIdentifier, r as isLiteral, t as isCallExpression } from "./ast-Cv0JwXqb.mjs";
|
|
5
|
-
import { _ as isRouteEnabledForEnvironment, b as ROUTE_EXTENSIONS, g as compareRouteSpecificity, m as deriveFromSource, t as pageFileEnvironment, v as parseRouteFilename, y as parseWebSocketFilename } from "./scan-4YOxDaw2.mjs";
|
|
6
5
|
import { n as readProjectPaths } from "./project-paths-CUhCPMpK.mjs";
|
|
7
6
|
import { n as resourceNameWords, t as isResourceName } from "./resource-name-DlJ9QXzg.mjs";
|
|
8
7
|
import { r as getSsrServerEntryPath } from "./entry-DMgR7XOf.mjs";
|
|
@@ -77,11 +77,15 @@ var PrefetchCache = class {
|
|
|
77
77
|
url,
|
|
78
78
|
method,
|
|
79
79
|
response,
|
|
80
|
+
pending: true,
|
|
80
81
|
staleAt: now + ttl.stale,
|
|
81
82
|
expiresAt: now + ttl.expires,
|
|
82
83
|
singleUse,
|
|
83
84
|
timer: null
|
|
84
85
|
};
|
|
86
|
+
response.then(() => {
|
|
87
|
+
entry.pending = false;
|
|
88
|
+
}, () => {});
|
|
85
89
|
if (!singleUse && ttl.expires > 0) entry.timer = setTimeout(() => this.entries.delete(k), ttl.expires);
|
|
86
90
|
this.entries.set(k, entry);
|
|
87
91
|
}
|