void 1.10.0 → 1.12.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-CZhbDfp4.mjs → account-cmd-D_0qJ9fx.mjs} +6 -6
- package/dist/{agents-DRo8gzni.mjs → agents-64FnLwxP.mjs} +6 -5
- package/dist/{application-analysis-Do1WaGAY.mjs → application-analysis-Cx2S63z5.mjs} +48 -22
- package/dist/{application-routing-DrOFahHO.mjs → application-routing-BAXpnawu.mjs} +1 -1
- package/dist/{assets-DZBd7yqh.mjs → assets-Br6_BeFJ.mjs} +34 -27
- package/dist/{ast-Cv0JwXqb.mjs → ast-BkPQu7A0.mjs} +5 -1
- package/dist/{auth-BN0NU9dz.mjs → auth-Boz0lrb3.mjs} +1 -1
- package/dist/{auth-CCk9Seol.mjs → auth-DlLDymuc.mjs} +24 -12
- package/dist/{auth-link-DFQTA1jN.mjs → auth-link-C97r9p2N.mjs} +6 -6
- package/dist/{auth-router-BOiaDmcQ.mjs → auth-router-BmzEgzYx.mjs} +5 -5
- package/dist/{better-auth-shared-BqsMzU14.d.mts → better-auth-shared-BS3pDQbT.d.mts} +11 -6
- package/dist/{better-auth-shared-DRHo5FoG.mjs → better-auth-shared-BcqDt-37.mjs} +7 -2
- package/dist/{build-cmd-BCiXgjn9.mjs → build-cmd-BaFsyZrz.mjs} +13 -12
- package/dist/{cache-CUulshOu.mjs → cache-xO711ATQ.mjs} +6 -6
- package/dist/{cancel-deploy-BHGZo6KC.mjs → cancel-deploy-Di11ynsr.mjs} +5 -5
- package/dist/{cf-access-pejlJmuy.mjs → cf-access-DmkKPcAI.mjs} +0 -8
- package/dist/{cf-access-Dnyw8KFY.mjs → cf-access-FaIm95jA.mjs} +8 -4
- package/dist/{cf-build-output-bBx1gDll.mjs → cf-build-output-Ca201_n1.mjs} +27 -25
- package/dist/cf-build-output-Dy7N0hQN.mjs +1 -0
- package/dist/{cf-command-values-Ccl-zRhl.mjs → cf-command-values-5BPBRc9Z.mjs} +1 -1
- package/dist/cf-config-migrate-D271BTiw.mjs +1664 -0
- package/dist/{cf-worker-settings-CARs4Wy9.mjs → cf-worker-settings-BBdlhm9U.mjs} +1 -1
- package/dist/cli/cli.mjs +1 -1
- package/dist/cli/cloudflare-operation-process.mjs +223 -16
- package/dist/cli/env-schema-probe.d.mts +3 -1
- package/dist/cli/env-schema-probe.mjs +7 -8
- package/dist/{cli-main-hM7rhIbB.mjs → cli-main-DlW6lB8s.mjs} +153 -91
- package/dist/{client-BEYbgqZw.mjs → client-DkYzDEC0.mjs} +1 -1
- package/dist/{client-aIv5UQf3.mjs → client-ImIe7Mjq.mjs} +192 -17
- package/dist/{cloudflare-auth-pNvmT6kL.mjs → cloudflare-auth-eWfhdZCk.mjs} +1 -1
- package/dist/{cloudflare-cmd-DLcgInCa.mjs → cloudflare-cmd-SsFlJe2B.mjs} +7 -8
- package/dist/{cloudflare-config-BfEfIEuY.mjs → cloudflare-config-D9UFH_A5.mjs} +2 -2
- package/dist/{cloudflare-connect-CMcKtA02.mjs → cloudflare-connect-BgpHcSg3.mjs} +3 -3
- package/dist/{cloudflare-operations-DLhn_Bom.mjs → cloudflare-operations-BF0PSErW.mjs} +40 -24
- package/dist/cloudflare-operations-dpRD-2Px.mjs +1 -0
- package/dist/cloudflare-process-60r4Z2Zf.mjs +671 -0
- package/dist/cloudflare-user-output-CCR99eQY.mjs +19 -0
- package/dist/collect-B6nlSnsb.mjs +1 -0
- package/dist/{collect-C6Blu9yw.mjs → collect-rNLybAnF.mjs} +3 -3
- package/dist/{config-Do7gJI3T.mjs → config-BFX5ZB1J.mjs} +5 -4
- package/dist/{config-CbKmMpHK.mjs → config-BSoW3QCB.mjs} +5 -5
- package/dist/{config-DuiDZbq7.d.mts → config-DA6ZbLXO.d.mts} +3 -1
- package/dist/{config-CtkCfPpv.mjs → config-DtjrUtPo.mjs} +1 -1
- package/dist/{config-qgt863GH.mjs → config-Dv5jri1-.mjs} +10 -6
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-DM3yCNPG.mjs → connect-DDRQGfFE.mjs} +9 -9
- package/dist/{create-project-BkVGXGNt.mjs → create-project-CY7sP8sI.mjs} +7 -6
- package/dist/{create-project-C-hNdYvD.mjs → create-project-Dro3K-az.mjs} +1 -1
- package/dist/{db-DQAi7Ckr.mjs → db-DmlaWVBu.mjs} +166 -121
- package/dist/db-seed-loader-Bcz_SutQ.mjs +253 -0
- package/dist/{db-types-BpPYAx0B.mjs → db-types-B4Cf9dzR.mjs} +8 -2
- package/dist/{delete-BtVnPGO2.mjs → delete-Uuq9ch6o.mjs} +6 -6
- package/dist/{deploy-Cs93Af-d.mjs → deploy-B9E7_rHC.mjs} +235 -558
- package/dist/deploy-BB3rsZbP.mjs +2 -0
- package/dist/{deploy-managed-static-CZIx3cc1.mjs → deploy-managed-static-IKZyuc1W.mjs} +123 -198
- package/dist/deploy-security-notice-C3LalelR.mjs +192 -0
- package/dist/{deploy-transport-DT-ALuDj.mjs → deploy-transport-BKP_oV9q.mjs} +4 -4
- package/dist/deploy.mjs +10 -9
- package/dist/{dev-inbox-BiamQEAa.mjs → dev-inbox-ClVjKEHy.mjs} +1 -1
- package/dist/direct-r2-upload-DFXLWfXV.mjs +204 -0
- package/dist/discover-D2KGP3cR.mjs +1 -0
- package/dist/{discover-Vd18lHsj.mjs → discover-IcspacCg.mjs} +1 -1
- package/dist/{dispatch-DPEuEblR.mjs → dispatch-DIhDA3NI.mjs} +38 -17
- package/dist/{dist-Cp4b1_T9.mjs → dist-C47zy_kJ.mjs} +1 -1
- package/dist/{dist-STQXl8ck.mjs → dist-Cr_xGE_K.mjs} +73 -38
- package/dist/{domain-cOhYYiHU.mjs → domain-B_xY1yZ5.mjs} +8 -10
- package/dist/{dotenv-CEI8hapP.mjs → dotenv-BG6RQavH.mjs} +2 -2
- package/dist/{drizzle-DBSpPpU1.mjs → drizzle-BJDMPrj7.mjs} +35 -30
- package/dist/{drizzle-D4V_06-B.mjs → drizzle-CQ5jWuDL.mjs} +1 -1
- package/dist/{email-CnnDqvXV.mjs → email-BIC15L7a.mjs} +47 -32
- package/dist/{email-cloudflare-CCIoQueP.mjs → email-cloudflare-C447nOqq.mjs} +195 -109
- package/dist/{email-pattern-BYr-EFq5.mjs → email-pattern-bRna9MOJ.mjs} +2 -2
- package/dist/{entry-DMgR7XOf.mjs → entry-Bwb9ev8K.mjs} +13 -10
- package/dist/{env-5bphL5mV.mjs → env-DJPZYHT5.mjs} +8 -8
- package/dist/{env-UqS-21xi.mjs → env-EjHqc7m9.mjs} +1 -1
- package/dist/{env-types-WEZw5D-r.mjs → env-types-D2hBodXP.mjs} +2 -19
- package/dist/{env-validation-DfJ9Fzfa.mjs → env-validation-D-v5_CWL.mjs} +13 -13
- package/dist/{env-validation-ly_Q9Kgd.mjs → env-validation-j9pjCDfA.mjs} +1 -1
- package/dist/{error-pages-QNeBXiRR.mjs → error-pages-GORL6F_e.mjs} +1 -1
- package/dist/{fetch-CbI6lNnk.d.mts → fetch-CczQyIed.d.mts} +1 -1
- package/dist/{fetch-DdK9eGin.mjs → fetch-CiEsvjpP.mjs} +1 -1
- package/dist/{fetch-stream-DQAavFdm.mjs → fetch-stream-BIG5lHW6.mjs} +3 -4
- package/dist/{fetch-stream-DoED9atq.d.mts → fetch-stream-DRX8-83b.d.mts} +2 -2
- package/dist/gen-CQDiPi8m.mjs +1 -0
- package/dist/{gen-CjcH6DJS.mjs → gen-DiTZlDx8.mjs} +21 -18
- package/dist/{generate-BOp1g1H_.mjs → generate-C3ZAqCy-.mjs} +1 -1
- package/dist/{generate-CWb8aOsm.mjs → generate-Dq2Bgw75.mjs} +6 -6
- package/dist/{git-metadata-Cukp5kV5.mjs → git-metadata-BEokJ6US.mjs} +1 -1
- package/dist/{github-cmd-CVDLb51-.mjs → github-cmd-DPmby8x-.mjs} +14 -9
- package/dist/{handler-w_FAiIRu.mjs → handler-DCrDLzw2.mjs} +3 -3
- package/dist/has-own-key-D9QEnAkF.mjs +5 -0
- package/dist/{head-0o0QoREY.mjs → head-BwQ5kgqt.mjs} +5 -4
- package/dist/{head-CVO92KEx.d.mts → head-fUp8n_QJ.d.mts} +9 -4
- package/dist/{headers-Cyr87J6Z.mjs → headers-DqBsjDxg.mjs} +7 -7
- package/dist/{help-B1cH8518.mjs → help-9wfMyXHb.mjs} +146 -69
- package/dist/help-Dy3w4rPq.mjs +1 -0
- package/dist/{inbound-BHt4dIlL.d.mts → inbound-CwgZSqFI.d.mts} +9 -3
- package/dist/{inbound--OF7zkwX.mjs → inbound-feMn1Rxx.mjs} +7 -7
- package/dist/{index-CmqHYj2R.d.mts → index-8cAgNdb6.d.mts} +1 -1
- package/dist/{index-BTmhCDbw.d.mts → index-BQ5qYiAw.d.mts} +2 -2
- package/dist/{index-BESZTC1z.d.mts → index-BYcWajVp.d.mts} +2 -1
- package/dist/{index-BXdP39qx.d.mts → index-Dn2mkPr2.d.mts} +24 -23
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +351 -444
- package/dist/{info-BE3snw2_.mjs → info-BWEWaOBo.mjs} +4 -4
- package/dist/{init-BrS5MAiJ.mjs → init-BuTPVLPO.mjs} +737 -546
- package/dist/{isr-config-Czzb4mIq.mjs → isr-config-DiTnL9Tb.mjs} +5 -5
- package/dist/{link-BbzyrCBD.mjs → link-BiesPyT4.mjs} +7 -7
- package/dist/{list-DmppHjVc.mjs → list-CkonftPQ.mjs} +11 -7
- package/dist/{live-DvtxTUhW.mjs → live-dvGThbwy.mjs} +14 -17
- package/dist/{load-user-env-BltIJLtl.mjs → load-user-env-B8qC0Q2Y.mjs} +1 -1
- package/dist/{local-d1-DLxsKmkw.mjs → local-d1-CYOYkVwO.mjs} +3 -3
- package/dist/{login-Cihxnu7m.mjs → login-BSOSah1j.mjs} +8 -6
- package/dist/login-DWCZeCX9.mjs +1 -0
- package/dist/{logs-BCgLeLNd.mjs → logs-HOBUnroa.mjs} +9 -9
- package/dist/{migrate-DOK67gE-.mjs → migrate-BNZL1hee.mjs} +9 -10
- package/dist/migrate-C9aoWLvY.mjs +1 -0
- package/dist/{migrations-ByS7r3HV.mjs → migrations-CUHhX65Y.mjs} +15 -12
- package/dist/{mime-BGoZ8ZLL.mjs → mime-Btw9R3CC.mjs} +26 -12
- package/dist/{mysql-sql-SlpS6OMg.mjs → mysql-sql-CB52k8tQ.mjs} +45 -22
- package/dist/nitro.d.mts +3 -0
- package/dist/nitro.mjs +14 -5
- package/dist/{node-qXD3FbIU.mjs → node-DVJWfV6s.mjs} +6 -6
- package/dist/node-buffer-D7kgjaDs.mjs +4 -0
- package/dist/{operator-ai-logging-CNuX5uKg.mjs → operator-ai-logging-ZDqqhnIq.mjs} +11 -10
- package/dist/operator-args-DCkWbgT-.mjs +1499 -0
- package/dist/{operator-auth-CD3pap65.mjs → operator-auth-BjoPLgja.mjs} +2 -2
- package/dist/{operator-client-XvXTkea6.mjs → operator-client-DzebIntv.mjs} +3 -3
- package/dist/{operator-cmd-D0vSUVle.mjs → operator-cmd-AZoeI9Pl.mjs} +28 -12
- package/dist/operator-cmd-DEnHFmJF.mjs +1 -0
- package/dist/operator-security-Bo26FP01.mjs +263 -0
- package/dist/{output-DNVILSz2.mjs → output-BZLnu0z8.mjs} +39 -4
- package/dist/output-D7K9TWIA.mjs +1 -0
- package/dist/{package-json-DvS6IFRv.mjs → package-json-4xUI3xLz.mjs} +1 -1
- package/dist/pages/client.d.mts +53 -30
- package/dist/pages/client.mjs +93 -31
- package/dist/pages/head.d.mts +1 -1
- package/dist/pages/head.mjs +1 -1
- package/dist/pages/index.d.mts +2 -2
- package/dist/pages/index.mjs +7 -7
- package/dist/pages/islands-plugin.d.mts +26 -8
- package/dist/pages/islands-plugin.mjs +61 -22
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{pgpass-CEtnBOZO.mjs → pgpass-BLPoYN9_.mjs} +3 -2
- package/dist/platform-args-DNbNZ_RR.mjs +1 -0
- package/dist/{platform-args-DQSMW4EP.mjs → platform-args-lwCyQ6Xy.mjs} +37 -9
- package/dist/{platform-auth-config-V2ifSLQ-.mjs → platform-auth-config-DLRMPw1G.mjs} +26 -23
- package/dist/{platform-auth-protection-BybVCUzi.mjs → platform-auth-protection-HSmLmD3d.mjs} +10 -10
- package/dist/{platform-auth-recovery-kH1-h8Ch.mjs → platform-auth-recovery-BXPhTlKa.mjs} +11 -9
- package/dist/{platform-cmd-B1jtqXnu.mjs → platform-cmd-CqRjxFEU.mjs} +1 -1
- package/dist/{platform-cmd-BHWdh1Hx.mjs → platform-cmd-DJ-fOYhL.mjs} +11 -11
- package/dist/{platform-discovery-B0eZjZ3B.mjs → platform-discovery-CLxtixHJ.mjs} +1 -1
- package/dist/{platform-domain-DB_KpVhg.mjs → platform-domain-CRsRJOws.mjs} +14 -10
- package/dist/{platform-lifecycle-BoOTmH6H.mjs → platform-lifecycle-bx_kpqo7.mjs} +1 -1
- package/dist/{platform-lifecycle-C6fUuj4y.mjs → platform-lifecycle-fau3VKv6.mjs} +773 -206
- package/dist/platform-management-BRGhD-oF.mjs +1 -0
- package/dist/{platform-management-B8-pOxoJ.mjs → platform-management-CnKBdDx5.mjs} +227 -58
- package/dist/{platform-plans-config-iczSDkQK.mjs → platform-plans-config-2C3_5EDs.mjs} +112 -35
- package/dist/{platform-recovery-ZAXin6WK.mjs → platform-recovery-poxgOOAY.mjs} +5 -5
- package/dist/{platform-registry-DZ_2Xuqd.mjs → platform-registry-DHH6fivm.mjs} +6 -5
- package/dist/{platform-setup-CpcHLI-0.mjs → platform-setup-DYylapHD.mjs} +26 -12
- package/dist/{plugin-inference-BGamcCqB.mjs → plugin-inference-7O11_E4H.mjs} +26 -26
- package/dist/{prepare-BrAkXTTB.mjs → prepare-BbvlKreR.mjs} +12 -12
- package/dist/prepare-BmG2E6TI.mjs +1 -0
- package/dist/{prepare-Cjt6EM0d.mjs → prepare-DWjn1Lzd.mjs} +3 -3
- package/dist/{project-cmd-wtCuc8Ln.mjs → project-cmd-DyUEFi2b.mjs} +30 -24
- package/dist/{project-CLwxcEdq.mjs → project-dh9431bN.mjs} +2 -2
- package/dist/{project-paths-CUhCPMpK.mjs → project-paths-2ENfCCih.mjs} +4 -3
- package/dist/project-security--tYGFPGo.mjs +1340 -0
- package/dist/project-security-DZEQgnsS.mjs +1 -0
- package/dist/{project-team-CZFvPIJ-.mjs → project-team-BszTHgzC.mjs} +8 -8
- package/dist/{project-token-C3TxkWeC.mjs → project-token-DBDy4NdV.mjs} +6 -6
- package/dist/{project-tsconfig-MyRJgufB.mjs → project-tsconfig-BOA4ym99.mjs} +25 -5
- package/dist/{project-DVsTAWFh.mjs → project-uXKua1it.mjs} +1 -1
- package/dist/project-zero-trust-D9sUouij.mjs +210 -0
- package/dist/{protocol-W5EQcIzN.mjs → protocol-CE3wP-H1.mjs} +5 -5
- package/dist/{protocol-BlAiF-hc.d.mts → protocol-ERy-n3jf.d.mts} +7 -4
- package/dist/{provision-CknEbPuw.mjs → provision-Bh44omGA.mjs} +39 -29
- package/dist/provision-DFv7SJDn.mjs +1 -0
- package/dist/{public-B80SwOFp.d.mts → public-DB9C2Cy_.d.mts} +5 -2
- package/dist/{raw-7pQirZpQ.mjs → raw-5rak34QN.mjs} +2 -1
- package/dist/{redirect-Dqb4fEc5.mjs → redirect-DD825Stf.mjs} +1 -1
- package/dist/{requests-FaA9M3RX.mjs → requests-CBokjiOi.mjs} +6 -6
- package/dist/{resolve-project-Da3OgCU1.mjs → resolve-project-8WZ3iVmr.mjs} +3 -3
- package/dist/resolve-project-YsTH-U9I.mjs +1 -0
- package/dist/{rollback-DM6pZ23Y.mjs → rollback-CEeHNFUn.mjs} +16 -7
- package/dist/route-types-CSed9-Dp.mjs +435 -0
- package/dist/{route-url-BBdkU7rb.mjs → route-url-B41eQ8QI.mjs} +1 -1
- package/dist/{route-url-Di1kB8D_.d.mts → route-url-Bd6IX-JZ.d.mts} +2 -1
- package/dist/routes-stub.d.mts +1 -1
- package/dist/routes-stub.mjs +1 -1
- package/dist/{runner-CTk21HrO.mjs → runner-Bf94YVJK.mjs} +1 -1
- package/dist/{runner-CMZb7jNU.mjs → runner-CeguHWJx.mjs} +3 -2
- package/dist/{runner-mysql-CJ-HyqxV.mjs → runner-mysql-3XDKrn-g.mjs} +13 -9
- package/dist/{runner-mysql-C_PrAUTm.mjs → runner-mysql-r688x6Y9.mjs} +1 -1
- package/dist/{runner-pg-mYc75KfH.mjs → runner-pg-Buzw17hl.mjs} +1 -1
- package/dist/{runner-pg-2pjltt0t.mjs → runner-pg-DMJquR3d.mjs} +1 -1
- package/dist/runtime/ai/index.d.mts +1 -0
- package/dist/runtime/ai/index.mjs +26 -11
- package/dist/runtime/auth/better-auth-d1.d.mts +1 -1
- package/dist/runtime/auth/better-auth-d1.mjs +2 -2
- package/dist/runtime/auth/better-auth-mysql.d.mts +1 -1
- package/dist/runtime/auth/better-auth-mysql.mjs +2 -2
- package/dist/runtime/auth/better-auth-postgres.d.mts +1 -1
- package/dist/runtime/auth/better-auth-postgres.mjs +3 -3
- package/dist/runtime/client/fetch-server.d.mts +1 -1
- package/dist/runtime/client/fetch-server.mjs +2 -2
- package/dist/runtime/client/fetch-stream.d.mts +2 -2
- package/dist/runtime/client/fetch-stream.mjs +1 -1
- package/dist/runtime/client/fetch.d.mts +1 -1
- package/dist/runtime/client/fetch.mjs +1 -1
- package/dist/runtime/client/index.d.mts +2 -2
- package/dist/runtime/client/index.mjs +2 -2
- package/dist/runtime/client/react.d.mts +2 -2
- package/dist/runtime/client/react.mjs +2 -2
- package/dist/runtime/client/solid.d.mts +2 -2
- package/dist/runtime/client/solid.mjs +2 -2
- package/dist/runtime/client/svelte.d.mts +2 -2
- package/dist/runtime/client/svelte.mjs +2 -2
- package/dist/runtime/client/vue.d.mts +2 -2
- package/dist/runtime/client/vue.mjs +2 -2
- package/dist/runtime/db/index.d.mts +8 -2
- package/dist/runtime/db/index.mjs +21 -8
- package/dist/runtime/db/migrations/mysql-handler.mjs +1 -1
- package/dist/runtime/db/migrations/postgres-handler.mjs +1 -1
- package/dist/runtime/db/session.d.mts +2 -0
- package/dist/runtime/db/session.mjs +1 -0
- package/dist/runtime/durable/index.mjs +7 -5
- package/dist/runtime/email/index.d.mts +1 -1
- package/dist/runtime/email/index.mjs +14 -11
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +4 -4
- package/dist/runtime/env/public-client.d.mts +4 -1
- package/dist/runtime/env/public.d.mts +1 -1
- package/dist/runtime/env/public.mjs +2 -2
- package/dist/runtime/env/runtime.mjs +1 -1
- package/dist/runtime/handler/index.d.mts +1 -1
- package/dist/runtime/handler/index.mjs +1 -1
- package/dist/runtime/handler/validator.d.mts +1 -1
- package/dist/runtime/handler/validator.mjs +1 -1
- package/dist/runtime/isr/index.mjs +1 -1
- package/dist/runtime/kv/index.mjs +1 -1
- package/dist/runtime/live/client.d.mts +2 -2
- package/dist/runtime/live/client.mjs +7 -7
- package/dist/runtime/live/index.d.mts +1 -1
- package/dist/runtime/live/index.mjs +1 -1
- package/dist/runtime/live/server.mjs +3 -3
- package/dist/runtime/queues/index.mjs +2 -2
- package/dist/runtime/remote/index.d.mts +5 -1
- package/dist/runtime/remote/index.mjs +10 -9
- package/dist/runtime/routing/index.d.mts +11 -12
- package/dist/runtime/routing/index.mjs +69 -65
- package/dist/runtime/routing/route-url.d.mts +1 -1
- package/dist/runtime/routing/route-url.mjs +1 -1
- package/dist/runtime/sandbox/index.d.mts +1 -1
- package/dist/runtime/sandbox/index.mjs +2 -2
- package/dist/runtime/sse/client.d.mts +1 -1
- package/dist/runtime/sse/index.mjs +1 -1
- package/dist/runtime/storage/index.mjs +1 -1
- package/dist/runtime/ws/index.d.mts +1 -1
- package/dist/runtime/ws/index.mjs +3 -2
- package/dist/runtime/ws/room.d.mts +1 -1
- package/dist/runtime/ws/room.mjs +2 -2
- package/dist/runtime/ws/server.d.mts +2 -2
- package/dist/runtime/ws/server.mjs +1 -1
- package/dist/{runtime-zDDinDI5.mjs → runtime-C_VPIJBF.mjs} +1 -1
- package/dist/{scan-tDExXbA1.mjs → scan-Ct_SEzH4.mjs} +36 -29
- package/dist/{secret-DDNLIQOT.mjs → secret-Deqo3n_N.mjs} +11 -10
- package/dist/security-api-types-CU7zQtr_.mjs +9 -0
- package/dist/security-sarif-ClyYwtAW.mjs +123 -0
- package/dist/{serialize-Pf-CIQK_.mjs → serialize-BmB4BfKu.mjs} +1 -1
- package/dist/{server-CfUbeOjx.mjs → server-T-4mn8zy.mjs} +5 -4
- package/dist/session-BT8XDkvL.mjs +45 -0
- package/dist/session-ouZYD7zb.d.mts +18 -0
- package/dist/{skills-CoBB9_Ao.mjs → skills-C-csz78e.mjs} +10 -17
- package/dist/{sse-BXnTfcf3.mjs → sse-D3ab0YQT.mjs} +16 -13
- package/dist/{static-exports-DFkzL-NX.mjs → static-exports-s7P86Ngp.mjs} +3 -3
- package/dist/{subcommand-prompt-0yIARXf2.mjs → subcommand-prompt-B4LOLosl.mjs} +31 -21
- package/dist/sveltekit.mjs +1 -1
- package/dist/{terminal-log-text-DNsWJREL.mjs → terminal-log-text-CfS2JKM6.mjs} +1 -1
- package/dist/{url-DaehRGKR.mjs → url-DBQluotE.mjs} +4 -1
- package/dist/validate-CZYUIfR-.mjs +1 -0
- package/dist/{validate-Ddzl-IwT.mjs → validate-CtBWCzez.mjs} +7 -4
- package/dist/{validator-Duafcnh7.mjs → validator-Dfh9kCDm.mjs} +5 -5
- package/dist/{version-metadata-DEmItNdS.mjs → version-metadata-DqgLa6gc.mjs} +1 -1
- package/dist/{wrangler-D1zq1rXr.mjs → wrangler-DVe5KV5G.mjs} +49 -46
- package/dist/wrangler-Dq269bjx.mjs +1 -0
- package/dist/{wrapper-C2gMY432.mjs → wrapper-CcMYpOS8.mjs} +45 -171
- package/docs/guide/ai.md +13 -0
- package/docs/guide/app-types.md +1 -1
- package/docs/guide/auth.md +2 -16
- package/docs/guide/database/d1.md +283 -3
- package/docs/guide/database.md +2 -0
- package/docs/guide/email/domains.md +8 -6
- package/docs/guide/email/sending.md +18 -1
- package/docs/guide/pages-routing/actions-and-forms.md +4 -4
- package/docs/guide/pages-routing/head.md +20 -2
- package/docs/guide/platform/administration/plans.md +13 -0
- package/docs/guide/platform/administration/security-audits.md +213 -0
- package/docs/guide/platform/administration/zero-trust.md +6 -0
- package/docs/guide/platform/development/local.md +3 -5
- package/docs/guide/platform/installation/ci.md +1 -1
- package/docs/guide/platform/installation/credentials.md +23 -20
- package/docs/guide/platform/installation/maintenance.md +8 -2
- package/docs/guide/platform/installation/prerequisites.md +1 -1
- package/docs/guide/platform/installation/uninstall.md +2 -0
- package/docs/guide/platform-administration.md +1 -0
- package/docs/guide/self-hosted-platform.md +14 -13
- package/docs/guide/type-safety.md +1 -1
- package/docs/integrations/cloudflare.md +5 -3
- package/docs/reference/api/database.md +42 -2
- package/docs/reference/api/handlers.md +3 -3
- package/docs/reference/api/types.md +11 -1
- package/docs/reference/api.md +1 -1
- package/docs/reference/cli/database.md +6 -3
- package/docs/reference/cli/deploy.md +17 -13
- package/docs/reference/cli/domains.md +1 -1
- package/docs/reference/cli/email.md +3 -3
- package/docs/reference/cli/platform-config.md +5 -3
- package/docs/reference/cli/platform-installation.md +29 -28
- package/docs/reference/cli/platform-security.md +98 -0
- package/docs/reference/cli/platform-zero-trust.md +2 -0
- package/docs/reference/cli/platform.md +1 -0
- package/docs/reference/cli/project.md +57 -0
- package/docs/reference/cli.md +3 -1
- package/docs/reference/config.md +7 -6
- package/package.json +31 -27
- package/schema.json +7 -1
- package/skills/void/SKILL.md +8 -0
- package/dist/cf-build-output-D3_x71H6.mjs +0 -1
- package/dist/cf-config-migrate-CHtnM3_C.mjs +0 -348
- package/dist/cloudflare-operations-C5RTQNnh.mjs +0 -1
- package/dist/cloudflare-process-wcnaQ5JG.mjs +0 -392
- package/dist/cloudflare-user-output-zEwuGrEJ.mjs +0 -19
- package/dist/collect-8i0wU63d.mjs +0 -1
- package/dist/deploy-rUunHBNJ.mjs +0 -2
- package/dist/discover-Diq0l6TZ.mjs +0 -1
- package/dist/gen-BQ7itmK7.mjs +0 -1
- package/dist/help-Ld6XFol7.mjs +0 -1
- package/dist/login-C-n1rA0s.mjs +0 -1
- package/dist/migrate-CKn30rmw.mjs +0 -1
- package/dist/operator-args-BCCohcz3.mjs +0 -722
- package/dist/operator-cmd-BnLoIO2A.mjs +0 -1
- package/dist/output-BsdnNpxa.mjs +0 -1
- package/dist/platform-args-Rgp86xa7.mjs +0 -1
- package/dist/platform-management-7Bf_OgS5.mjs +0 -1
- package/dist/prepare-CI7_C9Xf.mjs +0 -1
- package/dist/project-zero-trust-DrRyAHW1.mjs +0 -64
- package/dist/provision-DdWqRmmr.mjs +0 -1
- package/dist/resolve-project-C5wC-Hoi.mjs +0 -1
- package/dist/route-types-CrODgORq.mjs +0 -655
- package/dist/validate-DY1U9rET.mjs +0 -1
- package/dist/wrangler-DM3GOqck.mjs +0 -1
|
@@ -1,55 +1,59 @@
|
|
|
1
|
-
import { n as __toESM
|
|
2
|
-
import { A as confirm, K as select, L as log, tt as isCancel } from "./dist-
|
|
1
|
+
import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
|
+
import { A as confirm, K as select, L as log, tt as isCancel } from "./dist-Cr_xGE_K.mjs";
|
|
3
3
|
import { a as join, c as resolve, n as dirname, o as normalize, r as extname, s as relative, t as basename } from "./dist-DMYe8CZJ.mjs";
|
|
4
|
-
import { a as persistCloudflareConfig, c as stashCloudflareDeployPointer, i as materializeCloudflareConfig } from "./cloudflare-config-
|
|
5
|
-
import { m as resolveBindingNames, p as readConfig, r as convertHeadersConfig, u as isNodeTarget } from "./config-
|
|
6
|
-
import { r as detectFramework } from "./plugin-inference-
|
|
7
|
-
import {
|
|
8
|
-
import { a as
|
|
9
|
-
import { a as
|
|
4
|
+
import { a as persistCloudflareConfig, c as stashCloudflareDeployPointer, i as materializeCloudflareConfig } from "./cloudflare-config-D9UFH_A5.mjs";
|
|
5
|
+
import { m as resolveBindingNames, p as readConfig, r as convertHeadersConfig, u as isNodeTarget } from "./config-Dv5jri1-.mjs";
|
|
6
|
+
import { r as detectFramework } from "./plugin-inference-7O11_E4H.mjs";
|
|
7
|
+
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
8
|
+
import { a as buildEnv, i as WRANGLER_AUTH_CREDENTIAL_ENV_VARS, n as readVersionMetadataBinding, r as selectNativeVersionMetadataBinding, t as CLOUDFLARE_PRESERVE_BINDINGS_BUILD_ENV } from "./version-metadata-DqgLa6gc.mjs";
|
|
9
|
+
import { a as getApiUrl, c as getToken, l as getTokenSource } from "./auth-DlLDymuc.mjs";
|
|
10
|
+
import { a as isExpiredTokenError, r as PlatformClient } from "./client-ImIe7Mjq.mjs";
|
|
10
11
|
import { t as writeFileAtomic } from "./atomic-write-DA6eD1Kp.mjs";
|
|
11
|
-
import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-
|
|
12
|
-
import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig } from "./project-
|
|
13
|
-
import { a as FRAMEWORK_PRESETS, c as hasBackendFiles, i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, o as detectPreset, s as formatProjectCommand, t as createCloudflareProcessRunner, u as resolveProjectCommand } from "./cloudflare-process-
|
|
12
|
+
import { r as discoverFrameworkWranglerFiles, t as migrateLegacyVoidConfig } from "./migrate-BNZL1hee.mjs";
|
|
13
|
+
import { c as writeDeploymentPlatform, n as readDeploymentPlatform, r as readProjectConfig } from "./project-dh9431bN.mjs";
|
|
14
|
+
import { a as FRAMEWORK_PRESETS, c as hasBackendFiles, i as isCleanCloudflareExit, l as resolveCloudflareOperationArgv, o as detectPreset, s as formatProjectCommand, t as createCloudflareProcessRunner, u as resolveProjectCommand } from "./cloudflare-process-60r4Z2Zf.mjs";
|
|
14
15
|
import { n as redactMessage } from "./env-mask-D31Qztl9.mjs";
|
|
15
|
-
import { a as
|
|
16
|
-
import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-
|
|
17
|
-
import { A as promptDeployProjectConfig, C as ensureManagedHyperdrive, D as hasNonPageBackend, E as getGitCommit, F as resolveStaticBuildCommand, I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, O as hasPrerenderSources, P as resolveFullDeployBuildCommand, R as validateDeployMigrations, S as createProjectFromSlug, T as getExitCode, _ as getDeploySchemaDriftMessage, a as collectAndHashAssets, b as assertProjectDeployAccess, c as readWranglerHtmlHandling, d as printDeploySuccess, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, h as warnUnpublishedRouting, i as buildStaticManifest, j as resolveDeployLiveBindingConfig, k as log$1, l as formatDeploySummary, m as warnIgnoredNotFoundForFramework, n as runStaticDeploy, o as collectWorkerFiles, p as streamDirectR2Deploy, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeployContext, v as hasDeploySchemaDrift, w as generateDeployWrapperIfNeeded, x as assertWorkerMainUploaded, y as assertEnvSchemaValid } from "./deploy-managed-static-
|
|
18
|
-
import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-
|
|
19
|
-
import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate } from "./isr-config-
|
|
20
|
-
import { i as otherQueueConsumers, n as chooseCloudflareQueueName, o as scopedCloudflareQueueName, r as cloudflareQueueName } from "./dispatch-
|
|
21
|
-
import { a as checkCloudflareProvisionDrift,
|
|
22
|
-
import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-
|
|
23
|
-
import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-
|
|
16
|
+
import { a as assertSandboxNamespaceConfig, c as resolveSandboxConfig, d as hasEmailHandlers, i as SANDBOX_MIGRATION_TAG, l as sandboxContainerConfig, o as hasSandboxSqliteMigration, s as requiresSandboxPlatformImage, t as analyzeApplicationSync } from "./application-analysis-Cx2S63z5.mjs";
|
|
17
|
+
import { A as syncWranglerWebSockets, C as readWranglerManagedQueueCleanupCandidates, D as sameMigrationsDir, E as resolveLiveBindingConfig, L as writeVoidProjectConfig, M as writeProvisionedWranglerConfig, N as writeWranglerPublishedTrafficSnapshot, a as LIVE_MIGRATION_TAG, c as bindingEntriesForField, h as nextDurableObjectMigrationTag, k as syncWranglerDurableObjects, m as hasDurableObjectSqliteMigration, o as acknowledgeWranglerManagedQueueRemovals, r as FRIENDLY_BINDING_NAMES, v as readExistingLiveBindingConfig, w as readWranglerPublishedTrafficSnapshot } from "./wrangler-DVe5KV5G.mjs";
|
|
18
|
+
import { A as promptDeployProjectConfig, C as ensureManagedHyperdrive, D as hasNonPageBackend, E as getGitCommit, F as resolveStaticBuildCommand, I as resolveStaticDeployPreset, L as toManifestSchedulesAndQueues, M as resolveDeployWorkerMain, N as resolveDeployWranglerCompat, O as hasPrerenderSources, P as resolveFullDeployBuildCommand, R as validateDeployMigrations, S as createProjectFromSlug, T as getExitCode, _ as getDeploySchemaDriftMessage, a as collectAndHashAssets, b as assertProjectDeployAccess, c as readWranglerHtmlHandling, d as printDeploySuccess, f as mergeAndLintRoutingRules, g as assertDeploySchemaDriftFree, h as warnUnpublishedRouting, i as buildStaticManifest, j as resolveDeployLiveBindingConfig, k as log$1, l as formatDeploySummary, m as warnIgnoredNotFoundForFramework, n as runStaticDeploy, o as collectWorkerFiles, p as streamDirectR2Deploy, r as buildFrameworkManifest, s as detectNonSpaFallbackWarning, t as assembleVoidManifest, u as printDeployContext, v as hasDeploySchemaDrift, w as generateDeployWrapperIfNeeded, x as assertWorkerMainUploaded, y as assertEnvSchemaValid } from "./deploy-managed-static-IKZyuc1W.mjs";
|
|
19
|
+
import { n as completeApplicationAnalysis, t as analyzeApplication } from "./application-routing-BAXpnawu.mjs";
|
|
20
|
+
import { a as resolveDistDir, n as collectRevalidate, o as resolveWorkerDirName, r as hasRevalidate } from "./isr-config-DiTnL9Tb.mjs";
|
|
21
|
+
import { i as otherQueueConsumers, n as chooseCloudflareQueueName, o as scopedCloudflareQueueName, r as cloudflareQueueName } from "./dispatch-DIhDA3NI.mjs";
|
|
22
|
+
import { a as checkCloudflareProvisionDrift, d as isRealD1Id, h as provisionCloudflareResources, i as assertValidResourceName, p as isRealKvId, s as deleteEnvVarCaseAware, u as isQueueConfirmedAbsent, y as resolveWorkersDevComplianceRegion } from "./provision-Bh44omGA.mjs";
|
|
23
|
+
import { c as scrubWranglerAuthCredentials, n as buildSchemaProbeEnv, o as resolveDeployTransport, r as deployChildEnv, s as scrubManagedDeployBuildMarkers, t as MANAGED_DEPLOY_BUILD_ENV } from "./deploy-transport-BKP_oV9q.mjs";
|
|
24
|
+
import { f as listSelfHostSecretNames, h as selfHostSchemaFailureMessage, i as SelfHostSecretListError, l as dischargeSelfHostEnvContext, n as SelfHostFirstDeployError, p as readEmittedWorkerVars, r as SelfHostSchemaError, s as deriveSelfHostEnvContextFromVars, t as SelfHostEnvValidationError } from "./env-validation-D-v5_CWL.mjs";
|
|
24
25
|
import { n as readGeneratedWranglerConfigFile } from "./generated-wrangler-config-CoDaaFsA.mjs";
|
|
25
|
-
import {
|
|
26
|
-
import { t as collectMigrations } from "./collect-
|
|
26
|
+
import { a as createSpinner, c as formatCount, g as note, p as getErrorMessage } from "./output-BZLnu0z8.mjs";
|
|
27
|
+
import { t as collectMigrations } from "./collect-rNLybAnF.mjs";
|
|
27
28
|
import { n as openMigrationValidationDatabase, t as SqliteMigrationError } from "./sqlite-validation-CLJXXN93.mjs";
|
|
28
|
-
import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV, u as resolveRemoteMode } from "./env-
|
|
29
|
-
import { n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-
|
|
30
|
-
import { c as VOID_INTERNAL_WORKER_FIRST, d as hasDocumentRoutes, f as resolveAssetConfig, i as readGeneratedAssetHeadersFile, l as edgeRulesNeedWorker, u as hasApiRoutes } from "./headers-
|
|
31
|
-
import { o as validateSsrEntry } from "./entry-
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import { n as
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import { t as
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { a as
|
|
44
|
-
import {
|
|
29
|
+
import { n as CLOUDFLARE_QUEUE_NAMES_BUILD_ENV, t as CLOUDFLARE_DEPLOY_BUILD_ENV, u as resolveRemoteMode } from "./env-EjHqc7m9.mjs";
|
|
30
|
+
import { n as prepareCfFrameworkBuildOutput, r as prepareCfStaticBuildOutput, t as prepareCfBuildOutput } from "./cf-build-output-Ca201_n1.mjs";
|
|
31
|
+
import { c as VOID_INTERNAL_WORKER_FIRST, d as hasDocumentRoutes, f as resolveAssetConfig, i as readGeneratedAssetHeadersFile, l as edgeRulesNeedWorker, u as hasApiRoutes } from "./headers-DqBsjDxg.mjs";
|
|
32
|
+
import { o as validateSsrEntry } from "./entry-Bwb9ev8K.mjs";
|
|
33
|
+
import { v as require_ci_info } from "./project-security--tYGFPGo.mjs";
|
|
34
|
+
import { a as parseCloudflareAuthSession, i as ensureCloudflareAuthentication, n as cloudflareCredentialOverrides, t as CloudflareAuthenticationError } from "./cloudflare-auth-eWfhdZCk.mjs";
|
|
35
|
+
import { r as trustedCloudflareWorkerAccessHeaders, t as cfAccessHeaders } from "./cf-access-DmkKPcAI.mjs";
|
|
36
|
+
import { i as safePositional, r as readCfUploadOutput, t as CF_VERSION_SOURCE_MAX_OUTPUT_BYTES } from "./cf-command-values-5BPBRc9Z.mjs";
|
|
37
|
+
import { n as record, t as migrateBuiltWranglerConfig } from "./cf-config-migrate-D271BTiw.mjs";
|
|
38
|
+
import { n as getCfCliVersion, r as getVoidUserAgent, t as publishCloudflareWorkerSettings } from "./cf-worker-settings-BBdlhm9U.mjs";
|
|
39
|
+
import { t as Buffer } from "./node-buffer-D7kgjaDs.mjs";
|
|
40
|
+
import { a as createCloudflareEmptyDomainPublisher, i as createCloudflareEmptyCronPublisher } from "./cloudflare-operations-BF0PSErW.mjs";
|
|
41
|
+
import { i as validateMigrations, t as assertJournalCoherence } from "./validate-CtBWCzez.mjs";
|
|
42
|
+
import { n as readProjectPaths, t as assertNoRootSourceConventionConflicts } from "./project-paths-2ENfCCih.mjs";
|
|
43
|
+
import { t as sanitizeTerminalLogText } from "./terminal-log-text-CfS2JKM6.mjs";
|
|
44
|
+
import { a as runMySqlMigrations } from "./runner-mysql-3XDKrn-g.mjs";
|
|
45
|
+
import { i as runPgMigrations } from "./runner-pg-Buzw17hl.mjs";
|
|
46
|
+
import { a as emailConfigInputs, c as preflightEmail, d as renderEmailChecklist, f as collectPrerenderPaths, h as prerenderPagesNode, i as createNodeEmailDns, m as prerenderPages, n as SEND_EMAIL_BINDING, o as formatSendingOnlyPaidHint, p as collectPrerenderPathsNode, r as applyEmailSetup, s as isAwaitingSendingOnboarding, t as EMAIL_FROM_VAR, u as renderAddressMap } from "./email-cloudflare-C447nOqq.mjs";
|
|
47
|
+
import { n as printDeploySecurityNotice } from "./deploy-security-notice-C3LalelR.mjs";
|
|
48
|
+
import { a as needsWrapper, r as cleanupWrapper, t as bundleEntry } from "./wrapper-CcMYpOS8.mjs";
|
|
45
49
|
import { t as assertNoPrerenderFailures } from "./prerender-render-BAdYhivW.mjs";
|
|
46
|
-
import { t as collectGitDeployMetadata } from "./git-metadata-
|
|
47
|
-
import { t as ensurePlatformAccessToken } from "./cf-access-
|
|
48
|
-
import { r as getPackageDir } from "./agents-
|
|
50
|
+
import { t as collectGitDeployMetadata } from "./git-metadata-BEokJ6US.mjs";
|
|
51
|
+
import { t as ensurePlatformAccessToken } from "./cf-access-FaIm95jA.mjs";
|
|
52
|
+
import { r as getPackageDir } from "./agents-64FnLwxP.mjs";
|
|
49
53
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
50
|
-
import { t as promptForLoginToken } from "./login-
|
|
51
|
-
import { s as listPlatformConnections } from "./platform-registry-
|
|
52
|
-
import { t as getRequestedProjectSlug } from "./resolve-project-
|
|
54
|
+
import { t as promptForLoginToken } from "./login-BSOSah1j.mjs";
|
|
55
|
+
import { s as listPlatformConnections } from "./platform-registry-DHH6fivm.mjs";
|
|
56
|
+
import { t as getRequestedProjectSlug } from "./resolve-project-8WZ3iVmr.mjs";
|
|
53
57
|
import { createRequire } from "node:module";
|
|
54
58
|
import { closeSync, cpSync, existsSync, mkdirSync, mkdtempSync, openSync, readFileSync, readdirSync, readlinkSync, realpathSync, rmSync, statSync, unlinkSync, writeFileSync, writeSync } from "node:fs";
|
|
55
59
|
import { fileURLToPath } from "node:url";
|
|
@@ -64,9 +68,8 @@ import { convertToWranglerConfig } from "@cloudflare/config";
|
|
|
64
68
|
import mime from "mime";
|
|
65
69
|
import ignore from "ignore";
|
|
66
70
|
import { CloudflareWorkerInspectionError, activateCloudflareVersion, assertCloudflareBindingsPreserved, assertCloudflareDurableObjectLifecycleSupported, assertExistingCloudflareConfig, cloudflareCommandDiagnostic, encodeCloudflareVersionMessage, extractWorkersDevSubdomain, normalizeReadinessAccessOrigin, normalizeWorkersDevSubdomain, parseCloudflareVersionMessage, parseRootWranglerConfig, parseRootWranglerConfig as parseRootWranglerConfig$1, readBindingFieldPresence, readCloudflareTriggerConfig, readConfigEntryString, readExistingCloudflareWorker, readStoredResourceName, readWranglerTopLevelString, renderCloudflareStaticEntry, resolveD1MigrateTarget, stageCloudflareStaticAssets, writeCloudflareFrameworkDeployConfig, writeCloudflareStaticDeployConfig } from "@void/deploy-cloudflare";
|
|
67
|
-
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
68
|
-
import { Buffer as Buffer$1 } from "node:buffer";
|
|
69
71
|
import { Minimatch } from "minimatch";
|
|
72
|
+
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
70
73
|
// src/cli/cloudflare-candidate.ts
|
|
71
74
|
const CANDIDATE_FILE = ".void/cloudflare-candidate.json";
|
|
72
75
|
const INVALID_CANDIDATE_MESSAGE = "The saved Cloudflare candidate receipt is invalid. Restore or remove .void/cloudflare-candidate.json before retrying.";
|
|
@@ -114,16 +117,21 @@ function readCloudflareLink(root) {
|
|
|
114
117
|
if (!existsSync(path)) return null;
|
|
115
118
|
try {
|
|
116
119
|
const value = JSON.parse(readFileSync(path, "utf8"));
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
120
|
+
if (typeof value.accountId === "string" && value.accountId && typeof value.workerName === "string" && value.workerName) {
|
|
121
|
+
const link = {
|
|
122
|
+
accountId: value.accountId,
|
|
123
|
+
workerName: value.workerName
|
|
124
|
+
};
|
|
125
|
+
const receipt = value.candidateReceipt;
|
|
126
|
+
if (receipt === void 0) return link;
|
|
127
|
+
if (typeof receipt === "object" && receipt !== null && typeof receipt.parentVersionId === "string" && receipt.parentVersionId.length > 0 && isVersionIdChain(receipt.versionIds)) {
|
|
128
|
+
link.candidateReceipt = {
|
|
129
|
+
parentVersionId: receipt.parentVersionId,
|
|
130
|
+
versionIds: [...receipt.versionIds]
|
|
131
|
+
};
|
|
132
|
+
return link;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
127
135
|
} catch {}
|
|
128
136
|
throw new Error("The saved Cloudflare link is invalid. Restore .void/cloudflare-link.json before retrying.");
|
|
129
137
|
}
|
|
@@ -171,8 +179,9 @@ async function prepareExistingCloudflareDeploy(options) {
|
|
|
171
179
|
};
|
|
172
180
|
const metadataBindings = existing.bindings.filter((binding) => binding.type === "version_metadata");
|
|
173
181
|
if (config.version_metadata === void 0 && metadataBindings.length === 1 && typeof metadataBindings[0].name === "string") {
|
|
174
|
-
|
|
175
|
-
|
|
182
|
+
const metadata = { binding: metadataBindings[0].name };
|
|
183
|
+
config.version_metadata = metadata;
|
|
184
|
+
patch.version_metadata = metadata;
|
|
176
185
|
}
|
|
177
186
|
assertExistingCloudflareConfig(existing, config, false, options.approvedKv);
|
|
178
187
|
let updated = text;
|
|
@@ -185,10 +194,12 @@ async function prepareExistingCloudflareDeploy(options) {
|
|
|
185
194
|
insertSpaces: true,
|
|
186
195
|
tabSize: 2
|
|
187
196
|
} }));
|
|
197
|
+
assertCloudflareLinkUnchanged(options.root, pending);
|
|
198
|
+
const receipt = pending?.candidateReceipt;
|
|
188
199
|
saveCloudflareLink(options.root, {
|
|
189
|
-
...pending ?? {},
|
|
190
200
|
accountId: options.accountId,
|
|
191
|
-
workerName: config.name
|
|
201
|
+
workerName: config.name,
|
|
202
|
+
...receipt?.parentVersionId === existing.versionId ? { candidateReceipt: receipt } : {}
|
|
192
203
|
});
|
|
193
204
|
writeFileSync(options.configPath, updated);
|
|
194
205
|
persistCloudflareConfig(options.root);
|
|
@@ -318,7 +329,7 @@ function readCloudflareLocalState(root) {
|
|
|
318
329
|
const filePath = join(root, STATE_FILE);
|
|
319
330
|
if (!existsSync(filePath)) return {};
|
|
320
331
|
try {
|
|
321
|
-
const parsed = JSON.parse(readFileSync(filePath, "
|
|
332
|
+
const parsed = JSON.parse(readFileSync(filePath, "utf8"));
|
|
322
333
|
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) ? parsed : {};
|
|
323
334
|
} catch {
|
|
324
335
|
return {};
|
|
@@ -671,7 +682,8 @@ function normalizeContainerImagePaths(container, base) {
|
|
|
671
682
|
images: Object.fromEntries(Object.entries(value.images).map(([name, source]) => {
|
|
672
683
|
if (!source || typeof source !== "object" || Array.isArray(source)) return [name, source];
|
|
673
684
|
const image = { ...source };
|
|
674
|
-
|
|
685
|
+
if ("dockerfile" in image && typeof image.dockerfile === "string") image.dockerfile = resolve(base, image.dockerfile);
|
|
686
|
+
if ("build_context" in image && typeof image.build_context === "string") image.build_context = resolve(base, image.build_context);
|
|
675
687
|
return [name, image];
|
|
676
688
|
}))
|
|
677
689
|
};
|
|
@@ -725,8 +737,7 @@ function reconstructExpectedDurableObjectState(config, root, rootConfig, options
|
|
|
725
737
|
function hashWranglerUploader(root, resolveArgv = resolveCloudflareOperationArgv) {
|
|
726
738
|
let entry;
|
|
727
739
|
try {
|
|
728
|
-
|
|
729
|
-
entry = argv[argv.length - 1];
|
|
740
|
+
entry = resolveArgv(root).at(-1);
|
|
730
741
|
} catch {
|
|
731
742
|
return;
|
|
732
743
|
}
|
|
@@ -952,7 +963,7 @@ const MAX_WORKER_NAME_LENGTH = 63;
|
|
|
952
963
|
* config matches the name the build emits.
|
|
953
964
|
*/
|
|
954
965
|
function toValidWorkerName(raw) {
|
|
955
|
-
const name = raw.toLowerCase().
|
|
966
|
+
const name = raw.toLowerCase().replaceAll("_", "-").replaceAll(/[^a-z0-9-]/g, "-").replaceAll(/^-+|-+$/g, "").slice(0, MAX_WORKER_NAME_LENGTH).replaceAll(/-+$/g, "");
|
|
956
967
|
return name.length > 0 ? name : "my-worker";
|
|
957
968
|
}
|
|
958
969
|
/**
|
|
@@ -962,7 +973,7 @@ function toValidWorkerName(raw) {
|
|
|
962
973
|
function suffixedResourceName(workerName, suffix) {
|
|
963
974
|
const full = toValidWorkerName(`${workerName}-${suffix}`);
|
|
964
975
|
if (full.endsWith(`-${suffix}`)) return full;
|
|
965
|
-
return toValidWorkerName(`${toValidWorkerName(workerName).slice(0, MAX_WORKER_NAME_LENGTH - suffix.length - 1).
|
|
976
|
+
return toValidWorkerName(`${toValidWorkerName(workerName).slice(0, MAX_WORKER_NAME_LENGTH - suffix.length - 1).replaceAll(/-+$/g, "")}-${suffix}`);
|
|
966
977
|
}
|
|
967
978
|
/**
|
|
968
979
|
* Worker name as the CF plugin derives it (package.json `name`, then the directory name),
|
|
@@ -971,7 +982,7 @@ function suffixedResourceName(workerName, suffix) {
|
|
|
971
982
|
function deriveWorkerName(root) {
|
|
972
983
|
let pkgName;
|
|
973
984
|
try {
|
|
974
|
-
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "
|
|
985
|
+
const pkg = JSON.parse(readFileSync(join(root, "package.json"), "utf8"));
|
|
975
986
|
if (typeof pkg.name === "string" && pkg.name.length > 0) pkgName = pkg.name;
|
|
976
987
|
} catch {}
|
|
977
988
|
return toValidWorkerName(pkgName ?? basename(root) ?? "");
|
|
@@ -1027,9 +1038,10 @@ async function computeDesiredCloudflareResources(root, voidConfig, configPath, a
|
|
|
1027
1038
|
const authoredName = voidConfig.cloudflare?.d1_databases?.find((entry) => entry.binding === binding)?.database_name;
|
|
1028
1039
|
desired.d1 = {
|
|
1029
1040
|
binding,
|
|
1030
|
-
name: storedName
|
|
1041
|
+
name: storedName !== null && storedName !== void 0 && isRealD1Id(storedId) ? storedName : authoredName?.trim() || (basename(configPath) !== ".void-wrangler.jsonc" && storedName !== "default" ? storedName : void 0) || suffixedResourceName(workerName, "db"),
|
|
1031
1042
|
migrationsDir: migrationsDirRelative
|
|
1032
1043
|
};
|
|
1044
|
+
if (typeof voidConfig.database === "object" && voidConfig.database.readReplication !== void 0) desired.d1.readReplication = voidConfig.database.readReplication;
|
|
1033
1045
|
reasons.set(binding, databaseReason);
|
|
1034
1046
|
}
|
|
1035
1047
|
if (bindings.needsKV) {
|
|
@@ -1109,7 +1121,7 @@ async function validateEmittedVarsDefault(input, env) {
|
|
|
1109
1121
|
}
|
|
1110
1122
|
function resolveGeneratedDeployConfigPathDefault(root) {
|
|
1111
1123
|
const pointerPath = deployPointerPath(root);
|
|
1112
|
-
const pointer = JSON.parse(readFileSync(pointerPath, "
|
|
1124
|
+
const pointer = JSON.parse(readFileSync(pointerPath, "utf8"));
|
|
1113
1125
|
if (typeof pointer.configPath !== "string" || pointer.configPath.length === 0) throw new Error(`Generated Cloudflare deploy pointer ${pointerPath} has no configPath.`);
|
|
1114
1126
|
return resolve(dirname(pointerPath), pointer.configPath);
|
|
1115
1127
|
}
|
|
@@ -1154,6 +1166,7 @@ function hasConfiguredVoidWorkerRoutingRules(routing) {
|
|
|
1154
1166
|
function removeDeployPointer(root) {
|
|
1155
1167
|
rmSync(deployPointerPath(root), { force: true });
|
|
1156
1168
|
}
|
|
1169
|
+
const byName = (left, right) => String(left.name).localeCompare(String(right.name));
|
|
1157
1170
|
/**
|
|
1158
1171
|
* Check the generated deploy config before upload: the pinned account and Worker name, required
|
|
1159
1172
|
* secrets, and every binding, container, migration, queue and cron against the pre-build pins,
|
|
@@ -1168,7 +1181,7 @@ function verifyGeneratedDeployConfig(root, expected) {
|
|
|
1168
1181
|
};
|
|
1169
1182
|
let redirectedPath;
|
|
1170
1183
|
try {
|
|
1171
|
-
const parsed = JSON.parse(readFileSync(deployConfigPath, "
|
|
1184
|
+
const parsed = JSON.parse(readFileSync(deployConfigPath, "utf8"));
|
|
1172
1185
|
if (typeof parsed.configPath !== "string" || parsed.configPath.length === 0) return {
|
|
1173
1186
|
ok: false,
|
|
1174
1187
|
reason: `${deployConfigPath} has no "configPath" pointer.`
|
|
@@ -1329,7 +1342,6 @@ function verifyGeneratedDeployConfig(root, expected) {
|
|
|
1329
1342
|
reason: "generated config durable_objects bindings could not be verified."
|
|
1330
1343
|
};
|
|
1331
1344
|
}
|
|
1332
|
-
const byName = (left, right) => String(left.name).localeCompare(String(right.name));
|
|
1333
1345
|
if (!isDeepStrictEqual([...emittedBindings].sort(byName), [...expected.expectedDurableObjectBindings].sort(byName))) return {
|
|
1334
1346
|
ok: false,
|
|
1335
1347
|
reason: "generated config durable_objects bindings differ from the pre-build binding set — refusing to deploy a binding the build added, removed, or retargeted."
|
|
@@ -1460,7 +1472,7 @@ async function validateCloudflarePostBuildEnv(options) {
|
|
|
1460
1472
|
return false;
|
|
1461
1473
|
}
|
|
1462
1474
|
const emittedVars = emitted.vars;
|
|
1463
|
-
if (authEnabled && Object.
|
|
1475
|
+
if (authEnabled && Object.hasOwn(emittedVars, "BETTER_AUTH_SECRET")) {
|
|
1464
1476
|
log$1.error([
|
|
1465
1477
|
`deploy: ${BETTER_AUTH_SECRET_NAME} must be stored as a Cloudflare Worker secret, not a plaintext worker var.`,
|
|
1466
1478
|
"Remove it from Worker vars and rerun. This deploy command preserves an",
|
|
@@ -1513,390 +1525,8 @@ async function validateCloudflarePostBuildEnv(options) {
|
|
|
1513
1525
|
}
|
|
1514
1526
|
return true;
|
|
1515
1527
|
}
|
|
1516
|
-
// ../../node_modules/.pnpm/ci-info@4.5.0/node_modules/ci-info/vendors.json
|
|
1517
|
-
var require_vendors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
1518
|
-
module.exports = [
|
|
1519
|
-
{
|
|
1520
|
-
"name": "Agola CI",
|
|
1521
|
-
"constant": "AGOLA",
|
|
1522
|
-
"env": "AGOLA_GIT_REF",
|
|
1523
|
-
"pr": "AGOLA_PULL_REQUEST_ID"
|
|
1524
|
-
},
|
|
1525
|
-
{
|
|
1526
|
-
"name": "Alpic",
|
|
1527
|
-
"constant": "ALPIC",
|
|
1528
|
-
"env": "ALPIC_HOST"
|
|
1529
|
-
},
|
|
1530
|
-
{
|
|
1531
|
-
"name": "Appcircle",
|
|
1532
|
-
"constant": "APPCIRCLE",
|
|
1533
|
-
"env": "AC_APPCIRCLE",
|
|
1534
|
-
"pr": {
|
|
1535
|
-
"env": "AC_GIT_PR",
|
|
1536
|
-
"ne": "false"
|
|
1537
|
-
}
|
|
1538
|
-
},
|
|
1539
|
-
{
|
|
1540
|
-
"name": "AppVeyor",
|
|
1541
|
-
"constant": "APPVEYOR",
|
|
1542
|
-
"env": "APPVEYOR",
|
|
1543
|
-
"pr": "APPVEYOR_PULL_REQUEST_NUMBER"
|
|
1544
|
-
},
|
|
1545
|
-
{
|
|
1546
|
-
"name": "AWS CodeBuild",
|
|
1547
|
-
"constant": "CODEBUILD",
|
|
1548
|
-
"env": "CODEBUILD_BUILD_ARN",
|
|
1549
|
-
"pr": {
|
|
1550
|
-
"env": "CODEBUILD_WEBHOOK_EVENT",
|
|
1551
|
-
"any": [
|
|
1552
|
-
"PULL_REQUEST_CREATED",
|
|
1553
|
-
"PULL_REQUEST_UPDATED",
|
|
1554
|
-
"PULL_REQUEST_REOPENED"
|
|
1555
|
-
]
|
|
1556
|
-
}
|
|
1557
|
-
},
|
|
1558
|
-
{
|
|
1559
|
-
"name": "Azure Pipelines",
|
|
1560
|
-
"constant": "AZURE_PIPELINES",
|
|
1561
|
-
"env": "TF_BUILD",
|
|
1562
|
-
"pr": { "BUILD_REASON": "PullRequest" }
|
|
1563
|
-
},
|
|
1564
|
-
{
|
|
1565
|
-
"name": "Bamboo",
|
|
1566
|
-
"constant": "BAMBOO",
|
|
1567
|
-
"env": "bamboo_planKey"
|
|
1568
|
-
},
|
|
1569
|
-
{
|
|
1570
|
-
"name": "Bitbucket Pipelines",
|
|
1571
|
-
"constant": "BITBUCKET",
|
|
1572
|
-
"env": "BITBUCKET_COMMIT",
|
|
1573
|
-
"pr": "BITBUCKET_PR_ID"
|
|
1574
|
-
},
|
|
1575
|
-
{
|
|
1576
|
-
"name": "Bitrise",
|
|
1577
|
-
"constant": "BITRISE",
|
|
1578
|
-
"env": "BITRISE_IO",
|
|
1579
|
-
"pr": "BITRISE_PULL_REQUEST"
|
|
1580
|
-
},
|
|
1581
|
-
{
|
|
1582
|
-
"name": "Buddy",
|
|
1583
|
-
"constant": "BUDDY",
|
|
1584
|
-
"env": "BUDDY_WORKSPACE_ID",
|
|
1585
|
-
"pr": "BUDDY_EXECUTION_PULL_REQUEST_ID"
|
|
1586
|
-
},
|
|
1587
|
-
{
|
|
1588
|
-
"name": "Buildkite",
|
|
1589
|
-
"constant": "BUILDKITE",
|
|
1590
|
-
"env": "BUILDKITE",
|
|
1591
|
-
"pr": {
|
|
1592
|
-
"env": "BUILDKITE_PULL_REQUEST",
|
|
1593
|
-
"ne": "false"
|
|
1594
|
-
}
|
|
1595
|
-
},
|
|
1596
|
-
{
|
|
1597
|
-
"name": "Capawesome Cloud",
|
|
1598
|
-
"constant": "CAPAWESOME_CLOUD",
|
|
1599
|
-
"env": "CAPAWESOME_CLOUD"
|
|
1600
|
-
},
|
|
1601
|
-
{
|
|
1602
|
-
"name": "CircleCI",
|
|
1603
|
-
"constant": "CIRCLE",
|
|
1604
|
-
"env": "CIRCLECI",
|
|
1605
|
-
"pr": "CIRCLE_PULL_REQUEST"
|
|
1606
|
-
},
|
|
1607
|
-
{
|
|
1608
|
-
"name": "Cirrus CI",
|
|
1609
|
-
"constant": "CIRRUS",
|
|
1610
|
-
"env": "CIRRUS_CI",
|
|
1611
|
-
"pr": "CIRRUS_PR"
|
|
1612
|
-
},
|
|
1613
|
-
{
|
|
1614
|
-
"name": "Cloudflare Pages",
|
|
1615
|
-
"constant": "CLOUDFLARE_PAGES",
|
|
1616
|
-
"env": "CF_PAGES"
|
|
1617
|
-
},
|
|
1618
|
-
{
|
|
1619
|
-
"name": "Cloudflare Workers",
|
|
1620
|
-
"constant": "CLOUDFLARE_WORKERS",
|
|
1621
|
-
"env": "WORKERS_CI"
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
"name": "Codefresh",
|
|
1625
|
-
"constant": "CODEFRESH",
|
|
1626
|
-
"env": "CF_BUILD_ID",
|
|
1627
|
-
"pr": { "any": ["CF_PULL_REQUEST_NUMBER", "CF_PULL_REQUEST_ID"] }
|
|
1628
|
-
},
|
|
1629
|
-
{
|
|
1630
|
-
"name": "Codemagic",
|
|
1631
|
-
"constant": "CODEMAGIC",
|
|
1632
|
-
"env": "CM_BUILD_ID",
|
|
1633
|
-
"pr": "CM_PULL_REQUEST"
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
"name": "Codeship",
|
|
1637
|
-
"constant": "CODESHIP",
|
|
1638
|
-
"env": { "CI_NAME": "codeship" }
|
|
1639
|
-
},
|
|
1640
|
-
{
|
|
1641
|
-
"name": "Drone",
|
|
1642
|
-
"constant": "DRONE",
|
|
1643
|
-
"env": "DRONE",
|
|
1644
|
-
"pr": { "DRONE_BUILD_EVENT": "pull_request" }
|
|
1645
|
-
},
|
|
1646
|
-
{
|
|
1647
|
-
"name": "dsari",
|
|
1648
|
-
"constant": "DSARI",
|
|
1649
|
-
"env": "DSARI"
|
|
1650
|
-
},
|
|
1651
|
-
{
|
|
1652
|
-
"name": "Earthly",
|
|
1653
|
-
"constant": "EARTHLY",
|
|
1654
|
-
"env": "EARTHLY_CI"
|
|
1655
|
-
},
|
|
1656
|
-
{
|
|
1657
|
-
"name": "Expo Application Services",
|
|
1658
|
-
"constant": "EAS",
|
|
1659
|
-
"env": "EAS_BUILD"
|
|
1660
|
-
},
|
|
1661
|
-
{
|
|
1662
|
-
"name": "Gerrit",
|
|
1663
|
-
"constant": "GERRIT",
|
|
1664
|
-
"env": "GERRIT_PROJECT"
|
|
1665
|
-
},
|
|
1666
|
-
{
|
|
1667
|
-
"name": "Gitea Actions",
|
|
1668
|
-
"constant": "GITEA_ACTIONS",
|
|
1669
|
-
"env": "GITEA_ACTIONS"
|
|
1670
|
-
},
|
|
1671
|
-
{
|
|
1672
|
-
"name": "GitHub Actions",
|
|
1673
|
-
"constant": "GITHUB_ACTIONS",
|
|
1674
|
-
"env": "GITHUB_ACTIONS",
|
|
1675
|
-
"pr": { "GITHUB_EVENT_NAME": "pull_request" }
|
|
1676
|
-
},
|
|
1677
|
-
{
|
|
1678
|
-
"name": "GitLab CI",
|
|
1679
|
-
"constant": "GITLAB",
|
|
1680
|
-
"env": "GITLAB_CI",
|
|
1681
|
-
"pr": "CI_MERGE_REQUEST_ID"
|
|
1682
|
-
},
|
|
1683
|
-
{
|
|
1684
|
-
"name": "GoCD",
|
|
1685
|
-
"constant": "GOCD",
|
|
1686
|
-
"env": "GO_PIPELINE_LABEL"
|
|
1687
|
-
},
|
|
1688
|
-
{
|
|
1689
|
-
"name": "Google Cloud Build",
|
|
1690
|
-
"constant": "GOOGLE_CLOUD_BUILD",
|
|
1691
|
-
"env": "BUILDER_OUTPUT"
|
|
1692
|
-
},
|
|
1693
|
-
{
|
|
1694
|
-
"name": "Harness CI",
|
|
1695
|
-
"constant": "HARNESS",
|
|
1696
|
-
"env": "HARNESS_BUILD_ID"
|
|
1697
|
-
},
|
|
1698
|
-
{
|
|
1699
|
-
"name": "Heroku",
|
|
1700
|
-
"constant": "HEROKU",
|
|
1701
|
-
"env": {
|
|
1702
|
-
"env": "NODE",
|
|
1703
|
-
"includes": "/app/.heroku/node/bin/node"
|
|
1704
|
-
}
|
|
1705
|
-
},
|
|
1706
|
-
{
|
|
1707
|
-
"name": "Hudson",
|
|
1708
|
-
"constant": "HUDSON",
|
|
1709
|
-
"env": "HUDSON_URL"
|
|
1710
|
-
},
|
|
1711
|
-
{
|
|
1712
|
-
"name": "Jenkins",
|
|
1713
|
-
"constant": "JENKINS",
|
|
1714
|
-
"env": ["JENKINS_URL", "BUILD_ID"],
|
|
1715
|
-
"pr": { "any": ["ghprbPullId", "CHANGE_ID"] }
|
|
1716
|
-
},
|
|
1717
|
-
{
|
|
1718
|
-
"name": "LayerCI",
|
|
1719
|
-
"constant": "LAYERCI",
|
|
1720
|
-
"env": "LAYERCI",
|
|
1721
|
-
"pr": "LAYERCI_PULL_REQUEST"
|
|
1722
|
-
},
|
|
1723
|
-
{
|
|
1724
|
-
"name": "Magnum CI",
|
|
1725
|
-
"constant": "MAGNUM",
|
|
1726
|
-
"env": "MAGNUM"
|
|
1727
|
-
},
|
|
1728
|
-
{
|
|
1729
|
-
"name": "Netlify CI",
|
|
1730
|
-
"constant": "NETLIFY",
|
|
1731
|
-
"env": "NETLIFY",
|
|
1732
|
-
"pr": {
|
|
1733
|
-
"env": "PULL_REQUEST",
|
|
1734
|
-
"ne": "false"
|
|
1735
|
-
}
|
|
1736
|
-
},
|
|
1737
|
-
{
|
|
1738
|
-
"name": "Nevercode",
|
|
1739
|
-
"constant": "NEVERCODE",
|
|
1740
|
-
"env": "NEVERCODE",
|
|
1741
|
-
"pr": {
|
|
1742
|
-
"env": "NEVERCODE_PULL_REQUEST",
|
|
1743
|
-
"ne": "false"
|
|
1744
|
-
}
|
|
1745
|
-
},
|
|
1746
|
-
{
|
|
1747
|
-
"name": "Prow",
|
|
1748
|
-
"constant": "PROW",
|
|
1749
|
-
"env": "PROW_JOB_ID"
|
|
1750
|
-
},
|
|
1751
|
-
{
|
|
1752
|
-
"name": "ReleaseHub",
|
|
1753
|
-
"constant": "RELEASEHUB",
|
|
1754
|
-
"env": "RELEASE_BUILD_ID"
|
|
1755
|
-
},
|
|
1756
|
-
{
|
|
1757
|
-
"name": "Render",
|
|
1758
|
-
"constant": "RENDER",
|
|
1759
|
-
"env": "RENDER",
|
|
1760
|
-
"pr": { "IS_PULL_REQUEST": "true" }
|
|
1761
|
-
},
|
|
1762
|
-
{
|
|
1763
|
-
"name": "RWX",
|
|
1764
|
-
"constant": "RWX",
|
|
1765
|
-
"env": "RWX"
|
|
1766
|
-
},
|
|
1767
|
-
{
|
|
1768
|
-
"name": "Sail CI",
|
|
1769
|
-
"constant": "SAIL",
|
|
1770
|
-
"env": "SAILCI",
|
|
1771
|
-
"pr": "SAIL_PULL_REQUEST_NUMBER"
|
|
1772
|
-
},
|
|
1773
|
-
{
|
|
1774
|
-
"name": "Screwdriver",
|
|
1775
|
-
"constant": "SCREWDRIVER",
|
|
1776
|
-
"env": "SCREWDRIVER",
|
|
1777
|
-
"pr": {
|
|
1778
|
-
"env": "SD_PULL_REQUEST",
|
|
1779
|
-
"ne": "false"
|
|
1780
|
-
}
|
|
1781
|
-
},
|
|
1782
|
-
{
|
|
1783
|
-
"name": "Semaphore",
|
|
1784
|
-
"constant": "SEMAPHORE",
|
|
1785
|
-
"env": "SEMAPHORE",
|
|
1786
|
-
"pr": "PULL_REQUEST_NUMBER"
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
"name": "Sourcehut",
|
|
1790
|
-
"constant": "SOURCEHUT",
|
|
1791
|
-
"env": { "CI_NAME": "sourcehut" }
|
|
1792
|
-
},
|
|
1793
|
-
{
|
|
1794
|
-
"name": "Strider CD",
|
|
1795
|
-
"constant": "STRIDER",
|
|
1796
|
-
"env": "STRIDER"
|
|
1797
|
-
},
|
|
1798
|
-
{
|
|
1799
|
-
"name": "TaskCluster",
|
|
1800
|
-
"constant": "TASKCLUSTER",
|
|
1801
|
-
"env": ["TASK_ID", "RUN_ID"]
|
|
1802
|
-
},
|
|
1803
|
-
{
|
|
1804
|
-
"name": "TeamCity",
|
|
1805
|
-
"constant": "TEAMCITY",
|
|
1806
|
-
"env": "TEAMCITY_VERSION"
|
|
1807
|
-
},
|
|
1808
|
-
{
|
|
1809
|
-
"name": "Travis CI",
|
|
1810
|
-
"constant": "TRAVIS",
|
|
1811
|
-
"env": "TRAVIS",
|
|
1812
|
-
"pr": {
|
|
1813
|
-
"env": "TRAVIS_PULL_REQUEST",
|
|
1814
|
-
"ne": "false"
|
|
1815
|
-
}
|
|
1816
|
-
},
|
|
1817
|
-
{
|
|
1818
|
-
"name": "Vela",
|
|
1819
|
-
"constant": "VELA",
|
|
1820
|
-
"env": "VELA",
|
|
1821
|
-
"pr": { "VELA_PULL_REQUEST": "1" }
|
|
1822
|
-
},
|
|
1823
|
-
{
|
|
1824
|
-
"name": "Vercel",
|
|
1825
|
-
"constant": "VERCEL",
|
|
1826
|
-
"env": { "any": ["NOW_BUILDER", "VERCEL"] },
|
|
1827
|
-
"pr": "VERCEL_GIT_PULL_REQUEST_ID"
|
|
1828
|
-
},
|
|
1829
|
-
{
|
|
1830
|
-
"name": "Visual Studio App Center",
|
|
1831
|
-
"constant": "APPCENTER",
|
|
1832
|
-
"env": "APPCENTER_BUILD_ID"
|
|
1833
|
-
},
|
|
1834
|
-
{
|
|
1835
|
-
"name": "Woodpecker",
|
|
1836
|
-
"constant": "WOODPECKER",
|
|
1837
|
-
"env": { "CI": "woodpecker" },
|
|
1838
|
-
"pr": { "CI_BUILD_EVENT": "pull_request" }
|
|
1839
|
-
},
|
|
1840
|
-
{
|
|
1841
|
-
"name": "Xcode Cloud",
|
|
1842
|
-
"constant": "XCODE_CLOUD",
|
|
1843
|
-
"env": "CI_XCODE_PROJECT",
|
|
1844
|
-
"pr": "CI_PULL_REQUEST_NUMBER"
|
|
1845
|
-
},
|
|
1846
|
-
{
|
|
1847
|
-
"name": "Xcode Server",
|
|
1848
|
-
"constant": "XCODE_SERVER",
|
|
1849
|
-
"env": "XCS"
|
|
1850
|
-
}
|
|
1851
|
-
];
|
|
1852
|
-
}));
|
|
1853
1528
|
// src/cli/deploy-cloudflare-auth.ts
|
|
1854
|
-
var import_ci_info = (
|
|
1855
|
-
const vendors = require_vendors();
|
|
1856
|
-
const env = process.env;
|
|
1857
|
-
Object.defineProperty(exports, "_vendors", { value: vendors.map(function(v) {
|
|
1858
|
-
return v.constant;
|
|
1859
|
-
}) });
|
|
1860
|
-
exports.name = null;
|
|
1861
|
-
exports.isPR = null;
|
|
1862
|
-
exports.id = null;
|
|
1863
|
-
if (env.CI !== "false") vendors.forEach(function(vendor) {
|
|
1864
|
-
const isCI = (Array.isArray(vendor.env) ? vendor.env : [vendor.env]).every(function(obj) {
|
|
1865
|
-
return checkEnv(obj);
|
|
1866
|
-
});
|
|
1867
|
-
exports[vendor.constant] = isCI;
|
|
1868
|
-
if (!isCI) return;
|
|
1869
|
-
exports.name = vendor.name;
|
|
1870
|
-
exports.isPR = checkPR(vendor);
|
|
1871
|
-
exports.id = vendor.constant;
|
|
1872
|
-
});
|
|
1873
|
-
exports.isCI = !!(env.CI !== "false" && (env.BUILD_ID || env.BUILD_NUMBER || env.CI || env.CI_APP_ID || env.CI_BUILD_ID || env.CI_BUILD_NUMBER || env.CI_NAME || env.CONTINUOUS_INTEGRATION || env.RUN_ID || exports.name || false));
|
|
1874
|
-
function checkEnv(obj) {
|
|
1875
|
-
if (typeof obj === "string") return !!env[obj];
|
|
1876
|
-
if ("env" in obj) return env[obj.env] && env[obj.env].includes(obj.includes);
|
|
1877
|
-
if ("any" in obj) return obj.any.some(function(k) {
|
|
1878
|
-
return !!env[k];
|
|
1879
|
-
});
|
|
1880
|
-
return Object.keys(obj).every(function(k) {
|
|
1881
|
-
return env[k] === obj[k];
|
|
1882
|
-
});
|
|
1883
|
-
}
|
|
1884
|
-
function checkPR(vendor) {
|
|
1885
|
-
switch (typeof vendor.pr) {
|
|
1886
|
-
case "string": return !!env[vendor.pr];
|
|
1887
|
-
case "object": if ("env" in vendor.pr) {
|
|
1888
|
-
if ("any" in vendor.pr) return vendor.pr.any.some(function(key) {
|
|
1889
|
-
return env[vendor.pr.env] === key;
|
|
1890
|
-
});
|
|
1891
|
-
else return vendor.pr.env in env && env[vendor.pr.env] !== vendor.pr.ne;
|
|
1892
|
-
} else if ("any" in vendor.pr) return vendor.pr.any.some(function(key) {
|
|
1893
|
-
return !!env[key];
|
|
1894
|
-
});
|
|
1895
|
-
else return checkEnv(vendor.pr);
|
|
1896
|
-
default: return null;
|
|
1897
|
-
}
|
|
1898
|
-
}
|
|
1899
|
-
})))();
|
|
1529
|
+
var import_ci_info = require_ci_info();
|
|
1900
1530
|
/** Run typed provider operations in the pinned account and API context. */
|
|
1901
1531
|
function createDeployWranglerRunner(root, accountId, apiBaseUrl) {
|
|
1902
1532
|
const runner = createCloudflareProcessRunner({
|
|
@@ -1969,6 +1599,15 @@ function isWranglerNonInteractiveOrCI() {
|
|
|
1969
1599
|
return import_ci_info.isCI || !(process.stdin.isTTY && process.stdout.isTTY);
|
|
1970
1600
|
}
|
|
1971
1601
|
const GLOBAL_API_KEY_SESSION = "the session uses a Global API Key (CLOUDFLARE_API_KEY), which this step cannot use. Set CLOUDFLARE_API_TOKEN, or unset CLOUDFLARE_API_KEY and run `void cloudflare login`, then retry.";
|
|
1602
|
+
const fail = (status, signal, stderr) => ({
|
|
1603
|
+
ok: false,
|
|
1604
|
+
failure: {
|
|
1605
|
+
status: status === 0 ? 1 : status,
|
|
1606
|
+
...signal ? { signal } : {},
|
|
1607
|
+
stdout: "",
|
|
1608
|
+
stderr
|
|
1609
|
+
}
|
|
1610
|
+
});
|
|
1972
1611
|
/**
|
|
1973
1612
|
* Read the current Cloudflare session bearer through the pinned deploy runner, for API calls
|
|
1974
1613
|
* Void makes itself. The token goes only to the caller. A failure is built fresh from the
|
|
@@ -1976,15 +1615,6 @@ const GLOBAL_API_KEY_SESSION = "the session uses a Global API Key (CLOUDFLARE_AP
|
|
|
1976
1615
|
* or data, so an auth failure can never be read as a Cloudflare upload error.
|
|
1977
1616
|
*/
|
|
1978
1617
|
async function readWranglerAuthToken(runWrangler, configPath) {
|
|
1979
|
-
const fail = (status, signal, stderr) => ({
|
|
1980
|
-
ok: false,
|
|
1981
|
-
failure: {
|
|
1982
|
-
status: status === 0 ? 1 : status,
|
|
1983
|
-
...signal ? { signal } : {},
|
|
1984
|
-
stdout: "",
|
|
1985
|
-
stderr
|
|
1986
|
-
}
|
|
1987
|
-
});
|
|
1988
1618
|
let result;
|
|
1989
1619
|
try {
|
|
1990
1620
|
result = await Promise.resolve(runWrangler({
|
|
@@ -2072,8 +1702,6 @@ async function ensureCloudflareAuthSecret(options) {
|
|
|
2072
1702
|
if (!(await list(false)).includes("BETTER_AUTH_SECRET")) throw new CloudflareAuthSecretError(`deploy: Cloudflare reported success but ${BETTER_AUTH_SECRET_NAME} was not present afterward. No worker was uploaded; retry once Cloudflare secret storage is available.`, "verification-failed");
|
|
2073
1703
|
return { created: true };
|
|
2074
1704
|
}
|
|
2075
|
-
// src/cli/node-buffer.ts
|
|
2076
|
-
const Buffer$2 = Buffer$1;
|
|
2077
1705
|
// src/cli/cf-version-api.ts
|
|
2078
1706
|
var CloudflareApiError = class extends Error {
|
|
2079
1707
|
status;
|
|
@@ -2124,15 +1752,15 @@ async function readPackageDependencies(directory) {
|
|
|
2124
1752
|
return;
|
|
2125
1753
|
}
|
|
2126
1754
|
}
|
|
2127
|
-
const moduleContentTypes =
|
|
2128
|
-
esm
|
|
2129
|
-
cjs
|
|
2130
|
-
wasm
|
|
2131
|
-
text
|
|
2132
|
-
data
|
|
2133
|
-
json
|
|
2134
|
-
sourcemap
|
|
2135
|
-
|
|
1755
|
+
const moduleContentTypes = /* @__PURE__ */ new Map([
|
|
1756
|
+
["esm", "application/javascript+module"],
|
|
1757
|
+
["cjs", "application/javascript"],
|
|
1758
|
+
["wasm", "application/wasm"],
|
|
1759
|
+
["text", "text/plain"],
|
|
1760
|
+
["data", "application/octet-stream"],
|
|
1761
|
+
["json", "text/plain"],
|
|
1762
|
+
["sourcemap", "application/source-map"]
|
|
1763
|
+
]);
|
|
2136
1764
|
function bindingsFromOutput(env, workerName, activeSecrets, explicitSecrets) {
|
|
2137
1765
|
const inherited = new Map(activeSecrets.bindings.map((binding) => [binding.name, binding.type]));
|
|
2138
1766
|
const names = /* @__PURE__ */ new Set([
|
|
@@ -2479,18 +2107,26 @@ async function apiResult(url, token, method, body, verifyUploader, timeout = 12e
|
|
|
2479
2107
|
const result = record(parsed?.result);
|
|
2480
2108
|
if (!response.ok || parsed?.success !== true || !result) {
|
|
2481
2109
|
const error = Array.isArray(parsed?.errors) ? record(parsed.errors[0]) : null;
|
|
2482
|
-
const code = Number.isSafeInteger(error
|
|
2110
|
+
const code = error && Number.isSafeInteger(error.code) ? ` [code: ${error.code}]` : "";
|
|
2483
2111
|
throw new CloudflareApiError(`Cloudflare version upload failed (${response.status})${code}.`, response.status, typeof error?.code === "number" ? error.code : void 0);
|
|
2484
2112
|
}
|
|
2485
2113
|
return result;
|
|
2486
2114
|
}
|
|
2487
2115
|
/** Durable Object namespace bindings that point at this Worker's own class. */
|
|
2488
2116
|
function localNamespaceBindings(bindings, className, workerName) {
|
|
2489
|
-
return bindings.
|
|
2117
|
+
return bindings.flatMap((item) => {
|
|
2118
|
+
const binding = record(item);
|
|
2119
|
+
return binding?.type === "durable_object_namespace" && binding.class_name === className && (binding.script_name === void 0 || binding.script_name === workerName) && binding.environment === void 0 && binding.dispatch_namespace === void 0 ? [binding] : [];
|
|
2120
|
+
});
|
|
2490
2121
|
}
|
|
2491
2122
|
function assertContainerApplicationIdentity(application, plan, namespace) {
|
|
2492
2123
|
if (application.id !== namespace || application.name !== plan.name || application.scheduling_policy !== "durable_object" || record(application.durable_objects)?.namespace_id !== namespace) throw new Error(`Cloudflare Container ${plan.name} application identity does not match the uploaded namespace.`);
|
|
2493
2124
|
}
|
|
2125
|
+
function compareFlagValues(left, right) {
|
|
2126
|
+
const a = String(left);
|
|
2127
|
+
const b = String(right);
|
|
2128
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
2129
|
+
}
|
|
2494
2130
|
function assertContainerApplicationSettings(application, plan) {
|
|
2495
2131
|
const desired = record(plan.settings.configuration) ?? {};
|
|
2496
2132
|
const current = record(application.configuration) ?? {};
|
|
@@ -2502,7 +2138,7 @@ function assertContainerApplicationSettings(application, plan) {
|
|
|
2502
2138
|
}
|
|
2503
2139
|
if (key === "experimental_flags" && Array.isArray(value)) {
|
|
2504
2140
|
const flags = current.experimental_flags ?? [];
|
|
2505
|
-
return !Array.isArray(flags) || !isDeepStrictEqual([...flags].sort(), [...value].sort());
|
|
2141
|
+
return !Array.isArray(flags) || !isDeepStrictEqual([...flags].sort(compareFlagValues), [...value].sort(compareFlagValues));
|
|
2506
2142
|
}
|
|
2507
2143
|
return !isDeepStrictEqual(current[key] ?? [], value);
|
|
2508
2144
|
});
|
|
@@ -2539,7 +2175,7 @@ function containerPlansFromOutput(containers, exports, bindings) {
|
|
|
2539
2175
|
const [className, raw] = classes[0];
|
|
2540
2176
|
const declaration = record(raw);
|
|
2541
2177
|
const localBindings = bindings.filter((binding) => binding.type === "durable_object_namespace" && binding.class_name === className && binding.script_name === void 0);
|
|
2542
|
-
if (declaration
|
|
2178
|
+
if (declaration?.storage !== "sqlite" || localBindings.length === 0) throw new Error(`Cloudflare Container ${config.name} needs a local SQLite Durable Object binding.`);
|
|
2543
2179
|
const unsafe = record(config.unsafe);
|
|
2544
2180
|
const configuration = record(unsafe?.configuration);
|
|
2545
2181
|
if (unsafe && Object.keys(unsafe).some((key) => key !== "configuration") || configuration && Object.keys(configuration).some((key) => key !== "experimental_flags")) throw new Error(`Cloudflare Container ${config.name} has an unsupported setting.`);
|
|
@@ -2603,11 +2239,11 @@ async function prepareContainerMetadata(options) {
|
|
|
2603
2239
|
const images = {};
|
|
2604
2240
|
for (const [name, raw] of Object.entries(plan.images)) {
|
|
2605
2241
|
const source = record(raw);
|
|
2606
|
-
const reference = requiredString(source
|
|
2242
|
+
const reference = requiredString(source?.localReference ?? source?.reference, `Container ${plan.name} image`);
|
|
2607
2243
|
let image = prepared.get(reference);
|
|
2608
2244
|
if (!image) {
|
|
2609
2245
|
image = reference;
|
|
2610
|
-
if (source
|
|
2246
|
+
if (source?.localReference !== void 0) {
|
|
2611
2247
|
if (!options.runCf || !options.verifyUploader()) throw new Error("The verified Cloudflare Container image uploader is unavailable.");
|
|
2612
2248
|
const pushed = await options.runCf([
|
|
2613
2249
|
"containers",
|
|
@@ -2623,7 +2259,7 @@ async function prepareContainerMetadata(options) {
|
|
|
2623
2259
|
if (pushed.status !== 0 || pushed.signal || pushed.error) throw new Error("Cloudflare Container image push failed.");
|
|
2624
2260
|
const matches = [...`${pushed.stdout}\n${pushed.stderr}`.matchAll(/Pushed image:\s*(\S+)/g)];
|
|
2625
2261
|
const remote = matches.length === 1 ? matches[0][1] : "";
|
|
2626
|
-
if (!remote.startsWith(`registry.cloudflare.com/${options.accountId}/`) ||
|
|
2262
|
+
if (!remote.startsWith(`registry.cloudflare.com/${options.accountId}/`) || Array.from(remote).some((character) => character.charCodeAt(0) <= 32 || character.charCodeAt(0) === 127)) throw new Error("Cloudflare Container image push did not return the verified account registry.");
|
|
2627
2263
|
image = await dockerImageDigest(remote, Math.min(12e4, remaining()), options.verifyUploader);
|
|
2628
2264
|
}
|
|
2629
2265
|
for (;;) {
|
|
@@ -2661,7 +2297,8 @@ async function ensureContainerApplications(options) {
|
|
|
2661
2297
|
const metadata = record(record(version.resources)?.script_runtime)?.containers;
|
|
2662
2298
|
if (!Array.isArray(metadata) || metadata.length !== options.containers.length || options.containers.some((expected) => {
|
|
2663
2299
|
const matching = metadata.map(record).filter((entry) => entry !== null && entry.name === expected.name && entry.class_name === expected.class_name);
|
|
2664
|
-
|
|
2300
|
+
const actual = matching[0];
|
|
2301
|
+
return matching.length !== 1 || !actual || !isDeepStrictEqual(actual.images ?? {}, expected.images ?? {});
|
|
2665
2302
|
})) throw new Error("The uploaded Worker version did not retain the verified Container image metadata.");
|
|
2666
2303
|
for (const plan of options.plans) {
|
|
2667
2304
|
const matches = localNamespaceBindings(versionBindings, plan.className, options.workerName);
|
|
@@ -2819,7 +2456,7 @@ async function uploadPinnedCloudflareVersion(options) {
|
|
|
2819
2456
|
if (bindings.some((binding) => binding.type === "assets") && !options.output.assetsDirectory) throw new Error("The Cloudflare Worker has an assets binding without verified assets.");
|
|
2820
2457
|
const modules = [];
|
|
2821
2458
|
for (const [name, entry] of Object.entries(config.manifest.modules)) {
|
|
2822
|
-
const type = moduleContentTypes
|
|
2459
|
+
const type = moduleContentTypes.get(entry.type);
|
|
2823
2460
|
if (!type || name.startsWith("/") || name.split("/").includes("..")) throw new Error(`Cloudflare Worker module ${name} cannot be uploaded with pinned secrets.`);
|
|
2824
2461
|
modules.push({
|
|
2825
2462
|
name,
|
|
@@ -2831,7 +2468,7 @@ async function uploadPinnedCloudflareVersion(options) {
|
|
|
2831
2468
|
if (assetHeaders !== void 0) modules.push({
|
|
2832
2469
|
name: "_headers",
|
|
2833
2470
|
content_type: "text/plain",
|
|
2834
|
-
content_base64: Buffer
|
|
2471
|
+
content_base64: Buffer.from(assetHeaders).toString("base64")
|
|
2835
2472
|
});
|
|
2836
2473
|
await preflightWorkflowExports({
|
|
2837
2474
|
exports,
|
|
@@ -3137,9 +2774,9 @@ function createCfCommand(options) {
|
|
|
3137
2774
|
}
|
|
3138
2775
|
const output = Buffer.concat(stdout).toString("utf8");
|
|
3139
2776
|
const diagnostic = Buffer.concat(stderr).toString("utf8");
|
|
3140
|
-
const completed = typeof status === "number" && signal
|
|
2777
|
+
const completed = typeof status === "number" && (signal === null || signal === void 0) && (error === null || error === void 0);
|
|
3141
2778
|
const code = completed ? (output + "\n" + diagnostic).match(/\[(?:code:\s*)?(\d{4,})\]/)?.[1] : void 0;
|
|
3142
|
-
const missingUploadTarget = completed && status !== 0 && code === void 0 && args[0] === "workers" && args[1] === "versions" && args[2] === "create" && (output + "\n" + diagnostic).
|
|
2779
|
+
const missingUploadTarget = completed && status !== 0 && code === void 0 && args[0] === "workers" && args[1] === "versions" && args[2] === "create" && (output + "\n" + diagnostic).replaceAll(/\s+/g, " ").includes("You cannot upload a new version of a Worker that does not yet exist.");
|
|
3143
2780
|
resolve({
|
|
3144
2781
|
status: typeof status === "number" ? status : 1,
|
|
3145
2782
|
stdout: output,
|
|
@@ -3154,6 +2791,19 @@ function createCfCommand(options) {
|
|
|
3154
2791
|
});
|
|
3155
2792
|
};
|
|
3156
2793
|
}
|
|
2794
|
+
const uploadedResult = (result) => {
|
|
2795
|
+
if (!isCleanCloudflareExit(result)) return result;
|
|
2796
|
+
if (isRecord(result.data) && typeof result.data.versionId === "string") return result;
|
|
2797
|
+
const { versionId, previewUrl, workersDevUrl } = readCfUploadOutput(result);
|
|
2798
|
+
return {
|
|
2799
|
+
...result,
|
|
2800
|
+
data: versionId ? {
|
|
2801
|
+
versionId,
|
|
2802
|
+
...previewUrl ? { previewUrl } : {},
|
|
2803
|
+
...workersDevUrl ? { workersDevUrl } : {}
|
|
2804
|
+
} : void 0
|
|
2805
|
+
};
|
|
2806
|
+
};
|
|
3157
2807
|
/**
|
|
3158
2808
|
* Adapt the stable activation protocol to cf's prebuilt and API commands.
|
|
3159
2809
|
* The protocol keeps the existing preview, inheritance, traffic and rollback checks.
|
|
@@ -3170,19 +2820,6 @@ function createCfVersionRunner(options) {
|
|
|
3170
2820
|
data: result.data ?? parseJson(result.stdout)
|
|
3171
2821
|
};
|
|
3172
2822
|
};
|
|
3173
|
-
const uploadedResult = (result) => {
|
|
3174
|
-
if (!isCleanCloudflareExit(result)) return result;
|
|
3175
|
-
if (isRecord(result.data) && typeof result.data.versionId === "string") return result;
|
|
3176
|
-
const { versionId, previewUrl, workersDevUrl } = readCfUploadOutput(result);
|
|
3177
|
-
return {
|
|
3178
|
-
...result,
|
|
3179
|
-
data: versionId ? {
|
|
3180
|
-
versionId,
|
|
3181
|
-
...previewUrl ? { previewUrl } : {},
|
|
3182
|
-
...workersDevUrl ? { workersDevUrl } : {}
|
|
3183
|
-
} : void 0
|
|
3184
|
-
};
|
|
3185
|
-
};
|
|
3186
2823
|
let sessionToken;
|
|
3187
2824
|
const readSessionToken = async (credentials) => {
|
|
3188
2825
|
if (sessionToken !== void 0) return {
|
|
@@ -3331,13 +2968,19 @@ function createCfVersionRunner(options) {
|
|
|
3331
2968
|
if (!next.versions) return failed("The Cloudflare Worker version history was not readable.");
|
|
3332
2969
|
if (next.versions.length === 0) break;
|
|
3333
2970
|
const numbers = next.versions.map((item) => item.number);
|
|
3334
|
-
if (Math.min(...numbers) <= last) return
|
|
2971
|
+
if (Math.min(...numbers) <= last) return {
|
|
2972
|
+
...failed("The Cloudflare Worker version history changed during inspection."),
|
|
2973
|
+
failure: "version-history-changed"
|
|
2974
|
+
};
|
|
3335
2975
|
versions.push(...next.versions);
|
|
3336
2976
|
last = Math.max(...numbers);
|
|
3337
2977
|
if (next.versions.length < pageSize) break;
|
|
3338
2978
|
if (page === 1e3) return failed("The Cloudflare Worker version history is too large to verify.");
|
|
3339
2979
|
}
|
|
3340
|
-
} else if (Math.max(...secondNumbers) >= Math.min(...firstNumbers)) return
|
|
2980
|
+
} else if (Math.max(...secondNumbers) >= Math.min(...firstNumbers)) return {
|
|
2981
|
+
...failed("The Cloudflare Worker version history changed during inspection."),
|
|
2982
|
+
failure: "version-history-changed"
|
|
2983
|
+
};
|
|
3341
2984
|
}
|
|
3342
2985
|
}
|
|
3343
2986
|
return {
|
|
@@ -3719,7 +3362,10 @@ function cloudflareCandidateActivationOptions(options) {
|
|
|
3719
3362
|
});
|
|
3720
3363
|
assertCloudflareBindingsPreserved(existingWorker, uploaded, options.approvedKv, { staticAssetsBinding: options.staticAssetsBinding });
|
|
3721
3364
|
} : void 0,
|
|
3722
|
-
recordVerifiedCandidate: existingWorker ? (versionId) =>
|
|
3365
|
+
recordVerifiedCandidate: existingWorker ? (versionId) => {
|
|
3366
|
+
if (!pinnedHandoffLink) throw new Error("Cannot record a Cloudflare handoff candidate without its pinned link.");
|
|
3367
|
+
recordCloudflareCandidate(root, pinnedHandoffLink, existingWorker.versionId, versionId);
|
|
3368
|
+
} : (versionId, parentVersionId) => {
|
|
3723
3369
|
if (parentVersionId) recordCloudflareCandidateUpload(root, initialCloudflareCandidate, accountId, workerName, parentVersionId, versionId);
|
|
3724
3370
|
},
|
|
3725
3371
|
readinessHeaders: cloudflareWorkerReadinessHeaders(),
|
|
@@ -3836,15 +3482,22 @@ function formatCloudflareActivationFailure(result) {
|
|
|
3836
3482
|
if (result.rollback === "unsafe") return "deploy: the verified Wrangler uploader changed after version activation. Void did not invoke the changed binary to restore traffic; reinstall Wrangler from a trusted lockfile and inspect `void project status` immediately.";
|
|
3837
3483
|
return "deploy: the verified Wrangler uploader changed before version activation.";
|
|
3838
3484
|
case "status-failed":
|
|
3839
|
-
if (result.versionId)
|
|
3485
|
+
if (result.versionId) {
|
|
3486
|
+
if (result.rollback === "not-needed") return `deploy: Worker version ${result.versionId} was uploaded, but Cloudflare deployment status could not be verified before activation${status}. Inspect \`void project status\` before retrying.`;
|
|
3487
|
+
return `deploy: Worker version ${result.versionId} was published, but current deployment status could not be verified${status}. Inspect \`void project status\` before retrying.`;
|
|
3488
|
+
}
|
|
3840
3489
|
return `deploy: could not snapshot the current Cloudflare deployment${status}; no version was uploaded.`;
|
|
3841
3490
|
case "deployment-changed": return result.triggerRepair === "succeeded" ? `deploy: another Cloudflare operation superseded this deployment. Void restored triggers for the active version ${result.activeVersionId ?? "(unknown)"}; retry from fresh deployment status.` : `deploy: another Cloudflare operation superseded this deployment, but its trigger state could not be verified. Inspect the active Worker version ${result.activeVersionId ?? "(unknown)"} immediately.`;
|
|
3842
|
-
case "inheritance-source-unavailable":
|
|
3843
|
-
|
|
3844
|
-
"deploy:
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3491
|
+
case "inheritance-source-unavailable":
|
|
3492
|
+
if (result.versionId) return `deploy: Worker version ${result.versionId} was uploaded but not activated because Cloudflare's version history could not confirm which secrets it inherited. Production traffic is unchanged.`;
|
|
3493
|
+
return "deploy: could not verify which Worker Version would supply inherited secrets; production traffic is unchanged.";
|
|
3494
|
+
case "inheritance-source-changed":
|
|
3495
|
+
if (result.versionId) return `deploy: Worker version ${result.versionId} was uploaded but not activated because Cloudflare returned an unexpected version history. Inspect the Worker versions in Cloudflare before retrying. Production traffic is unchanged.`;
|
|
3496
|
+
return [
|
|
3497
|
+
"deploy: the active Worker Version is not the latest upload, and its secrets could not be pinned safely.",
|
|
3498
|
+
"Inspect the active and latest Worker versions in Cloudflare before retrying.",
|
|
3499
|
+
"No version was uploaded; production traffic is unchanged."
|
|
3500
|
+
].join("\n");
|
|
3848
3501
|
case "traffic-preservation-unavailable": return ["deploy: the existing Worker has dashboard-managed routes or visibility that Void cannot safely republish.", "Add its current routes, workers_dev, and preview_urls values to the root Wrangler config, then retry; no version was uploaded."].join("\n");
|
|
3849
3502
|
case "traffic-split-unsupported": return [
|
|
3850
3503
|
"deploy: the current Cloudflare deployment splits traffic across multiple Worker Versions.",
|
|
@@ -4044,7 +3697,7 @@ async function prepareCloudflareFrameworkArtifact(options) {
|
|
|
4044
3697
|
migrationDialect: analysis.dialect,
|
|
4045
3698
|
readiness: true,
|
|
4046
3699
|
versionMetadataBinding,
|
|
4047
|
-
...hasRevalidate(revalidate) && { isr: {
|
|
3700
|
+
...revalidate !== void 0 && hasRevalidate(revalidate) && { isr: {
|
|
4048
3701
|
revalidate,
|
|
4049
3702
|
queryAllowlist: voidConfig.routing?.revalidateQueryAllowlist
|
|
4050
3703
|
} }
|
|
@@ -4085,7 +3738,7 @@ function resolveCloudflareStaticPreset(root, voidConfig, options) {
|
|
|
4085
3738
|
...configured,
|
|
4086
3739
|
buildCommand: resolveStaticBuildCommand(configured, voidConfig.inference?.build, Boolean(options.dir))
|
|
4087
3740
|
};
|
|
4088
|
-
if (detectFramework(root)) return null;
|
|
3741
|
+
if (detectFramework(root) || voidConfig.inference?.appType) return null;
|
|
4089
3742
|
const detected = detectPreset(root, {
|
|
4090
3743
|
spa: options.spa,
|
|
4091
3744
|
strictBackend: true
|
|
@@ -4204,7 +3857,7 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
4204
3857
|
const rootConfig = parseRootWranglerConfig(configPath);
|
|
4205
3858
|
const workerName = readWranglerTopLevelString(rootConfig, "name") ?? deriveWorkerName(root);
|
|
4206
3859
|
printDeployContext(workerName, "Cloudflare");
|
|
4207
|
-
const rootConfigBeforeBuild = existsSync(configPath) ? readFileSync(configPath, "
|
|
3860
|
+
const rootConfigBeforeBuild = existsSync(configPath) ? readFileSync(configPath, "utf8") : null;
|
|
4208
3861
|
if (preset.buildCommand && !options.skipBuild) {
|
|
4209
3862
|
log$1.step("Building...");
|
|
4210
3863
|
const buildChildEnv = scrubManagedDeployBuildMarkers(scrubWranglerAuthCredentials(deployChildEnv(accountId, apiBaseUrl)));
|
|
@@ -4230,7 +3883,7 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
4230
3883
|
return exit(1);
|
|
4231
3884
|
}
|
|
4232
3885
|
if (!assertUploaderStillPinned()) return exit(1);
|
|
4233
|
-
if ((existsSync(configPath) ? readFileSync(configPath, "
|
|
3886
|
+
if ((existsSync(configPath) ? readFileSync(configPath, "utf8") : null) !== rootConfigBeforeBuild) {
|
|
4234
3887
|
log$1.error(["deploy: the root Wrangler config changed during the static build.", "Refusing to upload a config rewritten by project build code. Restore the config and retry."].join("\n"));
|
|
4235
3888
|
return exit(1);
|
|
4236
3889
|
}
|
|
@@ -4358,6 +4011,9 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
4358
4011
|
printDeploySuccess();
|
|
4359
4012
|
}
|
|
4360
4013
|
// src/cli/deploy-migrations.ts
|
|
4014
|
+
const foldIdentifier = (identifier) => identifier.toLowerCase();
|
|
4015
|
+
const quote = (identifier) => `"${identifier.replaceAll("\"", "\"\"")}"`;
|
|
4016
|
+
const sameIdentifier = (a, b) => foldIdentifier(a) === foldIdentifier(b);
|
|
4361
4017
|
/**
|
|
4362
4018
|
* Apply the checked-in migrations to an in-memory SQLite database and assert the resulting
|
|
4363
4019
|
* schema has every required auth table and column, with its primary key, NOT NULL, UNIQUE and
|
|
@@ -4370,9 +4026,6 @@ async function runCloudflareStaticDeploy(root, options, voidConfig, preset, cliL
|
|
|
4370
4026
|
*/
|
|
4371
4027
|
async function assertMigrationsProduceAuthSchema(migrations, required) {
|
|
4372
4028
|
const db = await openMigrationValidationDatabase(migrations);
|
|
4373
|
-
const quote = (identifier) => `"${identifier.replace(/"/g, "\"\"")}"`;
|
|
4374
|
-
const foldIdentifier = (identifier) => identifier.toLowerCase();
|
|
4375
|
-
const sameIdentifier = (a, b) => foldIdentifier(a) === foldIdentifier(b);
|
|
4376
4029
|
const tableInfoCache = /* @__PURE__ */ new Map();
|
|
4377
4030
|
const tableInfoFor = (table) => {
|
|
4378
4031
|
const key = foldIdentifier(table);
|
|
@@ -4435,10 +4088,10 @@ async function assertMigrationsProduceAuthSchema(migrations, required) {
|
|
|
4435
4088
|
const matching = constraints.flatMap((group) => group.length === 1 && group[0] && namesReference(group[0]) ? [group[0]] : []);
|
|
4436
4089
|
const composite = constraints.some((group) => group.length > 1 && group.some(namesReference));
|
|
4437
4090
|
if (!matching.some((fk) => {
|
|
4438
|
-
if (fk.to
|
|
4091
|
+
if (fk.to !== null && fk.to !== void 0) return sameIdentifier(String(fk.to), reference.column);
|
|
4439
4092
|
const parentPrimaryKey = singleColumnPrimaryKey(fk.table);
|
|
4440
4093
|
return parentPrimaryKey !== null && sameIdentifier(parentPrimaryKey, reference.column);
|
|
4441
|
-
})) problems.push(matching.length === 0 && composite ? `table "${req.table}" column "${required.column}" references "${reference.table}"."${reference.column}" only as part of a MULTI-COLUMN foreign key — SQLite skips a composite foreign key entirely when any of its child columns is NULL, so a row naming a "${reference.table}" that does not exist is still accepted. This reference needs its own single-column foreign key on "${required.column}"` : matching.some((fk) => fk.to
|
|
4094
|
+
})) problems.push(matching.length === 0 && composite ? `table "${req.table}" column "${required.column}" references "${reference.table}"."${reference.column}" only as part of a MULTI-COLUMN foreign key — SQLite skips a composite foreign key entirely when any of its child columns is NULL, so a row naming a "${reference.table}" that does not exist is still accepted. This reference needs its own single-column foreign key on "${required.column}"` : matching.some((fk) => fk.to === null || fk.to === void 0) ? `table "${req.table}" column "${required.column}" references "${reference.table}" without naming a target column, but "${reference.table}"."${reference.column}" is not that table's single-column PRIMARY KEY — SQLite resolves an omitted target only to the parent's PRIMARY KEY (a UNIQUE constraint does not qualify, nor does a composite PRIMARY KEY) and rejects this at runtime with "foreign key mismatch"` : `table "${req.table}" column "${required.column}" is missing a foreign key referencing "${reference.table}"."${reference.column}"`);
|
|
4442
4095
|
}
|
|
4443
4096
|
try {
|
|
4444
4097
|
const violations = db.prepare(`PRAGMA foreign_key_check(${quote(req.table)})`).all();
|
|
@@ -4466,7 +4119,7 @@ async function assertMigrationsProduceAuthSchema(migrations, required) {
|
|
|
4466
4119
|
function readEmittedAuthMigrationSchema(root) {
|
|
4467
4120
|
const schemaPath = join(root, ".void", "better-auth-schema.ts");
|
|
4468
4121
|
if (!existsSync(schemaPath)) throw new Error(`the build did not emit ${schemaPath}, so the generated auth schema could not be read from the build output.`);
|
|
4469
|
-
const content = readFileSync(schemaPath, "
|
|
4122
|
+
const content = readFileSync(schemaPath, "utf8");
|
|
4470
4123
|
const start = content.indexOf("export const migrationSchema = ");
|
|
4471
4124
|
if (start === -1) throw new Error(`${schemaPath} has no migrationSchema literal — cannot verify the auth schema.`);
|
|
4472
4125
|
const jsonStart = start + 31;
|
|
@@ -4529,7 +4182,7 @@ function assertRemoteMigrationsDeployable(root, dialect, migrationsDir, migratio
|
|
|
4529
4182
|
*/
|
|
4530
4183
|
function leadingWranglerMigrationNumber(relativePath) {
|
|
4531
4184
|
const firstSegment = relativePath.split("/")[0] ?? "";
|
|
4532
|
-
return parseInt(firstSegment.split("_")[0] ?? "", 10);
|
|
4185
|
+
return Number.parseInt(firstSegment.split("_")[0] ?? "", 10);
|
|
4533
4186
|
}
|
|
4534
4187
|
function compareWranglerMigrationSegments(a, b) {
|
|
4535
4188
|
const aNum = leadingWranglerMigrationNumber(a);
|
|
@@ -4555,7 +4208,7 @@ function compareWranglerMigrationPaths(a, b) {
|
|
|
4555
4208
|
}
|
|
4556
4209
|
function resolveWranglerMigrationPattern(config, binding, migrationsDirRaw) {
|
|
4557
4210
|
const field = readBindingFieldPresence(config, "d1_databases", binding, "migrations_pattern");
|
|
4558
|
-
const migrationsDir = normalize(migrationsDirRaw.
|
|
4211
|
+
const migrationsDir = normalize(migrationsDirRaw.replaceAll("\\", "/")).replace(/\/$/, "");
|
|
4559
4212
|
if (!field.present) return {
|
|
4560
4213
|
ok: true,
|
|
4561
4214
|
pattern: "*.sql"
|
|
@@ -4568,7 +4221,7 @@ function resolveWranglerMigrationPattern(config, binding, migrationsDirRaw) {
|
|
|
4568
4221
|
ok: false,
|
|
4569
4222
|
reason: `deploy: migrations_pattern for D1 binding ${binding} must be a non-empty string.`
|
|
4570
4223
|
};
|
|
4571
|
-
const normalized = normalize(field.value.
|
|
4224
|
+
const normalized = normalize(field.value.replaceAll("\\", "/")).replace(/\/$/, "");
|
|
4572
4225
|
const prefix = migrationsDir === "." ? "" : `${migrationsDir}/`;
|
|
4573
4226
|
if (prefix && !normalized.startsWith(prefix)) return {
|
|
4574
4227
|
ok: false,
|
|
@@ -4617,8 +4270,8 @@ async function checkWranglerMigrationApplySet(configPath, config, binding, migra
|
|
|
4617
4270
|
const resolvedPattern = resolveWranglerMigrationPattern(config, binding, migrationsDirRaw);
|
|
4618
4271
|
if (!resolvedPattern.ok) return resolvedPattern;
|
|
4619
4272
|
const wranglerNames = listWranglerMigrationFiles(absDir, resolvedPattern.pattern);
|
|
4620
|
-
const wranglerContent = new Map(wranglerNames.map((name) => [name, readFileSync(join(absDir, name), "
|
|
4621
|
-
const gatedNames = gated.map((m) => m.name.
|
|
4273
|
+
const wranglerContent = new Map(wranglerNames.map((name) => [name, readFileSync(join(absDir, name), "utf8")]));
|
|
4274
|
+
const gatedNames = gated.map((m) => m.name.replaceAll("\\", "/"));
|
|
4622
4275
|
const gatedContent = new Map(gatedNames.map((name, i) => [name, gated[i].sql]));
|
|
4623
4276
|
const wranglerSet = new Set(wranglerNames);
|
|
4624
4277
|
const extra = wranglerNames.filter((k) => !gatedContent.has(k));
|
|
@@ -5017,12 +4670,12 @@ async function migrateCloudflareWorker(input) {
|
|
|
5017
4670
|
*/
|
|
5018
4671
|
function classifyCloudflareDeployApp(root, voidConfig, options, application) {
|
|
5019
4672
|
const framework = application.framework;
|
|
5020
|
-
const
|
|
4673
|
+
const configuredAppType = voidConfig.inference?.appType;
|
|
4674
|
+
const staticPreset = framework || configuredAppType ? null : detectPreset(root, {
|
|
5021
4675
|
dir: options.dir,
|
|
5022
4676
|
spa: options.spa
|
|
5023
4677
|
});
|
|
5024
|
-
|
|
5025
|
-
if (staticPreset || configuredStatic || options.dir || options.spa) return unsupported([
|
|
4678
|
+
if (staticPreset || configuredAppType === "static" || configuredAppType === "spa" || options.dir || options.spa) return unsupported([
|
|
5026
4679
|
`deploy: --platform cloudflare could not resolve the ${staticPreset?.appType ?? (options.spa ? "spa" : "static")} output to deploy.`,
|
|
5027
4680
|
"Set inference.outputDir in void.config.ts, pass --dir with an existing build directory,",
|
|
5028
4681
|
"or add a supported build tool so Void can locate the generated static assets."
|
|
@@ -5148,6 +4801,7 @@ async function runCloudflareEmailStep(input) {
|
|
|
5148
4801
|
routes: pre.derived.routes,
|
|
5149
4802
|
addresses,
|
|
5150
4803
|
sendingReady,
|
|
4804
|
+
sendingOnly: pre.usage.handlers.length === 0,
|
|
5151
4805
|
creating
|
|
5152
4806
|
});
|
|
5153
4807
|
const writeConfig = (patch) => {
|
|
@@ -5159,7 +4813,9 @@ async function runCloudflareEmailStep(input) {
|
|
|
5159
4813
|
return false;
|
|
5160
4814
|
}
|
|
5161
4815
|
};
|
|
5162
|
-
|
|
4816
|
+
const awaitingOnboarding = isAwaitingSendingOnboarding(pre);
|
|
4817
|
+
if (pre.ready || awaitingOnboarding) {
|
|
4818
|
+
if (awaitingOnboarding) log$1.warn(formatSendingOnlyPaidHint(pre.domain).join("\n"));
|
|
5163
4819
|
const patch = {};
|
|
5164
4820
|
const rows = [];
|
|
5165
4821
|
if (pre.addressesStale) {
|
|
@@ -5183,6 +4839,14 @@ async function runCloudflareEmailStep(input) {
|
|
|
5183
4839
|
configWritten = true;
|
|
5184
4840
|
log$1.message(` ✔ config ${configName} updated (${rows.join(", ")})`);
|
|
5185
4841
|
}
|
|
4842
|
+
if (awaitingOnboarding) {
|
|
4843
|
+
log$1.warn(`deploy: deploying with the email setup ${configName} already carries.`);
|
|
4844
|
+
return {
|
|
4845
|
+
satisfied: false,
|
|
4846
|
+
configWritten,
|
|
4847
|
+
map: mapFor(pre.addresses, false)
|
|
4848
|
+
};
|
|
4849
|
+
}
|
|
5186
4850
|
return {
|
|
5187
4851
|
satisfied: true,
|
|
5188
4852
|
configWritten,
|
|
@@ -5231,7 +4895,7 @@ async function runCloudflareEmailStep(input) {
|
|
|
5231
4895
|
const bindingPresent = shipsBinding || out.patch.sendEmail !== void 0;
|
|
5232
4896
|
const written = out.patch.addresses ?? [];
|
|
5233
4897
|
return {
|
|
5234
|
-
satisfied:
|
|
4898
|
+
satisfied: out.ready,
|
|
5235
4899
|
configWritten: true,
|
|
5236
4900
|
map: bindingPresent ? mapFor(written, out.sendingReady, pre.rules.absent.filter((a) => written.includes(a))) : null
|
|
5237
4901
|
};
|
|
@@ -5316,7 +4980,7 @@ async function chooseCloudflareQueueNames(input) {
|
|
|
5316
4980
|
tooLong.push(` • ${choice.name} (${choice.name.length} characters)`);
|
|
5317
4981
|
continue;
|
|
5318
4982
|
}
|
|
5319
|
-
const state = choice.kept ? plain : scoped;
|
|
4983
|
+
const state = choice.kept ? plain ?? null : scoped;
|
|
5320
4984
|
if (state === null) absent.push(choice.name);
|
|
5321
4985
|
for (const consumer of otherQueueConsumers(state, workerName)) taken.push(` • ${choice.name} is consumed by ${consumer === null ? "a non-Worker (HTTP pull) consumer" : `Worker ${consumer}`}`);
|
|
5322
4986
|
if (choice.kept) input.info(`Queue ${queueName} keeps its Cloudflare name ${choice.name}, because this Worker already consumes it.`);
|
|
@@ -5625,7 +5289,7 @@ async function preflightCloudflareWorker(input) {
|
|
|
5625
5289
|
const absentQueues = queueNames.absent;
|
|
5626
5290
|
const { missing: initiallyMissing } = checkCloudflareProvisionDrift(configPath, desired);
|
|
5627
5291
|
const d1NeedsConfigReconciliation = !existingWorker && d1MigrationsDirMissing();
|
|
5628
|
-
if (options.provision || initiallyMissing.length > 0 || d1NeedsConfigReconciliation || absentQueues.length > 0) await provisionAndVerify();
|
|
5292
|
+
if (options.provision || initiallyMissing.length > 0 || d1NeedsConfigReconciliation || !existingWorker && desired.d1?.readReplication !== void 0 || absentQueues.length > 0) await provisionAndVerify();
|
|
5629
5293
|
const frameworkQueues = detectedFramework ? source.analysis.queues : [];
|
|
5630
5294
|
writeProvisionedWranglerConfig(root, {
|
|
5631
5295
|
name: workerName,
|
|
@@ -5637,11 +5301,11 @@ async function preflightCloudflareWorker(input) {
|
|
|
5637
5301
|
})),
|
|
5638
5302
|
consumers: frameworkQueues.map((queue) => ({
|
|
5639
5303
|
queue: cloudflareQueueName(queue.name, desired.queueNames),
|
|
5640
|
-
...queue.maxBatchSize
|
|
5641
|
-
...queue.maxBatchTimeout
|
|
5642
|
-
...queue.maxRetries
|
|
5643
|
-
...queue.maxConcurrency
|
|
5644
|
-
...queue.retryDelay
|
|
5304
|
+
...queue.maxBatchSize !== null && queue.maxBatchSize !== void 0 && { max_batch_size: queue.maxBatchSize },
|
|
5305
|
+
...queue.maxBatchTimeout !== null && queue.maxBatchTimeout !== void 0 && { max_batch_timeout: queue.maxBatchTimeout },
|
|
5306
|
+
...queue.maxRetries !== null && queue.maxRetries !== void 0 && { max_retries: queue.maxRetries },
|
|
5307
|
+
...queue.maxConcurrency !== null && queue.maxConcurrency !== void 0 && { max_concurrency: queue.maxConcurrency },
|
|
5308
|
+
...queue.retryDelay !== null && queue.retryDelay !== void 0 && { retry_delay: queue.retryDelay }
|
|
5645
5309
|
})),
|
|
5646
5310
|
reconcileVoidOwned: true
|
|
5647
5311
|
} } : {}
|
|
@@ -5808,7 +5472,7 @@ async function runCloudflareDeploy(root, options, cliLog, deps = {}) {
|
|
|
5808
5472
|
return exit(1);
|
|
5809
5473
|
}
|
|
5810
5474
|
const detectedFramework = detectFramework(root);
|
|
5811
|
-
const frameworkPreset = detectedFramework ? FRAMEWORK_PRESETS[detectedFramework.name] : void 0;
|
|
5475
|
+
const frameworkPreset = detectedFramework && hasOwnKey(FRAMEWORK_PRESETS, detectedFramework.name) ? FRAMEWORK_PRESETS[detectedFramework.name] : void 0;
|
|
5812
5476
|
cliLog.info("cloudflare_deploy_start", { provision: options.provision === true ? true : void 0 });
|
|
5813
5477
|
if (isNodeTarget(voidConfig.target)) {
|
|
5814
5478
|
log$1.error([
|
|
@@ -5965,7 +5629,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
5965
5629
|
const wrapperFeatures = {
|
|
5966
5630
|
crons: rawJobs,
|
|
5967
5631
|
queues: rawQueues,
|
|
5968
|
-
hasMigrations: validatedMigrations
|
|
5632
|
+
hasMigrations: validatedMigrations !== null && validatedMigrations !== void 0 && validatedMigrations.length > 0,
|
|
5969
5633
|
migrationDialect: dialect
|
|
5970
5634
|
};
|
|
5971
5635
|
let actualWorkerDir = workerDir;
|
|
@@ -6016,6 +5680,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
6016
5680
|
frameworkName: detected.name,
|
|
6017
5681
|
alwaysUseHttps: voidConfig.routing?.alwaysUseHttps,
|
|
6018
5682
|
storage: voidConfig.storage,
|
|
5683
|
+
database: typeof voidConfig.database === "object" ? voidConfig.database : void 0,
|
|
6019
5684
|
workerMain: actualWorkerMain,
|
|
6020
5685
|
bindings,
|
|
6021
5686
|
migrations: validatedMigrations,
|
|
@@ -6049,6 +5714,7 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
6049
5714
|
gitMetadata,
|
|
6050
5715
|
preflightUsed: skipped > 0,
|
|
6051
5716
|
workerFiles,
|
|
5717
|
+
root,
|
|
6052
5718
|
spinner: s,
|
|
6053
5719
|
cliLog
|
|
6054
5720
|
});
|
|
@@ -6066,6 +5732,12 @@ async function runFrameworkDeploy(root, config, client, detected, fwPreset, void
|
|
|
6066
5732
|
cleanupWrapper(root);
|
|
6067
5733
|
warnUnpublishedRouting(result);
|
|
6068
5734
|
printDeploySuccess(result.published !== false);
|
|
5735
|
+
await printDeploySecurityNotice({
|
|
5736
|
+
client,
|
|
5737
|
+
...config,
|
|
5738
|
+
deploymentId: result.deployment,
|
|
5739
|
+
cliLog
|
|
5740
|
+
});
|
|
6069
5741
|
}
|
|
6070
5742
|
// src/cli/deploy-managed-full.ts
|
|
6071
5743
|
async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBuild, gitMetadata, detected, cliLog, skipMigrations) {
|
|
@@ -6099,14 +5771,14 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
6099
5771
|
let assetsPrefix = "assets";
|
|
6100
5772
|
const clientManifestPath = join(distDir, "client", ".vite", "manifest.json");
|
|
6101
5773
|
if (existsSync(clientManifestPath)) {
|
|
6102
|
-
const manifest = JSON.parse(readFileSync(clientManifestPath, "
|
|
5774
|
+
const manifest = JSON.parse(readFileSync(clientManifestPath, "utf8"));
|
|
6103
5775
|
for (const entry of Object.values(manifest)) if (entry.file?.includes("/")) {
|
|
6104
5776
|
const dir = entry.file.slice(0, entry.file.indexOf("/"));
|
|
6105
5777
|
if (dir !== "assets") assetsPrefix = dir;
|
|
6106
5778
|
break;
|
|
6107
5779
|
}
|
|
6108
5780
|
}
|
|
6109
|
-
const isFrameworkMode = detected
|
|
5781
|
+
const isFrameworkMode = detected !== null && detected !== void 0;
|
|
6110
5782
|
if (voidConfig.output === "static" && !isFrameworkMode) {
|
|
6111
5783
|
const result = isNodeTarget(voidConfig.target) ? await prerenderPagesNode({
|
|
6112
5784
|
root,
|
|
@@ -6274,6 +5946,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
6274
5946
|
} : bindings,
|
|
6275
5947
|
alwaysUseHttps: voidConfig.routing?.alwaysUseHttps,
|
|
6276
5948
|
storage: voidConfig.storage,
|
|
5949
|
+
database: typeof voidConfig.database === "object" ? voidConfig.database : void 0,
|
|
6277
5950
|
hasEmailHandlers: !isFrameworkMode && routeScan.email !== void 0 && hasEmailHandlers(routeScan.email),
|
|
6278
5951
|
migrations: validatedMigrations,
|
|
6279
5952
|
schedules,
|
|
@@ -6299,7 +5972,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
6299
5972
|
const wrapperFeatures = {
|
|
6300
5973
|
crons: rawJobs,
|
|
6301
5974
|
queues: rawQueues,
|
|
6302
|
-
hasMigrations: validatedMigrations
|
|
5975
|
+
hasMigrations: validatedMigrations !== null && validatedMigrations !== void 0 && validatedMigrations.length > 0,
|
|
6303
5976
|
migrationDialect: dialect
|
|
6304
5977
|
};
|
|
6305
5978
|
if (needsWrapper(wrapperFeatures)) {
|
|
@@ -6324,6 +5997,7 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
6324
5997
|
gitMetadata,
|
|
6325
5998
|
preflightUsed: skipped > 0,
|
|
6326
5999
|
workerFiles,
|
|
6000
|
+
root,
|
|
6327
6001
|
spinner: s,
|
|
6328
6002
|
cliLog
|
|
6329
6003
|
});
|
|
@@ -6341,6 +6015,12 @@ async function runFullDeploy(root, config, client, voidConfig, fwPreset, skipBui
|
|
|
6341
6015
|
}), result.url);
|
|
6342
6016
|
warnUnpublishedRouting(result);
|
|
6343
6017
|
printDeploySuccess(result.published !== false);
|
|
6018
|
+
await printDeploySecurityNotice({
|
|
6019
|
+
client,
|
|
6020
|
+
...config,
|
|
6021
|
+
deploymentId: result.deployment,
|
|
6022
|
+
cliLog
|
|
6023
|
+
});
|
|
6344
6024
|
}
|
|
6345
6025
|
// src/cli/github-oidc.ts
|
|
6346
6026
|
/**
|
|
@@ -6481,23 +6161,20 @@ function assertInstalledVoidMatchesCli(root) {
|
|
|
6481
6161
|
* ` -> `.
|
|
6482
6162
|
*/
|
|
6483
6163
|
function formatErrorNodeInline(node, depth = 0) {
|
|
6484
|
-
if (node
|
|
6485
|
-
const message = node.message
|
|
6164
|
+
if (node === null || node === void 0 || typeof node !== "object") return String(node);
|
|
6165
|
+
const message = String(node.message ?? "");
|
|
6486
6166
|
if (depth > 5) return message;
|
|
6487
6167
|
let head = node.name ? `${String(node.name)}: ${message}` : message;
|
|
6488
6168
|
const tags = [];
|
|
6489
6169
|
if (node.code !== void 0) tags.push(`code=${node.code}`);
|
|
6490
6170
|
if (node.errno !== void 0) tags.push(`errno=${node.errno}`);
|
|
6491
6171
|
if (tags.length > 0) head = `${head} (${tags.join(" ")})`;
|
|
6492
|
-
|
|
6172
|
+
const { cause } = node;
|
|
6173
|
+
if (cause !== null && cause !== void 0) return `${head} -> ${formatErrorNodeInline(cause, depth + 1)}`;
|
|
6493
6174
|
return head;
|
|
6494
6175
|
}
|
|
6495
|
-
/**
|
|
6496
|
-
* Walk `err.cause` up to 6 levels and return a plain JSON-friendly chain.
|
|
6497
|
-
* Skips stack traces deliberately — keeps output line-oriented and readable.
|
|
6498
|
-
*/
|
|
6499
6176
|
function describeErrorChain(err, depth = 0) {
|
|
6500
|
-
if (depth > 5 || err
|
|
6177
|
+
if (depth > 5 || err === null || err === void 0) return String(err);
|
|
6501
6178
|
if (err instanceof Error) {
|
|
6502
6179
|
const node = {
|
|
6503
6180
|
name: err.name,
|
|
@@ -6508,7 +6185,7 @@ function describeErrorChain(err, depth = 0) {
|
|
|
6508
6185
|
const errno = err.errno;
|
|
6509
6186
|
if (errno !== void 0) node.errno = errno;
|
|
6510
6187
|
const cause = err.cause;
|
|
6511
|
-
if (cause
|
|
6188
|
+
if (cause !== null && cause !== void 0) {
|
|
6512
6189
|
const sub = describeErrorChain(cause, depth + 1);
|
|
6513
6190
|
if (typeof sub === "object") node.cause = sub;
|
|
6514
6191
|
else node.cause = { message: sub };
|
|
@@ -6522,7 +6199,7 @@ function formatStderrLine(level, msg, err, fields) {
|
|
|
6522
6199
|
if (fields) for (const [k, v] of Object.entries(fields)) {
|
|
6523
6200
|
if (v === void 0) continue;
|
|
6524
6201
|
let s;
|
|
6525
|
-
if (v
|
|
6202
|
+
if (v === null || typeof v === "number" || typeof v === "boolean") s = String(v);
|
|
6526
6203
|
else if (typeof v === "string") s = v.length > 200 ? `${v.slice(0, 200)}...` : v;
|
|
6527
6204
|
else try {
|
|
6528
6205
|
s = JSON.stringify(v);
|
|
@@ -6545,7 +6222,7 @@ function openDeployLog(opts) {
|
|
|
6545
6222
|
try {
|
|
6546
6223
|
const dir = join(homedir(), ".void", "logs");
|
|
6547
6224
|
mkdirSync(dir, { recursive: true });
|
|
6548
|
-
const ts = (/* @__PURE__ */ new Date()).toISOString().
|
|
6225
|
+
const ts = (/* @__PURE__ */ new Date()).toISOString().replaceAll(/[:.]/g, "-");
|
|
6549
6226
|
const suffix = randomBytes(3).toString("hex");
|
|
6550
6227
|
const filePath = join(dir, `deploy-${ts}-${process.pid}-${suffix}.jsonl`);
|
|
6551
6228
|
fd = openSync(filePath, "wx", 384);
|
|
@@ -6656,14 +6333,14 @@ const BEARER_RE = /\b(Bearer\s+)\S+/g;
|
|
|
6656
6333
|
*/
|
|
6657
6334
|
const SECRET_KEY_RE = /token|secret|password|passwd|credential|cookie|signature|api[-_]?key|private[-_]?key/i;
|
|
6658
6335
|
function redact(text) {
|
|
6659
|
-
return text.
|
|
6336
|
+
return text.replaceAll(SIGNED_QUERY_RE, "$1[redacted]").replaceAll(BEARER_RE, "$1[redacted]");
|
|
6660
6337
|
}
|
|
6661
6338
|
function truncate(text, max) {
|
|
6662
6339
|
return text.length <= max ? text : `${text.slice(0, max)}...`;
|
|
6663
6340
|
}
|
|
6664
6341
|
/** Collapse every run of whitespace so one record always renders as one line. */
|
|
6665
6342
|
function oneLine(text) {
|
|
6666
|
-
return text.
|
|
6343
|
+
return text.replaceAll(/\s+/g, " ").trim();
|
|
6667
6344
|
}
|
|
6668
6345
|
function stringifyValue(value) {
|
|
6669
6346
|
if (typeof value === "string") return value;
|
|
@@ -6760,7 +6437,7 @@ function buildDeployLogSummary(path) {
|
|
|
6760
6437
|
if (!path) return null;
|
|
6761
6438
|
let text;
|
|
6762
6439
|
try {
|
|
6763
|
-
text = readFileSync(path, "
|
|
6440
|
+
text = readFileSync(path, "utf8");
|
|
6764
6441
|
} catch {
|
|
6765
6442
|
return null;
|
|
6766
6443
|
}
|
|
@@ -6931,7 +6608,7 @@ async function runManagedDeploy(root, options, cliLog) {
|
|
|
6931
6608
|
name: detected.name,
|
|
6932
6609
|
class: detected.class
|
|
6933
6610
|
});
|
|
6934
|
-
const fwPreset = FRAMEWORK_PRESETS[detected.name];
|
|
6611
|
+
const fwPreset = hasOwnKey(FRAMEWORK_PRESETS, detected.name) ? FRAMEWORK_PRESETS[detected.name] : void 0;
|
|
6935
6612
|
if (detected.class === "b" || detected.class === "c") {
|
|
6936
6613
|
if (!fwPreset) {
|
|
6937
6614
|
log$1.error(`No deploy preset found for framework "${detected.name}".`);
|