cf 1.0.0-beta.27 → 1.0.0-beta.28
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/_meta/commands.json +5787 -1914
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +796 -557
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
- package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
- package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
- package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
- package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/containers-B06OGOEB.mjs +380 -0
- package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
- package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
- package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
- package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
- package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
- package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
- package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
- package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
- package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
- package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
- package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
- package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/k2-CZT2Pd5J.mjs +10 -0
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
- package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
- package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
- package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
- package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
- package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
- package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
- package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
- package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
- package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
- package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
- package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
- package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
- package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
- package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +14 -14
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/containers-DINLx5_i.mjs +0 -380
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/workers-B3uJqJKc.mjs +0 -39
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-DoewLePl.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-CEpZ-lQZ.mjs";import{t as _}from"./body-unions-DNs981Ia.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/messages/${t.message_id}`,response:`binary-response`,errors:{404:`NotFoundError`,500:`InternalServerError`}};function ee(e){return e.usage(`$0 email-sending get <message-id>
|
|
3
3
|
|
|
4
|
-
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Returns the raw RFC 5322 MIME message for the given account and message id.`).positional(`message-id`,{type:`string`,description:`Message ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <message-id>`,describe:`Fetch an email message`,builder:ee,handler:async e=>l({command:`email-sending get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/messages/${e[`message-id`]==null?`<message-id>`:encodeURIComponent(String(e[`message-id`]))}`,pathParams:{"message-id":String(e[`message-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(v,{account_id:l,message_id:e[`message-id`]}));o(u,{successLabel:`Loaded`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/limits`,errors:{403:`ForbiddenError`}};function te(e){return e.usage(`$0 email-sending limits get
|
|
5
5
|
|
|
6
|
-
Returns the current daily sending quota for the account and, when a quota is resolved, the account's current usage against it. Quota is null when not yet available; usage is null when there is no resolved quota or usage is temporarily unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get`,describe:`Get sending limits`,builder:te,handler:async e=>l({command:`email-sending limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf email-sending limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/limits`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(
|
|
6
|
+
Returns the current daily sending quota for the account and, when a quota is resolved, the account's current usage against it. Quota is null when not yet available; usage is null when there is no resolved quota or usage is temporarily unavailable.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get`,describe:`Get sending limits`,builder:te,handler:async e=>l({command:`email-sending limits get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf email-sending limits get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/limits`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(b,{account_id:l}));o(u,{successLabel:`Loaded`})})},re={command:`limits`,describe:`Inspect account-level sending quotas and current usage`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/reputation`,errors:{403:`ForbiddenError`}};function ae(e){return e.usage(`$0 email-sending reputation get
|
|
7
7
|
|
|
8
8
|
Returns the authoritative Email Sending reputation state and active evaluation policy. Accounts without an evaluation are Healthy with null evaluation timestamps.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:`Get account reputation`,builder:ae,handler:async e=>l({command:`email-sending reputation get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();s({command:`cf email-sending reputation get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/reputation`,pathParams:{},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(ie,{account_id:l}));o(u,{successLabel:`Loaded`})})},se={command:`reputation`,describe:`Operations for reputation`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/sending/send_raw`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 email-sending send-raw
|
|
9
9
|
|
|
10
|
-
Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIME message plus the SMTP envelope (from and recipients).`).option(`from`,{type:`string`,description:`Sender email address.`}).option(`mime-message`,{type:`string`,description:`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`}).option(`recipients`,{type:`string`,array:!0,description:`List of recipient email addresses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`send-raw`,describe:`Send a raw MIME email`,builder:S,handler:async e=>l({command:`email-sending send-raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending send-raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/send_raw`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({from:m(e.from,`from`,`text`),mime_message:m(e[`mime-message`],`mime-message`,`text`),recipients:e.recipients}):d(e.body)});return}let i=await n(e),
|
|
10
|
+
Send a raw RFC 5322 (MIME) email for the specified account. Provide the full MIME message plus the SMTP envelope (from and recipients).`).option(`from`,{type:`string`,description:`Sender email address.`}).option(`mime-message`,{type:`string`,description:`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`}).option(`recipients`,{type:`string`,array:!0,description:`List of recipient email addresses.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const C={command:`send-raw`,describe:`Send a raw MIME email`,builder:S,handler:async e=>l({command:`email-sending send-raw`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending send-raw`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/send_raw`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({from:m(e.from,`from`,`text`),mime_message:m(e[`mime-message`],`mime-message`,`text`),recipients:e.recipients}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(x,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}if(e.from===void 0&&(e.from=await h(`from`,`Sender email address.`)),e[`mime-message`]===void 0&&(e[`mime-message`]=await h(`mime-message`,`The full MIME-encoded email message. Should include standard RFC 5322 headers such as From, To, Subject, and Content-Type. The from and recipients fields in the request body control SMTP envelope routing; the From and To headers in the MIME message control what the recipient's email client displays.`)),e.recipients===void 0)throw Error(`--recipients is required (or pass --body with this field set).`);let f=p({from:m(e.from,`from`,`text`),mime_message:m(e[`mime-message`],`mime-message`,`text`),recipients:e.recipients}),g=await c(`Creating`,async()=>l.send(x,{body:f,account_id:u}));o(g,{successLabel:`Created`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/sending/send`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,409:`ConflictError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 email-sending send
|
|
11
11
|
|
|
12
|
-
Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).option(`attachments`,{type:`string`,description:`File attachments and inline images. Provide as a JSON array of objects or @path/to/file.json.`}).option(`bcc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`bcc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`cc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`cc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`from-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`from-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`headers`,{type:`string`,description:`Custom email headers as key-value pairs. Provide as a JSON object or @path/to/file.json.`}).option(`html`,{type:`string`,description:`HTML body of the email. Provide at least one of text or html (non-empty).`}).option(`reply-to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`reply-to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`subject`,{type:`string`,description:`Email subject line.`}).option(`text`,{type:`string`,description:`Plain text body of the email. Provide at least one of text or html (non-empty).`}).option(`to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).implies(`bcc-name`,[`bcc-address`]).implies(`cc-name`,[`cc-address`]).implies(`from-name`,[`from-address`]).implies(`reply-to-name`,[`reply-to-address`]).implies(`to-name`,[`to-address`])}const E={command:`send`,describe:`Send an email`,builder:T,handler:async e=>l({command:`email-sending send`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/send`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({attachments:u(e.attachments,`attachments`),bcc:{address:m(e[`bcc-address`],`bcc-address`,`text`),name:m(e[`bcc-name`],`bcc-name`,`text`)},cc:{address:m(e[`cc-address`],`cc-address`,`text`),name:m(e[`cc-name`],`cc-name`,`text`)},from:{address:m(e[`from-address`],`from-address`,`text`),name:m(e[`from-name`],`from-name`,`text`)},headers:f(e.headers,`headers`),html:m(e.html,`html`,`text`),reply_to:{address:m(e[`reply-to-address`],`reply-to-address`,`text`),name:m(e[`reply-to-name`],`reply-to-name`,`text`)},subject:m(e.subject,`subject`,`text`),text:m(e.text,`text`,`text`),to:{address:m(e[`to-address`],`to-address`,`text`),name:m(e[`to-name`],`to-name`,`text`)}},[[`headers`]]):d(e.body)});return}let i=await n(e),
|
|
12
|
+
Send an email for the specified account using the structured builder. Provide the sender, recipients, subject, and at least one of text or html; attachments are optional.`).option(`attachments`,{type:`string`,description:`File attachments and inline images. Provide as a JSON array of objects or @path/to/file.json.`}).option(`bcc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`bcc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`cc-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`cc-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`from-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`from-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`headers`,{type:`string`,description:`Custom email headers as key-value pairs. Provide as a JSON object or @path/to/file.json.`}).option(`html`,{type:`string`,description:`HTML body of the email. Provide at least one of text or html (non-empty).`}).option(`reply-to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`reply-to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`subject`,{type:`string`,description:`Email subject line.`}).option(`text`,{type:`string`,description:`Plain text body of the email. Provide at least one of text or html (non-empty).`}).option(`to-address`,{type:`string`,description:`Email address (e.g., 'user@example.com').`}).option(`to-name`,{type:`string`,description:`Display name for the email address (e.g., 'John Doe'). Optional; set to null or leave it unset to send the address on its own.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).implies(`bcc-name`,[`bcc-address`]).implies(`cc-name`,[`cc-address`]).implies(`from-name`,[`from-address`]).implies(`reply-to-name`,[`reply-to-address`]).implies(`to-name`,[`to-address`])}const E={command:`send`,describe:`Send an email`,builder:T,handler:async e=>l({command:`email-sending send`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending send`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/send`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({attachments:u(e.attachments,`attachments`),bcc:{address:m(e[`bcc-address`],`bcc-address`,`text`),name:m(e[`bcc-name`],`bcc-name`,`text`)},cc:{address:m(e[`cc-address`],`cc-address`,`text`),name:m(e[`cc-name`],`cc-name`,`text`)},from:{address:m(e[`from-address`],`from-address`,`text`),name:m(e[`from-name`],`from-name`,`text`)},headers:f(e.headers,`headers`),html:m(e.html,`html`,`text`),reply_to:{address:m(e[`reply-to-address`],`reply-to-address`,`text`),name:m(e[`reply-to-name`],`reply-to-name`,`text`)},subject:m(e.subject,`subject`,`text`),text:m(e.text,`text`,`text`),to:{address:m(e[`to-address`],`to-address`,`text`),name:m(e[`to-name`],`to-name`,`text`)}},[[`headers`]]):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),g=e.local?t:await a();if(e.accountId=g,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(w,{body:e,account_id:g}));o(t,{successLabel:`Created`});return}e.subject===void 0&&(e.subject=await h(`subject`,`Email subject line.`));let _=p({attachments:u(e.attachments,`attachments`),bcc:{address:m(e[`bcc-address`],`bcc-address`,`text`),name:m(e[`bcc-name`],`bcc-name`,`text`)},cc:{address:m(e[`cc-address`],`cc-address`,`text`),name:m(e[`cc-name`],`cc-name`,`text`)},from:{address:m(e[`from-address`],`from-address`,`text`),name:m(e[`from-name`],`from-name`,`text`)},headers:f(e.headers,`headers`),html:m(e.html,`html`,`text`),reply_to:{address:m(e[`reply-to-address`],`reply-to-address`,`text`),name:m(e[`reply-to-name`],`reply-to-name`,`text`)},subject:m(e.subject,`subject`,`text`),text:m(e.text,`text`,`text`),to:{address:m(e[`to-address`],`to-address`,`text`),name:m(e[`to-name`],`to-name`,`text`)}},[[`headers`]]),v=await c(`Creating`,async()=>l.send(w,{body:_,account_id:g}));o(v,{successLabel:`Created`})})};var D={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains`,body:`json`,errors:{403:`ForbiddenError`}};function O(e){return e.usage("$0 email-sending subdomains create\n\nCreates a new sending subdomain or re-enables sending on an existing subdomain that had it disabled. If zone-level Email Sending has not been enabled yet, the zone flag is automatically set when the entitlement is present. A leftmost wildcard such as `*.example.com` is accepted only for accounts with wildcard Email Sending enabled. Wildcard senders share the base domain's DKIM signing identity and `cf-bounce.<base>` return path.").option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement. The derived Return-Path hostname, including its bounce prefix, must be at most 201 characters after ASCII conversion; wildcards use the base hostname."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const k={command:`create`,describe:`Create a sending subdomain`,builder:O,handler:async e=>l({command:`email-sending subdomains create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>r.send(D,{body:e,zone_id:a}));o(n,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement. The derived Return-Path hostname, including its bounce prefix, must be at most 201 characters after ASCII conversion; wildcards use the base hostname."));let l=p({name:m(e.name,`name`,`text`)}),u=await c(`Creating`,async()=>r.send(D,{body:l,zone_id:a}));o(u,{successLabel:`Created`})})};var A={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}`,errors:{404:`NotFoundError`}};function j(e){return e.usage(`$0 email-sending subdomains delete <subdomain-id>
|
|
13
13
|
|
|
14
14
|
Disables sending on a subdomain and removes its DNS records. If routing is still active on the subdomain, only sending is disabled.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const M={command:`delete <subdomain-id>`,describe:`Delete a sending subdomain`,builder:j,handler:async e=>l({command:`email-sending subdomains delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation disables sending and removes the subdomain's Email Sending DNS records.`}))return;let a=await c(`Deleting`,async()=>t.send(A,{zone_id:r,subdomain_id:e[`subdomain-id`]}));o(a,{successLabel:`Deleted`})})};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}/dns`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function P(e){return e.usage(`$0 email-sending subdomains dns fix <subdomain-id>
|
|
15
15
|
|
|
@@ -23,23 +23,23 @@ Gets information for a specific sending subdomain.`).positional(`subdomain-id`,{
|
|
|
23
23
|
|
|
24
24
|
Lists all sending-enabled subdomains for the zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List sending subdomains`,builder:ce,handler:async e=>l({command:`email-sending subdomains list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r;let a=await c(`Loading`,async()=>t.send(K,{zone_id:r}));o(a,{successLabel:`Loaded`})})};var q={method:`POST`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/preview`,body:`json`,errors:{403:`ForbiddenError`}};function ue(e){return e.usage(`$0 email-sending subdomains preview
|
|
25
25
|
|
|
26
|
-
Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run — no records are created or modified. Use before or after creating a subdomain to check DNS status. A leftmost wildcard requires wildcard Email Sending to be enabled for the account and previews base-scoped DKIM and return-path records.`).option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement. The derived Return-Path hostname, including its bounce prefix, must be at most 201 characters after ASCII conversion; wildcards use the base hostname."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const de={command:`preview`,describe:`Preview sending subdomain DNS`,builder:ue,handler:async e=>l({command:`email-sending subdomains preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let t=await n(e),
|
|
26
|
+
Returns the DNS records that would be created for a sending subdomain, flags which records are missing, and reports any conflicts with existing DNS records. This is a read-only dry-run — no records are created or modified. Use before or after creating a subdomain to check DNS status. A leftmost wildcard requires wildcard Email Sending to be enabled for the account and previews base-scoped DKIM and return-path records.`).option(`name`,{type:`string`,description:"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement. The derived Return-Path hostname, including its bounce prefix, must be at most 201 characters after ASCII conversion; wildcards use the base hostname."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const de={command:`preview`,describe:`Preview sending subdomain DNS`,builder:ue,handler:async e=>l({command:`email-sending subdomains preview`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/preview`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`)}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let e=t,n=await c(`Loading`,async()=>r.send(q,{body:e,zone_id:a}));o(n,{successLabel:`Loaded`});return}e.name===void 0&&(e.name=await h(`name`,"The domain name within the zone. A wildcard is allowed only as the complete leftmost label (`*.example.com`) and requires the account wildcard Email Sending entitlement. The derived Return-Path hostname, including its bounce prefix, must be at most 201 characters after ASCII conversion; wildcards use the base hostname."));let l=p({name:m(e.name,`name`,`text`)}),u=await c(`Loading`,async()=>r.send(q,{body:l,zone_id:a}));o(u,{successLabel:`Loaded`})})};var fe={method:`GET`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}/reputation/complaints`,query:[`start_at`,`end_at`],errors:{400:`BadRequestError`,404:`NotFoundError`,422:`UnprocessableEntityError`,502:`BadGatewayError`}};function pe(e){return e.usage(`$0 email-sending subdomains reputation get-complaints <subdomain-id>
|
|
27
27
|
|
|
28
28
|
Returns the matched complaint count for a sending subdomain in a half-open time window of up to seven days.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`start-at`,{type:`string`,description:`Start at`,demandOption:!0}).option(`end-at`,{type:`string`,description:`End at`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const me={command:`get-complaints <subdomain-id>`,describe:`Get sending subdomain complaint count`,builder:pe,handler:async e=>l({command:`email-sending subdomains reputation get-complaints`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={start_at:e[`start-at`],end_at:e[`end-at`]};if(e.dryRun){s({command:`cf email-sending subdomains reputation get-complaints`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}/reputation/complaints`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.send(fe,{zone_id:a,subdomain_id:e[`subdomain-id`],...t}));o(l,{successLabel:`Loaded`})})},he={command:`reputation`,describe:`Operations for subdomains.reputation`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/email/sending/subdomains/${t.subdomain_id}`,body:`json`,errors:{404:`NotFoundError`}};function ge(e){return e.usage(`$0 email-sending subdomains update <subdomain-id>
|
|
29
29
|
|
|
30
30
|
Updates the activity-log preview preference for a sending subdomain.`).positional(`subdomain-id`,{type:`string`,description:`Sending subdomain identifier.`,demandOption:!0}).option(`drop-suppressed-recipients`,{type:`boolean`,description:`Whether a send request that includes a recipient suppressed on
|
|
31
31
|
this subdomain drops that recipient and still delivers to the
|
|
32
32
|
rest, instead of failing the entire request.
|
|
33
|
-
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const _e={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:ge,handler:async e=>l({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):d(e.body)});return}let t=await n(e),
|
|
33
|
+
`}).option(`preview-enabled`,{type:`boolean`,description:`Whether sent messages from this subdomain can be previewed in the activity log.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"At least one of `preview_enabled` or `drop_suppressed_recipients` must be provided. A field omitted from the request body is left unchanged. "})}const _e={command:`update <subdomain-id>`,describe:`Update a sending subdomain`,builder:ge,handler:async e=>l({command:`email-sending subdomains update`,classification:{safeFlags:[`drop-suppressed-recipients`,`preview-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf email-sending subdomains update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/email/sending/subdomains/${e[`subdomain-id`]==null?`<subdomain-id>`:encodeURIComponent(String(e[`subdomain-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"subdomain-id":String(e[`subdomain-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let n=t,i=await c(`Updating`,async()=>r.send(J,{body:n,zone_id:a,subdomain_id:e[`subdomain-id`]}));o(i,{successLabel:`Updated`});return}let l=p({drop_suppressed_recipients:e[`drop-suppressed-recipients`],preview_enabled:e[`preview-enabled`]}),u=await c(`Updating`,async()=>r.send(J,{body:l,zone_id:a,subdomain_id:e[`subdomain-id`]}));o(u,{successLabel:`Updated`})})},ve={command:`subdomains`,describe:`Configure sending subdomains and keep their DNS records healthy`,builder:e=>e.command(k).command(M).command(G).command(le).command(de).command(_e).command(H).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function ye(e){return e.usage(`$0 email-sending suppressions create
|
|
34
34
|
|
|
35
|
-
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).coerce(`scope-type`,e=>m(e,`scope-type`,`text`)).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`scope-type`,`scope-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const X=[{path:[`scope`],selector:`type`,variants:[{values:[`account`],schema:{type:`object`,properties:{type:{enum:[`account`]}},required:[`type`],additionalProperties:!1}},{values:[`sending_domain`],schema:{type:`object`,properties:{type:{enum:[`sending_domain`]},value:{type:`string`}},required:[`type`,`value`],additionalProperties:!1}}]}],be={command:`create`,describe:`Create account Email Sending suppression`,builder:ye,handler:async e=>l({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}}),X):d(e.body)});return}let i=await n(e),
|
|
35
|
+
Creates a suppression for every sending domain of the account (default) or for one sending domain (\`scope.type = sending_domain\`). Creating an existing active suppression returns its identifier. If a mutable legacy zone-linked account row already exists, it is promoted without changing its identifier.`).option(`email`,{type:`string`,description:`The email address to suppress.`}).option(`expires-at`,{type:`string`,description:`Expiration timestamp for the suppression. Omit or set to null for a permanent suppression that never expires.`}).option(`note`,{type:`string`,description:`Advisory note for this suppression. Not enforced or validated beyond length.`}).option(`scope-type`,{type:`string`,description:`Blocks the recipient for every sending domain of the account.`,choices:[`account`,`sending_domain`]}).coerce(`scope-type`,e=>m(e,`scope-type`,`text`)).option(`scope-value`,{type:`string`,description:`The sending domain to suppress for: the domain part of the envelope MAIL FROM. It is lowercased and trailing dots are removed. Internationalized domains must use the ASCII (punycode) form. Ownership is not checked; a domain the account does not send from never matches.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`scope-type`,`scope-value`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`scope-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --scope-* flag is set`)}return!0})}const X=[{path:[`scope`],selector:`type`,variants:[{values:[`account`],schema:{type:`object`,properties:{type:{enum:[`account`]}},required:[`type`],additionalProperties:!1}},{values:[`sending_domain`],schema:{type:`object`,properties:{type:{enum:[`sending_domain`]},value:{type:`string`}},required:[`type`,`value`],additionalProperties:!1}}]}],be={command:`create`,describe:`Create account Email Sending suppression`,builder:ye,handler:async e=>l({command:`email-sending suppressions create`,classification:{safeFlags:[`scope-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?_(p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}}),X):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(Y,{body:e,account_id:u}));o(t,{successLabel:`Created`});return}e.email===void 0&&(e.email=await h(`email`,`The email address to suppress.`));let f=p({email:m(e.email,`email`,`text`),expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:{type:e[`scope-type`],value:m(e[`scope-value`],`scope-value`,`text`)}});_(f,X);let g=await c(`Creating`,async()=>l.send(Y,{body:f,account_id:u}));o(g,{successLabel:`Created`})})};var xe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`}};function Se(e){return e.usage(`$0 email-sending suppressions delete <suppression-id>
|
|
36
36
|
|
|
37
37
|
Deletes the suppression, its note, and every legacy internal zone membership, allowing future delivery attempts to the address.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Ce={command:`delete <suppression-id>`,describe:`Delete account Email Sending suppression`,builder:Se,handler:async e=>l({command:`email-sending suppressions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await g({force:!!e.force,message:`This operation removes an Email Sending suppression and may allow email delivery to resume for the address.`}))return;let u=await c(`Deleting`,async()=>i.send(xe,{account_id:l,suppression_id:e[`suppression-id`]}));o(u,{successLabel:`Deleted`})})};var Z={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,body:`json`,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`}};function we(e){return e.usage(`$0 email-sending suppressions edit <suppression-id>
|
|
38
38
|
|
|
39
|
-
Updates expiry or advisory note fields without changing legacy internal zone memberships. Scope cannot be changed.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`scope`,{type:`string`,description:"Not editable. Scope is fixed when the suppression is created; any value returns 400 with code `scope_immutable`. Delete and recreate the suppression to change it. Provide as a JSON object or @path/to/file.json."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:we,handler:async e=>l({command:`email-sending suppressions edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:f(e.scope,`scope`)},[[`scope`]]):d(e.body)});return}let i=await n(e),
|
|
39
|
+
Updates expiry or advisory note fields without changing legacy internal zone memberships. Scope cannot be changed.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`expires-at`,{type:`string`,description:"New expiry. Send `null` to make the suppression permanent; omit to leave it unchanged."}).option(`note`,{type:`string`,description:`Replacement advisory note. Send an empty string to clear it; omit to leave it unchanged.`}).option(`scope`,{type:`string`,description:"Not editable. Scope is fixed when the suppression is created; any value returns 400 with code `scope_immutable`. Delete and recreate the suppression to change it. Provide as a JSON object or @path/to/file.json."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`edit <suppression-id>`,describe:`Update account Email Sending suppression`,builder:we,handler:async e=>l({command:`email-sending suppressions edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:f(e.scope,`scope`)},[[`scope`]]):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),u=e.local?t:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Updating`,async()=>l.send(Z,{body:t,account_id:u,suppression_id:e[`suppression-id`]}));o(n,{successLabel:`Updated`});return}let h=p({expires_at:m(e[`expires-at`],`expires-at`,`text`),note:m(e.note,`note`,`text`),scope:f(e.scope,`scope`)},[[`scope`]]),g=await c(`Updating`,async()=>l.send(Z,{body:h,account_id:u,suppression_id:e[`suppression-id`]}));o(g,{successLabel:`Updated`})})};var Ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/${t.suppression_id}`,errors:{404:`NotFoundError`}};function De(e){return e.usage(`$0 email-sending suppressions get <suppression-id>
|
|
40
40
|
|
|
41
41
|
Gets an Email Sending suppression owned by the account.`).positional(`suppression-id`,{type:`string`,description:`The suppression's identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`get <suppression-id>`,describe:`Get account Email Sending suppression`,builder:De,handler:async e=>l({command:`email-sending suppressions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/${e[`suppression-id`]==null?`<suppression-id>`:encodeURIComponent(String(e[`suppression-id`]))}`,pathParams:{"suppression-id":String(e[`suppression-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(Ee,{account_id:l,suppression_id:e[`suppression-id`]}));o(u,{successLabel:`Loaded`})})};var Q={method:`POST`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions/bulk`,body:`json`,errors:{429:`TooManyRequestsError`}};function ke(e){return e.usage(`$0 email-sending suppressions import
|
|
42
42
|
|
|
43
|
-
Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with the same email address and scope are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ae={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:ke,handler:async e=>l({command:`email-sending suppressions import`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({items:u(e.items,`items`)}):d(e.body)});return}let i=await n(e),
|
|
43
|
+
Imports up to 1,000 Email Sending suppressions in one request. Each item applies to every sending domain of the account (default) or to one sending domain.`).option(`items`,{type:`string`,description:`Suppressions to import. Items with the same email address and scope are deduplicated before processing. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ae={command:`import`,describe:`Bulk import account Email Sending suppressions`,builder:ke,handler:async e=>l({command:`email-sending suppressions import`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf email-sending suppressions import`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/email/sending/suppressions/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({items:u(e.items,`items`)}):d(e.body)});return}let i=e.body===void 0?void 0:d(e.body),l=await n(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(Q,{body:e,account_id:f}));o(t,{successLabel:`Created`});return}if(e.items===void 0)throw Error(`--items is required (or pass --body with this field set).`);let m=p({items:u(e.items,`items`)}),h=await c(`Creating`,async()=>l.send(Q,{body:m,account_id:f}));o(h,{successLabel:`Created`})})};var $={method:`GET`,path:t=>e`/accounts/${t.account_id}/email/sending/suppressions`,query:[`per_page`,`cursor`,`email`,`search`,`reason`,`scope_type`,`scope_value`],errors:{400:`BadRequestError`}};function je(e){return e.usage(`$0 email-sending suppressions list
|
|
44
44
|
|
|
45
|
-
Lists every active Email Sending suppression owned by the account: sending-domain suppressions first, then account-wide suppressions (including legacy rows with internal zone memberships). Each group is newest first.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`scope-type`,{type:`string`,description:"Filter by scope: `account` returns only account-wide suppressions, `sending_domain` only sending-domain suppressions. Omit to list both, sending-domain suppressions first.",choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:"Exact sending-domain filter. Requires `scope_type=sending_domain`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List account Email Sending suppressions`,builder:je,handler:async e=>l({command:`email-sending suppressions list`,classification:{safeFlags:[`reason`,`scope-type`,`dry-run`]}},e,async()=>{let i={per_page:e[`per-page`],cursor:e.cursor,email:e.email,search:e.search,reason:e.reason,scope_type:e[`scope-type`],scope_value:e[`scope-value`]};if(e.dryRun){let e=await r();s({command:`cf email-sending suppressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send($,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})},Ne={command:`suppressions`,describe:`Prevent delivery to suppressed addresses and manage the account suppression list`,builder:e=>e.command(be).command(Ce).command(Te).command(Oe).command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pe={command:`email-sending`,describe:`Send transactional email and manage sending subdomains and their DNS configuration`,builder:e=>e.command(
|
|
45
|
+
Lists every active Email Sending suppression owned by the account: sending-domain suppressions first, then account-wide suppressions (including legacy rows with internal zone memberships). Each group is newest first.`).option(`per-page`,{type:`number`,description:`Maximum number of suppressions to return per page.`}).option(`cursor`,{type:`string`,description:"Opaque pagination cursor returned as `result_info.next_cursor`. It carries the filters that produced it."}).option(`email`,{type:`string`,description:`Exact email-address filter.`}).option(`search`,{type:`string`,description:"A complete address is an exact match; a value ending in `@` matches that username across every domain. Prefix searches may return short intermediate pages while the bounded account scan advances."}).option(`reason`,{type:`string`,description:`Filter to suppressions with this reason.`,choices:[`manual`,`complaint`,`hard_bounce`,`soft_bounce`,`policy`]}).option(`scope-type`,{type:`string`,description:"Filter by scope: `account` returns only account-wide suppressions, `sending_domain` only sending-domain suppressions. Omit to list both, sending-domain suppressions first.",choices:[`account`,`sending_domain`]}).option(`scope-value`,{type:`string`,description:"Exact sending-domain filter. Requires `scope_type=sending_domain`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`List account Email Sending suppressions`,builder:je,handler:async e=>l({command:`email-sending suppressions list`,classification:{safeFlags:[`reason`,`scope-type`,`dry-run`]}},e,async()=>{let i={per_page:e[`per-page`],cursor:e.cursor,email:e.email,search:e.search,reason:e.reason,scope_type:e[`scope-type`],scope_value:e[`scope-value`]};if(e.dryRun){let e=await r();s({command:`cf email-sending suppressions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/email/sending/suppressions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send($,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})},Ne={command:`suppressions`,describe:`Prevent delivery to suppressed addresses and manage the account suppression list`,builder:e=>e.command(be).command(Ce).command(Te).command(Oe).command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Pe={command:`email-sending`,describe:`Send transactional email and manage sending subdomains and their DNS configuration`,builder:e=>e.command(y).command(E).command(C).command(re).command(se).command(ve).command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Pe as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{
|
|
2
|
+
import{t as e}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{i as t}from"./api-Dnt6lRJG.mjs";function n(e){if(typeof e!=`object`||!e)return[];let t=e.errors;return Array.isArray(t)?t.flatMap(e=>{if(typeof e!=`object`||!e)return[];let t=e.code;return typeof t==`number`&&Number.isFinite(t)?[t]:[]}):[]}function r(e){return typeof e==`number`&&Number.isInteger(e)&&e>=100&&e<=599}function i(e){try{return a(e)}catch{return{errorType:`Error`}}}function a(i){if(i instanceof t){let e=n(i.body);return{errorType:`APIError`,...r(i.statusCode)?{httpStatus:i.statusCode}:{},...e.length===0?{}:{errorCodes:e}}}return i instanceof e?{errorType:`APIError`,...r(i.status)?{httpStatus:i.status}:{},...typeof i.code==`number`&&Number.isFinite(i.code)?{errorCodes:[i.code]}:{}}:i instanceof Error?{errorType:`Error`}:{errorType:typeof i}}export{i as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n}from"./version-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./chunk-AAQI36FL-e6E5HW1g.mjs";import{n}from"./version-6Bpy6Bgt.mjs";import{i as r,t as i}from"./blocks-BFulF68V.mjs";import{t as a}from"./session-vzNfUhPl.mjs";import{i as o}from"./api-Dnt6lRJG.mjs";var s=class extends Error{};function c(e){return e instanceof s||`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&`reason`in e&&e.reason===`no-credentials-non-interactive`}function l(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function u(e){return Array.isArray(e)?e.flatMap(e=>{if(typeof e==`string`)return[{message:e}];if(typeof e!=`object`||!e)return[];let t=e,n=typeof t.code==`number`?t.code:void 0,r=typeof t.message==`string`?t.message:void 0;return n!==void 0||r!==void 0?[{code:n,message:r}]:[]}):[]}function d(s){if(a(n),s instanceof o){let t=s.statusCode,n=s.body,a=t===void 0?`Envelope Error`:p(t),o=typeof n==`object`&&n?n:void 0,c=[...u(o?.errors).map(e=>({...e,isError:!0})),...u(o?.messages).map(e=>({...e,isError:!1}))],d=s.rawResponse?.url?`HTTP ${l(s.rawResponse.url)}`:void 0,f=t===void 0?a:`${t} ${a}`,m=d?`${f} · ${d}`:f,h=e.muted(m),g=``;return c.length>0?g=c.map((t,n)=>{let r=typeof t.code==`number`?e.error(e.bold(`[${t.code}]`)):t.isError?e.error(e.bold(`[error]`)):void 0,i=e.bold(t.message??``),a=r?`${r} ${i}`:i;return n===c.length-1?`${a}\n${h}`:a}).join(`
|
|
3
3
|
|
|
4
4
|
`):(g=e.error(e.bold(s.message||m)),s.message&&m&&(g+=`\n${h}`)),console.error(i(g,void 0,{title:`APIError`,rawMessage:!0})),t===401?console.error(`
|
|
5
5
|
`+r(`Try running: cf auth login`)):t===403&&console.error(`
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as l,n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f}from"./prompt-CEpZ-lQZ.mjs";var p={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function m(e){return e.usage(`$0 field-extractors delete <extractor>
|
|
3
3
|
|
|
4
4
|
Deletes all custom extraction rules for an extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const h={command:`delete <extractor>`,describe:`Delete Field Extractor`,builder:m,handler:async e=>c({command:`field-extractors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await f({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(p,{account_id:l,extractor:e.extractor}));a(u,{successLabel:`Deleted`})})};var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 field-extractors get <extractor>
|
|
5
5
|
|
|
6
6
|
Retrieves the custom extraction rules configured for a given extractor type.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <extractor>`,describe:`Get Field Extractor`,builder:_,handler:async e=>c({command:`field-extractors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(g,{account_id:l,extractor:e.extractor}));a(u,{successLabel:`Loaded`})})};var y={method:`PUT`,path:t=>e`/accounts/${t.account_id}/field_extractors/${t.extractor}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function b(e){return e.usage(`$0 field-extractors update <extractor>
|
|
7
7
|
|
|
8
|
-
Replaces all custom extraction rules for an extractor type. Omitted rules are deleted.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired-state replacement of all rules for this extractor type.`})}const x={command:`update <extractor>`,describe:`Update Field Extractor`,builder:b,handler:async e=>c({command:`field-extractors update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`json`,body:e.body===void 0?d({rules:l(e.rules,`rules`)}):u(e.body)});return}let c=await n(e),
|
|
8
|
+
Replaces all custom extraction rules for an extractor type. Omitted rules are deleted.`).positional(`extractor`,{type:`string`,description:`Extractor type.`,demandOption:!0}).option(`rules`,{type:`string`,description:`The rules field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Desired-state replacement of all rules for this extractor type.`})}const x={command:`update <extractor>`,describe:`Update Field Extractor`,builder:b,handler:async e=>c({command:`field-extractors update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf field-extractors update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/field_extractors/${e.extractor==null?`<extractor>`:encodeURIComponent(String(e.extractor))}`,pathParams:{extractor:String(e.extractor??``)},bodyKind:`json`,body:e.body===void 0?d({rules:l(e.rules,`rules`)}):u(e.body)});return}let c=e.body===void 0?void 0:u(e.body),f=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>f.send(y,{body:t,account_id:p,extractor:e.extractor}));a(n,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let m=d({rules:l(e.rules,`rules`)}),h=await s(`Updating`,async()=>f.send(y,{body:m,account_id:p,extractor:e.extractor}));a(h,{successLabel:`Updated`})})},S={command:`field-extractors`,describe:`field-extractors`,builder:e=>e.command(h).command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{S as default};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{a as u,n as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{a as m,i as h,n as g}from"./prompt-CEpZ-lQZ.mjs";var _={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,body:`json`};function v(e){return e.usage(`$0 firewall access-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new IP Access rule for an account or zone. The rule will apply to all zones in the account or zone. Note: To create an IP Access rule that applies to a single zone, refer to the [IP Access rules for a zone](#ip-access-rules-for-a-zone) endpoints.
|
|
5
5
|
|
|
6
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
6
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`,default:``}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Create an IP Access rule`,builder:v,handler:async e=>l({command:`firewall access-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}):d(e.body)});return}let l=e.body===void 0?void 0:d(e.body),u=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let e=l,t=await c(`Creating`,async()=>u.send(_,{body:e,account_or_zone:m,account_or_zone_id:g}));o(t,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let v=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}),y=await c(`Creating`,async()=>u.send(_,{body:v,account_or_zone:m,account_or_zone_id:g}));o(y,{successLabel:`Created`})})};var ee={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function b(e){return e.usage(`$0 firewall access-rules delete <rule-id>
|
|
7
7
|
|
|
8
8
|
Deletes an existing IP Access rule defined. Note: This operation will affect all zones in the account or zone.
|
|
9
9
|
|
|
10
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
10
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const x={command:`delete <rule-id>`,describe:`Delete an IP Access rule`,builder:b,handler:async e=>l({command:`firewall access-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await g({force:!!e.force,message:`This operation deletes the account-level IP Access Rule and affects every zone in the account.`}))return;let f=await c(`Deleting`,async()=>l.send(ee,{account_or_zone:u,account_or_zone_id:d,rule_id:e[`rule-id`]}));o(f,{successLabel:`Deleted`})})};var S={method:`PATCH`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`,body:`json`};function te(e){return e.usage(`$0 firewall access-rules edit <rule-id>
|
|
11
11
|
|
|
12
12
|
Updates an IP Access rule defined. Note: This operation will affect all zones in the account or zone.
|
|
13
13
|
|
|
14
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
14
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`notes`,{type:`string`,description:`An informative summary of the rule, typically used as a reminder or explanation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ne={command:`edit <rule-id>`,describe:`Update an IP Access rule`,builder:te,handler:async e=>l({command:`firewall access-rules edit`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"rule-id":String(e[`rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}):d(e.body)});return}let l=e.body===void 0?void 0:d(e.body),u=await n(e),m=e.zone===void 0?`accounts`:`zones`,g=m===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();if(m===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let t=l,n=await c(`Updating`,async()=>u.send(S,{body:t,account_or_zone:m,account_or_zone_id:g,rule_id:e[`rule-id`]}));o(n,{successLabel:`Updated`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let _=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},mode:e[`access-rule-mode`],notes:p(e.notes,`notes`,`text`)}),v=await c(`Updating`,async()=>u.send(S,{body:_,account_or_zone:m,account_or_zone_id:g,rule_id:e[`rule-id`]}));o(v,{successLabel:`Updated`})})};var re={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules/${t.rule_id}`};function C(e){return e.usage(`$0 firewall access-rules get <rule-id>
|
|
15
15
|
|
|
16
16
|
Fetches the details of an IP Access rule defined.
|
|
17
17
|
|
|
18
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:C,handler:async e=>l({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(
|
|
18
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).positional(`rule-id`,{type:`string`,description:`Unique identifier for a rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <rule-id>`,describe:`Get an IP Access rule`,builder:C,handler:async e=>l({command:`firewall access-rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules/${e[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(e[`rule-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i),"rule-id":String(e[`rule-id`]??``)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();u===`zones`?e.zoneId=d:e.accountId=d;let f=await c(`Loading`,async()=>l.send(re,{account_or_zone:u,account_or_zone_id:d,rule_id:e[`rule-id`]}));o(f,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/access_rules/rules`,query:[`mode`,`configuration.target`,`configuration.value`,`notes`,`match`,`page`,`per_page`,`order`,`direction`]};function E(e){return e.usage(`$0 firewall access-rules list
|
|
19
19
|
|
|
20
20
|
Fetches IP Access rules of an account or zone. These rules apply to all the zones in the account or zone. You can filter the results using several optional parameters.
|
|
21
21
|
|
|
22
22
|
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).option(`configuration-target`,{type:`string`,description:`Defines the target to search in existing rules.`,choices:[`ip`,`ip_range`,`asn`,`country`]}).option(`configuration-value`,{type:`string`,description:"Defines the target value to search for in existing rules: an IP address, an IP address range, or a country code, depending on the provided `configuration.target`.\nNotes: You can search for a single IPv4 address, an IP address range with a subnet of '/16' or '/24', or a two-letter ISO-3166-1 alpha-2 country code."}).option(`notes`,{type:`string`,description:`Defines the string to search for in the notes of existing IP Access rules.
|
|
23
|
-
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List IP Access rules`,builder:E,handler:async e=>l({command:`firewall access-rules list`,classification:{safeFlags:[`access-rule-mode`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let l={mode:e[`access-rule-mode`],"configuration.target":e[`configuration-target`],"configuration.value":e[`configuration-value`],notes:e.notes,match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},O={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(
|
|
23
|
+
Notes: For example, the string 'attack' would match IP Access rules with notes 'Attack 26/02' and 'Attack 27/02'. The search is case insensitive.`}).option(`match`,{type:`string`,description:"Defines the search requirements. When set to `all`, all the search requirements must match. When set to `any`, only one of the search requirements has to match.",choices:[`any`,`all`]}).option(`page`,{type:`number`,description:`Defines the requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Defines the maximum number of results requested.`}).option(`order`,{type:`string`,description:`Defines the field used to sort returned rules.`,choices:[`configuration.target`,`configuration.value`,`mode`]}).option(`direction`,{type:`string`,description:`Defines the direction used to sort returned rules.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List IP Access rules`,builder:E,handler:async e=>l({command:`firewall access-rules list`,classification:{safeFlags:[`access-rule-mode`,`configuration-target`,`match`,`order`,`direction`,`dry-run`]}},e,async()=>{let l={mode:e[`access-rule-mode`],"configuration.target":e[`configuration-target`],"configuration.value":e[`configuration-value`],notes:e.notes,match:e.match,page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall access-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/access_rules/rules`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},query:l,bodyKind:`none`});return}let u=await n(e),d=e.zone===void 0?`accounts`:`zones`,f=d===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();d===`zones`?e.zoneId=f:e.accountId=f;let p=await c(`Loading`,async()=>u.send(T,{account_or_zone:d,account_or_zone_id:f,...l}));o(p,{successLabel:`Loaded`})})},O={command:`access-rules`,describe:`IP-based access rules that allow, block, challenge, or whitelist traffic globally or per-zone`,builder:e=>e.command(y).command(x).command(ne).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`POST`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns`,body:`json`};function A(e){return e.usage(`$0 firewall lockdowns create
|
|
24
24
|
|
|
25
|
-
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a Zone Lockdown rule`,builder:A,handler:async e=>l({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configurations:u(e.configurations,`configurations`),description:p(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):d(e.body)});return}let t=await n(e),
|
|
25
|
+
Creates a new Zone Lockdown rule.`).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const j={command:`create`,describe:`Create a Zone Lockdown rule`,builder:A,handler:async e=>l({command:`firewall lockdowns create`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall lockdowns create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configurations:u(e.configurations,`configurations`),description:p(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>r.send(k,{body:e,zone_id:a}));o(n,{successLabel:`Created`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let l=f({configurations:u(e.configurations,`configurations`),description:p(e.description,`description`,`text`),paused:e.paused,priority:e.priority,urls:e.urls}),m=await c(`Creating`,async()=>r.send(k,{body:l,zone_id:a}));o(m,{successLabel:`Created`})})};var M={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`};function N(e){return e.usage(`$0 firewall lockdowns delete <lock-downs-id>
|
|
26
26
|
|
|
27
27
|
Deletes an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const P={command:`delete <lock-downs-id>`,describe:`Delete a Zone Lockdown rule`,builder:N,handler:async e=>l({command:`firewall lockdowns delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf firewall lockdowns delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation deletes the Zone Lockdown rule from the zone.`}))return;let a=await c(`Deleting`,async()=>t.send(M,{zone_id:r,lock_downs_id:e[`lock-downs-id`]}));o(a,{successLabel:`Deleted`})})};var F={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`};function I(e){return e.usage(`$0 firewall lockdowns get <lock-downs-id>
|
|
28
28
|
|
|
@@ -30,11 +30,11 @@ Fetches the details of a Zone Lockdown rule.`).positional(`lock-downs-id`,{type:
|
|
|
30
30
|
|
|
31
31
|
Fetches Zone Lockdown rules. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`modified-on`,{type:`string`,description:`The timestamp of when the rule was last modified.`}).option(`ip`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`priority`,{type:`number`,description:`The priority of the rule to control the processing order. A lower number indicates higher priority. If not provided, any rules with a configured priority will be processed before rules without a priority.`}).option(`uri-search`,{type:`string`,description:`A single URI to search for in the list of URLs of existing rules.`}).option(`ip-range-search`,{type:`string`,description:`A single IP address range to search for in existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`created-on`,{type:`string`,description:`The timestamp of when the rule was created.`}).option(`description-search`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`ip-search`,{type:`string`,description:`A single IP address to search for in existing rules.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List Zone Lockdown rules`,builder:z,handler:async e=>l({command:`firewall lockdowns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let t={page:e.page,description:e.description,modified_on:e[`modified-on`],ip:e.ip,priority:e.priority,uri_search:e[`uri-search`],ip_range_search:e[`ip-range-search`],per_page:e[`per-page`],created_on:e[`created-on`],description_search:e[`description-search`],ip_search:e[`ip-search`]};if(e.dryRun){s({command:`cf firewall lockdowns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.send(R,{zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};var V={method:`PUT`,path:t=>e`/zones/${t.zone_id}/firewall/lockdowns/${t.lock_downs_id}`,body:`json`};function H(e){return e.usage(`$0 firewall lockdowns update <lock-downs-id>
|
|
32
32
|
|
|
33
|
-
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:H,handler:async e=>l({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configurations:u(e.configurations,`configurations`),urls:e.urls}):d(e.body)});return}let t=await n(e),
|
|
33
|
+
Updates an existing Zone Lockdown rule.`).positional(`lock-downs-id`,{type:`string`,description:`The unique identifier of the Zone Lockdown rule.`,demandOption:!0}).option(`configurations`,{type:`string`,description:"A list of IP addresses or CIDR ranges that will be allowed to access the URLs specified in the Zone Lockdown rule. You can include any number of `ip` or `ip_range` configurations. Provide as a JSON array of objects or @path/to/file.json."}).option(`urls`,{type:`string`,array:!0,description:`The URLs to include in the current WAF override. You can use wildcards. Each entered URL will be escaped before use, which means you can only use simple wildcard patterns.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`update <lock-downs-id>`,describe:`Update a Zone Lockdown rule`,builder:H,handler:async e=>l({command:`firewall lockdowns update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall lockdowns update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/lockdowns/${e[`lock-downs-id`]==null?`<lock-downs-id>`:encodeURIComponent(String(e[`lock-downs-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"lock-downs-id":String(e[`lock-downs-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configurations:u(e.configurations,`configurations`),urls:e.urls}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let n=t,i=await c(`Updating`,async()=>r.send(V,{body:n,zone_id:a,lock_downs_id:e[`lock-downs-id`]}));o(i,{successLabel:`Updated`});return}if(e.configurations===void 0)throw Error(`--configurations is required (or pass --body with this field set).`);if(e.urls===void 0)throw Error(`--urls is required (or pass --body with this field set).`);let l=f({configurations:u(e.configurations,`configurations`),urls:e.urls}),p=await c(`Updating`,async()=>r.send(V,{body:l,zone_id:a,lock_downs_id:e[`lock-downs-id`]}));o(p,{successLabel:`Updated`})})},W={command:`lockdowns`,describe:`Zone lockdown rules that restrict access to URLs by IP address or range`,builder:e=>e.command(j).command(P).command(L).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`DELETE`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/payload_logging/key`};function K(e){return e.usage(`$0 firewall payload-logging delete
|
|
34
34
|
|
|
35
35
|
Deletes the payload logging public key of the account or zone.
|
|
36
36
|
|
|
37
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const
|
|
37
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ie={command:`delete`,describe:`Delete the payload logging key`,builder:K,handler:async e=>l({command:`firewall payload-logging delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall payload-logging delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`none`});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=d:e.accountId=d,!await g({force:!!e.force}))return;let f=await c(`Deleting`,async()=>l.send(G,{account_or_zone:u,account_or_zone_id:d}));o(f,{successLabel:`Deleted`})})};var q={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/firewall/payload_logging/key`};function J(e){return e.usage(`$0 firewall payload-logging get
|
|
38
38
|
|
|
39
39
|
Fetches the public key that payload logging uses to encrypt matched payloads for the account or zone.
|
|
40
40
|
|
|
@@ -42,9 +42,9 @@ Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE
|
|
|
42
42
|
|
|
43
43
|
Creates or replaces the public key that payload logging uses to encrypt matched payloads for the account or zone. It applies to every zone in the account or zone that has no zone key. Requires a plan that includes payload logging (Enterprise); otherwise it returns 403.
|
|
44
44
|
|
|
45
|
-
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`public-key`,{type:`string`,description:`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`update`,describe:`Set the payload logging key`,builder:ae,handler:async e=>l({command:`firewall payload-logging update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall payload-logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({public_key:p(e[`public-key`],`public-key`,`text`)}):d(e.body)});return}let l=await n(e),
|
|
45
|
+
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`public-key`,{type:`string`,description:`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`update`,describe:`Set the payload logging key`,builder:ae,handler:async e=>l({command:`firewall payload-logging update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf firewall payload-logging update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/firewall/payload_logging/key`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({public_key:p(e[`public-key`],`public-key`,`text`)}):d(e.body)});return}let l=e.body===void 0?void 0:d(e.body),u=await n(e),h=e.zone===void 0?`accounts`:`zones`,g=h===`zones`?await i({zone:e.zone},u,{quiet:e.quiet}):e.local?t:await a();if(h===`zones`?e.zoneId=g:e.accountId=g,e.body!==void 0){let e=l,t=await c(`Updating`,async()=>u.send(X,{body:e,account_or_zone:h,account_or_zone_id:g}));o(t,{successLabel:`Updated`});return}e[`public-key`]===void 0&&(e[`public-key`]=await m(`public-key`,`Defines the X25519 public key, as standard base64 of exactly 32 bytes, that encrypts matched payloads. Cloudflare stores only the public key; keep the private key to decrypt logged payloads.`));let _=f({public_key:p(e[`public-key`],`public-key`,`text`)}),v=await c(`Updating`,async()=>u.send(X,{body:_,account_or_zone:h,account_or_zone_id:g}));o(v,{successLabel:`Updated`})})},se={command:`payload-logging`,describe:`Account-level public key that WAF payload logging uses to encrypt matched payloads`,builder:e=>e.command(ie).command(Y).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules`,body:`json`};function ce(e){return e.usage(`$0 firewall ua-rules create
|
|
46
46
|
|
|
47
|
-
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create a User Agent Blocking rule`,builder:ce,handler:async e=>l({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):d(e.body)});return}let t=await n(e),
|
|
47
|
+
Creates a new User Agent Blocking rule in a zone.`).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ua` when specifying a user agent in the rule.",choices:[`ua`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`the user agent to exactly match`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const le={command:`create`,describe:`Create a User Agent Blocking rule`,builder:ce,handler:async e=>l({command:`firewall ua-rules create`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall ua-rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let e=t,n=await c(`Creating`,async()=>r.send(Z,{body:e,zone_id:a}));o(n,{successLabel:`Created`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let l=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}),u=await c(`Creating`,async()=>r.send(Z,{body:l,zone_id:a}));o(u,{successLabel:`Created`})})};var ue={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`};function de(e){return e.usage(`$0 firewall ua-rules delete <ua-rule-id>
|
|
48
48
|
|
|
49
49
|
Deletes an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fe={command:`delete <ua-rule-id>`,describe:`Delete a User Agent Blocking rule`,builder:de,handler:async e=>l({command:`firewall ua-rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf firewall ua-rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`none`});return}let t=await n(e),r=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,!await g({force:!!e.force,message:`This operation deletes the User Agent Blocking rule from the zone.`}))return;let a=await c(`Deleting`,async()=>t.send(ue,{zone_id:r,ua_rule_id:e[`ua-rule-id`]}));o(a,{successLabel:`Deleted`})})};var pe={method:`GET`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`};function me(e){return e.usage(`$0 firewall ua-rules get <ua-rule-id>
|
|
50
50
|
|
|
@@ -52,4 +52,4 @@ Fetches the details of a User Agent Blocking rule.`).positional(`ua-rule-id`,{ty
|
|
|
52
52
|
|
|
53
53
|
Fetches User Agent Blocking rules in a zone. You can filter the results using several optional parameters.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`description`,{type:`string`,description:`A string to search for in the description of existing rules.`}).option(`per-page`,{type:`number`,description:"The maximum number of results per page. You can only set the value to `1` or to a multiple of 5 such as `5`, `10`, `15`, or `20`."}).option(`user-agent`,{type:`string`,description:`A string to search for in the user agent values of existing rules.`}).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`list`,describe:`List User Agent Blocking rules`,builder:ge,handler:async e=>l({command:`firewall ua-rules list`,classification:{safeFlags:[`paused`,`dry-run`]}},e,async()=>{let t={page:e.page,description:e.description,per_page:e[`per-page`],user_agent:e[`user-agent`],paused:e.paused};if(e.dryRun){s({command:`cf firewall ua-rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let l=await c(`Loading`,async()=>r.send(he,{zone_id:a,...t}));o(l,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/zones/${t.zone_id}/firewall/ua_rules/${t.ua_rule_id}`,body:`json`};function ve(e){return e.usage(`$0 firewall ua-rules update <ua-rule-id>
|
|
54
54
|
|
|
55
|
-
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:ve,handler:async e=>l({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):d(e.body)});return}let t=await n(e),
|
|
55
|
+
Updates an existing User Agent Blocking rule.`).positional(`ua-rule-id`,{type:`string`,description:`The unique identifier of the User Agent Blocking rule.`,demandOption:!0}).option(`configuration-target`,{type:`string`,description:"The configuration target. You must set the target to `ip` when specifying an IP address in the rule.",choices:[`ip`,`ip6`,`ip_range`,`asn`,`country`]}).coerce(`configuration-target`,e=>p(e,`configuration-target`,`text`)).option(`configuration-value`,{type:`string`,description:`The IP address to match. This address will be compared to the IP address of incoming requests.`}).option(`description`,{type:`string`,description:`An informative summary of the rule. This value is sanitized and any tags will be removed.`}).option(`access-rule-mode`,{type:`string`,description:`The action to apply to a matched request.`,choices:[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]}).coerce(`access-rule-mode`,e=>p(e,`access-rule-mode`,`text`)).option(`paused`,{type:`boolean`,description:`When true, indicates that the rule is currently paused.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`update <ua-rule-id>`,describe:`Update a User Agent Blocking rule`,builder:ve,handler:async e=>l({command:`firewall ua-rules update`,classification:{safeFlags:[`configuration-target`,`access-rule-mode`,`paused`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf firewall ua-rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/firewall/ua_rules/${e[`ua-rule-id`]==null?`<ua-rule-id>`:encodeURIComponent(String(e[`ua-rule-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ua-rule-id":String(e[`ua-rule-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),r=await n(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,e.body!==void 0){let n=t,i=await c(`Updating`,async()=>r.send($,{body:n,zone_id:a,ua_rule_id:e[`ua-rule-id`]}));o(i,{successLabel:`Updated`});return}e[`access-rule-mode`]===void 0&&(e[`access-rule-mode`]=await h(`access-rule-mode`,`The action to apply to a matched request.`,[`block`,`challenge`,`whitelist`,`js_challenge`,`managed_challenge`]));let l=f({configuration:{target:e[`configuration-target`],value:p(e[`configuration-value`],`configuration-value`,`text`)},description:p(e.description,`description`,`text`),mode:e[`access-rule-mode`],paused:e.paused}),u=await c(`Updating`,async()=>r.send($,{body:l,zone_id:a,ua_rule_id:e[`ua-rule-id`]}));o(u,{successLabel:`Updated`})})},be={command:`ua-rules`,describe:`Block or challenge requests based on the User-Agent header string`,builder:e=>e.command(le).command(fe).command(Q).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`firewall`,describe:`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,builder:e=>e.command(O).command(W).command(se).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xe as default};
|