cf 1.0.0-beta.26 → 1.0.0-beta.27
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 +1996 -3422
- package/dist/_meta/schemas.json +9249 -2339
- package/dist/abuse-reports-RxXqfDEW.mjs +24 -0
- package/dist/{access-DCOOmDC5.mjs → access-BxEprr2f.mjs} +1 -1
- package/dist/{accounts-HC6XuIwP.mjs → accounts-DU2ZNYqP.mjs} +17 -11
- package/dist/{acm-DYgr6SAR.mjs → acm-CBCIKBJ4.mjs} +1 -1
- package/dist/{addressing-BS66pJ_a.mjs → addressing-BKxiLRHk.mjs} +1 -1
- package/dist/{agent-memory-BbXdueL0.mjs → agent-memory-DkBpQYUL.mjs} +1 -1
- package/dist/{ai-BiIKznNv.mjs → ai-DqEN_hhg.mjs} +2 -2
- package/dist/{ai-audit-DI4Rw2wl.mjs → ai-audit-BmzOgt6x.mjs} +1 -1
- package/dist/{ai-gateway-rlYCbts5.mjs → ai-gateway-B0uiYVHq.mjs} +3 -3
- package/dist/ai-search-DbZIxdio.mjs +74 -0
- package/dist/{ai-security-BUwS6kVh.mjs → ai-security-CvZfP2JC.mjs} +1 -1
- package/dist/{alerting-BSzuvFk1.mjs → alerting-BjGwBxZT.mjs} +1 -1
- package/dist/{analytics-CQ-Yt1mm.mjs → analytics-C7kT_H-W.mjs} +4 -4
- package/dist/{analytics-engine-CdrY5-95.mjs → analytics-engine-BHpcNSdD.mjs} +1 -1
- package/dist/{api-security-BBxEJjGv.mjs → api-security-BbcvDtff.mjs} +2 -2
- package/dist/{argo-BiefH8wc.mjs → argo-D1VONzu-.mjs} +1 -1
- package/dist/{artifacts-B9g9aPrk.mjs → artifacts-2R2sxIKO.mjs} +1 -1
- package/dist/{audit-logs-BhJs-OS2.mjs → audit-logs-LoBB1OO_.mjs} +1 -1
- package/dist/auth-CspwoBlp.mjs +2 -0
- package/dist/{auth-C50SqX9F.mjs → auth-D499YE2n.mjs} +3 -3
- package/dist/{auth-D5Yj9eYU.mjs → auth-FK2eLQ02.mjs} +1 -1
- package/dist/{auth-token-DvNoIhRL.mjs → auth-token-BwpERbnG.mjs} +1 -1
- package/dist/{autoconfig-ldsgXxa6.mjs → autoconfig-B2w-woU0.mjs} +36 -36
- package/dist/{basin-catalog-CtKFiH-n.mjs → basin-catalog-AgOHGiPI.mjs} +2 -2
- package/dist/billing-DRNww0iC.mjs +24 -0
- package/dist/{blocks-DnNrvi8s.mjs → blocks-C8vyXIAT.mjs} +1 -1
- package/dist/body-unions-CjpNjwSW.mjs +2 -0
- package/dist/bot-management-fwxKIbaB.mjs +9 -0
- package/dist/{botnet-feed-lD9s2oLA.mjs → botnet-feed-DCYB5kYZ.mjs} +1 -1
- package/dist/{brand-protection-Byoa1hvj.mjs → brand-protection-BVICLzBc.mjs} +1 -1
- package/dist/browser-run-CEk-NIgP.mjs +40 -0
- package/dist/build-CRm2TQq8.mjs +2 -0
- package/dist/{build-Dwd1_7o0.mjs → build-DO_GNhRl.mjs} +1 -1
- package/dist/{builds-D3mAH87h.mjs → builds-CoazxuN-.mjs} +26 -26
- package/dist/{cache-0xCdyNg9.mjs → cache-jlLJLSu7.mjs} +1 -1
- package/dist/{cf-CpC4giTf.mjs → cf-hP0SOgC6.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-vdfri8fR.mjs → chunk-DSGVRFIS-DQwKND2c.mjs} +1 -1
- package/dist/chunk-SOBRPAPT-BKzUiNx_.mjs +363 -0
- package/dist/{cli-Cm4Twas4.mjs → cli-Nqf58-1c.mjs} +1 -1
- package/dist/{client-side-security-BRn7KBpu.mjs → client-side-security-VmZzMy-m.mjs} +1 -1
- package/dist/{cloud-connector-DqkOIRDr.mjs → cloud-connector-bMlFnqP0.mjs} +1 -1
- package/dist/{cloudflared-DDp_8PTK.mjs → cloudflared-Ba4KWdTO.mjs} +1 -1
- package/dist/{cloudforce-one-B9k8vhso.mjs → cloudforce-one-CCaIBOAo.mjs} +121 -119
- package/dist/{command-BV8-laJK.mjs → command-BASaTmJc.mjs} +1 -1
- package/dist/{command-CfOqnqlN.mjs → command-BiIVclNA.mjs} +1 -1
- package/dist/{command-BKNQsGqu.mjs → command-Bih1HLr3.mjs} +1 -1
- package/dist/{command-BVz2aES3.mjs → command-BxZBNPxG.mjs} +1 -1
- package/dist/{command-B-_ba4rQ.mjs → command-ByYf12-8.mjs} +1 -1
- package/dist/{command-Dn39o5xQ.mjs → command-C0qCuw03.mjs} +1 -1
- package/dist/{command-BsCFkho-.mjs → command-C2FVMd1b.mjs} +1 -1
- package/dist/{command--Y_QAiU2.mjs → command-C4OgtX_x.mjs} +1 -1
- package/dist/{command-DlI7Z_7j.mjs → command-C5Kqc5Km.mjs} +1 -1
- package/dist/{command-CQMRxiDz.mjs → command-CFxyp8Uo.mjs} +1 -1
- package/dist/{command-CN8NFLs2.mjs → command-CZAR85ba.mjs} +1 -1
- package/dist/{command-QHmV62Fv.mjs → command-CelQVrZL.mjs} +1 -1
- package/dist/{command-yOG9VUtq.mjs → command-CrAlzysj.mjs} +1 -1
- package/dist/{command-DsOv6z9q.mjs → command-pMoNdd22.mjs} +1 -1
- package/dist/{completions-BA52jTea.mjs → completions-DRzBiqpv.mjs} +1 -1
- package/dist/{connector-interrupts-zL7pxPn6.mjs → connector-interrupts-CrTeSyaM.mjs} +1 -1
- package/dist/{connector-telemetry-events-PL4Fqqvu.mjs → connector-telemetry-events-BbAOUt9h.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DyBSuEFB.mjs → connector-telemetry-snapshots-DcpBx7Qx.mjs} +1 -1
- package/dist/{connectors-D8H6rQz9.mjs → connectors-D1WFLJoE.mjs} +1 -1
- package/dist/{containers-Db-eWudu.mjs → containers-BOBEs1Gk.mjs} +4 -4
- package/dist/containers-DINLx5_i.mjs +380 -0
- package/dist/{content-scan-DUVq09i8.mjs → content-scan-D1GfPSL0.mjs} +1 -1
- package/dist/{context-BvLXzoMs.mjs → context-Dp4CXG22.mjs} +1 -1
- package/dist/{cps-CqaRliZZ.mjs → cps-D4uhzg3k.mjs} +1 -1
- package/dist/{csam-scanner-DsXvOOsZ.mjs → csam-scanner-DOOUBeBM.mjs} +1 -3
- package/dist/custom-csrs-DtdFo5YZ.mjs +18 -0
- package/dist/{custom-hostnames-Cj_csfo_.mjs → custom-hostnames-ccdlELaD.mjs} +1 -1
- package/dist/custom-nameservers-p3gDjfva.mjs +12 -0
- package/dist/custom-pages-DAkKVzgR.mjs +38 -0
- package/dist/d1-CDIyRdh4.mjs +52 -0
- package/dist/{delegate-CMfEjvHn.mjs → delegate-B4bKqF7i.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DDbmxkiX.mjs → deploy-BaC5Ty7F.mjs} +1 -1
- package/dist/{deploy-context-DsEVu7bf.mjs → deploy-context-DTTgNGro.mjs} +1 -1
- package/dist/{deploy-input-BA_3Q2Xu.mjs → deploy-input-mAy06fAI.mjs} +1 -1
- package/dist/{dev-BS156bim.mjs → dev-De-HszNT.mjs} +1 -1
- package/dist/{diagnostics-BmkQnSEb.mjs → diagnostics-D1CUs2o9.mjs} +1 -1
- package/dist/{dist-DehXZozc.mjs → dist-D5qkmHhC.mjs} +1 -1
- package/dist/{dls-DciZC_gQ.mjs → dls-DWBiYzY1.mjs} +1 -1
- package/dist/{dns-firewall-CRfde07f.mjs → dns-firewall-DH9xIT5H.mjs} +8 -8
- package/dist/{dns-C2YPspGN.mjs → dns-wMjf1t6-.mjs} +14 -8
- package/dist/{docs-CYjyBA8q.mjs → docs-BA7qslb2.mjs} +1 -1
- package/dist/{durable-objects-DcI97y4p.mjs → durable-objects-DF0MYpnV.mjs} +1 -1
- package/dist/{email-auth-CMCQAu99.mjs → email-auth-BShMFXn4.mjs} +1 -1
- package/dist/email-domains-CDSbVclP.mjs +14 -0
- package/dist/{email-routing-7p9dr5Ue.mjs → email-routing-CBCkbg_F.mjs} +4 -2
- package/dist/{email-security-Bu0fAYh-.mjs → email-security-CnNa1YON.mjs} +4 -4
- package/dist/{email-sending-OpMZNaHZ.mjs → email-sending-CpDSw-Eb.mjs} +16 -16
- package/dist/{errors-C5RGao2J.mjs → errors-DatLr-iR.mjs} +1 -1
- package/dist/{field-extractors-BfsNjd0e.mjs → field-extractors-BwGdMnTr.mjs} +1 -1
- package/dist/{firewall-CJ-VIOk1.mjs → firewall-CY_oem-d.mjs} +25 -9
- package/dist/{flagship-C5PTR1ND.mjs → flagship-Bat5EZCk.mjs} +1 -1
- package/dist/{fraud-B7hwBheX.mjs → fraud-CSUKLh8X.mjs} +2 -2
- package/dist/global-options-DiKj2cQy.mjs +2 -0
- package/dist/{google-tag-gateway-D7iFDVEa.mjs → google-tag-gateway-C2skt6t-.mjs} +1 -1
- package/dist/{healthchecks-B4jTcKV7.mjs → healthchecks-uC43QKQd.mjs} +1 -1
- package/dist/{hyperdrive-1432DM-p.mjs → hyperdrive-FcBbpew4.mjs} +3 -3
- package/dist/iam-8T74DNhH.mjs +62 -0
- package/dist/{images-Ttea4khD.mjs → images-C3JUaf6b.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-BeYrAg7Q.mjs → init-BEVVz4_P.mjs} +1 -1
- package/dist/{intel-CJznBf5n.mjs → intel-DRy4rHrt.mjs} +6 -7
- package/dist/{interactive-DsU8VDvK.mjs → interactive-CKHdGvkh.mjs} +1 -1
- package/dist/{internal-DOho_iA0.mjs → internal-CamuESs0.mjs} +1 -1
- package/dist/{ips-BgNoRwFN.mjs → ips-DinCNnWj.mjs} +1 -1
- package/dist/k2-wsanPL3y.mjs +10 -0
- package/dist/{kv-CTyuvcAz.mjs → kv-BLSPcEnH.mjs} +1 -1
- package/dist/{lazy-command-DeTzOWvU.mjs → lazy-command-WB1FOuew.mjs} +1 -1
- package/dist/{leaked-credential-checks-21Wc7OqL.mjs → leaked-credential-checks-CSZd9hBQ.mjs} +1 -1
- package/dist/{live-BfrWKfq8.mjs → live-B6AsI_E5.mjs} +1 -1
- package/dist/{load-balancers-DMTsh-9q.mjs → load-balancers-gap5u4b1.mjs} +19 -7
- package/dist/local-CFsO9Tkg.mjs +2 -0
- package/dist/{local-CvzO-cQH.mjs → local-CgBhtmON.mjs} +1 -1
- package/dist/{local-runtime-DOpR_Tnc.mjs → local-runtime-CmlJ20uJ.mjs} +1 -1
- package/dist/{login-CVWkMh1L.mjs → login-BJHaTERg.mjs} +1 -1
- package/dist/login-BfuOf-Yi.mjs +2 -0
- package/dist/logpush-qhlxsioM.mjs +68 -0
- package/dist/{logs-BSyyNwso.mjs → logs-bI54CJ0w.mjs} +23 -7
- package/dist/{magic-network-monitoring-DRRvSrDP.mjs → magic-network-monitoring-CX3TaMTu.mjs} +1 -1
- package/dist/{magic-transit-BhP424T-.mjs → magic-transit-BwDyySHJ.mjs} +20 -20
- package/dist/{managed-defense-6l_B3hn_.mjs → managed-defense-CsBBkfeQ.mjs} +2 -2
- package/dist/{managed-transforms-D7FMBsnq.mjs → managed-transforms-CUC-uAbW.mjs} +1 -1
- package/dist/{mcp-BUOfMkBP.mjs → mcp-CyI0sDmL.mjs} +3 -3
- package/dist/{mesh-B1RrhAT1.mjs → mesh-Czr0UCP4.mjs} +2 -2
- package/dist/{migrate-BTU8AvlP.mjs → migrate-DKDWYrz2.mjs} +1 -1
- package/dist/{monetization-Da3ooFLC.mjs → monetization-NUgfDtSy.mjs} +7 -3
- package/dist/{network-CjhSzhMm.mjs → network-B42zrBic.mjs} +1 -1
- package/dist/{network-interconnects-DEQD6GM8.mjs → network-interconnects-DuIBe8fK.mjs} +4 -4
- package/dist/{o11y-DeNxXxcp.mjs → o11y-oEUpMC3O.mjs} +6 -6
- package/dist/{oauth-DdXkpU44.mjs → oauth-BLQ1-y3R.mjs} +1 -1
- package/dist/{oauth-Dnog5v-Q.mjs → oauth-BmSFLp_s.mjs} +1 -1
- package/dist/observability-BxhJQCgZ.mjs +4 -0
- package/dist/organization-CEnlXwrl.mjs +70 -0
- package/dist/{organizations-p8Mgo8A7.mjs → organizations-Dt86ToxE.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Bwysyttf.mjs → origin-post-quantum-encryption-lX-uaJSL.mjs} +1 -1
- package/dist/package-CiRJBRHO.mjs +2 -0
- package/dist/{page-rules-D2eFbKWb.mjs → page-rules-J6LhwR-s.mjs} +1 -1
- package/dist/{pages-DYZDvWK6.mjs → pages-BksdnChs.mjs} +4 -4
- package/dist/{pay-per-crawl-CgPFv5HT.mjs → pay-per-crawl-BLcbHRoR.mjs} +1 -1
- package/dist/{pay-per-use-BIQrsrTy.mjs → pay-per-use-VatiU-Nt.mjs} +4 -2
- package/dist/{pipelines-D6pkhlpm.mjs → pipelines-B5AoB3f3.mjs} +5 -5
- package/dist/precursor-D3VH2MXT.mjs +4 -0
- package/dist/{previews-B1mqjXaJ.mjs → previews-DzJ85fsr.mjs} +1 -1
- package/dist/{progress-B-CVX0kn.mjs → progress-DLri-rA7.mjs} +1 -1
- package/dist/{prompt-DJF_Rs5S.mjs → prompt-D0dXwuME.mjs} +1 -1
- package/dist/{queues-DaqLO-UO.mjs → queues-BsAck4To.mjs} +5 -5
- package/dist/{r2-DDIU9JN3.mjs → r2-BYjdHDEZ.mjs} +38 -38
- package/dist/{radar-D59qCgld.mjs → radar-CvLtu-Vr.mjs} +1 -1
- package/dist/{raw-fetch-BrOxDN9k.mjs → raw-fetch-DQeDx1wT.mjs} +1 -1
- package/dist/{ready-DgE08svD.mjs → ready-gsGEaWLL.mjs} +1 -1
- package/dist/{realtime-DWjdrDzv.mjs → realtime-DiCEgFTC.mjs} +81 -79
- package/dist/{registrar-uYOU1U27.mjs → registrar-D4wdgWpo.mjs} +8 -8
- package/dist/{registrar-sandbox-uzs3eOKk.mjs → registrar-sandbox-B6yopzdG.mjs} +2 -2
- package/dist/{reporting-Dx2YTick.mjs → reporting-BiHgnT8L.mjs} +1 -1
- package/dist/{request-headers-DHzBX7dQ.mjs → request-headers-CoxHUNcB.mjs} +1 -1
- package/dist/{request-tracers-B49cBKkj.mjs → request-tracers-817HTytF.mjs} +1 -1
- package/dist/{resource-sharing-CIsLVAcK.mjs → resource-sharing-CW9xxtq5.mjs} +12 -12
- package/dist/{rules-CjgLSlUC.mjs → rules-CRhe_ca9.mjs} +1 -1
- package/dist/rulesets-CKyc-Xlx.mjs +42 -0
- package/dist/{rum-vPEpMS_h.mjs → rum-BfnWHW_d.mjs} +1 -1
- package/dist/{run-BZ6Fj3jQ.mjs → run-Ciw_GIrC.mjs} +1 -1
- package/dist/run-DD45EQTm.mjs +2 -0
- package/dist/{schema-cache-C_rvto6Y.mjs → schema-cache-BIo0Gi2H.mjs} +1 -1
- package/dist/schema-flags-DrqvwQNw.mjs +4 -0
- package/dist/{scim-BA7XbsSu.mjs → scim-C4iRWNYB.mjs} +1 -1
- package/dist/{secrets-store-MEUNt1Ph.mjs → secrets-store-DgtzZRze.mjs} +1 -1
- package/dist/security-insights-SlUGW3F_.mjs +62 -0
- package/dist/{security-txt-DikhnR2L.mjs → security-txt-C3YS0REz.mjs} +1 -1
- package/dist/{session-BOnam-Wv.mjs → session-D2yuwO4i.mjs} +1 -1
- package/dist/{shared-DmmWSObC.mjs → shared--uVkAAd7.mjs} +1 -1
- package/dist/{signed-url-C-24KbWB.mjs → signed-url-ClLk45_J.mjs} +1 -1
- package/dist/{smart-shield-DPqLMz7M.mjs → smart-shield-Dn95hqUH.mjs} +1 -1
- package/dist/{snippets-Bi3Uq1DF.mjs → snippets-BNUKOajz.mjs} +1 -1
- package/dist/{spawn-C3hzWVrJ.mjs → spawn-DuT4snxu.mjs} +1 -1
- package/dist/{spectrum-BaWKMoAl.mjs → spectrum-Cj0BMtg2.mjs} +3 -3
- package/dist/{speed-DShjlpAs.mjs → speed-BrVeZRyX.mjs} +1 -1
- package/dist/{sql-DCoFf15T.mjs → sql-BX1pBqj3.mjs} +2 -2
- package/dist/src-DPnUfK4c.mjs +131 -0
- package/dist/{ssl-C4nt4pJK.mjs → ssl-Bx4LCutF.mjs} +3 -3
- package/dist/{startup-profile-CFJ_Lu1c.mjs → startup-profile-DqaYNT0b.mjs} +1 -1
- package/dist/startup-profile-tZNb2HGz.mjs +2 -0
- package/dist/{state-DmjHXZat.mjs → state-BmzOLELo.mjs} +1 -1
- package/dist/state-Uwfrmw5I.mjs +2 -0
- package/dist/{stream-CpZbnSpH.mjs → stream-BRzr6yh0.mjs} +1 -1
- package/dist/{tags-BIjQ3Kjh.mjs → tags-xVzjZxdt.mjs} +11 -5
- package/dist/{telemetry-BDhqOpUw.mjs → telemetry-CJ9URio3.mjs} +1 -1
- package/dist/telemetry-Pt5GpCKD.mjs +2 -0
- package/dist/tenant-custom-nameservers-M7Fxqh2W.mjs +8 -0
- package/dist/{tunnels-CXAO2CeL.mjs → tunnels-DQVXKUKA.mjs} +3 -3
- package/dist/{turnstile-Ctm0rs0q.mjs → turnstile-B_Ugzgom.mjs} +1 -1
- package/dist/ui-FYultowZ.mjs +2 -0
- package/dist/{update-check-D_Wtw0_D.mjs → update-check-DHUo4FOJ.mjs} +1 -1
- package/dist/{update-check-Dc7cRFlx.mjs → update-check-DRr0eRhB.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-DOfc2Q7a.mjs → url-normalization-CZRQH_pJ.mjs} +1 -1
- package/dist/{url-scanner-J8M3X2tR.mjs → url-scanner-BH4PLy16.mjs} +1 -1
- package/dist/{user-BaF0qvvO.mjs → user-Bn82Qw0Y.mjs} +10 -12
- package/dist/{vectorize-D5qiggZU.mjs → vectorize-DoVVz_sh.mjs} +1 -1
- package/dist/version-Zr2oF8mY.mjs +2 -0
- package/dist/{waiting-rooms-BdmAq7ul.mjs → waiting-rooms-QUW131o3.mjs} +5 -3
- package/dist/{web-assets-BySw_Tme.mjs → web-assets-CgQXsp8m.mjs} +2 -2
- package/dist/{web3-BKkKf1RF.mjs → web3-TY9s6Swn.mjs} +3 -3
- package/dist/workers-B3uJqJKc.mjs +39 -0
- package/dist/{workers-builds-CVJ4FqzB.mjs → workers-builds-BgGY0IGk.mjs} +2 -2
- package/dist/{workers-for-platforms-mzdtmr6r.mjs → workers-for-platforms-5RkV9MVp.mjs} +2 -2
- package/dist/workers-vpc-Bt4OQbwM.mjs +12 -0
- package/dist/{workflows-Cr957c4U.mjs → workflows-6m85DdqF.mjs} +7 -7
- package/dist/{wrangler-migration-DZV7-4Fp.mjs → wrangler-migration-BbmGOu8l.mjs} +3 -3
- package/dist/{zaraz-C8__FhOh.mjs → zaraz-8WSJ7l0L.mjs} +2 -2
- package/dist/{zero-trust-BVCvQJ4e.mjs → zero-trust-DK0cqDZv.mjs} +483 -405
- package/dist/{zones-BzyjOT10.mjs → zones-DTAcguf6.mjs} +3 -3
- package/package.json +14 -14
- package/dist/abuse-reports-zPrsxbRz.mjs +0 -24
- package/dist/ai-search-QOenIzDL.mjs +0 -74
- package/dist/auth-Czzy5Rs_.mjs +0 -2
- package/dist/billing-BrLJqlOf.mjs +0 -22
- package/dist/bot-management-BSBVuKc0.mjs +0 -9
- package/dist/browser-run-BSVANGzU.mjs +0 -40
- package/dist/build-CPKxZ3kL.mjs +0 -2
- package/dist/chunk-3PJ54H4K-CY8EY_n2.mjs +0 -363
- package/dist/containers-D4sa-Eoy.mjs +0 -380
- package/dist/custom-csrs-Dl_daAbX.mjs +0 -10
- package/dist/custom-nameservers-Bw2P7F_W.mjs +0 -8
- package/dist/custom-pages-CJ7ecSX6.mjs +0 -20
- package/dist/d1-BsWI546w.mjs +0 -89
- package/dist/email-domains-1Nx60ETD.mjs +0 -12
- package/dist/iam-DuZenYtc.mjs +0 -48
- package/dist/k2-Cj1ORHul.mjs +0 -10
- package/dist/local-CWTti4ot.mjs +0 -2
- package/dist/login-Djz5mvHJ.mjs +0 -2
- package/dist/logpush-OMhp7VgE.mjs +0 -44
- package/dist/magic-cloud-networking-DD29yMnE.mjs +0 -68
- package/dist/oauth-clients-UnbMcHkx.mjs +0 -14
- package/dist/oauth-scopes-DbtnZVO4.mjs +0 -4
- package/dist/organization-IsxVyWol.mjs +0 -73
- package/dist/package-BOE_De2L.mjs +0 -2
- package/dist/precursor-B35P8h6h.mjs +0 -4
- package/dist/rulesets-C7_aZA7m.mjs +0 -34
- package/dist/run-D4-K_cbQ.mjs +0 -2
- package/dist/schema-flags-Cr6kleor.mjs +0 -4
- package/dist/security-insights-ZKtey62s.mjs +0 -40
- package/dist/src-jyCTFHcS.mjs +0 -131
- package/dist/startup-profile-D_Qjgca1.mjs +0 -2
- package/dist/state-C7lNNN31.mjs +0 -2
- package/dist/telemetry-BZdRnr26.mjs +0 -2
- package/dist/tenant-CqYoylyU.mjs +0 -10
- package/dist/tenant-custom-nameservers-DDzzdyY3.mjs +0 -8
- package/dist/ui-BUCBQ3Sq.mjs +0 -2
- package/dist/version-DNcdABcr.mjs +0 -2
- package/dist/workers-TS0oQ-XH.mjs +0 -39
- package/dist/workers-vpc-xB1hHFPd.mjs +0 -12
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l,t as u}from"./body-parser-BKcZS9iJ.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-D0dXwuME.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 basin-catalog credentials create <bucket-name>
|
|
3
3
|
|
|
4
4
|
Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const g={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:h,handler:async e=>c({command:`basin-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({token:d(e.token,`token`,`text`)}):l(e.body),sensitiveBodyPaths:[[`token`]]});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}e.token===void 0&&(e.token=await f(`token`,`Provides the Cloudflare API token for accessing R2.`,{kind:`secret`}));let h=u({token:d(e.token,`token`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p,bucket_name:e[`bucket-name`]}));a(g,{successLabel:`Created`})})};var _={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/credential/status`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function v(e){return e.usage(`$0 basin-catalog credentials status <bucket-name>
|
|
5
5
|
|
|
@@ -9,7 +9,7 @@ Removes the catalog from the control plane without deleting R2 bucket objects. S
|
|
|
9
9
|
|
|
10
10
|
Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,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 C={command:`disable <bucket-name>`,describe:`Disable Basin Catalog`,builder:S,handler:async e=>c({command:`basin-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`}))return;let u=await s(`Deleting`,async()=>c.send(x,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Deleted`})})};var w={method:`POST`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}/enable`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 basin-catalog enable <bucket-name>
|
|
11
11
|
|
|
12
|
-
Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})
|
|
12
|
+
Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`credential-token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Contains the optional request to enable a catalog. Send an empty body to keep the defaults. If you include `credential`, the service checks that the token can access the bucket, then stores it as the catalog's maintenance credential, like the store credentials operation. "})}const E={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:T,handler:async e=>c({command:`basin-catalog enable`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},bodyKind:`json`,body:e.body===void 0?u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}):l(e.body),sensitiveBodyPaths:[[`credential`,`token`]]});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(w,{body:t,account_id:f,bucket_name:e[`bucket-name`]}));a(n,{successLabel:`Created`});return}let p=u({credential:{token:d(e[`credential-token`],`credential-token`,`text`)}}),m=await s(`Creating`,async()=>c.send(w,{body:p,account_id:f,bucket_name:e[`bucket-name`]}));a(m,{successLabel:`Created`})})};var D={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog/${t.bucket_name}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function O(e){return e.usage(`$0 basin-catalog get <bucket-name>
|
|
13
13
|
|
|
14
14
|
Retrieve detailed information about a specific Basin Catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <bucket-name>`,describe:`Get Basin Catalog details`,builder:O,handler:async e=>c({command:`basin-catalog get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf basin-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/basin-catalog/${e[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(e[`bucket-name`]))}`,pathParams:{"bucket-name":String(e[`bucket-name`]??``)},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(D,{account_id:l,bucket_name:e[`bucket-name`]}));a(u,{successLabel:`Loaded`})})};var A={method:`GET`,path:t=>e`/accounts/${t.account_id}/basin-catalog`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function j(e){return e.usage(`$0 basin-catalog list
|
|
15
15
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{i as n,n as r}from"./auth-FK2eLQ02.mjs";import{a as i,t as a}from"./context-Dp4CXG22.mjs";import{t as o}from"./output-BJEgbI0G.mjs";import{t as s}from"./dry-run-gy0Hl9xo.mjs";import{t as c}from"./progress-DLri-rA7.mjs";import{t as l}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-BKcZS9iJ.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D0dXwuME.mjs";var v={method:`POST`,path:()=>`/billing/address-validation`,body:`json`};function y(e){return e.usage(`$0 billing addresses validate
|
|
3
|
+
|
|
4
|
+
Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).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 ee={command:`validate`,describe:`Validate Billing Address`,builder:y,handler:async e=>l({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let t=await r(e);if(e.body){let n=d(e.body),r=await c(`Validating`,async()=>t.send(v,{body:n}));o(r,{successLabel:`Validated`});return}let n=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),city:m(e.city,`city`,`text`),country:m(e.country,`country`,`text`),state:m(e.state,`state`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),i=await c(`Validating`,async()=>t.send(v,{body:n}));o(i,{successLabel:`Validated`})})},b={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile/payment-method`};function S(e){return e.usage(`$0 billing profiles create-payment-intent
|
|
5
|
+
|
|
6
|
+
Creates a Stripe payment intent for adding or updating a payment method on the account's billing profile. Returns a client secret for frontend payment method collection.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`create-payment-intent`,describe:`Create Payment Intent for Billing Profile`,builder:S,handler:async e=>l({command:`billing profiles create-payment-intent`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles create-payment-intent`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile/payment-method`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Creating`,async()=>n.send(x,{account_id:l}));o(u,{successLabel:`Created`})})};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function w(e){return e.usage(`$0 billing profiles create
|
|
7
|
+
|
|
8
|
+
Creates a billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const T={command:`create`,describe:`Create Billing Profile`,builder:w,handler:async e=>l({command:`billing profiles create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(C,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}let u=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),f=await c(`Creating`,async()=>n.send(C,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/billing/profile`,response:!1};function D(e){return e.usage(`$0 billing profiles delete
|
|
9
|
+
|
|
10
|
+
Deletes the billing profile for an account.`).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 O={command:`delete`,describe:`Delete Billing Profile`,builder:D,handler:async e=>l({command:`billing profiles delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>n.send(E,{account_id:l}));o(u,{successLabel:`Deleted`})})};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/profile`};function A(e){return e.usage(`$0 billing profiles get
|
|
11
|
+
|
|
12
|
+
Gets the current billing profile for the account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get Billing Profile`,builder:A,handler:async e=>l({command:`billing profiles get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing profiles get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(k,{account_id:l}));o(u,{successLabel:`Loaded`})})};var M={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function N(e){return e.usage(`$0 billing profiles update-email
|
|
13
|
+
|
|
14
|
+
Updates the billing email addresses and preferred locale for an account.`).option(`billing-email`,{type:`string`,description:`The billing_email field`}).option(`preferred-locale`,{type:`string`,description:`The preferred_locale field`}).option(`secondary-billing-email`,{type:`string`,description:`The secondary_billing_email field`}).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 P={command:`update-email`,describe:`Update Billing Email`,builder:N,handler:async e=>l({command:`billing profiles update-email`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update-email`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(M,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=p({billing_email:m(e[`billing-email`],`billing-email`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`)}),f=await c(`Updating`,async()=>n.send(M,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})};var F={method:`PUT`,path:t=>e`/accounts/${t.account_id}/billing/profile`,body:`json`};function I(e){return e.usage(`$0 billing profiles update
|
|
15
|
+
|
|
16
|
+
Updates the billing profile for an account.`).option(`address`,{type:`string`,description:`Street address line 1.`}).option(`address2`,{type:`string`,description:`Street address line 2 (apt, suite, etc.).`}).option(`billing-email`,{type:`string`,description:`Primary billing email address.`}).option(`buying-rate-plan`,{type:`string`,description:`Rate plan being purchased right after profile setup.`}).option(`captcha-challenge-jwt`,{type:`string`,description:`Captcha challenge JWT issued during onboarding.`}).option(`cf-turnstile-response`,{type:`string`,description:`Cloudflare Turnstile response.`}).option(`city`,{type:`string`,description:`City on the billing profile.`}).option(`company`,{type:`string`,description:`Company name on the billing profile.`}).option(`country`,{type:`string`,description:`ISO 3166-1 alpha-2 country code.`}).option(`first-name`,{type:`string`,description:`First name on the billing profile.`}).option(`h-captcha-response`,{type:`string`,description:`hCaptcha response.`}).option(`last-name`,{type:`string`,description:`Last name on the billing profile.`}).option(`preferred-locale`,{type:`string`,description:`Preferred locale for invoice rendering (BCP 47).`}).option(`secondary-billing-email`,{type:`string`,description:`Secondary billing email address for CC on invoices.`}).option(`state`,{type:`string`,description:`State or region on the billing profile.`}).option(`tax-id-type`,{type:`string`,description:`Type of tax ID provided.`}).option(`telephone`,{type:`string`,description:`Contact phone number.`}).option(`vat`,{type:`string`,description:`VAT identifier.`}).option(`zipcode`,{type:`string`,description:`ZIP or postal code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a billing profile.`})}const L={command:`update`,describe:`Update Billing Profile`,builder:I,handler:async e=>l({command:`billing profiles update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing profiles update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/profile`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(F,{body:t,account_id:l}));o(r,{successLabel:`Updated`});return}let u=p({address:m(e.address,`address`,`text`),address2:m(e.address2,`address2`,`text`),billing_email:m(e[`billing-email`],`billing-email`,`text`),buying_rate_plan:m(e[`buying-rate-plan`],`buying-rate-plan`,`text`),captcha_challenge_jwt:m(e[`captcha-challenge-jwt`],`captcha-challenge-jwt`,`text`),cf_turnstile_response:m(e[`cf-turnstile-response`],`cf-turnstile-response`,`text`),city:m(e.city,`city`,`text`),company:m(e.company,`company`,`text`),country:m(e.country,`country`,`text`),first_name:m(e[`first-name`],`first-name`,`text`),h_captcha_response:m(e[`h-captcha-response`],`h-captcha-response`,`text`),last_name:m(e[`last-name`],`last-name`,`text`),preferred_locale:m(e[`preferred-locale`],`preferred-locale`,`text`),secondary_billing_email:m(e[`secondary-billing-email`],`secondary-billing-email`,`text`),state:m(e.state,`state`,`text`),tax_id_type:m(e[`tax-id-type`],`tax-id-type`,`text`),telephone:m(e.telephone,`telephone`,`text`),vat:m(e.vat,`vat`,`text`),zipcode:m(e.zipcode,`zipcode`,`text`)}),f=await c(`Updating`,async()=>n.send(F,{body:u,account_id:l}));o(f,{successLabel:`Updated`})})},R={command:`profiles`,describe:`Billing profile with payment method, address, and invoice preferences`,builder:e=>e.command(T).command(te).command(O).command(j).command(L).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var z={method:`GET`,path:t=>e`/billing/rate_plans/${t.public_key}`};function B(e){return e.usage(`$0 billing rate-plans get <public-key>
|
|
17
|
+
|
|
18
|
+
Gets a rate plan's details by its public key (e.g., 'teams_free', 'cf_pro_20_20'). This is a public catalog endpoint, so authentication is not enforced and credentials are accepted but not required.`).positional(`public-key`,{type:`string`,description:`The public key identifier for the rate plan.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <public-key>`,describe:`Get Rate Plan by Public Key`,builder:B,handler:async e=>l({command:`billing rate-plans get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf billing rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/billing/rate_plans/${e[`public-key`]==null?`<public-key>`:encodeURIComponent(String(e[`public-key`]))}`,pathParams:{"public-key":String(e[`public-key`]??``)},bodyKind:`none`});return}let t=await r(e),n=await c(`Loading`,async()=>t.send(z,{public_key:e[`public-key`]}));o(n,{successLabel:`Loaded`})})},H={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/activity`,query:[`limit`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function W(e){return e.usage(`$0 billing spend-policies activity list
|
|
19
|
+
|
|
20
|
+
Returns configuration history from immutable policy revisions for the account, including deleted policies. Entries contain before/after values and verified actor attribution. Pages use descending revision IDs, not event or commit order; refresh the first page for new entries. This cursor is not an incremental consumer checkpoint.`).option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`cursor`,{type:`string`,description:`Opaque token from the preceding response's result_info.cursor. Pass it unchanged to retrieve older entries.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`List Spend Policy Activity`,builder:W,handler:async e=>l({command:`billing spend-policies activity list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf billing spend-policies activity list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies/activity`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(U,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},K={command:`activity`,describe:`Operations for spend-policies.activity`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}/audit`,query:[`limit`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function J(e){return e.usage("$0 billing spend-policies audit list\n\nReturns the policy's evaluation history, newest first. At most one entry is recorded per trigger (`approaching_limit` or `limit_reached`), policy version and billing period, so a policy update can record a new entry without any change in balance. Disabled policies still return their history; deleted policies return `404`. There is no pagination: use `limit` to set how many entries come back.").option(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of audit entries to return. Defaults to 50. Values above 100 are capped at 100 rather than rejected.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`list`,describe:`List Spend Policy Audit Entries`,builder:J,handler:async e=>l({command:`billing spend-policies audit list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit};if(e.dryRun){let t=await i();s({command:`cf billing spend-policies audit list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}/audit`,pathParams:{"policy-id":String(e[`policy-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(q,{account_id:u,policy_id:e[`policy-id`],...n}));o(d,{successLabel:`Loaded`})})},X={command:`audit`,describe:`Operations for spend-policies.audit`,builder:e=>e.command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function ne(e){return e.usage("$0 billing spend-policies create\n\nCreates a spend policy. Each account can have only one enabled `usage_block` policy per product. A second one returns `409`. There is no limit on `notification` policies.").option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const re={command:`create`,describe:`Create Spend Policy`,builder:ne,handler:async e=>l({command:`billing spend-policies create`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(Z,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let u=p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}),f=await c(`Creating`,async()=>n.send(Z,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function ie(e){return e.usage("$0 billing spend-policies delete <policy-id>\n\nSoft-deletes the spend policy. The policy is disabled and no longer appears in list, get or audit responses. The `If-Match` header must equal the policy's current `version`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',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 ae={command:`delete <policy-id>`,describe:`Delete Spend Policy`,builder:ie,handler:async e=>l({command:`billing spend-policies delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let u=await r(e),d=e.local?t:await a();if(e.accountId=d,!await _({force:!!e.force}))return;let f=await c(`Deleting`,async()=>n(u,`DELETE`,`/accounts/${d}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{headers:Object.keys(l).length>0?l:void 0}));o(f,{successLabel:`Deleted`})})};var oe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies/${t.policy_id}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function se(e){return e.usage("$0 billing spend-policies get <policy-id>\n\nReturns one spend policy. The `ETag` response header holds the current `version`; send it as `If-Match` on a later update or delete.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ce={command:`get <policy-id>`,describe:`Get Spend Policy`,builder:se,handler:async e=>l({command:`billing spend-policies get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing spend-policies get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(oe,{account_id:l,policy_id:e[`policy-id`]}));o(u,{successLabel:`Loaded`})})};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/billing/spend-policies`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function ue(e){return e.usage("$0 billing spend-policies list\n\nReturns every spend policy on the account that has not been deleted, including disabled ones. Results are sorted by `name`, then `id`. There is no pagination.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const de={command:`list`,describe:`List Spend Policies`,builder:ue,handler:async e=>l({command:`billing spend-policies list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing spend-policies list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billing/spend-policies`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(le,{account_id:l}));o(u,{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 billing spend-policies update <policy-id>\n\nReplaces the whole spend policy. Every field is required, as on create; there are no partial updates and `PATCH` is not supported. The `If-Match` header must equal the policy's current `version`. On success, `version` goes up by one and the new value is returned in `ETag`.").positional(`policy-id`,{type:`string`,description:`Identifies the spend policy.`,demandOption:!0}).option(`if-match`,{type:`string`,description:'The policy `version` the change is based on, as returned in `ETag`. Quoted (`"3"`) and bare (`3`) values are both accepted. Weak ETags (`W/"3"`) and `*` are not.',demandOption:!0}).option(`action`,{type:`string`,description:"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",choices:[`notification`,`usage_block`]}).coerce(`action`,e=>m(e,`action`,`text`)).option(`enabled`,{type:`boolean`,description:`Whether the policy is evaluated.`}).option(`name`,{type:`string`,description:`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`}).option(`notification-email`,{type:`string`,description:"Email address that receives notifications. Required when `action` is `notification`. When set, it must be a bare address (`user@example.com`); display-name forms such as `Name <user@example.com>` are rejected."}).option(`product-id`,{type:`string`,description:"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",choices:[`workers`,`durable_objects`]}).coerce(`product-id`,e=>m(e,`product-id`,`text`)).option(`threshold-cents`,{type:`number`,description:`The spend threshold for the current billing period, in US cents. Must be greater than zero.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A spend policy as sent on create and on full replacement. Unknown fields and trailing JSON are rejected. Only the first 1 MiB of the body is read.`})}const pe={command:`update <policy-id>`,describe:`Update Spend Policy`,builder:fe,handler:async e=>l({command:`billing spend-policies update`,classification:{safeFlags:[`action`,`enabled`,`product-id`,`dry-run`]}},e,async()=>{let l={};if(e[`if-match`]!==void 0&&(l[`If-Match`]=String(e[`if-match`])),e.dryRun){let t=await i();s({command:`cf billing spend-policies update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billing/spend-policies/${e[`policy-id`]==null?`<policy-id>`:encodeURIComponent(String(e[`policy-id`]))}`,pathParams:{"policy-id":String(e[`policy-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({action:e.action,enabled:e.enabled,name:m(e.name,`name`,`text`),notification_email:m(e[`notification-email`],`notification-email`,`text`),product_id:e[`product-id`],threshold_cents:e[`threshold-cents`]}):d(e.body)});return}let u=await r(e),_=e.local?t:await a();if(e.accountId=_,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${_}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Updated`});return}if(e.action===void 0&&(e.action=await g(`action`,"The action taken when the threshold is reached. `notification` sends an email to `notification_email`. `usage_block` blocks further usage of the product until the end of the billing period. Raising the threshold above the current balance, disabling the policy, or deleting it lifts the block early.",[`notification`,`usage_block`])),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e.name===void 0&&(e.name=await h(`name`,`Display name of the policy. After surrounding whitespace is trimmed, it must be 1 to 200 bytes long. The value is stored as sent, untrimmed.`)),e[`product-id`]===void 0&&(e[`product-id`]=await g(`product-id`,"The product the policy applies to: `workers` or `durable_objects`. Each product's balance and policies are separate. Both products support `notification` and `usage_block` policies on create and update.",[`workers`,`durable_objects`])),e[`threshold-cents`]===void 0)throw Error(`--threshold-cents is required (or pass --body with this field set).`);let v={};e.action!==void 0&&f(v,[`action`],e.action),e.enabled!==void 0&&f(v,[`enabled`],e.enabled),e.name!==void 0&&f(v,[`name`],m(e.name,`name`,`text`)),e[`notification-email`]!==void 0&&f(v,[`notification_email`],m(e[`notification-email`],`notification-email`,`text`)),e[`product-id`]!==void 0&&f(v,[`product_id`],e[`product-id`]),e[`threshold-cents`]!==void 0&&f(v,[`threshold_cents`],e[`threshold-cents`]);let y=await c(`Updating`,async()=>n(u,`PUT`,`/accounts/${_}/billing/spend-policies/${encodeURIComponent(String(e[`policy-id`]))}`,{body:v,headers:Object.keys(l).length>0?l:void 0}));o(y,{successLabel:`Updated`})})},me={command:`spend-policies`,describe:`Operations for spend-policies`,builder:e=>e.command(re).command(ae).command(ce).command(de).command(pe).command(K).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var he={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage/billable-metrics`,query:[`from`,`to`]};function ge(e){return e.usage("$0 billing usage get-account-billable-metrics\n\nLists billable metrics available to the account through contracts and subscriptions that overlap the requested period. Results are deduplicated and ordered. If no qualifying contract exists, the result is an empty array. When `from` and `to` are omitted, the period defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _e={command:`get-account-billable-metrics`,describe:`List Account Billable Metrics (Version 2, Alpha, Restricted)`,builder:ge,handler:async e=>l({command:`billing usage get-account-billable-metrics`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-billable-metrics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage/billable-metrics`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(he,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var ve={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable/usage`,query:[`from`,`to`]};function ye(e){return e.usage("$0 billing usage get-account-usage-v2\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** This endpoint serves `usage` records only; cost and pricing fields are absent from responses. To retrieve rated costs, use `POST` on the same path with `Metric: cost`. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days.").option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const be={command:`get-account-usage-v2`,describe:`Get Account Usage (Version 2, Alpha, Restricted)`,builder:ye,handler:async e=>l({command:`billing usage get-account-usage-v2`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-account-usage-v2`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable/usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ve,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var xe={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage/info`};function Q(e){return e.usage(`$0 billing usage get-info-v1
|
|
21
|
+
|
|
22
|
+
Returns high-level usage information for the account, including coverage, and subscription metadata.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get-info-v1`,describe:`Get Account Billable Usage Info (Version 1, Alpha)`,builder:Q,handler:async e=>l({command:`billing usage get-info-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();s({command:`cf billing usage get-info-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage/info`,pathParams:{},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(xe,{account_id:l}));o(u,{successLabel:`Loaded`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/billable-usage`,query:[`from`,`to`]};function we(e){return e.usage(`$0 billing usage get-v1
|
|
23
|
+
|
|
24
|
+
Returns billable usage data for the account. When no query parameters are provided, returns usage for the current billing period.`).option(`from`,{type:`string`,description:`Start date for the usage query (ISO 8601). The provided time range must include the subscription billing cycle anchor day, otherwise no usage data is returned. Use the info endpoint to retrieve the subscription anchor day.`}).option(`to`,{type:`string`,description:`End date for the usage query (ISO 8601).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-v1`,describe:`Get Account Billable Usage (Version 1, Alpha)`,builder:we,handler:async e=>l({command:`billing usage get-v1`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={from:e.from,to:e.to};if(e.dryRun){let e=await i();s({command:`cf billing usage get-v1`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/billable-usage`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Ce,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`POST`,path:t=>e`/accounts/${t.account_id}/billable/usage`,body:`json`};function Ee(e){return e.usage("$0 billing usage query\n\nReturns cost and usage data for a single Cloudflare account, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. This is the filterable counterpart to `GET` on the same path. It is a read-only operation and requires only the `#billing:read` permission; `POST` is used so that filter criteria can be supplied in a request body rather than in the query string. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. **Note:** Cost and pricing fields are populated only when `Metric` is `cost`; otherwise they are absent from responses. The request body is optional. When it is omitted, or when `TimePeriod` is omitted, the range defaults to the start of the current month through today. The maximum date range is 31 days. Filters of different kinds are combined with AND. Values within one tag filter are combined with OR. Filter values that do not match usage produce an empty result set. Results can be grouped by up to two groups, in any combination of dimension keys and resource-tag keys. Tag groups are returned in the `Tags` field. Usage without a requested tag remains in an untagged group, with that key omitted from `Tags`. Requests that use tag filtering or tag grouping return HTTP 400 when the underlying usage data source does not support tags. Requests that use dimension grouping return HTTP 400 when the underlying usage data source does not support dimensions.").option(`filter-by-billable-metric-ids`,{type:`string`,array:!0,description:"Restrict results to rows whose `x_BillableMetricId` matches one of these billable metric ids (e.g. `workers_standard_requests`). Values must be unique."}).option(`filter-by-product-family-ids`,{type:`string`,array:!0,description:`Restrict results to billable metrics belonging to these product families. Values must be unique UUIDs.`}).option(`filter-by-tags`,{type:`string`,description:`Restrict results by resource tags. Filters for different keys are combined with AND, while values within one filter are combined with OR. Keys must be unique and are case-sensitive. Provide as a JSON array of objects or @path/to/file.json.`}).option(`group-by`,{type:`string`,description:`Grouping definitions used to split result rows. At most two unique keys may be supplied. Provide as a JSON array of objects or @path/to/file.json.`}).option(`metric`,{type:`string`,description:"Type of cost/usage records to retrieve. `usage` returns unrated usage quantities. `cost` returns rated usage with cost and pricing fields; it is available only on `POST` account usage and only when the underlying usage data source is ClickHouse (other sources return an empty result set). Requests that combine `cost` with `GroupBy` or `FilterBy.Tags` return HTTP 400. Unrelated to `FilterBy.BillableMetricIds`. Defaults to `usage` when omitted.",choices:[`usage`,`cost`],default:`usage`}).coerce(`metric`,e=>m(e,`metric`,`text`)).option(`time-period-from`,{type:`string`,description:"Start of the range (ISO 8601). Required if `To` is set."}).option(`time-period-to`,{type:`string`,description:"End of the range (ISO 8601). Required if `From` is set. Must be after `From` and no more than 31 days after it."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Filter criteria for a usage query. Every field is optional; an empty object is equivalent to omitting the body entirely. Unknown fields are rejected.`})}const De={command:`query`,describe:`Query Account Usage (Version 2, Alpha, Restricted)`,builder:Ee,handler:async e=>l({command:`billing usage query`,classification:{safeFlags:[`metric`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf billing usage query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/billable/usage`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Loading`,async()=>n.send($,{body:t,account_id:l}));o(r,{successLabel:`Loaded`});return}let f=p({FilterBy:{BillableMetricIds:e[`filter-by-billable-metric-ids`],ProductFamilyIds:e[`filter-by-product-family-ids`],Tags:u(e[`filter-by-tags`],`filter-by-tags`)},GroupBy:u(e[`group-by`],`group-by`),Metric:e.metric,TimePeriod:{From:m(e[`time-period-from`],`time-period-from`,`text`),To:m(e[`time-period-to`],`time-period-to`,`text`)}}),h=await c(`Loading`,async()=>n.send($,{body:f,account_id:l}));o(h,{successLabel:`Loaded`})})},Oe={command:`usage`,describe:`Metered usage data for billed services — requests, bandwidth, and feature consumption`,builder:e=>e.command(_e).command(be).command(Se).command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ke={command:`billing`,describe:`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,builder:e=>e.command(b).command(R).command(H).command(me).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ke as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-
|
|
2
|
+
import{n as e,r as t}from"./theme-BGHWSKCw.mjs";import"./delegate-B4bKqF7i.mjs";import{stripVTControlCharacters as n}from"node:util";function r(n){return`${t.success(e.success)} ${n}`}function i(n){return`${t.warning(e.warning)} ${n}`}function a(n){return`${t.muted(e.arrow)} ${t.muted(n)}`}function o(e,r){let a=process.env.CF_DELEGATION?` ${t.muted(`·`)} ${t.muted(`local version`)}`:``,o=r?` ${t.muted(`·`)} ${t.warning(`update available: v${r.latestVersion}`)}`:``,s=`🍊☁️ ${t.brand(t.bold(`cf`))} ${t.muted(`·`)} ${t.muted(`v${e}`)}${a}${o}`,c=n(s).length,l=`─`.repeat(c);return`${s}\n${t.brand(l)}${r?.isMajor?`\n${i(`A new major version of cf is available. Updating is recommended.`)}`:``}`}const s={bar:`│`,top:`┌`,bottom:`└`};function c(e,n,r){let i=r?.title??`Error`,a=t.error(s.bar),o=t.error(s.top),c=t.error(s.bottom),u=Math.max(20,(process.stderr.columns||80)-2),d=[];if(d.push(``),d.push(`${o} ${t.error(t.bold(i))}`),r?.rawMessage)for(let t of e.split(`
|
|
3
3
|
`))d.push(t.length>0?`${a} ${t}`:a);else for(let n of l(e,u))d.push(n.length>0?`${a} ${t.error(t.bold(n))}`:a);if(n){d.push(a);for(let e of l(n,u))d.push(e.length>0?`${a} ${t.muted(e)}`:a)}return d.push(c),d.join(`
|
|
4
4
|
`)}function l(e,t){let n=[];for(let r of e.split(`
|
|
5
5
|
`)){if(r.length<=t){n.push(r);continue}let e=r.split(/\s+/),i=``;for(let r of e)i?i.length+1+r.length<=t?i+=` `+r:(n.push(i),i=r):i=r;i&&n.push(i)}return n}export{r as a,a as i,l as n,i as o,o as r,c as t};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{d as e}from"./schema-flags-DrqvwQNw.mjs";function t(t,n){for(let r of n){let n=t;for(let e of r.path)n=typeof n==`object`&&n&&Object.hasOwn(n,e)?n[e]:void 0;if(n===void 0)continue;let i;if(`schema`in r)i=r.schema;else{let e=typeof n==`object`&&n?n[r.selector]:void 0;i=r.variants.find(t=>t.values.some(t=>t===e))?.schema??{oneOf:r.variants.map(e=>e.schema)}}let a=e(i,n);if(a.length>0)throw Error(`Invalid ${r.path.join(`.`)||`request body`}: ${a.join(`; `)}. Pass --body with a complete request body if it cannot be supplied as flags.`)}return t}export{t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-FK2eLQ02.mjs";import{i as n}from"./context-Dp4CXG22.mjs";import{t as r}from"./output-BJEgbI0G.mjs";import{t as i}from"./dry-run-gy0Hl9xo.mjs";import{t as a}from"./progress-DLri-rA7.mjs";import{t as o}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as s,r as c,t as l}from"./body-parser-BKcZS9iJ.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,i as f}from"./prompt-D0dXwuME.mjs";var p={method:`POST`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`,body:`json`,response:!1};function m(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`requests-by-attribute`,{type:`string`,description:`Top attributes contributing to the feedback sample. Keys include topASNs, topCountries, topHosts, topIPs, topJA3Hashes, topJA4s, topPaths, topUserAgents. Provide as a JSON object or @path/to/file.json.`}).option(`requests-by-score`,{type:`string`,description:"Map of bot scores (1-99) to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`requests-by-score-src`,{type:`string`,description:"Map of score source to request counts. Sum must equal `requests`. Provide as a JSON object or @path/to/file.json."}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).coerce(`type`,e=>u(e,`type`,`text`)).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 h={command:`create`,describe:`Submit a feedback report`,builder:m,handler:async e=>o({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]):s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}])});return}let o=await t(e),m=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=m,e.body){let t=s(e.body,[{path:[`requests_by_attribute`],flag:`requests-by-attribute`},{path:[`requests_by_score`],flag:`requests-by-score`},{path:[`requests_by_score_src`],flag:`requests-by-score-src`}]),n=await a(`Creating`,async()=>o.send(p,{body:t,zone_id:m}));r(n,{successLabel:`Created`});return}if(e.description===void 0&&(e.description=await d(`description`,`The description field`)),e.expression===void 0&&(e.expression=await d(`expression`,`Wirefilter expression describing the traffic being reported.`)),e[`first-request-seen-at`]===void 0&&(e[`first-request-seen-at`]=await d(`first-request-seen-at`,`The first_request_seen_at field`)),e[`last-request-seen-at`]===void 0&&(e[`last-request-seen-at`]=await d(`last-request-seen-at`,`The last_request_seen_at field`)),e.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);if(e[`requests-by-attribute`]===void 0)throw Error(`--requests-by-attribute is required (or pass --body with this field set).`);if(e[`requests-by-score`]===void 0)throw Error(`--requests-by-score is required (or pass --body with this field set).`);if(e[`requests-by-score-src`]===void 0)throw Error(`--requests-by-score-src is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await f(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let h=l({description:u(e.description,`description`,`text`),expression:u(e.expression,`expression`,`text`),first_request_seen_at:u(e[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:u(e[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:e.requests,requests_by_attribute:c(e[`requests-by-attribute`],`requests-by-attribute`,!0),requests_by_score:c(e[`requests-by-score`],`requests-by-score`,!0),requests_by_score_src:c(e[`requests-by-score-src`],`requests-by-score-src`,!0),subtype:u(e.subtype,`subtype`,`text`),type:e.type},[[`requests_by_attribute`],[`requests_by_score`],[`requests_by_score_src`]]),g=await a(`Creating`,async()=>o.send(p,{body:h,zone_id:m}));r(g,{successLabel:`Created`})})};var g={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management/feedback`};function _(e){return e.usage(`$0 bot-management feedback list
|
|
3
|
+
|
|
4
|
+
Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List zone feedback reports`,builder:_,handler:async e=>o({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(g,{zone_id:s}));r(c,{successLabel:`Loaded`})})},y={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(h).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`GET`,path:t=>e`/zones/${t.zone_id}/bot_management`};function x(e){return e.usage(`$0 bot-management get
|
|
5
|
+
|
|
6
|
+
Retrieve a zone's Bot Management Config`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get Zone Bot Management Config`,builder:x,handler:async e=>o({command:`bot-management get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf bot-management get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(b,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var C={method:`PUT`,path:t=>e`/zones/${t.zone_id}/bot_management`,body:`json`};function w(e){return e.usage('$0 bot-management update\n\nUpdates the Bot Management configuration for a zone. This API is used to update: - **Bot Fight Mode** - **Super Bot Fight Mode** - **Bot Management for Enterprise** See [Bot Plans](https://developers.cloudflare.com/bots/plans/) for more information on the different plans \\ If you recently upgraded or downgraded your plan, refer to the following examples to clean up old configurations. Copy and paste the example body to remove old zone configurations based on your current plan. #### Clean up configuration for Bot Fight Mode plan ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "suppress_session_score": false } ``` #### Clean up configuration for SBFM Pro plan ```json { "sbfm_likely_automated": "allow", "fight_mode": false } ``` #### Clean up configuration for SBFM Biz plan ```json { "fight_mode": false } ``` #### Clean up configuration for BM Enterprise Subscription plan It is strongly recommended that you ensure you have [custom rules](https://developers.cloudflare.com/waf/custom-rules/) in place to protect your zone before disabling the SBFM rules. Without these protections, your zone is vulnerable to attacks. ```json { "sbfm_likely_automated": "allow", "sbfm_definitely_automated": "allow", "sbfm_verified_bots": "allow", "sbfm_static_resource_protection": false, "optimize_wordpress": false, "fight_mode": false } ```').option(`ai-agents-anthropic-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-anthropic-agent`,e=>u(e,`ai-agents-anthropic-agent`,`text`)).option(`ai-agents-google-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-google-agent`,e=>u(e,`ai-agents-google-agent`,`text`)).option(`ai-agents-instinct`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-instinct`,e=>u(e,`ai-agents-instinct`,`text`)).option(`ai-agents-muse`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-muse`,e=>u(e,`ai-agents-muse`,`text`)).option(`ai-agents-openai-agent`,{type:`string`,description:`Action to apply to one supported personal AI agent.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-agents-openai-agent`,e=>u(e,`ai-agents-openai-agent`,`text`)).option(`ai-bots-migration-opt-out`,{type:`boolean`,description:`Temporary migration flag tracking zones opted out of AI bots managed-rule updates.`}).option(`ai-bots-protection`,{type:`string`,description:`Enable rule to block AI Scrapers and Crawlers.`,choices:[`block`,`disabled`,`only_on_ad_pages`]}).coerce(`ai-bots-protection`,e=>u(e,`ai-bots-protection`,`text`)).option(`ai-search`,{type:`string`,description:`Configure robots.txt policy for AI search bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-search`,e=>u(e,`ai-search`,`text`)).option(`ai-training`,{type:`string`,description:`Configure robots.txt policy for AI model training bots.`,choices:[`disabled`,`disallow`,`block`,`only_on_ad_pages`]}).coerce(`ai-training`,e=>u(e,`ai-training`,`text`)).option(`ai-user`,{type:`string`,description:`Configure robots.txt policy for AI assistant and agent bots.`,choices:[`disabled`,`block`,`only_on_ad_pages`]}).coerce(`ai-user`,e=>u(e,`ai-user`,`text`)).option(`bot-preference-sync-enabled`,{type:`boolean`,description:`Enable Bot Preference Sync for this zone. When enabled, Cloudflare can serve robots.txt content derived from the zone's AI Search, AI User, and AI Training preferences.`}).option(`cf-robots-variant`,{type:`string`,description:`Specifies the Robots Access Control License variant to use.`,choices:[`off`,`policy_only`]}).coerce(`cf-robots-variant`,e=>u(e,`cf-robots-variant`,`text`)).option(`content-bots-protection`,{type:`string`,description:`Enable rule to block content bots. When enabled, blocks automated traffic with low bot scores, excluding safe verified bot categories. Exceptions should be managed via skip rules.`,choices:[`block`,`disabled`]}).coerce(`content-bots-protection`,e=>u(e,`content-bots-protection`,`text`)).option(`crawler-protection`,{type:`string`,description:`Enable rule to punish AI Scrapers and Crawlers via a link maze.`,choices:[`enabled`,`disabled`]}).coerce(`crawler-protection`,e=>u(e,`crawler-protection`,`text`)).option(`enable-js`,{type:`boolean`,description:`Use lightweight, invisible JavaScript detections to improve Bot Management. [Learn more about JavaScript Detections](https://developers.cloudflare.com/bots/reference/javascript-detections/).`}).option(`is-robots-txt-managed`,{type:`boolean`,description:`Enable cloudflare managed robots.txt. If an existing robots.txt is detected, then managed robots.txt will be prepended to the existing robots.txt.`}).option(`jsd-api-results-enabled`,{type:`boolean`,description:`Whether to use JavaScript Detection results submitted through the API for this zone.`}).option(`fight-mode`,{type:`boolean`,description:`Whether to enable Bot Fight Mode.`}).option(`stale-zone-configuration-optimize-wordpress`,{type:`boolean`,description:`Indicates that the zone's wordpress optimization for SBFM is turned on.`}).option(`stale-zone-configuration-sbfm-definitely-automated`,{type:`string`,description:`Indicates that the zone's definitely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-likely-automated`,{type:`string`,description:`Indicates that the zone's likely automated requests are being blocked or challenged.`}).option(`stale-zone-configuration-sbfm-static-resource-protection`,{type:`string`,description:`Indicates that the zone's static resource protection is turned on.`}).option(`stale-zone-configuration-sbfm-verified-bots`,{type:`string`,description:`Indicates that the zone's verified bot requests are being blocked.`}).option(`stale-zone-configuration-suppress-session-score`,{type:`boolean`,description:`Indicates that the zone's session score tracking is disabled.`}).option(`stale-zone-configuration-fight-mode`,{type:`boolean`,description:`Indicates that the zone's Bot Fight Mode is turned on.`}).option(`optimize-wordpress`,{type:`boolean`,description:`Whether to optimize Super Bot Fight Mode protections for Wordpress.`}).option(`sbfm-definitely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on definitely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-definitely-automated`,e=>u(e,`sbfm-definitely-automated`,`text`)).option(`sbfm-static-resource-protection`,{type:`boolean`,description:`Super Bot Fight Mode (SBFM) to enable static resource protection.
|
|
7
|
+
Enable if static resources on your application need bot protection.
|
|
8
|
+
Note: Static resource protection can also result in legitimate traffic being blocked.
|
|
9
|
+
`}).option(`sbfm-verified-bots`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on verified bots requests.`,choices:[`allow`,`block`]}).coerce(`sbfm-verified-bots`,e=>u(e,`sbfm-verified-bots`,`text`)).option(`sbfm-likely-automated`,{type:`string`,description:`Super Bot Fight Mode (SBFM) action to take on likely automated requests.`,choices:[`allow`,`block`,`managed_challenge`]}).coerce(`sbfm-likely-automated`,e=>u(e,`sbfm-likely-automated`,`text`)).option(`auto-update-model`,{type:`boolean`,description:`Automatically update to the newest bot detection models created by Cloudflare as they are released. [Learn more.](https://developers.cloudflare.com/bots/reference/machine-learning-models#model-versions-and-release-notes)`}).option(`bm-cookie-enabled`,{type:`boolean`,description:`Indicates that the bot management cookie can be placed on end user devices accessing the site. Defaults to true`}).option(`suppress-session-score`,{type:`boolean`,description:`Whether to disable tracking the highest bot score for a session in the Bot Management cookie.`}).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 T={command:`update`,describe:`Update Zone Bot Management Config`,builder:w,handler:async e=>o({command:`bot-management update`,classification:{safeFlags:/* @__PURE__ */ `ai-agents-anthropic-agent.ai-agents-google-agent.ai-agents-instinct.ai-agents-muse.ai-agents-openai-agent.ai-bots-migration-opt-out.ai-bots-protection.ai-search.ai-training.ai-user.bot-preference-sync-enabled.cf-robots-variant.content-bots-protection.crawler-protection.enable-js.is-robots-txt-managed.jsd-api-results-enabled.fight-mode.stale-zone-configuration-optimize-wordpress.stale-zone-configuration-suppress-session-score.stale-zone-configuration-fight-mode.optimize-wordpress.sbfm-definitely-automated.sbfm-static-resource-protection.sbfm-verified-bots.sbfm-likely-automated.auto-update-model.bm-cookie-enabled.suppress-session-score.dry-run`.split(`.`)}},e,async()=>{if(e.dryRun){i({command:`cf bot-management update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/bot_management`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({ai_agents:{anthropic_agent:e[`ai-agents-anthropic-agent`],google_agent:e[`ai-agents-google-agent`],instinct:e[`ai-agents-instinct`],muse:e[`ai-agents-muse`],openai_agent:e[`ai-agents-openai-agent`]},ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}):s(e.body)});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(C,{body:t,zone_id:c}));r(n,{successLabel:`Updated`});return}let d=l({ai_agents:{anthropic_agent:e[`ai-agents-anthropic-agent`],google_agent:e[`ai-agents-google-agent`],instinct:e[`ai-agents-instinct`],muse:e[`ai-agents-muse`],openai_agent:e[`ai-agents-openai-agent`]},ai_bots_migration_opt_out:e[`ai-bots-migration-opt-out`],ai_bots_protection:e[`ai-bots-protection`],ai_search:e[`ai-search`],ai_training:e[`ai-training`],ai_user:e[`ai-user`],bot_preference_sync_enabled:e[`bot-preference-sync-enabled`],cf_robots_variant:e[`cf-robots-variant`],content_bots_protection:e[`content-bots-protection`],crawler_protection:e[`crawler-protection`],enable_js:e[`enable-js`],is_robots_txt_managed:e[`is-robots-txt-managed`],jsd_api_results_enabled:e[`jsd-api-results-enabled`],fight_mode:e[`fight-mode`],stale_zone_configuration:{optimize_wordpress:e[`stale-zone-configuration-optimize-wordpress`],sbfm_definitely_automated:u(e[`stale-zone-configuration-sbfm-definitely-automated`],`stale-zone-configuration-sbfm-definitely-automated`,`text`),sbfm_likely_automated:u(e[`stale-zone-configuration-sbfm-likely-automated`],`stale-zone-configuration-sbfm-likely-automated`,`text`),sbfm_static_resource_protection:u(e[`stale-zone-configuration-sbfm-static-resource-protection`],`stale-zone-configuration-sbfm-static-resource-protection`,`text`),sbfm_verified_bots:u(e[`stale-zone-configuration-sbfm-verified-bots`],`stale-zone-configuration-sbfm-verified-bots`,`text`),suppress_session_score:e[`stale-zone-configuration-suppress-session-score`],fight_mode:e[`stale-zone-configuration-fight-mode`]},optimize_wordpress:e[`optimize-wordpress`],sbfm_definitely_automated:e[`sbfm-definitely-automated`],sbfm_static_resource_protection:e[`sbfm-static-resource-protection`],sbfm_verified_bots:e[`sbfm-verified-bots`],sbfm_likely_automated:e[`sbfm-likely-automated`],auto_update_model:e[`auto-update-model`],bm_cookie_enabled:e[`bm-cookie-enabled`],suppress_session_score:e[`suppress-session-score`]}),f=await a(`Updating`,async()=>o.send(C,{body:d,zone_id:c}));r(f,{successLabel:`Updated`})})},E={command:`bot-management`,describe:`bot-management`,builder:e=>e.command(S).command(T).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{E as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{n as l}from"./prompt-D0dXwuME.mjs";var u={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/day_report`,query:[`date`]};function d(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
|
|
3
3
|
|
|
4
4
|
Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`day-report <asn-id>`,describe:`Get daily report`,builder:d,handler:async e=>c({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={date:e.date};if(e.dryRun){let t=await r();o({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/botnet_feed/asn/${e[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(e[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(e[`asn-id`]??``)},query:c,bodyKind:`none`});return}let l=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>l.send(u,{account_id:d,asn_id:e[`asn-id`],...c}));a(f,{successLabel:`Loaded`})})};var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/botnet_feed/asn/${t.asn_id}/full_report`};function m(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-X3wKppsT.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-CgBhtmON.mjs";import{n}from"./auth-FK2eLQ02.mjs";import{a as r,t as i}from"./context-Dp4CXG22.mjs";import{t as a}from"./output-BJEgbI0G.mjs";import{t as o}from"./dry-run-gy0Hl9xo.mjs";import{t as s}from"./progress-DLri-rA7.mjs";import{t as c}from"./run-Ciw_GIrC.mjs";import"./telemetry-Pt5GpCKD.mjs";import{a as l,n as u,t as d}from"./body-parser-BKcZS9iJ.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-D0dXwuME.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/matches`,query:[`offset`,`limit`,`query_id`,`download`,`orderBy`,`order`]};function _(e){return e.usage(`$0 brand-protection logo-matches get
|
|
3
3
|
|
|
4
4
|
Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`List logo matches`,builder:_,handler:async e=>c({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},e,async()=>{let c={offset:e.offset,limit:e.limit,query_id:e[`query-id`],download:e.download,orderBy:e[`order-by`],order:e.order};if(e.dryRun){let e=await r();o({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})},y={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/cloudforce-one/v2/brand-protection/logo/queries`,body:`json`};function x(e){return e.usage(`$0 brand-protection logos create
|
|
5
5
|
|