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,18 +1,19 @@
|
|
|
1
1
|
import { n as __toESM } from "./rolldown-runtime-uD8oG6U2.mjs";
|
|
2
2
|
import { a as join, n as dirname, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
3
3
|
import { t as require_picocolors } from "./picocolors-D1NxSLw-.mjs";
|
|
4
|
-
import { p as readConfig } from "./config-qgt863GH.mjs";
|
|
5
4
|
import { i as voidWarn, r as voidLog } from "./log-D9hwSySP.mjs";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { p as readConfig } from "./config-Dv5jri1-.mjs";
|
|
6
|
+
import { i as readProjectIdField } from "./project-dh9431bN.mjs";
|
|
7
|
+
import { p as findBindingNameOwner, u as ensureWranglerCompat } from "./wrangler-DVe5KV5G.mjs";
|
|
8
|
+
import { t as hasOwnKey } from "./has-own-key-D9QEnAkF.mjs";
|
|
9
|
+
import { n as scopedAccessCredentials } from "./cf-access-DmkKPcAI.mjs";
|
|
10
|
+
import { n as ensurePlatformProxyAccess } from "./cf-access-FaIm95jA.mjs";
|
|
11
|
+
import { a as getApiUrl, c as getToken, o as getProxyUrl } from "./auth-DlLDymuc.mjs";
|
|
12
|
+
import { d as stripInternalEnvKeys } from "./env-EjHqc7m9.mjs";
|
|
13
|
+
import { i as collectFiles } from "./isr-config-DiTnL9Tb.mjs";
|
|
13
14
|
import { a as renderPrerenderPaths, i as renderBoundary404, n as outputFileForPath, r as readPrerenderPathsResponse } from "./prerender-render-BAdYhivW.mjs";
|
|
14
|
-
import { t as renderDefaultErrorPage } from "./error-pages-
|
|
15
|
-
import { a as buildEnv } from "./version-metadata-
|
|
15
|
+
import { t as renderDefaultErrorPage } from "./error-pages-GORL6F_e.mjs";
|
|
16
|
+
import { a as buildEnv } from "./version-metadata-DqgLa6gc.mjs";
|
|
16
17
|
import { existsSync, mkdirSync, readFileSync, unlinkSync, writeFileSync } from "node:fs";
|
|
17
18
|
import { isRecord } from "@void/deploy-core";
|
|
18
19
|
import { execFile } from "node:child_process";
|
|
@@ -22,7 +23,7 @@ var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
|
|
|
22
23
|
const PRERENDER_PATHS_ENDPOINT = "/__void/prerender-paths";
|
|
23
24
|
const nodeRendererUrl = new URL(import.meta.url.endsWith(".ts") ? "./prerender-render.ts" : "./prerender-render.mjs", import.meta.url).href;
|
|
24
25
|
function normalizeWorkerModulePath(path) {
|
|
25
|
-
return path.
|
|
26
|
+
return path.replaceAll("\\", "/").replace(/^\.\//, "");
|
|
26
27
|
}
|
|
27
28
|
function resolveWorkerModuleType(relativePath) {
|
|
28
29
|
const normalized = normalizeWorkerModulePath(relativePath);
|
|
@@ -46,7 +47,7 @@ function collectPrerenderWorkerModules(workerDir, workerMain) {
|
|
|
46
47
|
path: filePath,
|
|
47
48
|
relativePath,
|
|
48
49
|
type,
|
|
49
|
-
contents: type === "CompiledWasm" || type === "Data" ? new Uint8Array(file) : file.toString("
|
|
50
|
+
contents: type === "CompiledWasm" || type === "Data" ? new Uint8Array(file) : file.toString("utf8")
|
|
50
51
|
}];
|
|
51
52
|
});
|
|
52
53
|
modules.sort((a, b) => {
|
|
@@ -79,7 +80,7 @@ async function createCloudflarePrerenderRunner(options) {
|
|
|
79
80
|
const { root, workerDir, persistDir, clientDir, remoteMode } = options;
|
|
80
81
|
const wranglerPath = join(workerDir, "wrangler.json");
|
|
81
82
|
if (!existsSync(wranglerPath)) throw new Error(`prerender: wrangler.json not found in '${workerDir}'.`);
|
|
82
|
-
const wranglerConfig = JSON.parse(readFileSync(wranglerPath, "
|
|
83
|
+
const wranglerConfig = JSON.parse(readFileSync(wranglerPath, "utf8"));
|
|
83
84
|
const wranglerCompat = ensureWranglerCompat(root, readConfig(root), workerDir);
|
|
84
85
|
const workerMain = wranglerConfig.main ?? "index.js";
|
|
85
86
|
let voidProjectId = options.projectId;
|
|
@@ -312,7 +313,8 @@ const SEND_EMAIL_BINDING = "SEND_EMAIL";
|
|
|
312
313
|
const EMAIL_FROM_VAR = "__VOID_EMAIL_FROM";
|
|
313
314
|
const CLOUDFLARE_API_BASE_URL = "https://api.cloudflare.com/client/v4";
|
|
314
315
|
/** OAuth scopes the session needs (`whoami` `tokenPermissions`). */
|
|
315
|
-
const
|
|
316
|
+
const SENDING_SCOPES = ["email_sending:write"];
|
|
317
|
+
const INBOUND_SCOPES = ["email_routing:write", ...SENDING_SCOPES];
|
|
316
318
|
/** Cloudflare Email API error codes with a known meaning; others are reported verbatim. */
|
|
317
319
|
const CF_EMAIL_ERROR_CODES = {
|
|
318
320
|
2062: "Email Routing is not enabled on this zone",
|
|
@@ -326,6 +328,27 @@ function subdomainDashboardFallback(apex, domain) {
|
|
|
326
328
|
}
|
|
327
329
|
/** The Workers Free hint printed when Email Sending onboarding fails. */
|
|
328
330
|
const SENDING_FREE_PLAN_HINT = "Workers Paid needed for arbitrary recipients. Inbound works; sendEmail() to verified destinations only.";
|
|
331
|
+
const CLOUDFLARE_WORKERS_PAID_URL = "https://dash.cloudflare.com/?to=/:account/workers/plans";
|
|
332
|
+
/**
|
|
333
|
+
* Why a sending-only app (no `email/` handlers) has no working sender: it sends only through
|
|
334
|
+
* Email Sending, which Workers Free does not offer. Names the plan, its link and the token
|
|
335
|
+
* permissions a sending-only setup needs.
|
|
336
|
+
*/
|
|
337
|
+
function formatSendingOnlyPaidHint(domain) {
|
|
338
|
+
return [
|
|
339
|
+
`Email Sending is not onboarded on ${domain}. Apps without email/ handlers send through Cloudflare Email Sending, which requires the Workers Paid plan.`,
|
|
340
|
+
`Enable Workers Paid: ${CLOUDFLARE_WORKERS_PAID_URL}`,
|
|
341
|
+
"After upgrading, run `void email setup --platform cloudflare`. An API token needs Zone Read + Email Sending Edit."
|
|
342
|
+
];
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* A sending-only app whose saved setup (the committed binding) still waits for Email Sending
|
|
346
|
+
* onboarding, with nothing else in the way. Preflight cannot tell Workers Free from a domain
|
|
347
|
+
* never onboarded, so deploys leave the retry to `void email setup` instead of asking again.
|
|
348
|
+
*/
|
|
349
|
+
function isAwaitingSendingOnboarding(pre) {
|
|
350
|
+
return !pre.ready && pre.usage.handlers.length === 0 && pre.binding.state === "present" && pre.sendingRetryable && !pre.blockers.some((b) => b.scope === "all");
|
|
351
|
+
}
|
|
329
352
|
/**
|
|
330
353
|
* Config shapes the writer would refuse for `SEND_EMAIL` and `__VOID_EMAIL_FROM`, checked
|
|
331
354
|
* before anything is asked. The writer keeps the same guard, since the file can change first.
|
|
@@ -507,6 +530,28 @@ function readSendingSettings(data) {
|
|
|
507
530
|
tag
|
|
508
531
|
} : null;
|
|
509
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* The `email.sending.settings` result for `domain`, built from a bearer read of
|
|
535
|
+
* `GET /zones/{z}/email/sending/subdomains`: the matching row, `data: null` when the domain
|
|
536
|
+
* is not listed (not onboarded), or a failure when the list could not be read.
|
|
537
|
+
*/
|
|
538
|
+
function sendingSettingsFromList(response, domain) {
|
|
539
|
+
if (!response?.ok || !Array.isArray(response.result)) {
|
|
540
|
+
const first = response?.errors[0];
|
|
541
|
+
return {
|
|
542
|
+
status: 1,
|
|
543
|
+
stdout: "",
|
|
544
|
+
stderr: first?.message ?? "",
|
|
545
|
+
...first?.code ? { errorCode: first.code } : {}
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
return {
|
|
549
|
+
status: 0,
|
|
550
|
+
stdout: "",
|
|
551
|
+
stderr: "",
|
|
552
|
+
data: response.result.find((item) => isRecord(item) && typeof item.name === "string" && item.name.toLowerCase() === domain) ?? null
|
|
553
|
+
};
|
|
554
|
+
}
|
|
510
555
|
function providerErrorCode(result) {
|
|
511
556
|
return result.errorCode ?? result.errors?.find((error) => error.code !== void 0)?.code ?? null;
|
|
512
557
|
}
|
|
@@ -569,6 +614,8 @@ async function preflightEmail(inputs) {
|
|
|
569
614
|
...inputs.configPath ? { configPath: inputs.configPath } : {}
|
|
570
615
|
}, { capture: true });
|
|
571
616
|
const usageHandlers = [...inputs.handlers.addresses.map((d) => `email/${d.filePath}`), ...inputs.handlers.defaultHandler ? [`email/${inputs.handlers.defaultHandler}`] : []];
|
|
617
|
+
const receivesEmail = usageHandlers.length > 0;
|
|
618
|
+
const permissions = receivesEmail ? "Email Routing Edit + Email Sending Edit" : "Zone Read + Email Sending Edit";
|
|
572
619
|
const pre = {
|
|
573
620
|
from: inputs.from,
|
|
574
621
|
domain,
|
|
@@ -641,20 +688,20 @@ async function preflightEmail(inputs) {
|
|
|
641
688
|
pre.session.accountName = who.accounts?.find((a) => a.id === inputs.accountId)?.name;
|
|
642
689
|
if (who.authType === "Global API Key") {
|
|
643
690
|
pre.session.state = "api-key";
|
|
644
|
-
block("all",
|
|
691
|
+
block("all", `the Cloudflare session is a Global API Key (CLOUDFLARE_API_KEY), which has no bearer to borrow for ${receivesEmail ? "the subaddressing calls" : "zone verification"} — unset CLOUDFLARE_API_KEY, then run \`void cloudflare login\` or set CLOUDFLARE_API_TOKEN to a token with ${permissions}`);
|
|
645
692
|
} else if (who.authType === void 0 || who.authType === "OAuth Token") {
|
|
646
693
|
const scopes = new Set(who.tokenPermissions ?? []);
|
|
647
|
-
pre.session.missingScopes =
|
|
694
|
+
pre.session.missingScopes = (receivesEmail ? INBOUND_SCOPES : SENDING_SCOPES).filter((s) => !scopes.has(s));
|
|
648
695
|
if (pre.session.missingScopes.length > 0) {
|
|
649
696
|
pre.session.state = "missing-scopes";
|
|
650
697
|
block("all", `the Cloudflare session lacks ${pre.session.missingScopes.join(" + ")} — run \`void cloudflare logout\`, then \`void cloudflare login\` (one browser Allow)`);
|
|
651
698
|
} else pre.session.state = "ok";
|
|
652
699
|
} else pre.session.state = "ok";
|
|
653
700
|
}
|
|
654
|
-
const tokenHint = pre.session.state === "ok" && pre.session.authType !== "OAuth Token" ?
|
|
701
|
+
const tokenHint = pre.session.state === "ok" && pre.session.authType !== "OAuth Token" ? ` (an API token needs ${permissions} on the zone and account)` : "";
|
|
655
702
|
let settings = null;
|
|
656
703
|
let settingsMiss = false;
|
|
657
|
-
if (pre.session.state === "ok") for (const candidate of zoneCandidates(domain)) {
|
|
704
|
+
if (receivesEmail && pre.session.state === "ok") for (const candidate of zoneCandidates(domain)) {
|
|
658
705
|
const result = await run({
|
|
659
706
|
type: "email.routing.settings",
|
|
660
707
|
domain: candidate
|
|
@@ -680,23 +727,37 @@ async function preflightEmail(inputs) {
|
|
|
680
727
|
zoneId: settings.tag
|
|
681
728
|
};
|
|
682
729
|
} else if (settingsMiss) block("all", `could not read Email Routing settings — unknown — run \`void email setup --platform cloudflare\`${tokenHint}`);
|
|
683
|
-
else if (pre.session.state === "ok") pre.zone.state = "not-found";
|
|
684
|
-
|
|
685
|
-
|
|
730
|
+
else if (receivesEmail && pre.session.state === "ok") pre.zone.state = "not-found";
|
|
731
|
+
if (receivesEmail) {
|
|
732
|
+
pre.domainMx = await probeMx(inputs.dns, domain);
|
|
733
|
+
pre.apexMx = pre.apex && pre.apex !== domain ? await probeMx(inputs.dns, pre.apex) : pre.domainMx;
|
|
734
|
+
}
|
|
686
735
|
const dmarc = await probeTxt(inputs.dns, `_dmarc.${domain}`);
|
|
687
736
|
const bounce = await probeTxt(inputs.dns, `cf-bounce.${domain}`);
|
|
688
737
|
if (dmarc === "present") pre.sending.dnsConflicts.push(`_dmarc.${domain}`);
|
|
689
738
|
if (bounce === "present") pre.sending.dnsConflicts.push(`cf-bounce.${domain}`);
|
|
690
739
|
if (dmarc === "unknown" || bounce === "unknown") pre.sending.dnsConflicts.push(`(DNS lookup failed for _dmarc.${domain} / cf-bounce.${domain})`);
|
|
691
|
-
let
|
|
692
|
-
|
|
740
|
+
let sendingRead = null;
|
|
741
|
+
const bearer = pre.session.state === "ok" ? await inputs.getSessionBearer().catch(() => null) : null;
|
|
693
742
|
if (bearer) {
|
|
743
|
+
if (!receivesEmail) pre.zone.state = "not-found";
|
|
694
744
|
const candidates = pre.apex ? [pre.apex] : zoneCandidates(domain);
|
|
695
745
|
for (const candidate of candidates) {
|
|
696
746
|
const zones = await fetchWithSessionBearer(inputs.fetchImpl, bearer, "GET", `/zones?name=${encodeURIComponent(candidate)}`, void 0, apiBaseUrl);
|
|
697
|
-
if (!zones.ok)
|
|
747
|
+
if (!zones.ok) {
|
|
748
|
+
if (!receivesEmail) pre.zone.state = "unknown";
|
|
749
|
+
break;
|
|
750
|
+
}
|
|
751
|
+
if (!receivesEmail && !Array.isArray(zones.result)) {
|
|
752
|
+
pre.zone.state = "unknown";
|
|
753
|
+
break;
|
|
754
|
+
}
|
|
698
755
|
const zone = (Array.isArray(zones.result) ? zones.result : [])[0];
|
|
699
756
|
if (!zone) continue;
|
|
757
|
+
if (!receivesEmail && (typeof zone.id !== "string" || zone.name !== candidate || typeof zone.type !== "string" || typeof zone.account?.id !== "string")) {
|
|
758
|
+
pre.zone.state = "unknown";
|
|
759
|
+
break;
|
|
760
|
+
}
|
|
700
761
|
pre.zone.type = zone.type;
|
|
701
762
|
if (zone.account?.id && zone.account.id !== inputs.accountId) pre.zone = {
|
|
702
763
|
state: "other-account",
|
|
@@ -721,13 +782,14 @@ async function preflightEmail(inputs) {
|
|
|
721
782
|
}
|
|
722
783
|
break;
|
|
723
784
|
}
|
|
724
|
-
if (pre.zone.state === "found" && pre.zone.zoneId) {
|
|
785
|
+
if (receivesEmail && pre.zone.state === "found" && pre.zone.zoneId) {
|
|
725
786
|
const routing = await fetchWithSessionBearer(inputs.fetchImpl, bearer, "GET", `/zones/${pre.zone.zoneId}/email/routing`, void 0, apiBaseUrl);
|
|
726
787
|
const flag = routing.result?.support_subaddress;
|
|
727
788
|
if (routing.ok && typeof flag === "boolean") pre.subaddressing.state = flag ? "on" : "off";
|
|
728
789
|
}
|
|
790
|
+
if (!receivesEmail && pre.zone.state === "found" && pre.zone.zoneId) sendingRead = await fetchWithSessionBearer(inputs.fetchImpl, bearer, "GET", `/zones/${pre.zone.zoneId}/email/sending/subdomains`, void 0, apiBaseUrl);
|
|
729
791
|
}
|
|
730
|
-
|
|
792
|
+
if (!receivesEmail && pre.session.state === "ok" && pre.zone.state === "unknown") block("all", `could not verify the sending domain's Cloudflare zone${tokenHint}; check zone access, then retry \`void email status --platform cloudflare\``);
|
|
731
793
|
switch (pre.zone.state) {
|
|
732
794
|
case "not-found":
|
|
733
795
|
block("all", `no zone for ${domain} in Cloudflare account ${inputs.accountId} — add the domain to this account first`);
|
|
@@ -735,7 +797,7 @@ async function preflightEmail(inputs) {
|
|
|
735
797
|
case "other-account":
|
|
736
798
|
block("all", `${pre.apex ?? domain} is a zone in a different Cloudflare account than ${inputs.accountId}`);
|
|
737
799
|
break;
|
|
738
|
-
case "partial": block("all", `${pre.apex ?? domain} is a ${pre.zone.type} zone; Email Routing needs a full zone on Cloudflare DNS`);
|
|
800
|
+
case "partial": block("all", `${pre.apex ?? domain} is a ${pre.zone.type} zone; ${receivesEmail ? "Email Routing" : "Email Sending"} needs a full zone on Cloudflare DNS`);
|
|
739
801
|
}
|
|
740
802
|
if (!pre.apex || !pre.mode) {
|
|
741
803
|
pre.ready = false;
|
|
@@ -760,49 +822,51 @@ async function preflightEmail(inputs) {
|
|
|
760
822
|
if (settings.status === "unlocked") block("all", `Email Routing on ${apex} is ${settings.status} — fix it in the Cloudflare dashboard; Void never re-locks records you unlocked`);
|
|
761
823
|
}
|
|
762
824
|
}
|
|
763
|
-
if (pre.routing.state !== "ready") {
|
|
825
|
+
if (receivesEmail && pre.routing.state !== "ready") {
|
|
764
826
|
if (pre.domainMx.state === "foreign") block("all", `${domain} already receives mail (${pre.domainMx.exchanges.join(", ")}). Void never enables routing over live mail.${mode === "apex" ? ` Use something@mail.${apex}.` : ""}`);
|
|
765
827
|
else if (pre.domainMx.state === "unknown") block("all", `could not read the MX records of ${domain} — unknown — run \`void email setup --platform cloudflare\``);
|
|
766
828
|
}
|
|
767
829
|
pre.derived = deriveAddresses(inputs.handlers, domain, mode);
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
if (
|
|
781
|
-
|
|
782
|
-
|
|
830
|
+
if (receivesEmail) {
|
|
831
|
+
const rulesResult = await run({
|
|
832
|
+
type: "email.routing.rules.list",
|
|
833
|
+
domain: apex
|
|
834
|
+
});
|
|
835
|
+
const rules = isHardFailure(rulesResult) || rulesResult.status !== 0 ? null : readRoutingRules(rulesResult.data);
|
|
836
|
+
if (!rules) {
|
|
837
|
+
pre.rules.state = "unknown";
|
|
838
|
+
block("all", `could not read Email Routing rules — unknown — run \`void email setup --platform cloudflare\`${tokenHint}`);
|
|
839
|
+
} else {
|
|
840
|
+
const workerToken = `worker:${inputs.workerName}`;
|
|
841
|
+
for (const address of pre.derived.addresses) {
|
|
842
|
+
if (address.startsWith("*@")) {
|
|
843
|
+
if (!rules.catchAll || !rules.catchAll.enabled || rules.catchAll.actions.includes("drop")) pre.rules.absent.push(address);
|
|
844
|
+
else if (rules.catchAll.actions.includes(workerToken)) pre.rules.mine.push(address);
|
|
845
|
+
else pre.rules.foreign.push({
|
|
846
|
+
address,
|
|
847
|
+
owner: rules.catchAll.actions.join(", ")
|
|
848
|
+
});
|
|
849
|
+
continue;
|
|
850
|
+
}
|
|
851
|
+
const rule = rules.rules.find((r) => r.enabled && r.to.includes(address)) ?? rules.rules.find((r) => r.to.includes(address));
|
|
852
|
+
if (!rule) pre.rules.absent.push(address);
|
|
853
|
+
else if (rule.actions.includes(workerToken)) {
|
|
854
|
+
if (rule.enabled) pre.rules.mine.push(address);
|
|
855
|
+
else pre.rules.absent.push(address);
|
|
856
|
+
} else pre.rules.foreign.push({
|
|
783
857
|
address,
|
|
784
|
-
owner:
|
|
858
|
+
owner: rule.actions.join(", ")
|
|
785
859
|
});
|
|
786
|
-
continue;
|
|
787
860
|
}
|
|
788
|
-
|
|
789
|
-
if (!rule) pre.rules.absent.push(address);
|
|
790
|
-
else if (rule.actions.includes(workerToken)) {
|
|
791
|
-
if (rule.enabled) pre.rules.mine.push(address);
|
|
792
|
-
else pre.rules.absent.push(address);
|
|
793
|
-
} else pre.rules.foreign.push({
|
|
794
|
-
address,
|
|
795
|
-
owner: rule.actions.join(", ")
|
|
796
|
-
});
|
|
861
|
+
pre.rules.state = pre.rules.absent.length === 0 ? "ready" : "pending";
|
|
797
862
|
}
|
|
798
|
-
pre.rules.state = pre.rules.absent.length === 0 ? "ready" : "pending";
|
|
799
863
|
}
|
|
800
864
|
const foreign = new Set(pre.rules.foreign.map((f) => f.address));
|
|
801
865
|
pre.addresses = pre.derived.addresses.filter((a) => !foreign.has(a));
|
|
802
|
-
const sendingResult = await run({
|
|
866
|
+
const sendingResult = receivesEmail ? await run({
|
|
803
867
|
type: "email.sending.settings",
|
|
804
868
|
domain
|
|
805
|
-
});
|
|
869
|
+
}) : sendingSettingsFromList(sendingRead, domain);
|
|
806
870
|
if (isHardFailure(sendingResult)) pre.sending.state = "unknown";
|
|
807
871
|
else if (sendingResult.status === 0 && sendingResult.data === null) pre.sending.state = "pending";
|
|
808
872
|
else if (sendingResult.status === 0) {
|
|
@@ -845,7 +909,7 @@ async function preflightEmail(inputs) {
|
|
|
845
909
|
const sendingBlocked = pre.blockers.some((b) => b.scope === "sending");
|
|
846
910
|
pre.sendingRetryable = pre.sending.state === "pending" && !sendingBlocked;
|
|
847
911
|
const sendingSettled = pre.sending.state === "ready" || sendingBlocked || pre.sending.state === "pending" && pre.binding.state === "present";
|
|
848
|
-
pre.ready = !pre.blockers.some((b) => b.scope === "all") && pre.routing.state === "ready" && pre.subaddressing.state === "on" && sendingSettled && pre.binding.state === "present";
|
|
912
|
+
pre.ready = !pre.blockers.some((b) => b.scope === "all") && (receivesEmail ? pre.routing.state === "ready" && pre.subaddressing.state === "on" && sendingSettled : pre.sending.state === "ready") && pre.binding.state === "present";
|
|
849
913
|
return pre;
|
|
850
914
|
}
|
|
851
915
|
/** Column padding for the checklist; an overflowing cell gets three spaces. */
|
|
@@ -858,6 +922,7 @@ function pad(text, width) {
|
|
|
858
922
|
*/
|
|
859
923
|
function renderEmailChecklist(pre) {
|
|
860
924
|
const apex = pre.apex ?? "?";
|
|
925
|
+
const receivesEmail = pre.usage.handlers.length > 0;
|
|
861
926
|
const lines = [];
|
|
862
927
|
const inUse = pre.usage.handlers.length > 0 ? pre.usage.handlers.join(" · ") : "sending only (no email/ handlers)";
|
|
863
928
|
lines.push(` Email in use ${inUse}`);
|
|
@@ -867,14 +932,16 @@ function renderEmailChecklist(pre) {
|
|
|
867
932
|
row("domain", pre.domain, "(void.config.ts email.from)");
|
|
868
933
|
const session = [pre.session.accountName ? `account ${pre.session.accountName} (${shortId(pre.accountId)})` : `account ${shortId(pre.accountId)}`, pre.session.authType && pre.session.authType !== "OAuth Token" ? `session ${pre.session.email ? `${pre.session.email} ` : ""}(${pre.session.authType})` : pre.session.email ? `session ${pre.session.email}` : null].filter(Boolean).join(" · ");
|
|
869
934
|
row("zone", pre.zone.state === "found" ? apex : `${apex} ${pre.zone.state}`, session);
|
|
870
|
-
if (
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
935
|
+
if (receivesEmail) {
|
|
936
|
+
if (pre.mode === "subdomain") row("apex MX", pre.apexMx.exchanges[0] ?? (pre.apexMx.state === "unknown" ? "unknown" : "none"), "left alone — mail lives on the subdomain");
|
|
937
|
+
else row("apex MX", pre.apexMx.exchanges[0] ?? (pre.apexMx.state === "unknown" ? "unknown" : "none"), pre.apexMx.state === "cloudflare" ? "Cloudflare Email Routing" : pre.apexMx.state === "empty" ? "empty — the apex can take routing" : "");
|
|
938
|
+
const routingWord = pre.routing.state === "ready" ? "enabled" : pre.routing.state === "unknown" ? "unknown — run void email setup --platform cloudflare" : `not enabled${pre.mode === "apex" && pre.routing.status && pre.routing.status !== "unconfigured" ? ` (${pre.routing.status})` : ""}`;
|
|
939
|
+
const subWord = pre.subaddressing.state === "on" ? "subaddressing on" : pre.subaddressing.state === "off" ? "subaddressing off" : "subaddressing unknown";
|
|
940
|
+
row("routing", `${pre.domain} ${routingWord} · ${subWord}`);
|
|
941
|
+
} else row("inbound", "not required");
|
|
942
|
+
const sendingWord = pre.sending.state === "ready" ? "onboarded" : pre.sending.state === "unknown" ? "unknown — could not verify; retry void email status --platform cloudflare" : pre.sendingRetryable && pre.binding.state === "present" ? receivesEmail ? "not onboarded — verified destinations only; after upgrading to Workers Paid run void email setup --platform cloudflare" : "not onboarded — needs Workers Paid; after upgrading run void email setup --platform cloudflare" : "not onboarded";
|
|
876
943
|
row("sending", `${pre.domain} ${sendingWord}`);
|
|
877
|
-
if (pre.derived.addresses.length === 0) row("rules", "(none — no email/ handlers)");
|
|
944
|
+
if (receivesEmail && pre.derived.addresses.length === 0) row("rules", "(none — no email/ handlers)");
|
|
878
945
|
for (const address of pre.derived.addresses) {
|
|
879
946
|
const foreignRule = pre.rules.foreign.find((f) => f.address === address);
|
|
880
947
|
const status = pre.rules.mine.includes(address) ? "ready" : foreignRule ? `owned elsewhere: ${foreignRule.owner} — pruned` : pre.rules.state === "unknown" ? "unknown" : "absent";
|
|
@@ -891,10 +958,10 @@ function renderEmailChecklist(pre) {
|
|
|
891
958
|
changes.push(` ! ${pad(what, 44)}${why}`);
|
|
892
959
|
};
|
|
893
960
|
const subdomainNeedsApex = pre.mode === "subdomain" && pre.routing.enabled !== true;
|
|
894
|
-
if (pre.routing.state !== "ready" && subdomainNeedsApex) warn(`enable Email Routing on ${pre.domain}`, `Email Routing is not enabled on ${apex}; Void never enables it on the apex from the subdomain path — ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
895
|
-
else if (pre.routing.state !== "ready") change(`enable Email Routing on ${pre.domain}`, `Cloudflare writes and locks 3 MX + 1 SPF record ${pre.mode === "subdomain" ? "there" : "on the apex"}`);
|
|
896
|
-
if (pre.subaddressing.state !== "on") change(`turn on subaddressing for ${apex}`, "support+anything@ reaches support@");
|
|
897
|
-
if (pre.sending.state
|
|
961
|
+
if (receivesEmail && pre.routing.state !== "ready" && subdomainNeedsApex) warn(`enable Email Routing on ${pre.domain}`, `Email Routing is not enabled on ${apex}; Void never enables it on the apex from the subdomain path — ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
962
|
+
else if (receivesEmail && pre.routing.state !== "ready") change(`enable Email Routing on ${pre.domain}`, `Cloudflare writes and locks 3 MX + 1 SPF record ${pre.mode === "subdomain" ? "there" : "on the apex"}`);
|
|
963
|
+
if (receivesEmail && pre.subaddressing.state !== "on") change(`turn on subaddressing for ${apex}`, "support+anything@ reaches support@");
|
|
964
|
+
if (pre.sending.state === "pending" && !pre.blockers.some((b) => b.scope === "sending")) change(`onboard ${pre.domain} for Email Sending`, `MX/SPF/DKIM on cf-bounce.${pre.domain}, _dmarc.${pre.domain} (p=reject)`);
|
|
898
965
|
const parts = [];
|
|
899
966
|
if (pre.binding.state !== "present") parts.push(`send_email: [{ name: "${SEND_EMAIL_BINDING}" }]`);
|
|
900
967
|
if (pre.addressesStale) parts.push(pre.addresses.length > 0 ? `addresses: ${JSON.stringify(pre.addresses)}` : "addresses: (removed)");
|
|
@@ -904,7 +971,7 @@ function renderEmailChecklist(pre) {
|
|
|
904
971
|
for (const foreign of pre.rules.foreign) warn(foreign.address, `already routed to ${foreign.owner}; left alone, not in addresses`);
|
|
905
972
|
for (const refused of pre.derived.refused) warn(refused.handler, refused.reason);
|
|
906
973
|
for (const blocker of pre.blockers) changes.push(` ✘ ${blocker.message}`);
|
|
907
|
-
if (changes.length === 0) lines.push(" Nothing to change — email is set up.");
|
|
974
|
+
if (changes.length === 0) lines.push(receivesEmail ? " Nothing to change — email is set up." : " Nothing to change — email sending is configured.");
|
|
908
975
|
else lines.push(` This changes YOUR Cloudflare account.${pre.mode === "subdomain" && !subdomainNeedsApex ? ` ${apex} itself is not touched.` : ""}`, ...changes);
|
|
909
976
|
return lines.join("\n");
|
|
910
977
|
}
|
|
@@ -937,7 +1004,7 @@ async function fetchWithSessionBearer(fetchImpl, bearer, method, path, body, api
|
|
|
937
1004
|
}]
|
|
938
1005
|
};
|
|
939
1006
|
}
|
|
940
|
-
let payload
|
|
1007
|
+
let payload;
|
|
941
1008
|
try {
|
|
942
1009
|
payload = await response.json();
|
|
943
1010
|
} catch {
|
|
@@ -954,19 +1021,29 @@ async function fetchWithSessionBearer(fetchImpl, bearer, method, path, body, api
|
|
|
954
1021
|
errors
|
|
955
1022
|
};
|
|
956
1023
|
}
|
|
1024
|
+
const describeFailure = (response) => {
|
|
1025
|
+
if (!response) return "could not borrow the Cloudflare session (session-bearer step failed)";
|
|
1026
|
+
const first = response.errors[0];
|
|
1027
|
+
const code = first?.code ? ` [code: ${first.code}]` : "";
|
|
1028
|
+
const known = first?.code && hasOwnKey(CF_EMAIL_ERROR_CODES, first.code) ? CF_EMAIL_ERROR_CODES[first.code] : void 0;
|
|
1029
|
+
return `Cloudflare answered ${response.status}${code}${known ? ` — ${known}` : first?.message ? ` — ${first.message}` : ""}`;
|
|
1030
|
+
};
|
|
957
1031
|
/**
|
|
958
1032
|
* Run only the rows preflight found not ready:
|
|
959
1033
|
*
|
|
960
1034
|
* routing apex → `email routing enable <apex>`
|
|
961
1035
|
* subdomain → bearer POST /zones/{z}/email/routing/dns { name }
|
|
962
1036
|
* subaddr bearer PATCH /zones/{z}/email/routing { support_subaddress: true }
|
|
963
|
-
* sending `email sending enable <domain
|
|
964
|
-
*
|
|
1037
|
+
* sending inbound → `email sending enable <domain>`
|
|
1038
|
+
* sending-only → bearer POST /zones/{z}/email/sending/subdomains { name }
|
|
1039
|
+
* code 2040 (already onboarded) is ok; any other failure prints a hint and
|
|
1040
|
+
* continues without sending
|
|
965
1041
|
*
|
|
966
1042
|
* A failed bearer call prints the dashboard fallback and withholds `addresses` this run;
|
|
967
1043
|
* it never fails the deploy. An `all` blocker applies nothing and returns an empty patch.
|
|
968
1044
|
*/
|
|
969
1045
|
async function applyEmailSetup(pre, inputs) {
|
|
1046
|
+
const receivesEmail = pre.usage.handlers.length > 0;
|
|
970
1047
|
const lines = [];
|
|
971
1048
|
const result = {
|
|
972
1049
|
patch: {},
|
|
@@ -974,7 +1051,8 @@ async function applyEmailSetup(pre, inputs) {
|
|
|
974
1051
|
routingReady: pre.routing.state === "ready",
|
|
975
1052
|
subaddressingReady: pre.subaddressing.state === "on",
|
|
976
1053
|
sendingReady: pre.sending.state === "ready",
|
|
977
|
-
inboundReady: false
|
|
1054
|
+
inboundReady: false,
|
|
1055
|
+
ready: false
|
|
978
1056
|
};
|
|
979
1057
|
const blocked = pre.blockers.filter((b) => b.scope === "all");
|
|
980
1058
|
if (blocked.length > 0 || !pre.apex || !pre.mode) {
|
|
@@ -1006,15 +1084,8 @@ async function applyEmailSetup(pre, inputs) {
|
|
|
1006
1084
|
if (!response.ok) bearerFailed = true;
|
|
1007
1085
|
return response;
|
|
1008
1086
|
};
|
|
1009
|
-
const describeFailure = (response) => {
|
|
1010
|
-
if (!response) return "could not borrow the Cloudflare session (session-bearer step failed)";
|
|
1011
|
-
const first = response.errors[0];
|
|
1012
|
-
const code = first?.code ? ` [code: ${first.code}]` : "";
|
|
1013
|
-
const known = first?.code ? CF_EMAIL_ERROR_CODES[first.code] : void 0;
|
|
1014
|
-
return `Cloudflare answered ${response.status}${code}${known ? ` — ${known}` : first?.message ? ` — ${first.message}` : ""}`;
|
|
1015
|
-
};
|
|
1016
1087
|
const apexRoutingOff = pre.mode === "subdomain" && pre.routing.enabled !== true;
|
|
1017
|
-
if (!result.routingReady) {
|
|
1088
|
+
if (receivesEmail && !result.routingReady) {
|
|
1018
1089
|
if (pre.mode === "apex") {
|
|
1019
1090
|
const enable = await run({
|
|
1020
1091
|
type: "email.routing.enable",
|
|
@@ -1025,50 +1096,64 @@ async function applyEmailSetup(pre, inputs) {
|
|
|
1025
1096
|
lines.push(` ✔ routing ${apex} enabled`);
|
|
1026
1097
|
} else {
|
|
1027
1098
|
const code = providerErrorCode(enable);
|
|
1028
|
-
lines.push(` ✘ routing could not enable Email Routing on ${apex}${code ? ` [code: ${code}]${CF_EMAIL_ERROR_CODES
|
|
1099
|
+
lines.push(` ✘ routing could not enable Email Routing on ${apex}${code ? ` [code: ${code}]${hasOwnKey(CF_EMAIL_ERROR_CODES, code) ? ` — ${CF_EMAIL_ERROR_CODES[code]}` : ""}` : ""}`);
|
|
1029
1100
|
}
|
|
1030
|
-
} else if (apexRoutingOff) {
|
|
1031
|
-
|
|
1032
|
-
lines.push(` ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
1033
|
-
} else {
|
|
1101
|
+
} else if (apexRoutingOff) lines.push(` ✘ routing ${pre.domain}: Email Routing is not enabled on ${apex} — a subdomain can only be added to a zone that already routes; Void never enables routing on the apex from the subdomain path`, ` ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
1102
|
+
else {
|
|
1034
1103
|
const response = await withBearer("POST", `/zones/${pre.zone.zoneId}/email/routing/dns`, { name: pre.domain });
|
|
1035
1104
|
if (response?.ok) {
|
|
1036
1105
|
result.routingReady = true;
|
|
1037
1106
|
lines.push(` ✔ routing ${pre.domain} enabled`);
|
|
1038
|
-
} else {
|
|
1039
|
-
lines.push(` ✘ routing ${pre.domain}: ${describeFailure(response)}`);
|
|
1040
|
-
lines.push(` ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
1041
|
-
}
|
|
1107
|
+
} else lines.push(` ✘ routing ${pre.domain}: ${describeFailure(response)}`, ` ${subdomainDashboardFallback(apex, pre.domain)}`);
|
|
1042
1108
|
}
|
|
1043
1109
|
}
|
|
1044
|
-
if (!result.subaddressingReady && !bearerFailed && !apexRoutingOff) {
|
|
1110
|
+
if (receivesEmail && !result.subaddressingReady && !bearerFailed && !apexRoutingOff) {
|
|
1045
1111
|
const response = await withBearer("PATCH", `/zones/${pre.zone.zoneId}/email/routing`, { support_subaddress: true });
|
|
1046
1112
|
if (response?.ok) {
|
|
1047
1113
|
result.subaddressingReady = true;
|
|
1048
1114
|
lines.push(` ✔ routing subaddressing on for ${apex}`);
|
|
1049
|
-
} else {
|
|
1050
|
-
|
|
1051
|
-
|
|
1115
|
+
} else lines.push(` ✘ routing subaddressing on ${apex}: ${describeFailure(response)}`, ` turn it on in the Cloudflare dashboard → ${apex} → Email → Settings → Subaddressing`);
|
|
1116
|
+
} else if (receivesEmail && !result.subaddressingReady) lines.push(` ✘ routing subaddressing on ${apex}: skipped (${apexRoutingOff ? `Email Routing is not enabled on ${apex}` : bearerObtained ? "the subdomain routing call failed" : "session bearer unavailable"})`);
|
|
1117
|
+
const enableSending = async () => {
|
|
1118
|
+
if (receivesEmail) {
|
|
1119
|
+
const enable = await run({
|
|
1120
|
+
type: "email.sending.enable",
|
|
1121
|
+
domain: pre.domain
|
|
1122
|
+
});
|
|
1123
|
+
const code = isHardFailure(enable) ? null : providerErrorCode(enable);
|
|
1124
|
+
return {
|
|
1125
|
+
ok: !isHardFailure(enable) && (enable.status === 0 || code === 2040),
|
|
1126
|
+
code
|
|
1127
|
+
};
|
|
1052
1128
|
}
|
|
1053
|
-
|
|
1054
|
-
|
|
1129
|
+
const token = await borrow();
|
|
1130
|
+
if (!token) return {
|
|
1131
|
+
ok: false,
|
|
1132
|
+
code: null,
|
|
1133
|
+
noBearer: true
|
|
1134
|
+
};
|
|
1135
|
+
const response = await fetchWithSessionBearer(inputs.fetchImpl, token, "POST", `/zones/${pre.zone.zoneId}/email/sending/subdomains`, { name: pre.domain }, apiBaseUrl);
|
|
1136
|
+
const code = response.errors.find((error) => error.code !== 0)?.code ?? null;
|
|
1137
|
+
return {
|
|
1138
|
+
ok: response.ok || code === 2040,
|
|
1139
|
+
code
|
|
1140
|
+
};
|
|
1141
|
+
};
|
|
1055
1142
|
const sendingBlocked = pre.blockers.filter((b) => b.scope === "sending");
|
|
1056
1143
|
if (!result.sendingReady && sendingBlocked.length > 0) for (const b of sendingBlocked) lines.push(` ! sending ${b.message}`);
|
|
1057
1144
|
else if (!result.sendingReady) {
|
|
1058
|
-
const
|
|
1059
|
-
|
|
1060
|
-
domain: pre.domain
|
|
1061
|
-
});
|
|
1062
|
-
const code = isHardFailure(enable) ? null : providerErrorCode(enable);
|
|
1063
|
-
if (!isHardFailure(enable) && (enable.status === 0 || code === 2040)) {
|
|
1145
|
+
const { ok, code, noBearer } = await enableSending();
|
|
1146
|
+
if (ok) {
|
|
1064
1147
|
result.sendingReady = true;
|
|
1065
1148
|
lines.push(` ✔ sending ${pre.domain} onboarded`);
|
|
1066
|
-
} else {
|
|
1067
|
-
|
|
1149
|
+
} else if (noBearer) lines.push(` ! sending ${pre.domain} not onboarded (session bearer unavailable); rerun void email setup --platform cloudflare`);
|
|
1150
|
+
else {
|
|
1151
|
+
const known = code && hasOwnKey(CF_EMAIL_ERROR_CODES, code) ? CF_EMAIL_ERROR_CODES[code] : void 0;
|
|
1068
1152
|
lines.push(` ! sending ${pre.domain} not onboarded${code ? ` [code: ${code}]` : ""}${known ? ` — ${known}` : ""}`);
|
|
1069
|
-
lines.push(` ${
|
|
1153
|
+
for (const hint of receivesEmail ? [SENDING_FREE_PLAN_HINT] : formatSendingOnlyPaidHint(pre.domain)) lines.push(` ${hint}`);
|
|
1070
1154
|
}
|
|
1071
1155
|
}
|
|
1156
|
+
bearer = null;
|
|
1072
1157
|
if (result.routingReady || result.sendingReady) {
|
|
1073
1158
|
result.patch.sendEmail = { name: SEND_EMAIL_BINDING };
|
|
1074
1159
|
result.patch.vars = { [EMAIL_FROM_VAR]: pre.from };
|
|
@@ -1080,7 +1165,8 @@ async function applyEmailSetup(pre, inputs) {
|
|
|
1080
1165
|
if (addressesWithheld && pre.addresses.length > 0) lines.push(` ! config addresses withheld this run (${bearerFailed ? "session-bearer step failed" : "routing not ready"}); no routing rule is created for ${pre.addresses.join(", ")}`);
|
|
1081
1166
|
}
|
|
1082
1167
|
lines.push(" ✔ config void.lock.json updated");
|
|
1083
|
-
result.inboundReady = result.routingReady && result.subaddressingReady && !addressesWithheld;
|
|
1168
|
+
result.inboundReady = receivesEmail && result.routingReady && result.subaddressingReady && !addressesWithheld;
|
|
1169
|
+
result.ready = (receivesEmail ? result.inboundReady : result.sendingReady) && (result.patch.sendEmail !== void 0 || pre.binding.state === "present");
|
|
1084
1170
|
return result;
|
|
1085
1171
|
}
|
|
1086
1172
|
/**
|
|
@@ -1097,7 +1183,7 @@ function renderAddressMap(map) {
|
|
|
1097
1183
|
const marker = !map.addresses.includes(route.address) ? ` ${pending}` : map.creating?.includes(route.address) ? " (rule created by this deploy)" : "";
|
|
1098
1184
|
lines.push(` inbound ${pad(route.address, width + 2)}→ ${route.handler}${marker}`);
|
|
1099
1185
|
}
|
|
1100
|
-
lines.push(` outbound sendEmail() from ${map.from}${map.sendingReady ? "" : " (verified destinations only)"}`);
|
|
1186
|
+
lines.push(` outbound sendEmail() from ${map.from}${map.sendingReady ? "" : map.sendingOnly ? " (Email Sending not onboarded)" : " (verified destinations only)"}`);
|
|
1101
1187
|
return lines.join("\n");
|
|
1102
1188
|
}
|
|
1103
1189
|
/** The production `EmailDns`: `node:dns/promises` against the system resolver. */
|
|
@@ -1108,4 +1194,4 @@ async function createNodeEmailDns() {
|
|
|
1108
1194
|
resolveTxt: (name) => dns.resolveTxt(name)
|
|
1109
1195
|
};
|
|
1110
1196
|
}
|
|
1111
|
-
export { emailConfigInputs as a,
|
|
1197
|
+
export { emailConfigInputs as a, preflightEmail as c, renderEmailChecklist as d, collectPrerenderPaths as f, prerenderPagesNode as h, createNodeEmailDns as i, probeMx as l, prerenderPages as m, SEND_EMAIL_BINDING as n, formatSendingOnlyPaidHint as o, collectPrerenderPathsNode as p, applyEmailSetup as r, isAwaitingSendingOnboarding as s, EMAIL_FROM_VAR as t, renderAddressMap as u };
|
|
@@ -14,7 +14,7 @@ function compileSegment(part) {
|
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
16
|
function escapeLiteral(value) {
|
|
17
|
-
return value.
|
|
17
|
+
return value.replaceAll(".", String.raw`\.`);
|
|
18
18
|
}
|
|
19
19
|
function segmentRegex(s) {
|
|
20
20
|
return s.kind === "literal" ? escapeLiteral(s.value) : "([^+@]+)";
|
|
@@ -48,7 +48,7 @@ function compileEmailPattern(basename) {
|
|
|
48
48
|
throw new Error(`email handler "${basename}" has duplicate param names: ${dupes.join(", ")}. Each [name] segment must be unique within a single handler filename.`);
|
|
49
49
|
}
|
|
50
50
|
const segments = [segmentRegex(prefix)];
|
|
51
|
-
if (tag) segments.push(
|
|
51
|
+
if (tag) segments.push(String.raw`\+`, segmentRegex(tag));
|
|
52
52
|
return {
|
|
53
53
|
kind: patternKind(prefix, tag),
|
|
54
54
|
regexSource: `^${segments.join("")}$`,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as join, s as relative } from "./dist-DMYe8CZJ.mjs";
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import { a as unwrapStaticExpression, o as bindingNames, s as bindingResolver } from "./static-exports-
|
|
4
|
-
import {
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-2ENfCCih.mjs";
|
|
3
|
+
import { a as unwrapStaticExpression, o as bindingNames, s as bindingResolver } from "./static-exports-s7P86Ngp.mjs";
|
|
4
|
+
import { r as isIdentifier, s as moduleExportName, t as asAstProgram } from "./ast-BkPQu7A0.mjs";
|
|
5
5
|
import { existsSync, readFileSync } from "node:fs";
|
|
6
6
|
import { parseSync } from "vite";
|
|
7
7
|
// src/ssr/entry.ts
|
|
@@ -10,10 +10,13 @@ const SSR_CLIENT_ENTRY_NAMES = ["main.client.ts", "main.client.tsx"];
|
|
|
10
10
|
const SSR_SERVER_ENTRY_RELATIVE_PATHS = SSR_SERVER_ENTRY_NAMES.map((name) => `src/${name}`);
|
|
11
11
|
const SSR_CLIENT_ENTRY_RELATIVE_PATHS = SSR_CLIENT_ENTRY_NAMES.map((name) => `src/${name}`);
|
|
12
12
|
function resolveSingleEntry(root, entries, label, paths = readProjectPaths(root)) {
|
|
13
|
-
const matches = entries.
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
13
|
+
const matches = entries.flatMap((entryName) => {
|
|
14
|
+
const entry = {
|
|
15
|
+
relativePath: relative(root, join(paths.ssrDir, entryName)),
|
|
16
|
+
absolutePath: join(paths.ssrDir, entryName)
|
|
17
|
+
};
|
|
18
|
+
return existsSync(entry.absolutePath) ? [entry] : [];
|
|
19
|
+
});
|
|
17
20
|
if (matches.length === 0) return null;
|
|
18
21
|
if (matches.length > 1) {
|
|
19
22
|
const names = matches.map((entry) => entry.relativePath).join(", ");
|
|
@@ -29,14 +32,14 @@ function hasSsrEntry(root, paths = readProjectPaths(root)) {
|
|
|
29
32
|
}
|
|
30
33
|
function validateServerRenderExport(entry) {
|
|
31
34
|
const { absolutePath, relativePath } = entry;
|
|
32
|
-
const source = readFileSync(absolutePath, "
|
|
35
|
+
const source = readFileSync(absolutePath, "utf8");
|
|
33
36
|
let parsed;
|
|
34
37
|
try {
|
|
35
38
|
parsed = parseSync(relativePath, source);
|
|
36
39
|
} catch (err) {
|
|
37
|
-
throw new Error(`ssr: Invalid entry '${relativePath}'. Could not parse source: '${err instanceof Error ? err.message : String(err)}'
|
|
40
|
+
throw new Error(`ssr: Invalid entry '${relativePath}'. Could not parse source: '${err instanceof Error ? err.message : String(err)}'.`, { cause: err });
|
|
38
41
|
}
|
|
39
|
-
const program = parsed.program;
|
|
42
|
+
const program = asAstProgram(parsed.program);
|
|
40
43
|
const body = program.body ?? [];
|
|
41
44
|
let resolve;
|
|
42
45
|
const binding = (node, name) => (resolve ??= bindingResolver(program))(node, name);
|