cf 1.0.0-beta.27 → 1.0.0-beta.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +5787 -1914
- package/dist/_meta/hand-written-commands.json +2 -2
- package/dist/_meta/schemas.json +796 -557
- package/dist/{abuse-reports-RxXqfDEW.mjs → abuse-reports-D9edOyag.mjs} +5 -5
- package/dist/{access-BxEprr2f.mjs → access-CKCCSrrU.mjs} +1 -1
- package/dist/{accounts-DU2ZNYqP.mjs → accounts-CNb9U9bK.mjs} +22 -22
- package/dist/{acm-CBCIKBJ4.mjs → acm-CdKTAToZ.mjs} +3 -3
- package/dist/{addressing-BKxiLRHk.mjs → addressing-eZI_C-b0.mjs} +18 -18
- package/dist/{agent-memory-DkBpQYUL.mjs → agent-memory-BBHCEE7h.mjs} +7 -7
- package/dist/{ai-DqEN_hhg.mjs → ai-Csl_QNwv.mjs} +7 -7
- package/dist/ai-audit-DlqWsQi-.mjs +6 -0
- package/dist/{ai-gateway-B0uiYVHq.mjs → ai-gateway-Lj4On37s.mjs} +13 -13
- package/dist/{ai-search-DbZIxdio.mjs → ai-search-BxyhS3X7.mjs} +17 -17
- package/dist/{ai-security-CvZfP2JC.mjs → ai-security-DvU2iYkY.mjs} +3 -3
- package/dist/{alerting-BjGwBxZT.mjs → alerting-r0G2X9y9.mjs} +10 -10
- package/dist/{analytics-C7kT_H-W.mjs → analytics-C6bfqm-W.mjs} +7 -7
- package/dist/analytics-engine-BlIecoOe.mjs +4 -0
- package/dist/api-Dnt6lRJG.mjs +3 -0
- package/dist/{api-security-BbcvDtff.mjs → api-security-DZ7GWOqD.mjs} +26 -26
- package/dist/argo-Bh0_cj49.mjs +14 -0
- package/dist/{artifacts-2R2sxIKO.mjs → artifacts-VZJWVq_6.mjs} +16 -16
- package/dist/{audit-logs-LoBB1OO_.mjs → audit-logs-B8cGL4B9.mjs} +1 -1
- package/dist/auth-B-h0BHg7.mjs +2 -0
- package/dist/auth-B6tswVxH.mjs +2 -0
- package/dist/{auth-D499YE2n.mjs → auth-clmqFEWU.mjs} +3 -3
- package/dist/{auth-token-BwpERbnG.mjs → auth-token-DW4dJVdj.mjs} +1 -1
- package/dist/{autoconfig-B2w-woU0.mjs → autoconfig-C0ynlGHf.mjs} +47 -47
- package/dist/{basin-catalog-AgOHGiPI.mjs → basin-catalog-TehR1sKZ.mjs} +11 -11
- package/dist/billing-B2KusU6g.mjs +22 -0
- package/dist/{blocks-C8vyXIAT.mjs → blocks-BFulF68V.mjs} +1 -1
- package/dist/body-parser-DoewLePl.mjs +2 -0
- package/dist/{body-unions-CjpNjwSW.mjs → body-unions-DNs981Ia.mjs} +1 -1
- package/dist/{bot-management-fwxKIbaB.mjs → bot-management-CXHXgrQC.mjs} +2 -2
- package/dist/{botnet-feed-DCYB5kYZ.mjs → botnet-feed-UyK7Rfp6.mjs} +1 -1
- package/dist/brand-protection-kv1ba80i.mjs +14 -0
- package/dist/browser-run-D-vRoZmf.mjs +40 -0
- package/dist/build-BzJGqb2o.mjs +2 -0
- package/dist/build-FFxzigo4.mjs +2 -0
- package/dist/{builds-CoazxuN-.mjs → builds-BbxINHRP.mjs} +15 -15
- package/dist/cache-BacNNtLu.mjs +36 -0
- package/dist/{cf-hP0SOgC6.mjs → cf-BQ_LRiut.mjs} +2 -2
- package/dist/{chunk-DSGVRFIS-DQwKND2c.mjs → chunk-DSGVRFIS-BaNZNW-M.mjs} +1 -1
- package/dist/{chunk-SOBRPAPT-BKzUiNx_.mjs → chunk-SOBRPAPT-QTjnHSNs.mjs} +1 -1
- package/dist/{cli-Nqf58-1c.mjs → cli-B7vslRfu.mjs} +1 -1
- package/dist/{client-side-security-VmZzMy-m.mjs → client-side-security-bzB9JosR.mjs} +6 -6
- package/dist/{cloud-connector-bMlFnqP0.mjs → cloud-connector-BHtf37R5.mjs} +2 -2
- package/dist/{cloudflared-Ba4KWdTO.mjs → cloudflared-QDdHMUEY.mjs} +1 -1
- package/dist/{cloudforce-one-CCaIBOAo.mjs → cloudforce-one-DWBPQDA3.mjs} +71 -71
- package/dist/{command-C4OgtX_x.mjs → command-AVwd7XjE.mjs} +1 -1
- package/dist/{command-C5Kqc5Km.mjs → command-B87T_f2f.mjs} +1 -1
- package/dist/{command-CelQVrZL.mjs → command-CEHhi3t0.mjs} +1 -1
- package/dist/{command-ByYf12-8.mjs → command-CYmQE79n.mjs} +1 -1
- package/dist/{command-pMoNdd22.mjs → command-CbxXc5IW.mjs} +1 -1
- package/dist/{command-Bih1HLr3.mjs → command-Ce8CVLth.mjs} +1 -1
- package/dist/{command-MxFFWqMg.mjs → command-CqDudQZs.mjs} +1 -1
- package/dist/{command-BASaTmJc.mjs → command-D4YcwpVp.mjs} +1 -1
- package/dist/{command-BxZBNPxG.mjs → command-D895kdlh.mjs} +1 -1
- package/dist/{command-CrAlzysj.mjs → command-D9Qyi1B0.mjs} +1 -1
- package/dist/{command-BiIVclNA.mjs → command-DeutqL1n.mjs} +1 -1
- package/dist/{command-C0qCuw03.mjs → command-Dl9ICrRK.mjs} +1 -1
- package/dist/{command-CZAR85ba.mjs → command-DtCSe8Hy.mjs} +1 -1
- package/dist/{command-C2FVMd1b.mjs → command-DwzVtmb3.mjs} +1 -1
- package/dist/{command-CFxyp8Uo.mjs → command-wtBubtZ4.mjs} +1 -1
- package/dist/{completions-DRzBiqpv.mjs → completions-BvdKtzsX.mjs} +1 -1
- package/dist/{connector-interrupts-CrTeSyaM.mjs → connector-interrupts-dUPW6Ya_.mjs} +2 -2
- package/dist/{connector-telemetry-events-BbAOUt9h.mjs → connector-telemetry-events-DWVCqnhn.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DcpBx7Qx.mjs → connector-telemetry-snapshots-CeMP3qeI.mjs} +1 -1
- package/dist/{connectors-D1WFLJoE.mjs → connectors-DZFGNw3i.mjs} +4 -4
- package/dist/containers-B06OGOEB.mjs +380 -0
- package/dist/{containers-BOBEs1Gk.mjs → containers-DCzQCo79.mjs} +8 -8
- package/dist/{content-scan-D1GfPSL0.mjs → content-scan-XhnNJqXf.mjs} +4 -4
- package/dist/{context-Dp4CXG22.mjs → context-BY1Eh_Qe.mjs} +1 -1
- package/dist/{cps-D4uhzg3k.mjs → cps-CohlxvuN.mjs} +2 -2
- package/dist/create-DmLDMvrj.mjs +2 -0
- package/dist/{csam-scanner-DOOUBeBM.mjs → csam-scanner-BV4bHq8v.mjs} +2 -2
- package/dist/{custom-csrs-DtdFo5YZ.mjs → custom-csrs-BVdMQjYq.mjs} +2 -2
- package/dist/{custom-hostnames-ccdlELaD.mjs → custom-hostnames-r-CxhSa1.mjs} +5 -5
- package/dist/{custom-nameservers-p3gDjfva.mjs → custom-nameservers-CapMDyly.mjs} +2 -2
- package/dist/{custom-pages-DAkKVzgR.mjs → custom-pages-BVIniWfq.mjs} +5 -5
- package/dist/{d1-CDIyRdh4.mjs → d1-nJCOJZb8.mjs} +20 -22
- package/dist/{delegate-B4bKqF7i.mjs → delegate-CcL6RoGw.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-BaC5Ty7F.mjs → deploy-DJMnWFNk.mjs} +1 -1
- package/dist/{deploy-context-DTTgNGro.mjs → deploy-context-YCW3eqP1.mjs} +15 -15
- package/dist/{deploy-input-mAy06fAI.mjs → deploy-input-CQLBXFEB.mjs} +1 -1
- package/dist/{dev-De-HszNT.mjs → dev-GsYHvMah.mjs} +1 -1
- package/dist/{diagnostics-D1CUs2o9.mjs → diagnostics-C3nqxsAO.mjs} +4 -4
- package/dist/{dist-D5qkmHhC.mjs → dist-D-ihn_mV.mjs} +42 -33
- package/dist/{dls-DWBiYzY1.mjs → dls-N1x8sAK3.mjs} +3 -3
- package/dist/{dns-wMjf1t6-.mjs → dns-DATWP-PF.mjs} +25 -25
- package/dist/{dns-firewall-DH9xIT5H.mjs → dns-firewall-n3Y2ui6W.mjs} +4 -4
- package/dist/{docs-BA7qslb2.mjs → docs-CRc_WOXh.mjs} +1 -1
- package/dist/{dry-run-gy0Hl9xo.mjs → dry-run-kJbjn4kG.mjs} +1 -1
- package/dist/{durable-objects-DF0MYpnV.mjs → durable-objects-DHK9w-vO.mjs} +2 -2
- package/dist/{email-auth-BShMFXn4.mjs → email-auth-ptdqNSTZ.mjs} +1 -1
- package/dist/{email-domains-CDSbVclP.mjs → email-domains-uL22-zRY.mjs} +2 -2
- package/dist/{email-routing-CBCkbg_F.mjs → email-routing-CV43rMJC.mjs} +12 -12
- package/dist/{email-security-CnNa1YON.mjs → email-security-DK_SJ0yi.mjs} +38 -38
- package/dist/{email-sending-CpDSw-Eb.mjs → email-sending-CTQafGec.mjs} +11 -11
- package/dist/{error-sanitization-DG8WSzHe.mjs → error-sanitization-BkgtZ0Vx.mjs} +1 -1
- package/dist/error-sanitization-D069tpKk.mjs +2 -0
- package/dist/{errors-DatLr-iR.mjs → errors-VG1mgwJl.mjs} +1 -1
- package/dist/{field-extractors-BwGdMnTr.mjs → field-extractors-jcZ_bAGc.mjs} +2 -2
- package/dist/{firewall-CY_oem-d.mjs → firewall-CW-fAI9m.mjs} +12 -12
- package/dist/{flagship-Bat5EZCk.mjs → flagship-RiLnDwfJ.mjs} +8 -8
- package/dist/{fraud-CSUKLh8X.mjs → fraud-DvfBBTe8.mjs} +2 -2
- package/dist/get-3XNn0upb.mjs +2 -0
- package/dist/{google-tag-gateway-C2skt6t-.mjs → google-tag-gateway-C5WYsSXv.mjs} +2 -2
- package/dist/{healthchecks-uC43QKQd.mjs → healthchecks-BA1fmzTm.mjs} +5 -5
- package/dist/{hyperdrive-FcBbpew4.mjs → hyperdrive-Ch6klUp3.mjs} +4 -4
- package/dist/{iam-8T74DNhH.mjs → iam-LlGEzRCq.mjs} +14 -14
- package/dist/{images-C3JUaf6b.mjs → images-C5WqUXkK.mjs} +11 -11
- package/dist/index.mjs +1 -1
- package/dist/{init-BEVVz4_P.mjs → init-EVsjBrOz.mjs} +2 -2
- package/dist/{intel-DRy4rHrt.mjs → intel-vcWyslaX.mjs} +14 -14
- package/dist/{interactive-CKHdGvkh.mjs → interactive-BCDFSPtq.mjs} +1 -1
- package/dist/{internal-CamuESs0.mjs → internal-BhV9WjLp.mjs} +1 -1
- package/dist/{ips-DinCNnWj.mjs → ips-CqHjVsqd.mjs} +1 -1
- package/dist/k2-CZT2Pd5J.mjs +10 -0
- package/dist/kv-Ipa7dnvF.mjs +12 -0
- package/dist/{lazy-command-WB1FOuew.mjs → lazy-command-DbKVgdGT.mjs} +1 -1
- package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs} +4 -4
- package/dist/{live-B6AsI_E5.mjs → live-C9L1bNuE.mjs} +1 -1
- package/dist/{load-balancers-gap5u4b1.mjs → load-balancers-Cb3VkSfc.mjs} +21 -21
- package/dist/local-D5Vq6ooZ.mjs +2 -0
- package/dist/{local-CgBhtmON.mjs → local-DIJ7SIKC.mjs} +1 -1
- package/dist/{local-runtime-CmlJ20uJ.mjs → local-runtime-BZjgkacr.mjs} +1 -1
- package/dist/{login-BJHaTERg.mjs → login-DG5ebyab.mjs} +1 -1
- package/dist/login-DRJugxya.mjs +2 -0
- package/dist/{logpush-qhlxsioM.mjs → logpush-C5Gw7F_9.mjs} +16 -16
- package/dist/{logs-bI54CJ0w.mjs → logs-y3REfHbb.mjs} +8 -8
- package/dist/magic-network-monitoring-BZBGZB6M.mjs +34 -0
- package/dist/{magic-transit-BwDyySHJ.mjs → magic-transit-BPV_POf5.mjs} +129 -129
- package/dist/{managed-defense-CsBBkfeQ.mjs → managed-defense-BaUBSUcz.mjs} +3 -3
- package/dist/{managed-transforms-CUC-uAbW.mjs → managed-transforms-CjkjLzMC.mjs} +2 -2
- package/dist/{mcp-CyI0sDmL.mjs → mcp-RPtrISTy.mjs} +6 -6
- package/dist/{mesh-Czr0UCP4.mjs → mesh-DZ4QHBPE.mjs} +5 -5
- package/dist/{migrate-DKDWYrz2.mjs → migrate-CRIUqGi2.mjs} +1 -1
- package/dist/{monetization-NUgfDtSy.mjs → monetization-CVZqM8Xo.mjs} +4 -4
- package/dist/{network-B42zrBic.mjs → network-DLt2JUo1.mjs} +15 -15
- package/dist/{network-interconnects-DuIBe8fK.mjs → network-interconnects-9nS5jL__.mjs} +10 -10
- package/dist/{o11y-oEUpMC3O.mjs → o11y-ySxrnP1Z.mjs} +45 -43
- package/dist/{oauth-BmSFLp_s.mjs → oauth-CFVUl-Wv.mjs} +1 -1
- package/dist/{oauth-BLQ1-y3R.mjs → oauth-Cidoyxfp.mjs} +1 -1
- package/dist/{observability-BxhJQCgZ.mjs → observability-C-KNh__y.mjs} +1 -1
- package/dist/ohttp-gateway-B5nCl4s3.mjs +8 -0
- package/dist/organizations-DbeeWUL4.mjs +71 -0
- package/dist/output-BZQEl3mK.mjs +2 -0
- package/dist/package-B7RgwuFR.mjs +2 -0
- package/dist/{page-rules-J6LhwR-s.mjs → page-rules-DRw763O1.mjs} +4 -4
- package/dist/{pages-BksdnChs.mjs → pages-DfQnxiTk.mjs} +12 -12
- package/dist/{pay-per-crawl-BLcbHRoR.mjs → pay-per-crawl-EHYtSKxX.mjs} +13 -13
- package/dist/{pay-per-use-VatiU-Nt.mjs → pay-per-use-wdEhl8k4.mjs} +11 -11
- package/dist/{pipelines-B5AoB3f3.mjs → pipelines-DbyrI6F4.mjs} +11 -11
- package/dist/{precursor-D3VH2MXT.mjs → precursor-Dx8lN4UJ.mjs} +2 -2
- package/dist/previews-DEVNSip2.mjs +6 -0
- package/dist/{progress-DLri-rA7.mjs → progress-yvPscjYg.mjs} +1 -1
- package/dist/{prompt-D0dXwuME.mjs → prompt-CEpZ-lQZ.mjs} +1 -1
- package/dist/{queues-BsAck4To.mjs → queues-DgMc7Z6A.mjs} +18 -18
- package/dist/{r2-BYjdHDEZ.mjs → r2-BpTVicIq.mjs} +21 -21
- package/dist/{radar-CvLtu-Vr.mjs → radar-DW-S1VUh.mjs} +11 -11
- package/dist/{raw-fetch-DQeDx1wT.mjs → raw-fetch-Cl5spWC3.mjs} +1 -1
- package/dist/{ready-gsGEaWLL.mjs → ready-d0li0X6r.mjs} +1 -1
- package/dist/{realtime-DiCEgFTC.mjs → realtime-DMKHLYF4.mjs} +41 -41
- package/dist/{registrar-D4wdgWpo.mjs → registrar-D23gfKBi.mjs} +5 -5
- package/dist/{registrar-sandbox-B6yopzdG.mjs → registrar-sandbox-lVLB1-mC.mjs} +4 -4
- package/dist/{reporting-BiHgnT8L.mjs → reporting-WX8P3Y0k.mjs} +2 -2
- package/dist/{request-headers-CoxHUNcB.mjs → request-headers-C0FpeBhz.mjs} +1 -1
- package/dist/{request-tracers-817HTytF.mjs → request-tracers-qd7XOAka.mjs} +2 -2
- package/dist/resource-sharing-B2ZSt_cA.mjs +36 -0
- package/dist/{rules-CRhe_ca9.mjs → rules-CB0QQTB3.mjs} +5 -5
- package/dist/{rulesets-CKyc-Xlx.mjs → rulesets-DmqwixUC.mjs} +6 -6
- package/dist/{rum-BfnWHW_d.mjs → rum-BZ_24qZU.mjs} +9 -9
- package/dist/{run-Ciw_GIrC.mjs → run-BOKI1uWa.mjs} +1 -1
- package/dist/run-DBqOjD1P.mjs +2 -0
- package/dist/{schema-DuLIZRhA.mjs → schema-Dj9STsWI.mjs} +1 -1
- package/dist/{schema-cache-BIo0Gi2H.mjs → schema-cache-5NkOj7Y3.mjs} +1 -1
- package/dist/{schema-flags-DrqvwQNw.mjs → schema-flags-CXm9iIv6.mjs} +1 -1
- package/dist/{scim-C4iRWNYB.mjs → scim-DchxaJfE.mjs} +8 -8
- package/dist/{secrets-store-DgtzZRze.mjs → secrets-store-oAft1cFE.mjs} +5 -5
- package/dist/{security-insights-SlUGW3F_.mjs → security-insights-DMm0qg_m.mjs} +15 -15
- package/dist/{security-txt-C3YS0REz.mjs → security-txt-CIt0494b.mjs} +2 -2
- package/dist/{session-D2yuwO4i.mjs → session-vzNfUhPl.mjs} +1 -1
- package/dist/{shared--uVkAAd7.mjs → shared-MK-_lkbn.mjs} +1 -1
- package/dist/{signed-url-ClLk45_J.mjs → signed-url-gNangfwc.mjs} +1 -1
- package/dist/{smart-shield-Dn95hqUH.mjs → smart-shield-Boy_qbqd.mjs} +6 -6
- package/dist/{snippets-BNUKOajz.mjs → snippets-DdoDYXW-.mjs} +3 -3
- package/dist/{spawn-DuT4snxu.mjs → spawn-B5F4OIHG.mjs} +1 -1
- package/dist/{spectrum-Cj0BMtg2.mjs → spectrum-DLYIHelC.mjs} +3 -3
- package/dist/{speed-BrVeZRyX.mjs → speed-DugG9Tm9.mjs} +2 -2
- package/dist/{sql-BX1pBqj3.mjs → sql-Bb56llsb.mjs} +2 -2
- package/dist/src-BoSDeQ9m.mjs +133 -0
- package/dist/{ssl-Bx4LCutF.mjs → ssl-Bg4X3WGk.mjs} +24 -24
- package/dist/startup-profile-DQVkZZpb.mjs +2 -0
- package/dist/{startup-profile-DqaYNT0b.mjs → startup-profile-DZL2DC44.mjs} +1 -1
- package/dist/state-DW3QZtfh.mjs +2 -0
- package/dist/{state-BmzOLELo.mjs → state-mr5ux1Nb.mjs} +1 -1
- package/dist/{stream-BRzr6yh0.mjs → stream-BuZYDbNR.mjs} +21 -21
- package/dist/{tags-xVzjZxdt.mjs → tags-SKz2odE_.mjs} +3 -3
- package/dist/{telemetry-CJ9URio3.mjs → telemetry-B4zmCpT0.mjs} +1 -1
- package/dist/telemetry-DkDUr4KK.mjs +2 -0
- package/dist/{tenant-custom-nameservers-M7Fxqh2W.mjs → tenant-custom-nameservers-BhkhBerL.mjs} +2 -2
- package/dist/tenants-DD-GMq0K.mjs +13 -0
- package/dist/{tools-C-vmgYSv.mjs → tools-KW_4hvzY.mjs} +1 -1
- package/dist/{tunnels-DQVXKUKA.mjs → tunnels-D90ztENM.mjs} +6 -6
- package/dist/{turnstile-B_Ugzgom.mjs → turnstile-DhSU_Xar.mjs} +4 -4
- package/dist/ui-xjCox-gU.mjs +2 -0
- package/dist/{update-check-DHUo4FOJ.mjs → update-check-CRttabfu.mjs} +1 -1
- package/dist/{update-check-DRr0eRhB.mjs → update-check-HltjTMDE.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-CZRQH_pJ.mjs → url-normalization-K7gkmPvG.mjs} +2 -2
- package/dist/{url-scanner-BH4PLy16.mjs → url-scanner-BRdWwka4.mjs} +3 -3
- package/dist/{user-Bn82Qw0Y.mjs → user-Cmb1_Wu5.mjs} +50 -50
- package/dist/{vectorize-DoVVz_sh.mjs → vectorize-BTBerJME.mjs} +11 -11
- package/dist/verify-B9ILCohg.mjs +2 -0
- package/dist/verify-BCuWaO-L.mjs +2 -0
- package/dist/version-6Bpy6Bgt.mjs +2 -0
- package/dist/{waiting-rooms-QUW131o3.mjs → waiting-rooms-LymmKIGr.mjs} +13 -13
- package/dist/{web-assets-CgQXsp8m.mjs → web-assets-LHPQsrnY.mjs} +21 -21
- package/dist/{web3-TY9s6Swn.mjs → web3-BsOio0Ae.mjs} +12 -12
- package/dist/workers-BnLiOjZf.mjs +39 -0
- package/dist/{workers-builds-BgGY0IGk.mjs → workers-builds-sKpITeRk.mjs} +4 -4
- package/dist/{workers-for-platforms-5RkV9MVp.mjs → workers-for-platforms-BGp6yr6P.mjs} +9 -9
- package/dist/{workers-vpc-Bt4OQbwM.mjs → workers-vpc-D8lefWDo.mjs} +3 -3
- package/dist/{workflows-6m85DdqF.mjs → workflows-B-ZIG3y7.mjs} +22 -22
- package/dist/{wrangler-migration-BbmGOu8l.mjs → wrangler-migration-6E6wT_LZ.mjs} +66 -57
- package/dist/{zaraz-8WSJ7l0L.mjs → zaraz-BBKki5WS.mjs} +11 -11
- package/dist/{zero-trust-DK0cqDZv.mjs → zero-trust-BZDXM5r6.mjs} +165 -165
- package/dist/{zones-DTAcguf6.mjs → zones-B-UV_DGE.mjs} +24 -24
- package/package.json +14 -14
- package/dist/ai-audit-BmzOgt6x.mjs +0 -6
- package/dist/analytics-engine-BHpcNSdD.mjs +0 -4
- package/dist/api-X3wKppsT.mjs +0 -3
- package/dist/argo-D1VONzu-.mjs +0 -14
- package/dist/auth-CspwoBlp.mjs +0 -2
- package/dist/auth-FK2eLQ02.mjs +0 -2
- package/dist/billing-DRNww0iC.mjs +0 -24
- package/dist/body-parser-BKcZS9iJ.mjs +0 -2
- package/dist/brand-protection-BVICLzBc.mjs +0 -26
- package/dist/browser-run-CEk-NIgP.mjs +0 -40
- package/dist/build-CRm2TQq8.mjs +0 -2
- package/dist/build-DO_GNhRl.mjs +0 -2
- package/dist/cache-jlLJLSu7.mjs +0 -36
- package/dist/containers-DINLx5_i.mjs +0 -380
- package/dist/create-BtmuVqVL.mjs +0 -2
- package/dist/error-sanitization-B025CygB.mjs +0 -2
- package/dist/get-Be821dio.mjs +0 -2
- package/dist/k2-wsanPL3y.mjs +0 -10
- package/dist/kv-BLSPcEnH.mjs +0 -12
- package/dist/local-CFsO9Tkg.mjs +0 -2
- package/dist/login-BfuOf-Yi.mjs +0 -2
- package/dist/magic-network-monitoring-CX3TaMTu.mjs +0 -34
- package/dist/organization-CEnlXwrl.mjs +0 -70
- package/dist/organizations-Dt86ToxE.mjs +0 -4
- package/dist/origin-post-quantum-encryption-lX-uaJSL.mjs +0 -6
- package/dist/output-BJEgbI0G.mjs +0 -2
- package/dist/package-CiRJBRHO.mjs +0 -2
- package/dist/previews-DzJ85fsr.mjs +0 -6
- package/dist/resource-sharing-CW9xxtq5.mjs +0 -36
- package/dist/run-DD45EQTm.mjs +0 -2
- package/dist/src-DPnUfK4c.mjs +0 -131
- package/dist/startup-profile-tZNb2HGz.mjs +0 -2
- package/dist/state-Uwfrmw5I.mjs +0 -2
- package/dist/telemetry-Pt5GpCKD.mjs +0 -2
- package/dist/ui-FYultowZ.mjs +0 -2
- package/dist/version-Zr2oF8mY.mjs +0 -2
- package/dist/workers-B3uJqJKc.mjs +0 -39
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,i as a,t as o}from"./context-BY1Eh_Qe.mjs";import{t as s}from"./output-BZQEl3mK.mjs";import{t as c}from"./dry-run-kJbjn4kG.mjs";import{t as l}from"./progress-yvPscjYg.mjs";import{t as u}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as d,t as f}from"./body-parser-DoewLePl.mjs";import{n as p,t as m}from"./input-validation-D7z60HJH.mjs";import{a as h,n as g}from"./prompt-CEpZ-lQZ.mjs";import{n as _,t as ee}from"./raw-fetch-Cl5spWC3.mjs";var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}`};function ne(e){return e.usage(`$0 intel asn get <asn>
|
|
3
3
|
|
|
4
|
-
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets
|
|
4
|
+
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get <asn>`,describe:`Get ASN Overview.`,builder:ne,handler:async e=>u({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(te,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})};var ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/asn/${t.asn}/subnets`};function ae(e){return e.usage(`$0 intel asn subnets list
|
|
5
5
|
|
|
6
|
-
Get ASN Subnets.`).
|
|
6
|
+
Get ASN Subnets.`).option(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`list`,describe:`Get ASN Subnets`,builder:ae,handler:async e=>u({command:`intel asn subnets list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel asn subnets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/asn/${e.asn==null?`<asn>`:encodeURIComponent(String(e.asn))}/subnets`,pathParams:{asn:String(e.asn??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ie,{account_id:a,asn:e.asn}));s(u,{successLabel:`Loaded`})})},se={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ce={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(re).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var le={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/attack-surface-report/issue-types`};function ue(e){return e.usage(`$0 intel attack-surface-report issue-types get
|
|
7
7
|
|
|
8
8
|
Lists all available issue types in Security Center, describing categories of security issues.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Retrieves Security Center Issues Types`,builder:ue,handler:async e=>u({command:`intel attack-surface-report issue-types get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel attack-surface-report issue-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/attack-surface-report/issue-types`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(le,{account_id:a}));s(u,{successLabel:`Loaded`})})},y={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},b={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/dns`,query:[`start_end_params`,`ipv4`,`page`,`per_page`]};function S(e){return e.usage(`$0 intel dns list
|
|
9
9
|
|
|
10
10
|
Gets a list of all the domains that have resolved to a specific IP address.`).option(`start-end-params`,{type:`string`,description:`Start end params`}).option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`page`,{type:`number`,description:`Requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results requested.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`Get Passive DNS by IP`,builder:S,handler:async e=>u({command:`intel dns list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={start_end_params:e[`start-end-params`],ipv4:e.ipv4,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await i();c({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/dns`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(x,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},w={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain-history`,query:[`domain`]};function E(e){return e.usage(`$0 intel domain-history get
|
|
11
11
|
|
|
12
|
-
Gets historical security threat and content categories currently and previously assigned to a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get`,describe:`Get Domain History`,builder:E,handler:async e=>u({command:`intel domain-history get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={domain:e.domain};if(e.dryRun){let e=await i();c({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain-history`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(T,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},O={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain/bulk`,query:[`domain`,`include_ranking`,`skip_ranking`]};function A(e){return e.usage("$0 intel domains bulks get\n\nReturns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.").option(`domain`,{type:`string`,array:!0,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get Multiple Domain Details`,builder:A,handler:async e=>u({command:`intel domains bulks get`,classification:{safeFlags:[`include-ranking`,`skip-ranking`,`dry-run`]}},e,async()=>{let n={domain:e.domain,include_ranking:e[`include-ranking`],skip_ranking:e[`skip-ranking`]};if(e.dryRun){let e=await i();c({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(k,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},M={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain`,query:[`domain`,`skip_dns`,`skip_ranking`]};function P(e){return e.usage(`$0 intel domains get
|
|
12
|
+
Gets historical security threat and content categories currently and previously assigned to a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get`,describe:`Get Domain History`,builder:E,handler:async e=>u({command:`intel domain-history get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={domain:e.domain};if(e.dryRun){let e=await i();c({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain-history`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(T,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},O={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var k={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain/bulk`,query:[`domain`,`include_ranking`,`skip_dns`,`skip_ranking`]};function A(e){return e.usage("$0 intel domains bulks get\n\nReturns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.").option(`domain`,{type:`string`,array:!0,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-dns`,{type:`boolean`,description:"Skip the DNS resolution-history lookup for faster responses. Defaults\nto `false`. Set to `true` if you only need categorization data; no\nDNS resolution history is returned for any domain. Matches the\n`skip_dns` parameter on `/intel/domain`."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`get`,describe:`Get Multiple Domain Details`,builder:A,handler:async e=>u({command:`intel domains bulks get`,classification:{safeFlags:[`include-ranking`,`skip-dns`,`skip-ranking`,`dry-run`]}},e,async()=>{let n={domain:e.domain,include_ranking:e[`include-ranking`],skip_dns:e[`skip-dns`],skip_ranking:e[`skip-ranking`]};if(e.dryRun){let e=await i();c({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(k,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},M={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/domain`,query:[`domain`,`skip_dns`,`skip_ranking`]};function P(e){return e.usage(`$0 intel domains get
|
|
13
13
|
|
|
14
14
|
Gets security details and statistics about a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`skip-dns`,{type:`boolean`,description:`Skip DNS resolution lookups for faster response.`}).option(`skip-ranking`,{type:`boolean`,description:"Skip the domain ranking lookup for faster responses. Defaults to\n`false` (ranking is included). Set to `true` to opt out — primarily\nused by callers like Cloudflare Radar that need to avoid a\ncircular dependency when building the domain details page.\nNote: the bulk endpoint (`/intel/domain/bulk`) uses opposite\ndefaults — see `include_ranking` there."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get`,describe:`Get Domain Details`,builder:P,handler:async e=>u({command:`intel domains get`,classification:{safeFlags:[`skip-dns`,`skip-ranking`,`dry-run`]}},e,async()=>{let n={domain:e.domain,skip_dns:e[`skip-dns`],skip_ranking:e[`skip-ranking`]};if(e.dryRun){let e=await i();c({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/domain`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(N,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},I={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(F).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds`,body:`json`};function R(e){return e.usage(`$0 intel indicator-feeds create
|
|
15
15
|
|
|
16
|
-
Creates a new custom threat indicator feed for sharing threat intelligence data.`).option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).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 z={command:`create`,describe:`Create new indicator feed`,builder:R,handler:async e=>u({command:`intel indicator-feeds create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),
|
|
16
|
+
Creates a new custom threat indicator feed for sharing threat intelligence data.`).option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).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 z={command:`create`,describe:`Create new indicator feed`,builder:R,handler:async e=>u({command:`intel indicator-feeds create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let e=n,t=await l(`Creating`,async()=>a.send(L,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}let m=f({description:p(e.description,`description`,`text`),name:p(e.name,`name`,`text`)}),h=await l(`Creating`,async()=>a.send(L,{body:m,account_id:u}));s(h,{successLabel:`Created`})})};function B(e){return e.usage(`$0 intel indicator-feeds data <feed-id>
|
|
17
17
|
|
|
18
18
|
Retrieves the raw data entries in a custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`data <feed-id>`,describe:`Get indicator feed data`,builder:B,handler:async e=>u({command:`intel indicator-feeds data`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/data`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await o();e.accountId=n;let a=await l(`Loading`,async()=>ee(`/accounts/${n}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/data`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));_(a.toString(`utf-8`))})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}/download`};function U(e){return e.usage(`$0 intel indicator-feeds downloads get <feed-id>
|
|
19
19
|
|
|
@@ -23,25 +23,25 @@ Retrieves details for a specific custom threat indicator feed.`).positional(`fee
|
|
|
23
23
|
|
|
24
24
|
Retrieves details for all accessible custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`list`,describe:`Get indicator feeds owned by this account`,builder:_e,handler:async e=>u({command:`intel indicator-feeds list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(ge,{account_id:a}));s(u,{successLabel:`Loaded`})})};var W={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/add`,body:`json`};function ye(e){return e.usage(`$0 intel indicator-feeds permissions create
|
|
25
25
|
|
|
26
|
-
Grants access permissions for a custom threat indicator feed to other accounts.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 be={command:`create`,describe:`Grant permission to indicator feed`,builder:ye,handler:async e=>u({command:`intel indicator-feeds permissions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=await r(e),
|
|
26
|
+
Grants access permissions for a custom threat indicator feed to other accounts.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 be={command:`create`,describe:`Grant permission to indicator feed`,builder:ye,handler:async e=>u({command:`intel indicator-feeds permissions create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let e=n,t=await l(`Updating`,async()=>a.send(W,{body:e,account_id:u}));s(t,{successLabel:`Updated`});return}let m=f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}),h=await l(`Updating`,async()=>a.send(W,{body:m,account_id:u}));s(h,{successLabel:`Updated`})})};var G={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/remove`,body:`json`};function xe(e){return e.usage(`$0 intel indicator-feeds permissions delete
|
|
27
27
|
|
|
28
|
-
Revokes access permissions for a custom threat indicator feed.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Se={command:`delete`,describe:`Revoke permission to indicator feed`,builder:xe,handler:async e=>u({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=await r(e),
|
|
28
|
+
Revokes access permissions for a custom threat indicator feed.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Se={command:`delete`,describe:`Revoke permission to indicator feed`,builder:xe,handler:async e=>u({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,!await g({force:!!e.force,message:`This operation destructively removes a permission entry.`}))return;if(e.body!==void 0){let e=n,t=await l(`Updating`,async()=>a.send(G,{body:e,account_id:u}));s(t,{successLabel:`Updated`});return}let m=f({account_tag:p(e[`account-tag`],`account-tag`,`text`),feed_id:e[`feed-id`]}),h=await l(`Updating`,async()=>a.send(G,{body:m,account_id:u}));s(h,{successLabel:`Updated`})})};var Ce={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/view`};function we(e){return e.usage(`$0 intel indicator-feeds permissions list
|
|
29
29
|
|
|
30
30
|
Lists current access permissions for custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`list`,describe:`List indicator feed permissions`,builder:we,handler:async e=>u({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Ce,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ee={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(be).command(Se).command(Te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/permissions/createProvider`,body:`json`};function De(e){return e.usage(`$0 intel indicator-feeds providers create
|
|
31
31
|
|
|
32
|
-
Creates a new indicator feed provider for an account. Only available to Intel accounts.`).option(`name`,{type:`string`,description:`The name of the provider`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oe={command:`create`,describe:`Create indicator feed provider`,builder:De,handler:async e=>u({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/createProvider`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),
|
|
32
|
+
Creates a new indicator feed provider for an account. Only available to Intel accounts.`).option(`name`,{type:`string`,description:`The name of the provider`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Oe={command:`create`,describe:`Create indicator feed provider`,builder:De,handler:async e=>u({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/permissions/createProvider`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let e=n,t=await l(`Updating`,async()=>a.send(K,{body:e,account_id:u}));s(t,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the provider`));let m=f({name:p(e.name,`name`,`text`)}),g=await l(`Updating`,async()=>a.send(K,{body:m,account_id:u}));s(g,{successLabel:`Updated`})})},ke={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage("$0 intel indicator-feeds snapshots update <feed-id>\n\nRevises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.").positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).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)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const je={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:Ae,handler:async e=>u({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let a={};if(e[`cf-async-upload`]!==void 0&&(a[`Cf-Async-Upload`]=String(e[`cf-async-upload`])),e.dryRun){let t=await i();c({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`multipart`,body:{body:e.body,file:e.file,source:e.source}});return}if(e.body===void 0&&e.file===void 0&&e.source===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let u=await r(e),d=e.local?t:await o();if(e.accountId=d,e.file!==void 0||e.body!==void 0||e.source!==void 0){let t=new FormData;if(e.file!==void 0){let n=m(e.file);t.append(`file`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`file`,e.body);e.source!==void 0&&t.append(`source`,String(p(e.source,`source`,`text`)??``));let r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:Object.keys(a).length>0?a:void 0}));s(r,{successLabel:`Updated`})}else if(e.body!==void 0){let t=p(e.body,`body`,`binary`),r=await l(`Updating`,async()=>n(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(e[`feed-id`]))}/snapshot`,{body:t,headers:{"Content-Type":`multipart/form-data`,...a}}));s(r,{successLabel:`Updated`})}})},Me={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var q={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}`,body:`json`};function Ne(e){return e.usage(`$0 intel indicator-feeds update <feed-id>
|
|
33
33
|
|
|
34
|
-
Revises details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).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 Pe={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ne,handler:async e=>u({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),
|
|
34
|
+
Revises details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).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 Pe={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ne,handler:async e=>u({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let t=n,r=await l(`Updating`,async()=>a.send(q,{body:t,account_id:u,feed_id:e[`feed-id`]}));s(r,{successLabel:`Updated`});return}let m=f({description:p(e.description,`description`,`text`),is_attributable:e[`is-attributable`],is_downloadable:e[`is-downloadable`],is_public:e[`is-public`],name:p(e.name,`name`,`text`)}),h=await l(`Updating`,async()=>a.send(q,{body:m,account_id:u,feed_id:e[`feed-id`]}));s(h,{successLabel:`Updated`})})};var Fe={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/indicator-feeds/${t.feed_id}/uploads/${t.upload_id}`};function Ie(e){return e.usage("$0 intel indicator-feeds uploads get <upload-id>\n\nPolls an asynchronously accepted upload. Continue polling after the recommended `poll_after_seconds` delay until status is `Unified` or `Error`. `Unified` is returned only after the durable loader finishes.").positional(`upload-id`,{type:`string`,description:`Upload ID`,demandOption:!0}).option(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Le={command:`get <upload-id>`,describe:`Get indicator feed upload status`,builder:Ie,handler:async e=>u({command:`intel indicator-feeds uploads get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel indicator-feeds uploads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/indicator-feeds/${e[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(e[`feed-id`]))}/uploads/${e[`upload-id`]==null?`<upload-id>`:encodeURIComponent(String(e[`upload-id`]))}`,pathParams:{"feed-id":String(e[`feed-id`]??``),"upload-id":String(e[`upload-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Fe,{account_id:a,feed_id:e[`feed-id`],upload_id:e[`upload-id`]}));s(u,{successLabel:`Loaded`})})},Re={command:`uploads`,describe:`Operations for indicator-feeds.uploads`,builder:e=>e.command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ze={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(z).command(V).command(he).command(ve).command(Pe).command(fe).command(Ee).command(ke).command(Me).command(Re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Be={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/ip-lists`};function Ve(e){return e.usage(`$0 intel ip-lists list
|
|
35
35
|
|
|
36
|
-
Returns a list of available IP list categories (e.g., anonymizer, botnetcc, malware, tor, vpn, open_proxies). This endpoint provides metadata about which IP lists are available in the system.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`
|
|
36
|
+
Returns a list of available IP list categories (e.g., anonymizer, botnetcc, malware, tor, vpn, open_proxies). This endpoint provides metadata about which IP lists are available in the system.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const He={command:`list`,describe:`Get Available IP Lists`,builder:Ve,handler:async e=>u({command:`intel ip-lists list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel ip-lists list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/ip-lists`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(Be,{account_id:a}));s(u,{successLabel:`Loaded`})})},Ue={command:`ip-lists`,describe:`Curated IP lists used for threat detection and policy enforcement`,builder:e=>e.command(He).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var We={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/ip`,query:[`ipv4`,`ipv6`]};function Ge(e){return e.usage("$0 intel ips get\n\nGets the geolocation, ASN, infrastructure type of the ASN, and any security threat categories of an IP address. **Must provide ip query parameters.** For example, `/intel/ip?ipv4=1.1.1.1` or `/intel/ip?ipv6=2001:db8::1`.").option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`ipv6`,{type:`string`,description:`Ipv6`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get`,describe:`Get IP Overview`,builder:Ge,handler:async e=>u({command:`intel ips get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={ipv4:e.ipv4,ipv6:e.ipv6};if(e.dryRun){let e=await i();c({command:`cf intel ips get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/ip`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(We,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},qe={command:`ips`,describe:`IP address intelligence — geolocation, risk assessment, and hosting provider details`,builder:e=>e.command(Ke).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/miscategorization`,body:`json`};function Je(e){return e.usage("$0 intel miscategorizations create\n\nAllows you to submit requests to change a domain’s category. Requests that include category `169` (New Domains) or category `177` (Newly Seen) in any of `content_adds`, `content_removes`, `security_adds`, or `security_removes` will be rejected with a `400 Bad Request`. These categories are automatically managed and fall off 30 days after they are applied.").option(`content-adds`,{type:`string`,array:!0,description:`Content category IDs to add.`}).option(`content-removes`,{type:`string`,array:!0,description:`Content category IDs to remove.`}).option(`indicator-type`,{type:`string`,description:`The indicator_type field`,choices:[`domain`,`ipv4`,`ipv6`,`url`]}).coerce(`indicator-type`,e=>p(e,`indicator-type`,`text`)).option(`ip`,{type:`string`,description:"Provide only if indicator_type is `ipv4` or `ipv6`."}).option(`security-adds`,{type:`string`,array:!0,description:`Security category IDs to add.`}).option(`security-removes`,{type:`string`,array:!0,description:`Security category IDs to remove.`}).option(`url`,{type:`string`,description:"Provide only if indicator_type is `domain` or `url`. Example if indicator_type is `domain`: `example.com`. Example if indicator_type is `url`: `https://example.com/news/`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Ye={command:`create`,describe:`Create Miscategorization`,builder:Je,handler:async e=>u({command:`intel miscategorizations create`,classification:{safeFlags:[`indicator-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel miscategorizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/miscategorization`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({content_adds:e[`content-adds`],content_removes:e[`content-removes`],indicator_type:e[`indicator-type`],ip:p(e.ip,`ip`,`text`),security_adds:e[`security-adds`],security_removes:e[`security-removes`],url:p(e.url,`url`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let e=n,t=await l(`Creating`,async()=>a.send(J,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}let m=f({content_adds:e[`content-adds`],content_removes:e[`content-removes`],indicator_type:e[`indicator-type`],ip:p(e.ip,`ip`,`text`),security_adds:e[`security-adds`],security_removes:e[`security-removes`],url:p(e.url,`url`,`text`)}),h=await l(`Creating`,async()=>a.send(J,{body:m,account_id:u}));s(h,{successLabel:`Created`})})},Xe={command:`miscategorizations`,describe:`Report and track domain miscategorization corrections`,builder:e=>e.command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes`,body:`json`};function Ze(e){return e.usage(`$0 intel sinkholes create
|
|
37
37
|
|
|
38
|
-
Create a new sinkhole. Logs of large request bodies will be truncated, but the full request body can be recorded in R2. If you wish to record large request bodies in R2, include the R2 key ID, key secret, and bucket name in the request body.`).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 Qe={command:`create`,describe:`Create a new sinkhole for your account`,builder:Ze,handler:async e=>u({command:`intel sinkholes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=await r(e),
|
|
38
|
+
Create a new sinkhole. Logs of large request bodies will be truncated, but the full request body can be recorded in R2. If you wish to record large request bodies in R2, include the R2 key ID, key secret, and bucket name in the request body.`).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 Qe={command:`create`,describe:`Create a new sinkhole for your account`,builder:Ze,handler:async e=>u({command:`intel sinkholes create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let e=n,t=await l(`Creating`,async()=>a.send(Y,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the sinkhole.`));let m=f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}),g=await l(`Creating`,async()=>a.send(Y,{body:m,account_id:u}));s(g,{successLabel:`Created`})})};var $e={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`,errors:{409:`ConflictError`}};function et(e){return e.usage(`$0 intel sinkholes delete <sinkhole-id>
|
|
39
39
|
|
|
40
40
|
Delete the specified sinkhole. The sinkhole must not have any active ingress rules defined. A 409 response code indicates that this condition is not met.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 tt={command:`delete <sinkhole-id>`,describe:`Delete a sinkhole`,builder:et,handler:async e=>u({command:`intel sinkholes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();if(e.accountId=a,!await g({force:!!e.force}))return;let u=await l(`Deleting`,async()=>n.send($e,{account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(u,{successLabel:`Deleted`})})};var nt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`};function rt(e){return e.usage(`$0 intel sinkholes get <sinkhole-id>
|
|
41
41
|
|
|
42
42
|
Get the specified sinkhole by its unique identifier.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const it={command:`get <sinkhole-id>`,describe:`Get a sinkhole`,builder:rt,handler:async e=>u({command:`intel sinkholes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(nt,{account_id:a,sinkhole_id:e[`sinkhole-id`]}));s(u,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses`,body:`json`};function at(e){return e.usage(`$0 intel sinkholes ingresses create <sinkhole-id>
|
|
43
43
|
|
|
44
|
-
Create a new ingress rule for the specified sinkhole. The CIDR block must be a Cloudflare BYOIP associated with your account. The zone_id must be a zone with the ability to create Spectrum Apps. The sinkhole must belong to the same account as the zone.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 ot={command:`create <sinkhole-id>`,describe:`Create an ingress rule`,builder:at,handler:async e=>u({command:`intel sinkholes ingresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=await r(e),
|
|
44
|
+
Create a new ingress rule for the specified sinkhole. The CIDR block must be a Cloudflare BYOIP associated with your account. The zone_id must be a zone with the ability to create Spectrum Apps. The sinkhole must belong to the same account as the zone.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 ot={command:`create <sinkhole-id>`,describe:`Create an ingress rule`,builder:at,handler:async e=>u({command:`intel sinkholes ingresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body!==void 0){let r=t,a=await l(`Creating`,async()=>n.send(X,{body:r,zone_id:i,sinkhole_id:e[`sinkhole-id`]}));s(a,{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await h(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let o=f({cidr:p(e.cidr,`cidr`,`text`)}),u=await l(`Creating`,async()=>n.send(X,{body:o,zone_id:i,sinkhole_id:e[`sinkhole-id`]}));s(u,{successLabel:`Created`})})};var st={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`};function ct(e){return e.usage(`$0 intel sinkholes ingresses delete <ingress-id>
|
|
45
45
|
|
|
46
46
|
Delete the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 lt={command:`delete <ingress-id>`,describe:`Delete an ingress rule`,builder:ct,handler:async e=>u({command:`intel sinkholes ingresses delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let t=await r(e),n=await a({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await g({force:!!e.force}))return;let i=await l(`Deleting`,async()=>t.send(st,{zone_id:n,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(i,{successLabel:`Deleted`})})};var ut={method:`GET`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`};function dt(e){return e.usage(`$0 intel sinkholes ingresses get <ingress-id>
|
|
47
47
|
|
|
@@ -51,11 +51,11 @@ Returns all ingress rules associated with the specified sinkhole.
|
|
|
51
51
|
|
|
52
52
|
Runs against your account. Pass --zone to run against a zone instead. CLOUDFLARE_ZONE_ID is ignored.`).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ht={command:`list`,describe:`List ingresses for a sinkhole`,builder:mt,handler:async e=>u({command:`intel sinkholes ingresses list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await i():void 0,n=e.zone===void 0?`accounts`:`zones`,r=e.zone??t??`<account-id>`;c({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`none`});return}let n=await r(e),u=e.zone===void 0?`accounts`:`zones`,d=u===`zones`?await a({zone:e.zone},n,{quiet:e.quiet}):e.local?t:await o();u===`zones`?e.zoneId=d:e.accountId=d;let f=await l(`Loading`,async()=>n.send(pt,{account_or_zone:u,account_or_zone_id:d,sinkhole_id:e[`sinkhole-id`]}));s(f,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/intel/sinkholes/${t.sinkhole_id}/ingresses/${t.ingress_id}`,body:`json`};function gt(e){return e.usage(`$0 intel sinkholes ingresses update <ingress-id>
|
|
53
53
|
|
|
54
|
-
Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 <ingress-id>`,describe:`Update an ingress rule`,builder:gt,handler:async e=>u({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=await r(e),
|
|
54
|
+
Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 <ingress-id>`,describe:`Update an ingress rule`,builder:gt,handler:async e=>u({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){c({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({cidr:p(e.cidr,`cidr`,`text`)}):d(e.body)});return}let t=e.body===void 0?void 0:d(e.body),n=await r(e),i=await a({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body!==void 0){let r=t,a=await l(`Updating`,async()=>n.send(Z,{body:r,zone_id:i,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(a,{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await h(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let o=f({cidr:p(e.cidr,`cidr`,`text`)}),u=await l(`Updating`,async()=>n.send(Z,{body:o,zone_id:i,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]}));s(u,{successLabel:`Updated`})})},vt={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(ot).command(lt).command(ft).command(ht).command(_t).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var yt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes`};function bt(e){return e.usage(`$0 intel sinkholes list
|
|
55
55
|
|
|
56
56
|
Lists sinkholes owned by the account for redirecting malicious traffic.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List sinkholes owned by this account`,builder:bt,handler:async e=>u({command:`intel sinkholes list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await i();c({command:`cf intel sinkholes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`none`});return}let n=await r(e),a=e.local?t:await o();e.accountId=a;let u=await l(`Loading`,async()=>n.send(yt,{account_id:a}));s(u,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/intel/sinkholes/${t.sinkhole_id}`,body:`json`};function xt(e){return e.usage(`$0 intel sinkholes update <sinkhole-id>
|
|
57
57
|
|
|
58
|
-
Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 St={command:`update <sinkhole-id>`,describe:`Update a sinkhole`,builder:xt,handler:async e=>u({command:`intel sinkholes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=await r(e),
|
|
58
|
+
Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 St={command:`update <sinkhole-id>`,describe:`Update a sinkhole`,builder:xt,handler:async e=>u({command:`intel sinkholes update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();c({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}):d(e.body)});return}let n=e.body===void 0?void 0:d(e.body),a=await r(e),u=e.local?t:await o();if(e.accountId=u,e.body!==void 0){let t=n,r=await l(`Updating`,async()=>a.send($,{body:t,account_id:u,sinkhole_id:e[`sinkhole-id`]}));s(r,{successLabel:`Updated`});return}e.name===void 0&&(e.name=await h(`name`,`The name of the sinkhole.`));let m=f({name:p(e.name,`name`,`text`),r2_bucket:p(e[`r2-bucket`],`r2-bucket`,`text`),r2_id:p(e[`r2-id`],`r2-id`,`text`),r2_secret:p(e[`r2-secret`],`r2-secret`,`text`)}),g=await l(`Updating`,async()=>a.send($,{body:m,account_id:u,sinkhole_id:e[`sinkhole-id`]}));s(g,{successLabel:`Updated`})})},Ct={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(Qe).command(tt).command(it).command(Q).command(St).command(vt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var wt={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/url`,query:[`url`]};function Tt(e){return e.usage(`$0 intel urls get
|
|
59
59
|
|
|
60
60
|
Gets security information about a URL, including content categories and risk types. The URL must be provided as a query parameter.`).option(`url`,{type:`string`,description:`The URL to look up.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Et={command:`get`,describe:`Get URL Intelligence`,builder:Tt,handler:async e=>u({command:`intel urls get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={url:e.url};if(e.dryRun){let e=await i();c({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/intel/url`,pathParams:{},query:n,bodyKind:`none`});return}let a=await r(e),u=e.local?t:await o();e.accountId=u;let d=await l(`Loading`,async()=>a.send(wt,{account_id:u,...n}));s(d,{successLabel:`Loaded`})})},Dt={command:`urls`,describe:`URL intelligence operations`,builder:e=>e.command(Et).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/intel/whois`,query:[`domain`]};function kt(e){return e.usage(`$0 intel whois get
|
|
61
61
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{n as r,t as i}from"./ansi-styles-kSC6bEIq.mjs";import{V as a}from"./dist-
|
|
2
|
+
import{n as e,r as t,t as n}from"./rolldown-runtime-BNtqjh-B.mjs";import{n as r,t as i}from"./ansi-styles-kSC6bEIq.mjs";import{V as a}from"./dist-D-ihn_mV.mjs";import{t as o}from"./src-COwxoocl.mjs";import{r as s}from"./interactive-wQM7Blhm.mjs";import c,{exit as l,stdin as u,stdout as d}from"node:process";import"node:os";import"node:tty";import{styleText as f}from"node:util";import p from"node:readline";const{white:m,gray:h,dim:g,hidden:_,bold:v,cyanBright:y,bgCyan:b}=a,x=a.hex(`#BD5B08`),S=a.hex(`#111`),C=a.hex(`#0E838F`),w=S.bgHex(`#0E838F`),ee=a.hex(`#AB2526`),te=S.bgHex(`#AB2526`),ne=a.hex(`#218529`),re=S.bgHex(`#218529`),ie=a.hex(`#7F7322`),ae=S.bgHex(`#7F7322`);var oe=class extends Error{constructor(e,t){super(e),this.signal=t}};const se=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,ce=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,le=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,ue=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,T=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,E=/\t{1,1000}/y,de=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,D=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,fe=/\p{M}+/gu,pe={limit:1/0,ellipsis:``},me=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?me(i,pe,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,f=n.regularWidth??1,p=n.wideWidth??2,m=0,h=0,g=e.length,_=0,v=!1,y=g,b=Math.max(0,r-a),x=0,S=0,C=0,w=0;outer:for(;;){if(S>x||h>=g&&h>m){let t=e.slice(x,S)||e.slice(m,h);_=0;for(let e of t.replaceAll(fe,``)){let t=e.codePointAt(0)||0;if(w=ce(t)?d:le(t)?p:l!==f&&se(t)?l:f,C+w>b&&(y=Math.min(y,Math.max(x,m)+_)),C+w>r){v=!0;break outer}_+=e.length,C+=w}x=S=0}if(h>=g)break;if(D.lastIndex=h,D.test(e)){if(_=D.lastIndex-h,w=_*f,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/f))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=D.lastIndex}else if(ue.lastIndex=h,ue.test(e)){if(C+o>b&&(y=Math.min(y,h)),C+o>r){v=!0;break}C+=o,x=m,S=h,h=m=ue.lastIndex}else if(T.lastIndex=h,T.test(e)){if(_=T.lastIndex-h,w=_*s,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/s))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=T.lastIndex}else if(E.lastIndex=h,E.test(e)){if(_=E.lastIndex-h,w=_*c,C+w>b&&(y=Math.min(y,h+Math.floor((b-C)/c))),C+w>r){v=!0;break}C+=w,x=m,S=h,h=m=E.lastIndex}else if(de.lastIndex=h,de.test(e)){if(C+u>b&&(y=Math.min(y,h)),C+u>r){v=!0;break}C+=u,x=m,S=h,h=m=de.lastIndex}else h+=1}return{width:v?b:C,index:v?y:g,truncated:v,ellipsed:v&&r>=a}},he={limit:1/0,ellipsis:``,ellipsisWidth:0},O=(e,t={})=>me(e,he,t).width,ge=`]8;;`,_e=RegExp(`(?:\\[(?<code>\\d+)m|\\${ge}(?<uri>.*))`,`y`),ve=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},ye=e=>`[${e}m`,be=e=>`${ge}${e}`,xe=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:O(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=O(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(ge,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},Se=e=>{let t=e.split(` `),n=t.length;for(;n&&!O(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},Ce=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=O(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=O(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),xe(s,r,t),c=O(s.at(-1)??``)}else{if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){xe(s,r,t),c=O(s.at(-1)??``);continue}s.push(``),c=0}c+i>t&&n.wordWrap===!1?(xe(s,r,t),c=O(s.at(-1)??``)):(s[s.length-1]+=r,c+=i)}}n.trim!==!1&&(s=s.map(e=>Se(e)));let l=s.join(`
|
|
3
3
|
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===``){_e.lastIndex=e+1;let t=_e.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
4
4
|
`){a&&(r+=be(``));let e=i?ve(i):void 0;i&&e&&(r+=ye(e))}else t===`
|
|
5
5
|
`&&(i&&ve(i)&&(r+=ye(i)),a&&(r+=be(a)))}return r},we=/\r?\n/;function Te(e,t,n){return String(e).normalize().split(we).map(e=>Ce(e,t,n)).join(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-B-h0BHg7.mjs";import{t}from"./output-BZQEl3mK.mjs";import{t as n}from"./dry-run-kJbjn4kG.mjs";import{t as r}from"./progress-yvPscjYg.mjs";import{t as i}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";var a={method:`POST`,path:()=>`/internal/submit`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 internal submit create
|
|
3
3
|
|
|
4
4
|
Internal route for testing URL submissions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`create`,describe:`Internal route for testing URL submissions`,builder:o,handler:async o=>i({command:`internal submit create`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf internal submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/internal/submit`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Creating`,async()=>i.send(a));t(s,{successLabel:`Created`})})},c={command:`submit`,describe:`Operations for submit`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`internal`,describe:`internal`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-B-h0BHg7.mjs";import{t}from"./output-BZQEl3mK.mjs";import{t as n}from"./dry-run-kJbjn4kG.mjs";import{t as r}from"./progress-yvPscjYg.mjs";import{t as i}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";var a={method:`GET`,path:()=>`/ips`,query:[`networks`]};function o(e){return e.usage(`$0 ips list
|
|
3
3
|
|
|
4
4
|
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:o,handler:async o=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let i={networks:o.networks};if(o.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let s=await e(o),c=await r(`Loading`,async()=>s.send(a,i));t(c,{successLabel:`Loaded`})})},c={command:`ips`,describe:`ips`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{n}from"./auth-B-h0BHg7.mjs";import{a as r,t as i}from"./context-BY1Eh_Qe.mjs";import{t as a}from"./output-BZQEl3mK.mjs";import{t as o}from"./dry-run-kJbjn4kG.mjs";import{t as s}from"./progress-yvPscjYg.mjs";import{t as c}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as l,t as u}from"./body-parser-DoewLePl.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-CEpZ-lQZ.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/k2/streams`,body:`json`};function h(e){return e.usage("$0 k2 streams create\n\nCreate a new K2 stream. HTTP is disabled when `http` is omitted. Enabled HTTP requires authentication and allows all origins unless `authentication` or `cors` say otherwise. At least one input must be enabled.").option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`name`,{type:`string`,description:`Specifies the name of the K2 stream.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`,default:604800}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const g={command:`create`,describe:`Create K2 stream`,builder:h,handler:async e=>c({command:`k2 streams create`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),p=await n(e),h=e.local?t:await i();if(e.accountId=h,e.body!==void 0){let e=c,t=await s(`Creating`,async()=>p.send(m,{body:e,account_id:h}));a(t,{successLabel:`Created`});return}e.name===void 0&&(e.name=await f(`name`,`Specifies the name of the K2 stream.`));let g=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},name:d(e.name,`name`,`text`),retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),_=await s(`Creating`,async()=>p.send(m,{body:g,account_id:h}));a(_,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function v(e){return e.usage(`$0 k2 streams delete <stream-id>
|
|
3
|
+
|
|
4
|
+
Delete a K2 stream in an account. Deleting a stream that does not exist also succeeds.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,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 y={command:`delete <stream-id>`,describe:`Delete K2 stream`,builder:v,handler:async e=>c({command:`k2 streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force}))return;let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`};function x(e){return e.usage(`$0 k2 streams get <stream-id>
|
|
5
|
+
|
|
6
|
+
Get K2 stream details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <stream-id>`,describe:`Get K2 stream`,builder:x,handler:async e=>c({command:`k2 streams get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},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(b,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})};var C={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams`,query:[`name`,`page`,`per_page`]};function w(e){return e.usage(`$0 k2 streams list
|
|
7
|
+
|
|
8
|
+
List or filter K2 streams in an account.`).option(`name`,{type:`string`,description:`Filters K2 streams by name using a case-insensitive substring.`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`List K2 streams`,builder:w,handler:async e=>c({command:`k2 streams list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={name:e.name,page:e.page,per_page:e[`per-page`]};if(e.dryRun){let e=await r();o({command:`cf k2 streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/k2/streams`,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(C,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var E={method:`GET`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}/subscriptions`};function D(e){return e.usage(`$0 k2 streams subscriptions list
|
|
9
|
+
|
|
10
|
+
Lists every subscription on one stream, oldest first. Lag uses committed positions, not reserved read positions. A failed tail observation preserves subscription metadata and returns unavailable lag.`).option(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`List subscriptions with consumer lag`,builder:D,handler:async e=>c({command:`k2 streams subscriptions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}/subscriptions`,pathParams:{"stream-id":String(e[`stream-id`]??``)},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(E,{account_id:l,stream_id:e[`stream-id`]}));a(u,{successLabel:`Loaded`})})},k={command:`subscriptions`,describe:`Subscriptions that consume a K2 stream, with committed-position lag`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var A={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/k2/streams/${t.stream_id}`,body:`json`};function j(e){return e.usage("$0 k2 streams update <stream-id>\n\nUpdate a K2 stream. Omitted `http` settings, such as `authentication` and `cors`, keep their current values. Disabling HTTP keeps them, so enabling HTTP again restores them. At least one input must remain enabled.").positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the K2 stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates whether the HTTP endpoint requires an API token with K2 produce permission. When false, the endpoint accepts unauthenticated records. Defaults to true when HTTP is enabled without a stored value.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:"Allows browser requests from these HTTP or HTTPS origins. Use a wildcard only as the sole origin. An empty list blocks cross-origin browser requests. Defaults to `['*']` when HTTP is enabled without stored origins."}).option(`http-enabled`,{type:`boolean`,description:`Indicates whether the HTTP endpoint accepts records.`}).option(`retention-seconds`,{type:`number`,description:`Sets the record retention period from 1 hour (3600 seconds) to 30 days (2592000 seconds), inclusive.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates whether Workers bindings can produce records to the stream.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{let t=[`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0})}const M={command:`update <stream-id>`,describe:`Update K2 stream`,builder:j,handler:async e=>c({command:`k2 streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf k2 streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/k2/streams/${e[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(e[`stream-id`]))}`,pathParams:{"stream-id":String(e[`stream-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}):l(e.body)});return}let c=e.body===void 0?void 0:l(e.body),d=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body!==void 0){let t=c,n=await s(`Updating`,async()=>d.send(A,{body:t,account_id:f,stream_id:e[`stream-id`]}));a(n,{successLabel:`Updated`});return}let p=u({http:{authentication:e[`http-authentication`],cors:{origins:e[`http-cors-origins`]},enabled:e[`http-enabled`]},retention_seconds:e[`retention-seconds`],worker_binding:{enabled:e[`worker-binding-enabled`]}}),m=await s(`Updating`,async()=>d.send(A,{body:p,account_id:f,stream_id:e[`stream-id`]}));a(m,{successLabel:`Updated`})})},N={command:`streams`,describe:`K2 streams, their retention, and the HTTP and Workers binding inputs used to produce records`,builder:e=>e.command(g).command(y).command(S).command(T).command(M).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`k2`,describe:`Durable, ordered event streams that you produce records to and consume from with subscriptions`,builder:e=>e.command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{P as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-DIJ7SIKC.mjs";import{i as n,n as r}from"./auth-B-h0BHg7.mjs";import{a as i,t as a}from"./context-BY1Eh_Qe.mjs";import{t as o}from"./output-BZQEl3mK.mjs";import{t as s}from"./dry-run-kJbjn4kG.mjs";import{t as c}from"./progress-yvPscjYg.mjs";import{t as l}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as u,t as d}from"./body-parser-DoewLePl.mjs";import{n as f,t as p}from"./input-validation-D7z60HJH.mjs";import{a as m,n as h}from"./prompt-CEpZ-lQZ.mjs";import{n as g,t as _}from"./raw-fetch-Cl5spWC3.mjs";var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/delete`,body:`json`};function y(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
|
+
|
|
4
|
+
Deletes up to 10,000 key-value pairs from the specified Workers KV namespace. Send a JSON array of the key names to delete. The result reports the number of successful deletions and any keys that failed and should be retried.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:y,handler:async e=>l({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:u(e.body,[],1e4),l=await r(e),d=e.local?t:await a();if(e.accountId=d,await h({force:!!e.force,message:`This operation deletes the specified keys and their values from the Workers KV namespace.`})&&e.body!==void 0){let t=n,r=await c(`Processing`,async()=>l.send(v,{body:t,account_id:d,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Done`})}})};var b={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk/get`,body:`json`};function x(e){return e.usage("$0 kv bulk get <namespace-id>\n\nRetrieves the text-based values of up to 100 keys from the specified Workers KV namespace. The result maps each requested key to its value. Set `type` to `json` to parse JSON values instead of returning strings, and set `withMetadata` to `true` to include metadata with each value. Binary values are not supported by this operation.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:"Return values as strings with `text`, or parse stored JSON values with `json`.",choices:[`text`,`json`],default:`text`}).coerce(`type`,e=>f(e,`type`,`text`)).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).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 S={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:x,handler:async e=>l({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}):u(e.body)});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),f=e.local?t:await a();if(e.accountId=f,e.body!==void 0){let t=n,r=await c(`Creating`,async()=>l.send(b,{body:t,account_id:f,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Created`});return}if(e.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=d({keys:e.keys,type:e.type,withMetadata:e[`with-metadata`]}),m=await c(`Creating`,async()=>l.send(b,{body:p,account_id:f,namespace_id:e[`namespace-id`]}));o(m,{successLabel:`Created`})})};var C={method:`PUT`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/bulk`,body:`json`};function w(e){return e.usage("$0 kv bulk put <namespace-id>\n\nWrites up to 10,000 key-value pairs to the specified Workers KV namespace from a JSON array, with optional metadata and expiration settings for each pair. Existing values and expirations are overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence. The entire request must be 100 megabytes or less. The result reports the number of successful writes and any keys that failed and should be retried.").positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).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:`put <namespace-id>`,describe:`Write multiple key-value pairs`,builder:w,handler:async e=>l({command:`kv bulk put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv bulk put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:u(e.body,[],1e4)});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`);let n=e.body===void 0?void 0:u(e.body,[],1e4),l=await r(e),d=e.local?t:await a();if(e.accountId=d,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send(C,{body:t,account_id:d,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Updated`})}})},E={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(ee).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/values/${t.key_name}`};function O(e){return e.usage("$0 kv keys delete <key-name>\n\nDeletes the specified key and its value from the Workers KV namespace. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 k={command:`delete <key-name>`,describe:`Delete a key-value pair`,builder:O,handler:async e=>l({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected key-value pair from the Workers KV namespace.`}))return;let u=await c(`Deleting`,async()=>n.send(D,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Deleted`})})};function A(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value stored under the specified key in the Workers KV namespace as raw bytes. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If the key-value pair expires, the `expiration` response header contains its expiration time in seconds since the UNIX epoch.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const j={command:`get <key-name>`,describe:`Get a key's value`,builder:A,handler:async e=>l({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},bodyKind:`none`});return}await r(e);let n=e.local?t:await a();e.accountId=n;let o=await c(`Loading`,async()=>_(`/accounts/${n}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{method:`GET`,local:e.local===!0,persistTo:e.persistTo}));g(e.text===!0?o.toString(`utf-8`):o)})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/keys`,query:[`limit`,`prefix`,`cursor`]};function N(e){return e.usage("$0 kv keys list\n\nLists key names in the specified Workers KV namespace, with expiration times and metadata when present. Use `prefix` to filter names and `cursor` to request the next page. Values are not included.").option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`limit`,{type:`number`,description:"Maximum number of keys to return in one response. Pass `result_info.cursor` from the response as `cursor` to request the next page."}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque pagination token from `result_info.cursor` in the previous response. Pass it unchanged to request the next page of keys."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`list`,describe:`List keys in a namespace`,builder:N,handler:async e=>l({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,prefix:e.prefix,cursor:e.cursor};if(e.dryRun){let t=await i();s({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(e[`namespace-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(M,{account_id:u,namespace_id:e[`namespace-id`],...n}));o(d,{successLabel:`Loaded`})})};function F(e){return e.usage("$0 kv keys put <key-name>\n\nWrites a value under the specified key in the Workers KV namespace, creating the key-value pair or replacing its existing value, expiration, and metadata. Send the value as an `application/octet-stream` request body, or use `multipart/form-data` with a `value` part and an optional JSON `metadata` part. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will not expire. If both are set, `expiration_ttl` takes precedence.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:"Number of seconds until the key expires. Must be at least 60. Takes precedence over `expiration` when both are specified."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Associates arbitrary JSON data with a key/value pair.`})}const te={command:`put <key-name>`,describe:`Write a key-value pair with optional metadata`,builder:F,handler:async e=>l({command:`kv keys put`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={expiration:e.expiration,expiration_ttl:e[`expiration-ttl`]};if(e.dryRun){let t=await i();s({command:`cf kv keys put`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/values/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},query:l,bodyKind:e.metadata===void 0?`octet-stream`:`multipart`,body:e.metadata===void 0?e.body:{body:e.body,file:e.file,metadata:e.metadata}});return}if(e.body===void 0&&e.file===void 0&&e.metadata===void 0)throw Error(`--body or --file is required for this command. Pass --body '<value>' or --file path/to/file.`);let u=e.metadata!==void 0||e.file!==void 0?void 0:f(e.body,`body`,`binary`),d=await r(e),m=e.local?t:await a();if(e.accountId=m,e.metadata!==void 0){let t=new FormData;if(e.file!==void 0){let n=p(e.file);t.append(`value`,new Blob([n]),e.file.split(/[\\/]/).filter(Boolean).pop())}else e.body!==void 0&&t.append(`value`,e.body);e.metadata!==void 0&&t.append(`metadata`,String(f(e.metadata,`metadata`,`text`)??``));let r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${m}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t}));o(r,{successLabel:`Updated`})}else if(e.file!==void 0){let t=p(e.file),r=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${m}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(r,{successLabel:`Updated`})}else if(e.body!==void 0){let t=u,r=new URLSearchParams(Object.entries(l).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),i=await c(`Updating`,async()=>n(d,`PUT`,`/accounts/${m}/storage/kv/namespaces/${encodeURIComponent(String(e[`namespace-id`]))}/values/${encodeURIComponent(String(e[`key-name`]))}${r?`?`+r:``}`,{body:t,headers:{"Content-Type":`application/octet-stream`}}));o(i,{successLabel:`Updated`})}})},I={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(k).command(j).command(P).command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}/metadata/${t.key_name}`};function R(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the JSON metadata associated with the specified key in the Workers KV namespace, without retrieving its value. Use URL-encoding for special characters (for example, `:`, `!`, `%`) in the key name when constructing the request URL.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <key-name>`,describe:`Get a key's metadata`,builder:R,handler:async e=>l({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}/metadata/${e[`key-name`]==null?`<key-name>`:encodeURIComponent(String(e[`key-name`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``),"key-name":String(e[`key-name`]??``)},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(L,{account_id:l,namespace_id:e[`namespace-id`],key_name:e[`key-name`]}));o(u,{successLabel:`Loaded`})})},B={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,body:`json`};function H(e){return e.usage(`$0 kv namespaces create
|
|
5
|
+
|
|
6
|
+
Creates a Workers KV namespace in the specified account with the given title. Returns \`400\` if the account already owns a namespace with that title; an existing namespace must be explicitly deleted before it can be replaced. An optional jurisdiction restricts where data is durably stored and can only be set at creation time.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).coerce(`jurisdiction`,e=>f(e,`jurisdiction`,`text`)).option(`namespace-mode`,{type:`string`,description:"The mode of the Workers KV namespace. Specify `instant` when creating a namespace to create a KV Instant namespace. Omit this field when creating a namespace to create a classic namespace. Currently, `instant` is the only supported explicit value.",choices:[`instant`]}).coerce(`namespace-mode`,e=>f(e,`namespace-mode`,`text`)).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const U={command:`create`,describe:`Create a namespace`,builder:H,handler:async e=>l({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`namespace-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({jurisdiction:e.jurisdiction,mode:e[`namespace-mode`],title:f(e.title,`title`,`text`)}):u(e.body)});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let e=n,t=await c(`Creating`,async()=>l.send(V,{body:e,account_id:p}));o(t,{successLabel:`Created`});return}e.title===void 0&&(e.title=await m(`title`,`Human-readable string name for a Workers KV namespace.`));let h=d({jurisdiction:e.jurisdiction,mode:e[`namespace-mode`],title:f(e.title,`title`,`text`)}),g=await c(`Creating`,async()=>l.send(V,{body:h,account_id:p}));o(g,{successLabel:`Created`})})};var W={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`};function G(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
7
|
+
|
|
8
|
+
Deletes the specified Workers KV namespace and its stored key-value pairs from the account.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,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 K={command:`delete <namespace-id>`,describe:`Delete a namespace`,builder:G,handler:async e=>l({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,!await h({force:!!e.force,message:`This operation deletes the selected Workers KV namespace and all of its key-value pairs.`}))return;let u=await c(`Deleting`,async()=>n.send(W,{account_id:l,namespace_id:e[`namespace-id`]}));o(u,{successLabel:`Deleted`})})};var q={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`};function J(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
9
|
+
|
|
10
|
+
Returns the Workers KV namespace for the specified account and namespace ID.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Y={command:`get <namespace-id>`,describe:`Get a namespace`,builder:J,handler:async e=>l({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-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(q,{account_id:l,namespace_id:e[`namespace-id`]}));o(u,{successLabel:`Loaded`})})};var X={method:`GET`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces`,query:[`page`,`per_page`,`order`,`direction`]};function Z(e){return e.usage("$0 kv namespaces list\n\nLists Workers KV namespaces owned by the specified account. Use `page` and `per_page` to select a page of results, and `order` and `direction` to control sorting.").option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:"Namespace field to sort by (`id` or `title`).",choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:"Sort namespaces in ascending (`asc`) or descending (`desc`) order.",choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`list`,describe:`List namespaces`,builder:Z,handler:async e=>l({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await i();s({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/storage/kv/namespaces`,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(X,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};var $={method:`PUT`,path:t=>e`/accounts/${t.account_id}/storage/kv/namespaces/${t.namespace_id}`,body:`json`};function ne(e){return e.usage(`$0 kv namespaces update <namespace-id>
|
|
11
|
+
|
|
12
|
+
Changes the title of the specified Workers KV namespace and returns the updated namespace. The namespace ID and stored key-value pairs are unchanged.`).positional(`namespace-id`,{type:`string`,description:`ID of the Workers KV namespace.`,demandOption:!0}).option(`title`,{type:`string`,description:`Human-readable string name for a Workers KV namespace.`}).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 re={command:`update <namespace-id>`,describe:`Rename a namespace`,builder:ne,handler:async e=>l({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/storage/kv/namespaces/${e[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(e[`namespace-id`]))}`,pathParams:{"namespace-id":String(e[`namespace-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({title:f(e.title,`title`,`text`)}):u(e.body)});return}let n=e.body===void 0?void 0:u(e.body),l=await r(e),p=e.local?t:await a();if(e.accountId=p,e.body!==void 0){let t=n,r=await c(`Updating`,async()=>l.send($,{body:t,account_id:p,namespace_id:e[`namespace-id`]}));o(r,{successLabel:`Updated`});return}e.title===void 0&&(e.title=await m(`title`,`Human-readable string name for a Workers KV namespace.`));let h=d({title:f(e.title,`title`,`text`)}),g=await c(`Updating`,async()=>l.send($,{body:h,account_id:p,namespace_id:e[`namespace-id`]}));o(g,{successLabel:`Updated`})})},ie={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(U).command(K).command(Y).command(Q).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ae={command:`kv`,describe:`kv`,builder:e=>e.command(E).command(I).command(B).command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ae as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-
|
|
2
|
+
function e(e,t,n,r){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{let t=await n();if(r===null){await t.default.handler(e);return}let{runWithTelemetry:i}=await import(`./run-DBqOjD1P.mjs`);await i(r,e,()=>t.default.handler(e))}}}export{e as t};
|
package/dist/{leaked-credential-checks-CSZd9hBQ.mjs → leaked-credential-checks-EzT4TTjO.mjs}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-B-h0BHg7.mjs";import{i as n}from"./context-BY1Eh_Qe.mjs";import{t as r}from"./output-BZQEl3mK.mjs";import{t as i}from"./dry-run-kJbjn4kG.mjs";import{t as a}from"./progress-yvPscjYg.mjs";import{t as o}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";import{n as s,t as c}from"./body-parser-DoewLePl.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-CEpZ-lQZ.mjs";var d={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections`,body:`json`};function f(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
3
|
|
|
4
|
-
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),
|
|
4
|
+
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const p={command:`create`,describe:`Create a custom detection location for a zone.`,builder:f,handler:async e=>o({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),u=await t(e),f=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=f,e.body!==void 0){let e=o,t=await a(`Creating`,async()=>u.send(d,{body:e,zone_id:f}));r(t,{successLabel:`Created`});return}let p=c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),m=await a(`Creating`,async()=>u.send(d,{body:p,zone_id:f}));r(m,{successLabel:`Created`})})};var m={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function h(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
5
|
|
|
6
6
|
Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,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 g={command:`delete <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:h,handler:async e=>o({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`}))return;let c=await a(`Deleting`,async()=>o.send(m,{zone_id:s,detection_id:e[`detection-id`]}));r(c,{successLabel:`Deleted`})})};var _={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks/detections/${t.detection_id}`};function v(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
|
|
7
7
|
|
|
@@ -9,8 +9,8 @@ Get the username and password expressions of a single user-defined detection loc
|
|
|
9
9
|
|
|
10
10
|
List the user-defined detection locations configured for Leaked Credential Checks, each with its own identifier. A custom detection location tells the WAF where to find the username and password in requests to your application.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List the custom detection locations of a zone.`,builder:x,handler:async e=>o({command:`leaked-credential-checks detections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections`,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}/leaked-credential-checks/detections/${t.detection_id}`,body:`json`};function w(e){return e.usage(`$0 leaked-credential-checks detections update <detection-id>
|
|
11
11
|
|
|
12
|
-
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const T={command:`update <detection-id>`,describe:`Update a custom detection location of a zone.`,builder:w,handler:async e=>o({command:`leaked-credential-checks detections update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=await t(e),
|
|
12
|
+
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`id`,{type:`string`,description:`Defines the unique ID for this custom detection.`}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const T={command:`update <detection-id>`,describe:`Update a custom detection location of a zone.`,builder:w,handler:async e=>o({command:`leaked-credential-checks detections update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks/detections/${e[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(e[`detection-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"detection-id":String(e[`detection-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),u=await t(e),d=await n({zone:e.zone},u,{quiet:e.quiet});if(e.zoneId=d,e.body!==void 0){let t=o,n=await a(`Updating`,async()=>u.send(C,{body:t,zone_id:d,detection_id:e[`detection-id`]}));r(n,{successLabel:`Updated`});return}let f=c({id:l(e.id,`id`,`text`),password:l(e.password,`password`,`text`),username:l(e.username,`username`,`text`)}),p=await a(`Updating`,async()=>u.send(C,{body:f,zone_id:d,detection_id:e[`detection-id`]}));r(p,{successLabel:`Updated`})})},E={command:`detections`,describe:`Custom detection locations that tell the WAF where to find usernames and passwords in requests`,builder:e=>e.command(p).command(g).command(y).command(S).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks`};function O(e){return e.usage(`$0 leaked-credential-checks get
|
|
13
13
|
|
|
14
14
|
Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get the Leaked Credential Checks status for a zone.`,builder:O,handler:async e=>o({command:`leaked-credential-checks get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,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(D,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var A={method:`POST`,path:t=>e`/zones/${t.zone_id}/leaked-credential-checks`,body:`json`};function j(e){return e.usage(`$0 leaked-credential-checks update
|
|
15
15
|
|
|
16
|
-
Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const M={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:j,handler:async e=>o({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled}):s(e.body)});return}let o=await t(e),
|
|
16
|
+
Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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}).option(`body`,{type:`string`,description:`Defines the overall status for Leaked Credential Checks.`})}const M={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:j,handler:async e=>o({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({enabled:e.enabled}):s(e.body)});return}let o=e.body===void 0?void 0:s(e.body),l=await t(e),d=await n({zone:e.zone},l,{quiet:e.quiet});if(e.zoneId=d,!await u({force:!!e.force,message:`This operation toggles Leaked Credential Checks for a zone.`}))return;if(e.body!==void 0){let e=o,t=await a(`Processing`,async()=>l.send(A,{body:e,zone_id:d}));r(t,{successLabel:`Done`});return}let f=c({enabled:e.enabled}),p=await a(`Processing`,async()=>l.send(A,{body:f,zone_id:d}));r(p,{successLabel:`Done`})})},N={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(k).command(M).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{N as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-B-h0BHg7.mjs";import{t}from"./output-BZQEl3mK.mjs";import{t as n}from"./dry-run-kJbjn4kG.mjs";import{t as r}from"./progress-yvPscjYg.mjs";import{t as i}from"./run-BOKI1uWa.mjs";import"./telemetry-DkDUr4KK.mjs";var a={method:`GET`,path:()=>`/live`,response:!1,errors:{400:`BadRequestError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function o(e){return e.usage(`$0 live get
|
|
3
3
|
|
|
4
4
|
Return a success message after running liveness checks.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get`,describe:`Run liveness checks`,builder:o,handler:async o=>i({command:`live get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf live get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/live`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`live`,describe:`live`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|