void 0.27.0 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/dist/{account-cmd-l-FM7Ioq.mjs → account-cmd-Ci00cncT.mjs} +5 -5
- package/dist/{agents-B_pX_HmQ.mjs → agents-CuNtT0D_.mjs} +5 -2
- package/dist/{application-analysis-DKy02UY0.mjs → application-analysis-D72ZQfMZ.mjs} +118 -135
- package/dist/{application-routing-DQyUh_5S.mjs → application-routing-Dy589Vgn.mjs} +1 -2
- package/dist/atomic-write-Dq6R0BPN.mjs +18 -0
- package/dist/{auth-Dn2vw-SG.mjs → auth-B6iOCjKI.mjs} +23 -56
- package/dist/{auth-link-vz9Z2kmG.mjs → auth-link-DWr6Afao.mjs} +10 -10
- package/dist/{auth-migrations-BwHgeEsD.mjs → auth-migrations-Cgs0k6lS.mjs} +28 -5
- package/dist/{auth-router-DvsCUVw4.mjs → auth-router-DP14wVkZ.mjs} +4 -4
- package/dist/auth-wn6F8dB8.mjs +2 -0
- package/dist/base64-DVrOndmI.mjs +16 -0
- package/dist/{better-auth-shared-CPvWD3nG.d.mts → better-auth-shared-B74NJIus.d.mts} +8 -13
- package/dist/{better-auth-shared-DPpj8zxc.mjs → better-auth-shared-CMXlZG7W.mjs} +56 -68
- package/dist/{build-cmd-D6we0VjO.mjs → build-cmd-Cr3FJxv0.mjs} +5 -5
- package/dist/{cache-CZRdzKx1.mjs → cache-D0Tt28cn.mjs} +5 -5
- package/dist/{cancel-deploy-CQ3NnMvf.mjs → cancel-deploy-CJKvk7AN.mjs} +4 -4
- package/dist/{cf-access-TWNzXltp.mjs → cf-access-BM9G0lhO.mjs} +4 -3
- package/dist/{cf-access-BcIBSKqG.mjs → cf-access-CWP4avfP.mjs} +3 -7
- package/dist/cf-build-output-2u583yJK.mjs +2 -0
- package/dist/{cf-build-output-DjvB_872.mjs → cf-build-output-Bc8i3dzE.mjs} +2 -2
- package/dist/cf-user-agent-ChjQp2MU.mjs +33 -0
- package/dist/cli/cli.mjs +198 -311
- package/dist/cli/cloudflare-operation-process.mjs +41 -15
- package/dist/cli/env-schema-probe.d.mts +5 -43
- package/dist/cli/env-schema-probe.mjs +14 -80
- package/dist/client-C1BjRn3g.mjs +2 -0
- package/dist/{client-DlDJuY0s.mjs → client-DM9Kcf4e.mjs} +161 -415
- package/dist/{cloudflare-auth-CuxfF6OA.mjs → cloudflare-auth-CqFBDo52.mjs} +12 -39
- package/dist/{cloudflare-cmd-lHqNlJGW.mjs → cloudflare-cmd-CTrn-lXJ.mjs} +6 -5
- package/dist/{cloudflare-config-BmhBv3HV.mjs → cloudflare-config-DV60XFFK.mjs} +16 -28
- package/dist/{cloudflare-connect-2G3rL2rP.mjs → cloudflare-connect-BosmCNlq.mjs} +3 -3
- package/dist/{cloudflare-operations-CwI1bChl.mjs → cloudflare-operations-BKdSfNBN.mjs} +26 -34
- package/dist/{cloudflare-operations-BlYLlowZ.mjs → cloudflare-operations-Ds-lX3Ts.mjs} +1 -1
- package/dist/{cloudflare-process-2-TfIEzB.mjs → cloudflare-process-CeDWJRhj.mjs} +12 -7
- package/dist/collect-NUlJMpLY.mjs +2 -0
- package/dist/{collect-DiTn9yr6.mjs → collect-xjffdCdk.mjs} +1 -1
- package/dist/{config-CSa15FvD.d.mts → config-7qoq2p9v.d.mts} +2 -2
- package/dist/{config-CLYAosnQ.mjs → config-BEm9vRvS.mjs} +11 -5
- package/dist/{config-DiowPT80.mjs → config-Bx_1SpnO.mjs} +87 -177
- package/dist/config-CNnrSMYm.mjs +2 -0
- package/dist/{config-DPByhVck.mjs → config-D0GY5ItR.mjs} +1 -1
- package/dist/config-entry.d.mts +1 -1
- package/dist/{connect-BfPBHHm-.mjs → connect-nukQSoEO.mjs} +8 -8
- package/dist/{create-project-BdXEFKal.mjs → create-project-D4APeBwX.mjs} +7 -7
- package/dist/{create-project-qFDC45zg.mjs → create-project-DL7YXpjj.mjs} +1 -1
- package/dist/{db-Xs80hcaA.mjs → db-27RztQLy.mjs} +173 -263
- package/dist/{delete-d2vuou3j.mjs → delete-BbsZFZIw.mjs} +5 -5
- package/dist/deploy-B06EQq4t.mjs +6009 -0
- package/dist/deploy-Db2ALnQP.mjs +3 -0
- package/dist/deploy-managed-static-CGswbcay.mjs +2277 -0
- package/dist/deploy-transport-BiicfoQW.mjs +180 -0
- package/dist/deploy.d.mts +10 -0
- package/dist/deploy.mjs +82 -0
- package/dist/dev-inbox-Rd6j_8vM.mjs +217 -0
- package/dist/discover-CTUiSsfG.mjs +2 -0
- package/dist/{discover-CkCYv9T_.mjs → discover-D2PGT63u.mjs} +2 -2
- package/dist/{dist-BVqXeR_h.mjs → dist-ipQi0Q8y.mjs} +2 -3
- package/dist/{domain-BsDUBAvt.mjs → domain-Bfq9n03H.mjs} +7 -22
- package/dist/{dotenv-BfU6eqFt.mjs → dotenv-CNazY3-w.mjs} +4 -16
- package/dist/{email-d_Aux1vM.mjs → email-BcjSyAL0.mjs} +4 -20
- package/dist/{email-_lGAHOhp.mjs → email-DIwaQU4P.mjs} +99 -191
- package/dist/email-cloudflare-CH053RxK.mjs +1096 -0
- package/dist/email-protocol-D9nTvhCp.mjs +82 -0
- package/dist/{entry-CMAkqBmU.mjs → entry-ehmBvs5w.mjs} +2 -2
- package/dist/{env-BxocywBB.mjs → env-BJjULvL0.mjs} +2 -2
- package/dist/{env-DMA3cXZt.mjs → env-BhdWMrNy.mjs} +2 -13
- package/dist/{env-C74QepDE.mjs → env-C6ipBLp3.mjs} +8 -8
- package/dist/{env-public-DR7ZM6d-.d.mts → env-public-CCdykygU.d.mts} +6 -23
- package/dist/{env-raw-jZpP5n47.mjs → env-raw-Cklzcde3.mjs} +3 -20
- package/dist/{env-types-CwXgeMgL.mjs → env-types-DS2_y4X8.mjs} +2 -2
- package/dist/{env-validation-CrVNjsPm.mjs → env-validation-CTn-HhG1.mjs} +1 -1
- package/dist/env-validation-cE0zcmzO.mjs +486 -0
- package/dist/{gen-DtkQhvQg.mjs → gen-CnN1Xidx.mjs} +131 -253
- package/dist/gen-F8pSZnhc.mjs +2 -0
- package/dist/{generate-GDbL7sUr.mjs → generate-Dat0UTry.mjs} +38 -4
- package/dist/generate-Rii9klHB.mjs +2 -0
- package/dist/generated-wrangler-config-DeWj5F9Y.mjs +18 -0
- package/dist/{github-cmd-DaDdBbSS.mjs → github-cmd-BdkU4Nhe.mjs} +27 -71
- package/dist/{handler-BHAn2fZJ.mjs → handler-BZ1t7-Rv.mjs} +2 -2
- package/dist/{handler-CNAwjRcW.d.mts → handler-_PqY82xe.d.mts} +1 -1
- package/dist/{headers-DlfR78Nu.mjs → headers-Di1FsD3e.mjs} +26 -81
- package/dist/{help-0bTe_lID.mjs → help-Bug7pyK_.mjs} +18 -10
- package/dist/help-s9q7LTcu.mjs +2 -0
- package/dist/{inbound-PfQDLXc5.mjs → inbound-DmkTQeWp.mjs} +71 -222
- package/dist/{inbound-CH5Mksyy.d.mts → inbound-brj2-TM5.d.mts} +19 -58
- package/dist/index.d.mts +2 -18
- package/dist/index.mjs +200 -496
- package/dist/{info-PYWwkWyt.mjs → info-CujPwtMe.mjs} +5 -5
- package/dist/{init-DaBGmaXC.mjs → init-ZWOJvc-Z.mjs} +179 -388
- package/dist/isr-config-DPjXM8J2.mjs +194 -0
- package/dist/{link-C6fjafep.mjs → link-UEc7bnF4.mjs} +8 -8
- package/dist/{list-BTFBlqKl.mjs → list-CuWeOnzk.mjs} +6 -17
- package/dist/{live-CgQuTpqD.mjs → live-BxLX-JqJ.mjs} +19 -17
- package/dist/{live-Du8jXwOW.d.mts → live-DJONVlQK.d.mts} +1 -1
- package/dist/load-user-env-DD5qveNU.mjs +49 -0
- package/dist/{local-d1-ga5O_idV.mjs → local-d1-BM3p74mm.mjs} +6 -6
- package/dist/{login-GKcNUmtI.mjs → login-CZ2Cqa-D.mjs} +11 -11
- package/dist/login-DhK7o1oJ.mjs +2 -0
- package/dist/{logs-BiMSULmc.mjs → logs-TihRcLTk.mjs} +5 -5
- package/dist/migrate-BgT-hmu8.mjs +2 -0
- package/dist/{migrate-NLsjBbuM.mjs → migrate-uFwojusJ.mjs} +69 -21
- package/dist/migration-handler-Cg0Y4EPu.mjs +470 -0
- package/dist/{migration-handler-DM4clYj5.d.mts → migration-handler-CwlEQUoo.d.mts} +17 -26
- package/dist/{mime-DxCznlJq.mjs → mime-srOklVVv.mjs} +92 -395
- package/dist/{node-DJicPvPj.mjs → node-DoKbo1SZ.mjs} +8 -24
- package/dist/{operator-args-DOBhIaIg.mjs → operator-args-UnE8Y2eK.mjs} +27 -26
- package/dist/{operator-auth-BEZ_u0Cz.mjs → operator-auth-Cr2zCc-J.mjs} +2 -2
- package/dist/{operator-client-DbDv4vtE.mjs → operator-client-C-ROjk1I.mjs} +4 -4
- package/dist/{operator-cmd-BT4hgavL.mjs → operator-cmd-C5lCctnc.mjs} +8 -8
- package/dist/operator-cmd-Cjk5DiRx.mjs +2 -0
- package/dist/{output-C50ag2r3.mjs → output-FNHKw5Ac.mjs} +36 -5
- package/dist/{package-json-DXfiT1jV.mjs → package-json-BjYqR-So.mjs} +1 -1
- package/dist/pages/client.d.mts +1 -1
- package/dist/pages/client.mjs +91 -5
- package/dist/pages/index.d.mts +1 -2
- package/dist/pages/index.mjs +6 -6
- package/dist/pages/islands-plugin.mjs +5 -83
- package/dist/pages/protocol.d.mts +2 -2
- package/dist/pages/protocol.mjs +1 -1
- package/dist/pages/serialize.mjs +1 -1
- package/dist/{platform-args-DUeXY9Om.mjs → platform-args-C6Mb_I3a.mjs} +34 -58
- package/dist/platform-args-Cm7x-fot.mjs +2 -0
- package/dist/{platform-auth-config-CkSx3usH.mjs → platform-auth-config-CJmNkFT2.mjs} +10 -11
- package/dist/{platform-auth-protection-BJimB_p9.mjs → platform-auth-protection-D5wvsI-Y.mjs} +36 -26
- package/dist/{platform-auth-recovery-BU6izFAU.mjs → platform-auth-recovery-D_0I3n-1.mjs} +8 -9
- package/dist/{platform-cmd-BbmJiq5O.mjs → platform-cmd-Cuj4oUVo.mjs} +1 -1
- package/dist/{platform-cmd-BbY1dWiM.mjs → platform-cmd-DxxZO6e5.mjs} +15 -15
- package/dist/{platform-discovery-DIYz8V63.mjs → platform-discovery-CHhNs8Nn.mjs} +1 -1
- package/dist/{platform-domain-CHVS6cV0.mjs → platform-domain-zLXnW1G_.mjs} +5 -5
- package/dist/{platform-lifecycle-DzCwqhFq.mjs → platform-lifecycle-DOW-wLfx.mjs} +1398 -2043
- package/dist/{platform-lifecycle-ByAlpkhV.mjs → platform-lifecycle-_gfnjUBr.mjs} +1 -1
- package/dist/{platform-management-CBOT4BSM.mjs → platform-management-CYrLvTGH.mjs} +1 -1
- package/dist/{platform-management-CuuVDhyt.mjs → platform-management-t7HKy4-U.mjs} +632 -124
- package/dist/{platform-plans-config-CN-heS4q.mjs → platform-plans-config-CNH6zbPX.mjs} +15 -11
- package/dist/{platform-recovery-CskSJgLh.mjs → platform-recovery-DeucI7A9.mjs} +6 -9
- package/dist/{platform-registry-Cjv2Qf0r.mjs → platform-registry-B9mWX9LO.mjs} +13 -18
- package/dist/{platform-setup-BBxRxmFC.mjs → platform-setup-CTf6MMT9.mjs} +19 -26
- package/dist/{plugin-inference-BlQbOL0P.mjs → plugin-inference-DsARdQKE.mjs} +18 -33
- package/dist/{prepare-Dq9hTIbo.mjs → prepare-C4zfwks4.mjs} +3 -3
- package/dist/{prepare-Do96654b.mjs → prepare-CSH9dKTI.mjs} +11 -13
- package/dist/prepare-dr9uxQSV.mjs +2 -0
- package/dist/{prerender-render-Ct20jftc.mjs → prerender-render-Bfsumdkv.mjs} +8 -2
- package/dist/prerender-render.d.mts +2 -0
- package/dist/prerender-render.mjs +2 -2
- package/dist/project-DiiOBZPF.mjs +2 -0
- package/dist/{project-cmd-DaoRrn-8.mjs → project-cmd-Dq75AXzy.mjs} +19 -19
- package/dist/{project-paths-GgcMozYz.mjs → project-paths-DMvEeSau.mjs} +9 -14
- package/dist/{project-BAm2aB6Q.mjs → project-rqDnVsJN.mjs} +8 -4
- package/dist/{project-team-Q_lCA7Io.mjs → project-team-B3_QcStG.mjs} +6 -6
- package/dist/{project-token-BArgK9o1.mjs → project-token-CvsRvv2I.mjs} +5 -5
- package/dist/{project-tsconfig-CVJhNMxs.mjs → project-tsconfig-bveqhlYA.mjs} +3 -5
- package/dist/{project-zero-trust-KO9Hu2Pq.mjs → project-zero-trust-D1ICiwN_.mjs} +5 -5
- package/dist/{protocol-BPZaNqBo.d.mts → protocol-4H7V_3Os.d.mts} +1 -1
- package/dist/{protocol-CfaUwNs8.mjs → protocol-RNP0u7UY.mjs} +9 -3
- package/dist/{provision-BfaLiWbj.mjs → provision-DDh7ITVS.mjs} +118 -865
- package/dist/{requests-C7Oeoh5u.mjs → requests-3CL3BuZh.mjs} +4 -4
- package/dist/resolve-project-B9Hr0D3n.mjs +2 -0
- package/dist/resolve-project-C_Cu7E8a.mjs +48 -0
- package/dist/{rollback-DVAtrLAl.mjs → rollback-Ce1d_0J9.mjs} +7 -17
- package/dist/{route-types-CbtsIeFn.mjs → route-types-IrBuwJ7u.mjs} +35 -70
- package/dist/routing-assets-VkrKIbxE.mjs +139 -0
- package/dist/{runner-9wjsSZx-.mjs → runner-B5huK2eC.mjs} +1 -1
- package/dist/{runner-DMBKSrRk.mjs → runner-DcVDrzuR.mjs} +7 -28
- package/dist/{runner-mysql-CEzKtmFb.mjs → runner-mysql-CCtyI0p6.mjs} +4 -3
- package/dist/runner-mysql-CaJq-hd6.mjs +2 -0
- package/dist/runner-pg-BJhFZZG4.mjs +2 -0
- package/dist/{runner-pg-DV8p_zjA.mjs → runner-pg-CPd-CB_F.mjs} +1 -1
- package/dist/runtime/ai.mjs +9 -22
- package/dist/runtime/better-auth-mysql.d.mts +2 -5
- package/dist/runtime/better-auth-mysql.mjs +6 -31
- package/dist/runtime/better-auth-pg.d.mts +2 -5
- package/dist/runtime/better-auth-pg.mjs +6 -32
- package/dist/runtime/better-auth.d.mts +2 -4
- package/dist/runtime/better-auth.mjs +9 -19
- package/dist/runtime/db.mjs +1 -1
- package/dist/runtime/durable.d.mts +16 -0
- package/dist/runtime/durable.mjs +26 -2
- package/dist/runtime/email/testing.d.mts +1 -1
- package/dist/runtime/email/testing.mjs +9 -23
- package/dist/runtime/email-protocol.d.mts +12 -0
- package/dist/runtime/email-protocol.mjs +2 -70
- package/dist/runtime/email.d.mts +1 -1
- package/dist/runtime/email.mjs +79 -221
- package/dist/runtime/env-public.d.mts +1 -1
- package/dist/runtime/env-public.mjs +12 -38
- package/dist/runtime/env.d.mts +1 -12
- package/dist/runtime/env.mjs +1 -1
- package/dist/runtime/handler.d.mts +1 -1
- package/dist/runtime/handler.mjs +1 -1
- package/dist/runtime/isr.mjs +1 -1
- package/dist/runtime/kv.mjs +1 -1
- package/dist/runtime/live-client.d.mts +1 -1
- package/dist/runtime/live-server.mjs +1 -16
- package/dist/runtime/live.d.mts +1 -1
- package/dist/runtime/live.mjs +1 -1
- package/dist/runtime/migration-handler-mysql.d.mts +2 -2
- package/dist/runtime/migration-handler-mysql.mjs +3 -2
- package/dist/runtime/migration-handler-pg.d.mts +2 -2
- package/dist/runtime/migration-handler-pg.mjs +1 -1
- package/dist/runtime/migration-handler.d.mts +2 -2
- package/dist/runtime/migration-handler.mjs +2 -470
- package/dist/runtime/queues.mjs +1 -1
- package/dist/runtime/remote/binding-handler.mjs +62 -62
- package/dist/runtime/remote/index.mjs +16 -77
- package/dist/runtime/routing.d.mts +1 -4
- package/dist/runtime/routing.mjs +82 -218
- package/dist/runtime/sandbox-container.d.mts +2 -2
- package/dist/runtime/sandbox-container.mjs +2 -2
- package/dist/runtime/sandbox.d.mts +2 -2
- package/dist/runtime/sandbox.mjs +13 -6
- package/dist/runtime/storage.mjs +1 -1
- package/dist/runtime/validator.d.mts +1 -1
- package/dist/runtime/ws-server.d.mts +2 -3
- package/dist/runtime/ws-server.mjs +6 -28
- package/dist/runtime/ws.d.mts +1 -1
- package/dist/{sandbox-container-Bo0eiFKz.d.mts → sandbox-container-ChQRum-j.d.mts} +3 -1
- package/dist/{sandbox-container-C6ItmVuN.mjs → sandbox-container-DBKIqDEK.mjs} +12 -1
- package/dist/{sandbox-C5LFoJMf.d.mts → sandbox-q3waMc2T.d.mts} +1 -1
- package/dist/{scan-C3uDzz6J.mjs → scan-C0BMdmEd.mjs} +84 -7
- package/dist/{secret-BvtB7IjY.mjs → secret-B5J8bBsI.mjs} +62 -80
- package/dist/{serialize-BPvnNQuA.mjs → serialize-BtQyaYoC.mjs} +10 -4
- package/dist/{skills-BgVMvQdy.mjs → skills-BJsan98C.mjs} +2 -2
- package/dist/{subcommand-prompt-BSlnD1fI.mjs → subcommand-prompt-gQ-NDA-u.mjs} +38 -43
- package/dist/sveltekit.mjs +1 -1
- package/dist/validate-C9xtFOYR.mjs +2 -0
- package/dist/{validate-C9qJArv7.mjs → validate-CheZGRE7.mjs} +4 -8
- package/dist/version-metadata-DIrqEHQo.mjs +73 -0
- package/dist/{wrangler-D9KTuqnv.mjs → wrangler-BYs07Rxy.mjs} +119 -378
- package/dist/{ws-CChrrAU-.d.mts → ws-aKVYB-fA.d.mts} +1 -1
- package/dist/yarn-pnp-DLbEFMT0.mjs +92 -0
- package/docs/guide/auth.md +2 -0
- package/docs/guide/database/postgresql.md +2 -0
- package/docs/guide/database.md +2 -0
- package/docs/guide/durable-state.md +24 -0
- package/docs/guide/platform/administration/access.md +4 -0
- package/docs/guide/platform/administration/connected-apps.md +55 -0
- package/docs/guide/platform/installation/credentials.md +3 -1
- package/docs/guide/quickstart.md +2 -0
- package/docs/guide/sandboxes.md +2 -0
- package/docs/reference/api/deploy.md +23 -0
- package/docs/reference/api/pages.md +2 -0
- package/docs/reference/api.md +2 -1
- package/docs/reference/cli/database.md +9 -3
- package/docs/reference/cli/platform-installation.md +1 -1
- package/docs/reference/cli/setup.md +2 -0
- package/package.json +13 -16
- package/skills/void/SKILL.md +1 -0
- package/dist/auth-LMJcNESe.mjs +0 -2
- package/dist/cf-build-output-H9a97vME.mjs +0 -2
- package/dist/cf-user-agent-lKblH3zU.mjs +0 -17
- package/dist/client-tso2OfcG.mjs +0 -2
- package/dist/collect-DLyFDiKW.mjs +0 -2
- package/dist/config-5r-YpMC-.mjs +0 -2
- package/dist/config-B_ggY-IO.mjs +0 -89
- package/dist/config-BtSFvXZx.mjs +0 -2
- package/dist/config-write-AHGesphx.mjs +0 -61
- package/dist/deploy-Bqe1PYBw.mjs +0 -10458
- package/dist/deploy-VsWsVQkw.mjs +0 -2
- package/dist/dev-inbox-CK-UuPob.mjs +0 -297
- package/dist/discover-EDUf6JJw.mjs +0 -2
- package/dist/dist-_UUlL6bg.mjs +0 -2
- package/dist/env-validation-Dxdx_5wo.mjs +0 -951
- package/dist/gen-dA9hW7AV.mjs +0 -2
- package/dist/head-client-DzmJGN4C.mjs +0 -90
- package/dist/help-DfQYVfGY.mjs +0 -2
- package/dist/login-mx_ydhmp.mjs +0 -2
- package/dist/migrate-BHp07yJE.mjs +0 -2
- package/dist/operator-cmd-CwBB-1yb.mjs +0 -2
- package/dist/pages/head-client.d.mts +0 -13
- package/dist/pages/head-client.mjs +0 -2
- package/dist/platform-args-D4E1PjVw.mjs +0 -2
- package/dist/prepare-DRUV-g3X.mjs +0 -2
- package/dist/project-DedqCp59.mjs +0 -2
- package/dist/provision-Wu9ZBk9L.mjs +0 -2
- package/dist/resolve-project-BIeYs9Cw.mjs +0 -2
- package/dist/resolve-project-CP8rZs_p.mjs +0 -28
- package/dist/runner-mysql-CkFqZ6CE.mjs +0 -2
- package/dist/runner-pg-BGYRFdRp.mjs +0 -2
- package/dist/runtime/env-helpers.d.mts +0 -2
- package/dist/runtime/env-helpers.mjs +0 -2
- package/dist/validate-BJr9LfXy.mjs +0 -2
- package/dist/yarn-pnp-CUX_iTPA.mjs +0 -188
|
@@ -1,18 +1,21 @@
|
|
|
1
|
-
import { a as join } from "./dist-
|
|
2
|
-
import { n as readProjectPaths } from "./project-paths-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { j as writeProvisionedWranglerConfig } from "./wrangler-D9KTuqnv.mjs";
|
|
8
|
-
import { c as getToken, u as openBrowser } from "./auth-Dn2vw-SG.mjs";
|
|
1
|
+
import { a as join } from "./dist-ipQi0Q8y.mjs";
|
|
2
|
+
import { n as readProjectPaths } from "./project-paths-DMvEeSau.mjs";
|
|
3
|
+
import { d as readConfig } from "./config-Bx_1SpnO.mjs";
|
|
4
|
+
import { i as scanEmailHandlersSync } from "./email-BcjSyAL0.mjs";
|
|
5
|
+
import { j as writeProvisionedWranglerConfig } from "./wrangler-BYs07Rxy.mjs";
|
|
6
|
+
import { c as getToken, u as openBrowser } from "./auth-B6iOCjKI.mjs";
|
|
9
7
|
import { A as confirm, L as log, U as password, tt as isCancel } from "./dist-D3m88sjf.mjs";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { f as import_picocolors, l as formatUrl, m as printSuccess, p as note, r as createSpinner } from "./output-FNHKw5Ac.mjs";
|
|
9
|
+
import { a as emailConfigInputs, c as renderAddressMap, i as createNodeEmailDns, l as renderEmailChecklist, o as preflightEmail, r as applyEmailSetup, s as probeMx } from "./email-cloudflare-CH053RxK.mjs";
|
|
10
|
+
import { n as PlatformApiError, r as PlatformClient } from "./client-DM9Kcf4e.mjs";
|
|
11
|
+
import { i as resolveCommandProjectId } from "./resolve-project-C_Cu7E8a.mjs";
|
|
12
|
+
import { o as resolveDeployTransport } from "./deploy-transport-BiicfoQW.mjs";
|
|
13
|
+
import { a as discoverRootWranglerConfig, c as runWranglerAuthToken, l as deriveWorkerName, o as createDeployWranglerRunner, s as isWranglerNonInteractiveOrCI } from "./deploy-B06EQq4t.mjs";
|
|
12
14
|
import { existsSync, mkdtempSync, rmSync, writeFileSync } from "node:fs";
|
|
13
15
|
import { tmpdir } from "node:os";
|
|
14
16
|
import { execSync } from "node:child_process";
|
|
15
17
|
import { parseRootWranglerConfig, readWranglerTopLevelString } from "@void/deploy-cloudflare";
|
|
18
|
+
import { setTimeout as setTimeout$1 } from "node:timers/promises";
|
|
16
19
|
//#region src/cli/email.ts
|
|
17
20
|
async function runEmailCommand(root, args) {
|
|
18
21
|
if (args.platform === "cloudflare") return runEmailCloudflareCommand(root, args);
|
|
@@ -30,23 +33,7 @@ async function runEmailCommand(root, args) {
|
|
|
30
33
|
process.exit(1);
|
|
31
34
|
}
|
|
32
35
|
const client = new PlatformClient(token, { root });
|
|
33
|
-
const
|
|
34
|
-
let projectId;
|
|
35
|
-
if (requestedSlug) {
|
|
36
|
-
const project = (await client.listProjects()).find((p) => p.slug === requestedSlug);
|
|
37
|
-
if (!project) {
|
|
38
|
-
log.error(`project: No project found with slug '${requestedSlug}'.`);
|
|
39
|
-
process.exit(1);
|
|
40
|
-
}
|
|
41
|
-
projectId = project.id;
|
|
42
|
-
} else {
|
|
43
|
-
const config = readProjectConfig(root);
|
|
44
|
-
if (!config) {
|
|
45
|
-
log.error("No linked project. Run `void project link` or pass --project <name>.");
|
|
46
|
-
process.exit(1);
|
|
47
|
-
}
|
|
48
|
-
projectId = config.projectId;
|
|
49
|
-
}
|
|
36
|
+
const projectId = await resolveCommandProjectId(client, root, args.projectSlug);
|
|
50
37
|
switch (args.subcommand) {
|
|
51
38
|
case "usage": return emailUsage(client, projectId);
|
|
52
39
|
case "logs": return emailLogs(client, projectId, args.limit);
|
|
@@ -118,10 +105,8 @@ async function emailLogs(client, projectId, limit) {
|
|
|
118
105
|
note(lines.join("\n"), "Email Logs");
|
|
119
106
|
}
|
|
120
107
|
/**
|
|
121
|
-
*
|
|
122
|
-
*
|
|
123
|
-
* gates the routing POST on both paths; `zone: read` is what the zone lookup
|
|
124
|
-
* needs. URL-encoded by `URL.searchParams`.
|
|
108
|
+
* Permission groups prefilled in the dashboard token link. `zone_settings: edit` gates
|
|
109
|
+
* the routing POST; `zone: read` serves the zone lookup.
|
|
125
110
|
*/
|
|
126
111
|
const CF_TOKEN_TEMPLATE_PERMISSION_GROUPS = [
|
|
127
112
|
{
|
|
@@ -145,7 +130,7 @@ const CF_TOKEN_TEMPLATE_PERMISSION_GROUPS = [
|
|
|
145
130
|
type: "edit"
|
|
146
131
|
}
|
|
147
132
|
];
|
|
148
|
-
/**
|
|
133
|
+
/** Dashboard link that prefills the scoped API token form. */
|
|
149
134
|
function buildCfApiTokenTemplateUrl(domain) {
|
|
150
135
|
const url = new URL("https://dash.cloudflare.com/profile/api-tokens");
|
|
151
136
|
url.searchParams.set("permissionGroupKeys", JSON.stringify(CF_TOKEN_TEMPLATE_PERMISSION_GROUPS));
|
|
@@ -211,10 +196,8 @@ function clearClipboard() {
|
|
|
211
196
|
} catch {}
|
|
212
197
|
}
|
|
213
198
|
/**
|
|
214
|
-
*
|
|
215
|
-
*
|
|
216
|
-
* lets the platform verify authoritatively, never treating a network blip as
|
|
217
|
-
* a bad token. The token itself is never logged.
|
|
199
|
+
* Local active check. 'unknown' means the check could not run (network or CF error); the
|
|
200
|
+
* caller proceeds and the platform verifies authoritatively. The token is never logged.
|
|
218
201
|
*/
|
|
219
202
|
async function verifyCfApiToken(token) {
|
|
220
203
|
let res;
|
|
@@ -244,42 +227,8 @@ function isValidEmailDomainInput(domain) {
|
|
|
244
227
|
return /^(?!-)[a-z0-9-]{1,63}(?<!-)(\.(?!-)[a-z0-9-]{1,63}(?<!-))+$/.test(domain);
|
|
245
228
|
}
|
|
246
229
|
/**
|
|
247
|
-
*
|
|
248
|
-
*
|
|
249
|
-
* Throws on anything else — the user named a domain this add cannot register.
|
|
250
|
-
*/
|
|
251
|
-
function resolveEmailDomainTarget(domain, subdomain) {
|
|
252
|
-
if (subdomain === void 0) return {
|
|
253
|
-
emailDomain: domain,
|
|
254
|
-
forced: false
|
|
255
|
-
};
|
|
256
|
-
const candidate = subdomain.trim().toLowerCase().replace(/\.$/, "");
|
|
257
|
-
const resolved = candidate.includes(".") ? candidate : `${candidate}.${domain}`;
|
|
258
|
-
if (!isValidEmailDomainInput(resolved)) throw new Error(`email: invalid --subdomain value '${subdomain}'.`);
|
|
259
|
-
if (resolved === domain || !resolved.endsWith(`.${domain}`)) throw new Error(`email: --subdomain must name a subdomain of ${domain} (got '${subdomain}').`);
|
|
260
|
-
return {
|
|
261
|
-
emailDomain: resolved,
|
|
262
|
-
forced: true
|
|
263
|
-
};
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Local public-DNS MX read. [] = no records, null = could not read. The
|
|
267
|
-
* local answer only steers the default and the render — the platform
|
|
268
|
-
* re-checks over public DNS and its answer is authoritative, so a
|
|
269
|
-
* split-horizon resolver never blocks a valid setup here.
|
|
270
|
-
*/
|
|
271
|
-
async function lookupMxForRender(dns, name) {
|
|
272
|
-
try {
|
|
273
|
-
return (await dns.resolveMx(name)).slice().sort((a, b) => a.priority - b.priority).map((r) => r.exchange.replace(/\.$/, "").toLowerCase());
|
|
274
|
-
} catch (err) {
|
|
275
|
-
const code = err?.code;
|
|
276
|
-
return code === "ENODATA" || code === "ENOTFOUND" ? [] : null;
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
/**
|
|
280
|
-
* The "Enter switches paths" race from 0078's flow. The default reads one
|
|
281
|
-
* cooked-mode line from stdin; `stop` removes the listener so a losing race
|
|
282
|
-
* cannot eat the first keystroke of a later prompt.
|
|
230
|
+
* Resolves when Enter is pressed during the clipboard watch. `stop` removes the listener so
|
|
231
|
+
* a losing race cannot eat the first keystroke of a later prompt.
|
|
283
232
|
*/
|
|
284
233
|
function createEnterRace(waitForEnter) {
|
|
285
234
|
if (waitForEnter) return {
|
|
@@ -308,15 +257,42 @@ async function defaultPasteToken() {
|
|
|
308
257
|
return result;
|
|
309
258
|
}
|
|
310
259
|
/**
|
|
311
|
-
* Lost-answer reconcile bounds
|
|
312
|
-
*
|
|
313
|
-
*
|
|
314
|
-
|
|
315
|
-
|
|
260
|
+
* Lost-answer reconcile bounds: attempt-count bounded so the worst case is finite. A lost
|
|
261
|
+
* answer does not stop the API worker, so one immediate status read can 404 while the
|
|
262
|
+
* request is still committing.
|
|
263
|
+
*/
|
|
264
|
+
const RECONCILE_ATTEMPTS = 15;
|
|
265
|
+
const RECONCILE_INTERVAL_MS = 1e3;
|
|
266
|
+
/**
|
|
267
|
+
* After an add or rotate request fails without a definitive refusal, poll its operation by
|
|
268
|
+
* attempt id and print it. Returns undefined when the operation never appears.
|
|
316
269
|
*/
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
270
|
+
async function reconcileEmailOperation(error, client, projectId, attemptId, title, sleep = setTimeout$1) {
|
|
271
|
+
if (error instanceof PlatformApiError && [
|
|
272
|
+
400,
|
|
273
|
+
403,
|
|
274
|
+
404,
|
|
275
|
+
409
|
|
276
|
+
].includes(error.status)) throw error;
|
|
277
|
+
for (let attempt = 0; attempt < RECONCILE_ATTEMPTS; attempt++) {
|
|
278
|
+
if (attempt > 0) await sleep(RECONCILE_INTERVAL_MS);
|
|
279
|
+
let operation;
|
|
280
|
+
try {
|
|
281
|
+
operation = await client.getEmailOperation(projectId, attemptId);
|
|
282
|
+
} catch {
|
|
283
|
+
continue;
|
|
284
|
+
}
|
|
285
|
+
note([
|
|
286
|
+
`Operation: ${operation.operationId}`,
|
|
287
|
+
`Status: ${operation.status}`,
|
|
288
|
+
`Inbound: ${operation.readiness.inbound.status}`,
|
|
289
|
+
`Outbound: ${operation.readiness.outbound.status}`,
|
|
290
|
+
`Credential: ${operation.readiness.management.status}`
|
|
291
|
+
].join("\n"), title);
|
|
292
|
+
return operation;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
async function emailDomainAdd(client, projectId, rawDomain, deps = {}, subdomain) {
|
|
320
296
|
const exit = deps.exit ?? ((code) => process.exit(code));
|
|
321
297
|
const fail = (message) => {
|
|
322
298
|
log.error(message);
|
|
@@ -325,56 +301,42 @@ async function emailDomainAdd(client, projectId, rawDomain, subdomain, deps = {}
|
|
|
325
301
|
const domain = normalizeEmailDomainInput(rawDomain);
|
|
326
302
|
if (!isValidEmailDomainInput(domain)) return fail(`email: invalid domain '${rawDomain}'.`);
|
|
327
303
|
if (subdomain !== void 0) return fail("email: Platform-managed custom email requires a Cloudflare zone apex because inbound email uses its catch-all. Omit --subdomain, choose an unused zone apex, or use the platform shared mail address.");
|
|
328
|
-
let target;
|
|
329
|
-
try {
|
|
330
|
-
target = resolveEmailDomainTarget(domain, subdomain);
|
|
331
|
-
} catch (err) {
|
|
332
|
-
return fail(err instanceof Error ? err.message : String(err));
|
|
333
|
-
}
|
|
334
304
|
const dns = deps.dns ?? await createNodeEmailDns();
|
|
335
|
-
const
|
|
336
|
-
const mx = await
|
|
337
|
-
if (mx ===
|
|
338
|
-
else if (mx.
|
|
305
|
+
const checkApexMx = async () => {
|
|
306
|
+
const mx = await probeMx(dns, domain);
|
|
307
|
+
if (mx.state === "unknown") log.info(`MX could not read ${domain}'s MX from here — the platform decides over public DNS.`);
|
|
308
|
+
else if (mx.state === "foreign") fail(`email: ${domain} already receives mail from another provider. Platform custom inbound email requires an unused Cloudflare zone apex; choose another apex or use the platform shared mail address.`);
|
|
339
309
|
else log.info(`MX using the requested apex ${domain}`);
|
|
340
310
|
};
|
|
341
|
-
let renewal;
|
|
311
|
+
let renewal = false;
|
|
342
312
|
const settings = await client.getEmailSettings(projectId);
|
|
343
313
|
if (settings.domains.management === "admin") {
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
await decideTarget();
|
|
314
|
+
renewal = (await client.listEmailDomains(projectId)).some((row) => row.domain === domain && row.managed_by !== "admin");
|
|
315
|
+
if (!renewal) {
|
|
316
|
+
await checkApexMx();
|
|
348
317
|
const project = settings.domains.projectSlug ?? projectId;
|
|
349
318
|
log.info([
|
|
350
319
|
"Email domains on this platform are managed by its administrator.",
|
|
351
320
|
"Ask them to run:",
|
|
352
321
|
"",
|
|
353
|
-
` void platform email domain-add ${
|
|
322
|
+
` void platform email domain-add ${domain} --project ${project}`,
|
|
354
323
|
"",
|
|
355
324
|
"`void email domain list` and `void email domain status` keep working here."
|
|
356
325
|
].join("\n"));
|
|
357
326
|
return exit(0);
|
|
358
327
|
}
|
|
359
|
-
renewal = existing.domain;
|
|
360
|
-
target = {
|
|
361
|
-
emailDomain: existing.domain,
|
|
362
|
-
forced: true
|
|
363
|
-
};
|
|
364
328
|
}
|
|
365
|
-
if (renewal
|
|
366
|
-
else await
|
|
329
|
+
if (renewal) log.info(`Updating ${domain} with a scoped credential; the platform will reconcile setup.`);
|
|
330
|
+
else await checkApexMx();
|
|
367
331
|
if (!(deps.isInteractive ?? !isWranglerNonInteractiveOrCI())) return fail("email: `void email domain add` needs an interactive terminal to create or paste a scoped Cloudflare API token. Run it locally.");
|
|
368
332
|
let credential;
|
|
369
333
|
{
|
|
370
|
-
log.info(`Create a Cloudflare API token restricted to the account and DNS zone containing ${
|
|
371
|
-
const url = buildCfApiTokenTemplateUrl(
|
|
334
|
+
log.info(`Create a Cloudflare API token restricted to the account and DNS zone containing ${domain}. In the resource selectors, replace All accounts and All zones with those exact resources. Workers Scripts Write still applies to every Worker in the selected account.`);
|
|
335
|
+
const url = buildCfApiTokenTemplateUrl(domain);
|
|
372
336
|
const readClip = deps.readClipboard ?? readClipboard;
|
|
373
337
|
const clearClip = deps.clearClipboard ?? clearClipboard;
|
|
374
338
|
const verify = deps.verifyToken ?? verifyCfApiToken;
|
|
375
|
-
const openUrl = deps.openUrl ??
|
|
376
|
-
import("node:child_process").then(({ execFile }) => openBrowser(u, execFile));
|
|
377
|
-
});
|
|
339
|
+
const openUrl = deps.openUrl ?? openBrowser;
|
|
378
340
|
const snapshot = readClip();
|
|
379
341
|
if (snapshot === null) log.info("No clipboard tool found here — paste the token instead.");
|
|
380
342
|
openUrl(url);
|
|
@@ -387,7 +349,7 @@ async function emailDomainAdd(client, projectId, rawDomain, subdomain, deps = {}
|
|
|
387
349
|
"Create the token in three clicks: Continue to summary → Create Token → Copy.",
|
|
388
350
|
"Watching the clipboard for it — nothing is read until you copy, and it is cleared afterwards.",
|
|
389
351
|
"(Enter pastes it yourself instead.)",
|
|
390
|
-
`If the browser didn't open, visit:\n${import_picocolors.default.blue(url)}`
|
|
352
|
+
`If the browser didn't open, visit:\n${import_picocolors.default.blue(formatUrl(url))}`
|
|
391
353
|
].join("\n"));
|
|
392
354
|
const spinner = watchSpinner;
|
|
393
355
|
const deadline = Date.now() + (deps.watchTimeoutMs ?? 6e5);
|
|
@@ -451,54 +413,32 @@ async function emailDomainAdd(client, projectId, rawDomain, subdomain, deps = {}
|
|
|
451
413
|
};
|
|
452
414
|
}
|
|
453
415
|
}
|
|
454
|
-
if (!await (deps.confirmScope ?? (async (
|
|
416
|
+
if (!await (deps.confirmScope ?? (async (name) => {
|
|
455
417
|
const answer = await confirm({
|
|
456
|
-
message: `Is this token restricted to the Cloudflare account and DNS zone containing ${
|
|
418
|
+
message: `Is this token restricted to the Cloudflare account and DNS zone containing ${name}?`,
|
|
457
419
|
initialValue: false
|
|
458
420
|
});
|
|
459
421
|
return !isCancel(answer) && answer === true;
|
|
460
|
-
}))(
|
|
422
|
+
}))(domain)) return fail("email: restrict the token to the selected account and zone before adding the domain. Nothing was submitted to the platform.");
|
|
461
423
|
const attemptId = crypto.randomUUID();
|
|
462
424
|
log.info(`Setup operation: ${attemptId}`);
|
|
463
425
|
let row;
|
|
464
426
|
try {
|
|
465
427
|
row = await client.addEmailDomain(projectId, {
|
|
466
|
-
domain
|
|
428
|
+
domain,
|
|
467
429
|
apiToken: credential.apiToken,
|
|
468
430
|
attemptId
|
|
469
431
|
});
|
|
470
432
|
} catch (error) {
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
for (let attempt = 0; attempt < ADD_RECONCILE_ATTEMPTS; attempt++) {
|
|
479
|
-
if (attempt > 0) await sleep(ADD_RECONCILE_INTERVAL_MS);
|
|
480
|
-
let operation;
|
|
481
|
-
try {
|
|
482
|
-
operation = await client.getEmailOperation(projectId, attemptId);
|
|
483
|
-
} catch {
|
|
484
|
-
continue;
|
|
485
|
-
}
|
|
486
|
-
note([
|
|
487
|
-
`Operation: ${operation.operationId}`,
|
|
488
|
-
`Status: ${operation.status}`,
|
|
489
|
-
`Inbound: ${operation.readiness.inbound.status}`,
|
|
490
|
-
`Outbound: ${operation.readiness.outbound.status}`,
|
|
491
|
-
`Credential: ${operation.readiness.management.status}`
|
|
492
|
-
].join("\n"), "Email Setup");
|
|
493
|
-
if (operation.error) log.error(operation.error);
|
|
494
|
-
log.info(`Run \`void email domain status ${target.emailDomain}\` to inspect setup.`);
|
|
495
|
-
if (operation.status === "completed") {
|
|
496
|
-
printSuccess(`Email domain ${target.emailDomain} configured.`);
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
return fail(`email: setup is ${operation.status}; operation ${operation.operationId} retains its confirmed progress on the platform.`);
|
|
433
|
+
const operation = await reconcileEmailOperation(error, client, projectId, attemptId, "Email Setup", deps.sleep);
|
|
434
|
+
if (!operation) return fail(`email: setup outcome is unknown (operation ${attemptId}). Nothing was revoked. Check \`void email domain status ${domain}\` before starting another setup.`);
|
|
435
|
+
if (operation.error) log.error(operation.error);
|
|
436
|
+
log.info(`Run \`void email domain status ${domain}\` to inspect setup.`);
|
|
437
|
+
if (operation.status === "completed") {
|
|
438
|
+
printSuccess(`Email domain ${domain} configured.`);
|
|
439
|
+
return;
|
|
500
440
|
}
|
|
501
|
-
return fail(`email: setup
|
|
441
|
+
return fail(`email: setup is ${operation.status}; operation ${operation.operationId} retains its confirmed progress on the platform.`);
|
|
502
442
|
}
|
|
503
443
|
log.info("Token stored encrypted on the platform for this zone connection — nothing is kept on this machine.");
|
|
504
444
|
printEmailDomainOutcome(row);
|
|
@@ -556,33 +496,11 @@ async function emailDomainRotateSecret(client, projectId, rawDomain, deps = {})
|
|
|
556
496
|
try {
|
|
557
497
|
row = await client.rotateEmailDomainSecret(projectId, domain, attemptId);
|
|
558
498
|
} catch (error) {
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
].includes(error.status)) throw error;
|
|
565
|
-
const sleep = deps.sleep ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
566
|
-
for (let attempt = 0; attempt < ADD_RECONCILE_ATTEMPTS; attempt++) {
|
|
567
|
-
if (attempt > 0) await sleep(ADD_RECONCILE_INTERVAL_MS);
|
|
568
|
-
let operation;
|
|
569
|
-
try {
|
|
570
|
-
operation = await client.getEmailOperation(projectId, attemptId);
|
|
571
|
-
} catch {
|
|
572
|
-
continue;
|
|
573
|
-
}
|
|
574
|
-
note([
|
|
575
|
-
`Operation: ${operation.operationId}`,
|
|
576
|
-
`Status: ${operation.status}`,
|
|
577
|
-
`Inbound: ${operation.readiness.inbound.status}`,
|
|
578
|
-
`Outbound: ${operation.readiness.outbound.status}`,
|
|
579
|
-
`Credential: ${operation.readiness.management.status}`
|
|
580
|
-
].join("\n"), "Email Secret Rotation");
|
|
581
|
-
if (operation.status !== "completed") throw new Error(`email: secret rotation ${operation.status}; inspect operation ${operation.operationId}`);
|
|
582
|
-
printSuccess("Zone ingress secret rotated and verified on the deployed Worker.");
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
throw new Error(`email: secret rotation outcome is unknown (operation key ${attemptId}); inspect \`void email domain status ${domain}\` before starting another rotation.`);
|
|
499
|
+
const operation = await reconcileEmailOperation(error, client, projectId, attemptId, "Email Secret Rotation", deps.sleep);
|
|
500
|
+
if (!operation) throw new Error(`email: secret rotation outcome is unknown (operation key ${attemptId}); inspect \`void email domain status ${domain}\` before starting another rotation.`);
|
|
501
|
+
if (operation.status !== "completed") throw new Error(`email: secret rotation ${operation.status}; inspect operation ${operation.operationId}`);
|
|
502
|
+
printSuccess("Zone ingress secret rotated and verified on the deployed Worker.");
|
|
503
|
+
return;
|
|
586
504
|
}
|
|
587
505
|
printEmailDomainOutcome(row);
|
|
588
506
|
if (row.operationStatus !== "completed") throw new Error(`email: secret rotation ${row.operationStatus ?? "pending"}; inspect operation ${row.operationId ?? row.domain}`);
|
|
@@ -601,7 +519,7 @@ async function emailDomainRemove(client, projectId, rawDomain, options = {}) {
|
|
|
601
519
|
}
|
|
602
520
|
async function runEmailDomainCommand(client, projectId, args) {
|
|
603
521
|
switch (args.domainVerb) {
|
|
604
|
-
case "add": return emailDomainAdd(client, projectId, args.domain, args.subdomain);
|
|
522
|
+
case "add": return emailDomainAdd(client, projectId, args.domain, {}, args.subdomain);
|
|
605
523
|
case "status": return emailDomainStatus(client, projectId, args.domain);
|
|
606
524
|
case "list": return emailDomainList(client, projectId);
|
|
607
525
|
case "sync": return emailDomainSync(client, projectId, args.domain);
|
|
@@ -610,10 +528,8 @@ async function runEmailDomainCommand(client, projectId, args) {
|
|
|
610
528
|
}
|
|
611
529
|
}
|
|
612
530
|
/**
|
|
613
|
-
* Wrangler
|
|
614
|
-
* an
|
|
615
|
-
* unrelated ancestor config can select the wrong account. The real project path remains separate:
|
|
616
|
-
* setup writes there only after it succeeds, while status leaves the project untouched.
|
|
531
|
+
* Wrangler finds config by walking parent directories, so an app with no root config runs in
|
|
532
|
+
* an empty temporary one; otherwise an unrelated ancestor config could select the wrong account.
|
|
617
533
|
*/
|
|
618
534
|
function createEmailWranglerConfigContext(configPath) {
|
|
619
535
|
if (existsSync(configPath)) return {
|
|
@@ -644,18 +560,15 @@ function createEmailWranglerConfigContext(configPath) {
|
|
|
644
560
|
};
|
|
645
561
|
}
|
|
646
562
|
/**
|
|
647
|
-
* `void email setup
|
|
563
|
+
* `void email setup|status --platform cloudflare`.
|
|
648
564
|
*
|
|
649
|
-
* `setup`
|
|
650
|
-
* apply
|
|
651
|
-
* finds email not ready
|
|
652
|
-
*
|
|
653
|
-
*
|
|
654
|
-
* is also the ONLY place a sending onboarding the committed binding remembers as refused
|
|
655
|
-
* (Workers Free) is retried — on its own prompt, after a Workers Paid upgrade; the deploy
|
|
656
|
-
* reads that row as settled and never retries it.
|
|
565
|
+
* `setup` runs the deploy's email step on its own: preflight, checklist, one confirmation,
|
|
566
|
+
* apply, then a write of the generated Cloudflare config and void.lock.json. A CI deploy that
|
|
567
|
+
* finds email not ready says to run it once locally, commit void.lock.json, and redeploy; the
|
|
568
|
+
* next deploy creates the routing rules from `addresses`. It is also the only place that
|
|
569
|
+
* retries a sending onboarding the committed binding records as refused (Workers Free).
|
|
657
570
|
*
|
|
658
|
-
* `status`
|
|
571
|
+
* `status` prints the preflight and exits 1 when email is not ready.
|
|
659
572
|
*/
|
|
660
573
|
async function runEmailCloudflareCommand(root, args, deps = {}) {
|
|
661
574
|
const rawExit = deps.exit ?? ((code) => process.exit(code));
|
|
@@ -692,7 +605,6 @@ async function runEmailCloudflareCommandInConfig(root, args, project, configPath
|
|
|
692
605
|
};
|
|
693
606
|
const { from, handlers } = project;
|
|
694
607
|
const rootConfig = parseRootWranglerConfig(configPath);
|
|
695
|
-
await loadProvisionModule();
|
|
696
608
|
let apiBaseUrl;
|
|
697
609
|
try {
|
|
698
610
|
apiBaseUrl = resolveDeployTransport(root, rootConfig);
|
|
@@ -708,16 +620,12 @@ async function runEmailCloudflareCommandInConfig(root, args, project, configPath
|
|
|
708
620
|
const workerName = readWranglerTopLevelString(rootConfig, "name") ?? deriveWorkerName(root);
|
|
709
621
|
const runWrangler = deps.runWrangler ?? createDeployWranglerRunner(root, accountId, apiBaseUrl);
|
|
710
622
|
const getSessionBearer = deps.getSessionBearer ?? (() => runWranglerAuthToken(runWrangler, wranglerConfigPath));
|
|
711
|
-
const sendEmail = rootConfig.send_email;
|
|
712
623
|
const inputs = {
|
|
713
624
|
handlers,
|
|
714
625
|
from,
|
|
715
626
|
workerName,
|
|
716
627
|
accountId,
|
|
717
|
-
|
|
718
|
-
existingAddresses: rootConfig.addresses,
|
|
719
|
-
existingVars: rootConfig.vars && typeof rootConfig.vars === "object" && !Array.isArray(rootConfig.vars) ? rootConfig.vars : null,
|
|
720
|
-
configConflicts: findEmailConfigConflicts(rootConfig),
|
|
628
|
+
...emailConfigInputs(rootConfig),
|
|
721
629
|
configPath: wranglerConfigPath,
|
|
722
630
|
apiBaseUrl,
|
|
723
631
|
runWrangler,
|