cf 0.15.0 → 1.0.0-beta.1
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/LICENSE-APACHE +176 -0
- package/LICENSE-MIT +25 -0
- package/README.md +6 -7
- package/dist/_meta/commands.json +62 -6
- package/dist/_meta/hand-written-commands.json +31 -1
- package/dist/_meta/schemas.json +23 -1
- package/dist/{abuse-reports-BAQR1w79.mjs → abuse-reports-Dd6kJM7r.mjs} +1 -1
- package/dist/{access-C8KMplzp.mjs → access-C_2rEi0H.mjs} +1 -1
- package/dist/{account-B-KQSR0L.mjs → account-CZ9SPVdz.mjs} +1 -1
- package/dist/{account-tags-EncLJpLc.mjs → account-tags-DAf-hq1m.mjs} +1 -1
- package/dist/{accounts-BA4Mp3A_.mjs → accounts-BDIKjiG2.mjs} +1 -1
- package/dist/{acm-ByxUJcqF.mjs → acm-D-q1FVWJ.mjs} +1 -1
- package/dist/{addressing-C-ym0h0G.mjs → addressing-0w2U1NEy.mjs} +1 -1
- package/dist/{agent-memory-CkPSiZDI.mjs → agent-memory-Drumm4qd.mjs} +1 -1
- package/dist/{ai-DkE_Q64s.mjs → ai-ARwLeQ1O.mjs} +1 -1
- package/dist/{ai-audit-pPcjYWI5.mjs → ai-audit-CPrmohqf.mjs} +1 -1
- package/dist/{ai-gateway-DtrwF1lQ.mjs → ai-gateway-DNY4FPF2.mjs} +1 -1
- package/dist/{ai-search-DLD_kDS1.mjs → ai-search-B5l4IDSR.mjs} +1 -1
- package/dist/{ai-security-jyZcBl9g.mjs → ai-security-C7_IGDDl.mjs} +1 -1
- package/dist/{alerting-DOROjm8E.mjs → alerting-B6m1Rhf4.mjs} +1 -1
- package/dist/{analytics-rQ-h-plT.mjs → analytics-nnzFBB_7.mjs} +1 -1
- package/dist/{analytics_engine-Cg9gCAMt.mjs → analytics_engine-BvjKCwn1.mjs} +1 -1
- package/dist/{api-security-B8p8vp8u.mjs → api-security-B9IozS2a.mjs} +1 -1
- package/dist/{argo-g8SjUb_t.mjs → argo-C_QcqR6P.mjs} +1 -1
- package/dist/{artifacts-B1PaeF5h.mjs → artifacts-DDFNpYBz.mjs} +1 -1
- package/dist/{audit-logs-DmU_PHy_.mjs → audit-logs-cTzNV0DV.mjs} +1 -1
- package/dist/{auth-Cp7gT-AF.mjs → auth-DJhSjNNL.mjs} +1 -1
- package/dist/{auth-CZqics6E.mjs → auth-sAorfdWU.mjs} +1 -1
- package/dist/{billing-CvTbUg-H.mjs → billing-DU2X-q-x.mjs} +1 -1
- package/dist/{bot-management-z53tbcbH.mjs → bot-management-BHAAoZOh.mjs} +1 -1
- package/dist/{botnet-feed-CSBbJdr_.mjs → botnet-feed-DOOnGVVY.mjs} +1 -1
- package/dist/{brand-protection-DzV211IQ.mjs → brand-protection-C_DYa7IK.mjs} +1 -1
- package/dist/{browser-extension-C0Hi9CHX.mjs → browser-extension-C48pKh3t.mjs} +1 -1
- package/dist/{browser-run-DYQvMAyo.mjs → browser-run-Dw-vgWGR.mjs} +1 -1
- package/dist/build-1a8CiNIT.mjs +2 -0
- package/dist/build-Ca_drQY2.mjs +2 -0
- package/dist/{builds-CwKRqjQ5.mjs → builds-CO0MmSd3.mjs} +1 -1
- package/dist/{cache-CugNPPsJ.mjs → cache-XxusQxXe.mjs} +1 -1
- package/dist/{certificate-authorities-DaEnJYge.mjs → certificate-authorities-Dmxh7w-Z.mjs} +1 -1
- package/dist/{client-certificates-DZUIqBTB.mjs → client-certificates-CgaIc3zN.mjs} +1 -1
- package/dist/{client-side-security-Dk6F1ENG.mjs → client-side-security-D7NWV0YH.mjs} +1 -1
- package/dist/{cloud-connector-avpf86kG.mjs → cloud-connector-XMFOTNqT.mjs} +1 -1
- package/dist/{cloudforce-one-DNRhUD8z.mjs → cloudforce-one-Cew4MHvA.mjs} +1 -1
- package/dist/{command-B2Qe-WUa.mjs → command-CsZFRm3P.mjs} +1 -1
- package/dist/{command-DIvPLK8x.mjs → command-DBz8QiFk.mjs} +1 -1
- package/dist/command-RiZ_LYcm.mjs +2 -0
- package/dist/{connector-interrupts-BSztJ-Ko.mjs → connector-interrupts-BfQN_pm6.mjs} +1 -1
- package/dist/{connector-telemetry-events-_M8CCK6_.mjs → connector-telemetry-events-B7qLZsZJ.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DySvmR9a.mjs → connector-telemetry-snapshots-Ckvg9BPc.mjs} +1 -1
- package/dist/{connectors-BSmhzNB7.mjs → connectors-BhvAP5fb.mjs} +1 -1
- package/dist/{containers-B5vDcFzo.mjs → containers-Bl3EY-cy.mjs} +1 -1
- package/dist/{containers-CFzvhmyz.mjs → containers-Cq1gtnq6.mjs} +1 -1
- package/dist/{content-scan-CeLZAcbT.mjs → content-scan-BYGe9fFj.mjs} +1 -1
- package/dist/{cps-BlI_Od72.mjs → cps-BWMDWeVq.mjs} +1 -1
- package/dist/{csamScanner-Cn7d0HWS.mjs → csamScanner-DMYGzLNi.mjs} +1 -1
- package/dist/{ct-alerting-lhgFPu-y.mjs → ct-alerting-Vq4l2s7n.mjs} +1 -1
- package/dist/{custom-certificates-Ba4Do5qt.mjs → custom-certificates-BDEHH0Ym.mjs} +1 -1
- package/dist/{custom-csrs-MNUIx8yX.mjs → custom-csrs-CHSkZNdX.mjs} +1 -1
- package/dist/{custom-hostnames-Dj1SBd0J.mjs → custom-hostnames-Bch3iQZC.mjs} +1 -1
- package/dist/{custom-nameservers-C7nzhNzV.mjs → custom-nameservers-Tdvu1-vr.mjs} +1 -1
- package/dist/{custom-pages-BgfhGksj.mjs → custom-pages-rFsiIXlr.mjs} +1 -1
- package/dist/{d1-P2kWbdID.mjs → d1-C1GK7DsW.mjs} +1 -1
- package/dist/{data-security-pBIozmRL.mjs → data-security-DDhPnX8Z.mjs} +1 -1
- package/dist/{dcv-delegation-Bpy9WnKZ.mjs → dcv-delegation-D6xiYj2l.mjs} +1 -1
- package/dist/{deploy-CVYdt3NK.mjs → deploy-D04Xvm0m.mjs} +1 -1
- package/dist/{deploy-input-DpOgndz4.mjs → deploy-input-COEKxOA1.mjs} +1 -1
- package/dist/{dev-PPUBjWcm.mjs → dev-CVD3BVUG.mjs} +1 -1
- package/dist/{diagnostics-C62habGQ.mjs → diagnostics-BZVAAguV.mjs} +1 -1
- package/dist/{dialog-C_ccBiZp.mjs → dialog--iw0F2s-.mjs} +1 -1
- package/dist/{dist-B4pQ4CXK.mjs → dist-CUUGKvjh.mjs} +1 -1
- package/dist/{dls-CpkcyQ8C.mjs → dls-BsnURYja.mjs} +1 -1
- package/dist/{dns-DG1X4Wap.mjs → dns-B_nTXhuM.mjs} +1 -1
- package/dist/{dns-firewall-B1gGHEDo.mjs → dns-firewall-DDsrdulo.mjs} +1 -1
- package/dist/{durable-objects-D214VhxH.mjs → durable-objects-8U8DpF9q.mjs} +1 -1
- package/dist/{email-auth-Ba4ONan2.mjs → email-auth-CzjtGH6g.mjs} +1 -1
- package/dist/{email-routing-BlqKnqNM.mjs → email-routing-B92fty1-.mjs} +1 -1
- package/dist/{email-security-Dl1E1Dko.mjs → email-security-keTqF0nJ.mjs} +1 -1
- package/dist/{email-sending-DIRSSRIz.mjs → email-sending-B7f95epu.mjs} +5 -5
- package/dist/error-sanitization-Cbd_oegl.mjs +2 -0
- package/dist/{error-sanitization-DOlqWkNu.mjs → error-sanitization-DwOlM3R7.mjs} +1 -1
- package/dist/{fieldExtractors-zqYKMCEn.mjs → fieldExtractors-DL_H1m7E.mjs} +1 -1
- package/dist/{firewall-DdsDh8GD.mjs → firewall-67qoXiqD.mjs} +1 -1
- package/dist/{flagship-CkUIVW7c.mjs → flagship-CjC3dF7L.mjs} +1 -1
- package/dist/{fraud-BUpZgvQT.mjs → fraud-DU_YCLC5.mjs} +1 -1
- package/dist/{google-tag-gateway-Bi1uLnEU.mjs → google-tag-gateway-xqN-QudN.mjs} +1 -1
- package/dist/{healthchecks-DjQWb3EM.mjs → healthchecks-COnq1YOx.mjs} +1 -1
- package/dist/{hostnames-ClBLPbct.mjs → hostnames-CxRAY_Pp.mjs} +1 -1
- package/dist/{hyperdrive-U54xZsWU.mjs → hyperdrive-DPWyiXpj.mjs} +1 -1
- package/dist/{iam-T-wWmOep.mjs → iam-CtX9NPCy.mjs} +1 -1
- package/dist/{images-ia5UG1GW.mjs → images-CuWFOsGw.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-BhswZLMI.mjs → intel-BeGV3VXt.mjs} +1 -1
- package/dist/{ips-Dad_EvhM.mjs → ips-d6aoKAI4.mjs} +1 -1
- package/dist/{keyless-certificates-BhHaxLjM.mjs → keyless-certificates-Dvib4jhw.mjs} +1 -1
- package/dist/{keys-DjIPvqj4.mjs → keys-Fyf3vWcA.mjs} +1 -1
- package/dist/{kv-DzXVnK94.mjs → kv-CA4J7cCq.mjs} +1 -1
- package/dist/{leaked-credential-checks-B9G_ZTNH.mjs → leaked-credential-checks-B7ewx3W-.mjs} +1 -1
- package/dist/{load-balancers-3wGHPsYz.mjs → load-balancers-DHD4f2CT.mjs} +1 -1
- package/dist/{login-CEQbOgBM.mjs → login-CLW108XX.mjs} +1 -1
- package/dist/{login-DEWvGuaU.mjs → login-xgRjiyJa.mjs} +1 -1
- package/dist/{logo-matches-YGRPstPi.mjs → logo-matches-BAX8v3iL.mjs} +1 -1
- package/dist/{logos-BirufUgo.mjs → logos-BWBVGwU6.mjs} +1 -1
- package/dist/{logpush-BlNbUHyV.mjs → logpush-CZKR8DHO.mjs} +1 -1
- package/dist/{logs-DmFlVF9q.mjs → logs-CiDyrqEu.mjs} +1 -1
- package/dist/{magic-cloud-networking-B3Wj2dhJ.mjs → magic-cloud-networking-DttrBXqd.mjs} +1 -1
- package/dist/{magic-network-monitoring-ry63w2Rw.mjs → magic-network-monitoring-9VXDSYuL.mjs} +1 -1
- package/dist/{magic-transit-CBVOK2aa.mjs → magic-transit-Dsu_cSGM.mjs} +1 -1
- package/dist/{managed-defense-BdW6s483.mjs → managed-defense-SYreve4W.mjs} +1 -1
- package/dist/{managed-transforms-BIeiofIS.mjs → managed-transforms-CzSy_xPw.mjs} +1 -1
- package/dist/{matches-CAnwci0P.mjs → matches-qf7GReyu.mjs} +1 -1
- package/dist/{mcp-BfhOMGFE.mjs → mcp-DYSk5_gc.mjs} +1 -1
- package/dist/{mesh-CxUL2Wf-.mjs → mesh-DdY07OYt.mjs} +1 -1
- package/dist/{mtls-certificates-CzmTw4zs.mjs → mtls-certificates-LXlgdkf1.mjs} +1 -1
- package/dist/{network-C68psMbz.mjs → network-DpaZ5LJL.mjs} +1 -1
- package/dist/{network-interconnects-CLsMrTuk.mjs → network-interconnects-C4uUoeNa.mjs} +1 -1
- package/dist/{oauth-D4bkeMAw.mjs → oauth-Dzk6Gy-6.mjs} +1 -1
- package/dist/{oauth-clients-DbUmVE_5.mjs → oauth-clients-D7Ou7oAS.mjs} +1 -1
- package/dist/{oauth-DouM-qz0.mjs → oauth-nsTDJ0dF.mjs} +1 -1
- package/dist/{oauth-scopes-CQ18rwBg.mjs → oauth-scopes-BFoE82Mv.mjs} +1 -1
- package/dist/{observability-DpYxkFeZ.mjs → observability-smcOFbC1.mjs} +1 -1
- package/dist/{organization-Dg55Xfz7.mjs → organization-Dyf_0mq4.mjs} +1 -1
- package/dist/{organizations-QnyzGjB2.mjs → organizations-D7zGPLVm.mjs} +1 -1
- package/dist/{origin-ca-certificates-Co5lqIGL.mjs → origin-ca-certificates-DJrp29gv.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Cz8JZamC.mjs → origin-post-quantum-encryption-BYj3kJiq.mjs} +1 -1
- package/dist/{origin-tls-client-auth-Dd0T1Kfv.mjs → origin-tls-client-auth-j0tGh6Fy.mjs} +1 -1
- package/dist/{page-rules--D3eXrCf.mjs → page-rules-CLzba_nr.mjs} +1 -1
- package/dist/{pages-Ce8DDgNr.mjs → pages-pah6dZBJ.mjs} +1 -1
- package/dist/{pay-per-crawl-CpkEbasz.mjs → pay-per-crawl-DbaTVI8V.mjs} +1 -1
- package/dist/{pay-per-use-fyM1DWgY.mjs → pay-per-use-BEvtoppJ.mjs} +1 -1
- package/dist/{pipelines-CAqCgBLh.mjs → pipelines-lps71uoA.mjs} +1 -1
- package/dist/{precursor-DBnn4Q35.mjs → precursor-DTTYLDEa.mjs} +1 -1
- package/dist/previews-B89cUmpr.mjs +4 -0
- package/dist/{progress-Bi02B6v4.mjs → progress-D_mL-Kcy.mjs} +1 -1
- package/dist/{prompt-Bx2PB-tt.mjs → prompt-sL_yMZbI.mjs} +1 -1
- package/dist/{queries-dg-CVXjf.mjs → queries-EJYlFw8m.mjs} +1 -1
- package/dist/{queues-C_ilLbRI.mjs → queues-CozKGaA4.mjs} +1 -1
- package/dist/{r2-hZAkra-l.mjs → r2-Chn_JQUM.mjs} +1 -1
- package/dist/{r2-data-catalog-DGv6aROr.mjs → r2-data-catalog-Bfn3AWzn.mjs} +1 -1
- package/dist/{radar-BO9b0aZy.mjs → radar-NmpdyMo5.mjs} +1 -1
- package/dist/{raw-fetch-DNTQkXbg.mjs → raw-fetch-lSVttVJF.mjs} +1 -1
- package/dist/{realtime-eSavuSeE.mjs → realtime-iWTz8WbH.mjs} +1 -1
- package/dist/{registrar-Ct30kOXZ.mjs → registrar-Cza1L8i_.mjs} +1 -1
- package/dist/{registrar-sandbox-Dmn9zGUk.mjs → registrar-sandbox-BP4GQg5s.mjs} +1 -1
- package/dist/{reporting-B-F5aWUJ.mjs → reporting-gvXX2MxY.mjs} +1 -1
- package/dist/{request-headers-Dnbzv6RZ.mjs → request-headers-POBKmu93.mjs} +1 -1
- package/dist/{request-tracers-CaubpUFV.mjs → request-tracers-F8a_aj32.mjs} +1 -1
- package/dist/{resource-sharing-6Snv-b69.mjs → resource-sharing-D6XWIDmb.mjs} +1 -1
- package/dist/{resource-tagging-W_LFiX2J.mjs → resource-tagging-c_z4VZt0.mjs} +1 -1
- package/dist/{rules-C26eyeA5.mjs → rules-_QDaG3U5.mjs} +1 -1
- package/dist/{rulesets-BKzIwVtJ.mjs → rulesets-Bc4ZuPG_.mjs} +1 -1
- package/dist/{rum-Xdw5hyWY.mjs → rum-ChPyfpM2.mjs} +1 -1
- package/dist/{run-BBBMrSrs.mjs → run-DtN51G2A.mjs} +1 -1
- package/dist/run-oACgYK8I.mjs +2 -0
- package/dist/{schema-DqtYndhB.mjs → schema-DZSSJaY0.mjs} +1 -1
- package/dist/{schema-flags-CebDI0f1.mjs → schema-flags-C9lbLgE-.mjs} +1 -1
- package/dist/{scim-odJTXiIe.mjs → scim-BjiswXbC.mjs} +1 -1
- package/dist/{sdk-CvIO3tWS.mjs → sdk-CsWOex96.mjs} +1 -1
- package/dist/{secrets-store-RYpWWzaw.mjs → secrets-store-Cn3D5a0d.mjs} +1 -1
- package/dist/{security-center-B3D95vCa.mjs → security-center-DP4GC1cG.mjs} +1 -1
- package/dist/{security-txt-BSytVv-9.mjs → security-txt-CaR5Idmz.mjs} +1 -1
- package/dist/shared-W9uoX1-W.mjs +2 -0
- package/dist/{smart-shield-C83Sfnf4.mjs → smart-shield-CphSzoh4.mjs} +1 -1
- package/dist/{snippets-B6oE9WIa.mjs → snippets-r-Mre0cE.mjs} +1 -1
- package/dist/{spawn-CKqJ9J4_.mjs → spawn-BWEuIO-w.mjs} +1 -1
- package/dist/{spectrum-CfxY--X_.mjs → spectrum-BhjCVFZk.mjs} +1 -1
- package/dist/{speed-DzK-kiWt.mjs → speed-CPgypY7n.mjs} +1 -1
- package/dist/{src-B3h6tKMt.mjs → src-Hw-TlVAO.mjs} +5 -5
- package/dist/{ssl-dnjzPcSB.mjs → ssl-DsMrXyqK.mjs} +1 -1
- package/dist/{stream-oFyhS4Wi.mjs → stream-L2NmGPby.mjs} +1 -1
- package/dist/{submit-4f-ravmC.mjs → submit-KN0Ul5fV.mjs} +1 -1
- package/dist/{tags-DrIP6Uiq.mjs → tags-CZMFKGdP.mjs} +1 -1
- package/dist/{telemetry-Ds4epd3D.mjs → telemetry-CSj_ezpk.mjs} +1 -1
- package/dist/telemetry-DAf9gLyH.mjs +2 -0
- package/dist/{tenant-C-gc3NWv.mjs → tenant-Cu4P-foo.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DduTQIwh.mjs → tenant-custom-nameservers-Nx59Buv0.mjs} +1 -1
- package/dist/{tunnels-D0QYsskp.mjs → tunnels-C-mMZy4v.mjs} +1 -1
- package/dist/{turnstile-C6Q3spRB.mjs → turnstile-39JL9tMt.mjs} +1 -1
- package/dist/{update-check-CTLoakFV.mjs → update-check-BKQBD4MQ.mjs} +1 -1
- package/dist/update-check-CE9XB6gf.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-Cs0V89qq.mjs → url-info-7ikewAnp.mjs} +1 -1
- package/dist/{url-normalization-DaEQYy5h.mjs → url-normalization-B0D7Fhf3.mjs} +1 -1
- package/dist/{url-scanner-C4YVeQ4v.mjs → url-scanner-DpKIqkin.mjs} +1 -1
- package/dist/{user-BV1VY3Kl.mjs → user-BFq8UM1s.mjs} +1 -1
- package/dist/{values-qDS63E43.mjs → values-DnBYV1ZD.mjs} +1 -1
- package/dist/{vectorize-NFzD3mP5.mjs → vectorize-BpZ4UsUj.mjs} +1 -1
- package/dist/version-Bh3b9vTa.mjs +2 -0
- package/dist/{waiting-rooms-Y9YGj3ih.mjs → waiting-rooms-DJfqehy9.mjs} +1 -1
- package/dist/{web-assets-Gd6z8dbt.mjs → web-assets-CCSSW_JH.mjs} +1 -1
- package/dist/{web3-DCJx4NRp.mjs → web3-bbT1REPc.mjs} +1 -1
- package/dist/{workers-B-j-1ygi.mjs → workers-CXuyjZB8.mjs} +20 -20
- package/dist/{workers-builds-DPrNKjZW.mjs → workers-builds-TRF3K416.mjs} +1 -1
- package/dist/{workers-for-platforms-BjKAhMLA.mjs → workers-for-platforms-B57iKiSN.mjs} +1 -1
- package/dist/{workers-vpc-C5YoCnQK.mjs → workers-vpc-kgryQ48l.mjs} +1 -1
- package/dist/{workflows-C2KKIJjl.mjs → workflows-CKdPlIkK.mjs} +1 -1
- package/dist/{zaraz-CVLCs1IX.mjs → zaraz-BXFlEWSx.mjs} +1 -1
- package/dist/{zero-trust-BtJi4OXF.mjs → zero-trust-M08mBsYd.mjs} +1 -1
- package/dist/{zone-hKgt0WzO.mjs → zone-DHmrotGW.mjs} +1 -1
- package/dist/{zones-CCNyaD3J.mjs → zones-C0eKBTqG.mjs} +1 -1
- package/package.json +15 -3
- package/dist/build-BPIp8J5F.mjs +0 -2
- package/dist/build-OC77a1zq.mjs +0 -2
- package/dist/command-D45NW-R3.mjs +0 -2
- package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
- package/dist/previews-y_nSqWK5.mjs +0 -4
- package/dist/run-BRucX7Rz.mjs +0 -2
- package/dist/shared-D67owd9x.mjs +0 -2
- package/dist/telemetry-mKEb8lYB.mjs +0 -2
- package/dist/update-check-BBS1K1jt.mjs +0 -2
- package/dist/version-W6_TN_kN.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-BiIYWOed.mjs";import{n as t,t as n}from"./local-B6b2OIBW.mjs";import{m as r,v as i}from"./oauth-
|
|
2
|
+
import{a as e}from"./theme-BiIYWOed.mjs";import{n as t,t as n}from"./local-B6b2OIBW.mjs";import{m as r,v as i}from"./oauth-Dzk6Gy-6.mjs";import{a,o,r as s}from"./auth-DJhSjNNL.mjs";import{t as c}from"./output-Bia1u2k5.mjs";import{t as l}from"./dry-run-CLX6Pbtq.mjs";import{t as u}from"./progress-D_mL-Kcy.mjs";import{n as d,t as f}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as p,t as m}from"./body-parser-CUWbw_Tq.mjs";import{n as h,t as g}from"./input-validation-Ch4Vllrm.mjs";import{a as _,i as v,n as y}from"./prompt-sL_yMZbI.mjs";import{t as b}from"./cli-types-tt_LZMbn.mjs";import{n as x}from"./raw-fetch-lSVttVJF.mjs";import{_ as S,c as C,d as w,f as T,g as ee,h as E,i as D,l as O,m as k,n as A,o as j,p as M,r as N,s as P,t as F}from"./schema-flags-C9lbLgE-.mjs";const I=`ai-model-schema`;async function L(e,t,n,r){let i=ee(I,[t,e]);if(i)return{ok:!0,schema:i};let a;try{let i=await n();if(r===void 0)a=await i.ai.getModelSchema({account_id:t,model:e});else{let n=r-Date.now();if(n<=0)return{ok:!1,reason:`the request timed out`};a=await i.ai.getModelSchema({account_id:t,model:e},{timeoutInSeconds:n/1e3,maxRetries:0})}}catch(e){return{ok:!1,reason:k(e)}}let o=E(a,`input`);return o?(S(I,[t,e],o),{ok:!0,schema:o}):{ok:!1,reason:`the API returned no input schema`}}const R="Run `cf ai models list` to see the models you can run.",z=[`model-name`,`modelName`];let B;function V(e){return B=e,e.positional(`model-name`,{type:`string`,description:`Model ID, e.g. @cf/meta/llama-3.1-8b-instruct`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this model's input flags`}).epilogue(`Input flags depend on the model: run \`cf ai run <model> --help\`.\n${R}`)}async function H(n){n.local&&console.log(`${t}\n`),B?.showHelp(`log`);let r=n[`model-name`];if(!r||n.local)return;let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the input flags for ${r}.`)}`);return}let c=await L(r,a,()=>s(n),i);console.log(c.ok?`\n${j(C(c.schema),`Input flags for ${r}`)}`:`\n${e.muted(`Could not load the input flags for ${r}: ${c.reason}.`)}`)}var U=d({command:`run [model-name]`,describe:"Run inference on a Workers AI model. Input flags are model-specific — see `cf ai run <model> --help`",builder:V,handler:async e=>{if(e.help){await H(e);return}if(e.local)throw Error(t);let n=e[`model-name`];if(!n)throw Error(`A model is required: cf ai run <model>. ${R}`);let o=e.dryRun?await i()??`<account-id>`:await r(),d=n.split(`/`).map(encodeURIComponent).join(`/`),f;if(e.body!==void 0){if(O(e,z).length>0)throw Error(`--body cannot be combined with model input flags. Pass one or the other.`);f=p(e.body)}else{let t=await L(n,o,()=>s(e));if(!t.ok)throw Error(`Could not load the input schema for ${n}: ${t.reason}.\nPass the request body directly instead: cf ai run ${n} --body '{…}'`);let r=C(t.schema),i=O(e,[...z,...A(r)]);if(i.length>0)throw Error(`${i.map(e=>`Unknown flag --${e}`).join(`
|
|
3
3
|
`)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);let a=new Set;for(;;){let t=D(r,e).find(e=>!a.has(e.name)&&(e.choices!==void 0||e.type===`string`));if(!t)break;a.add(t.name),t.choices?e[t.name]=await v(t.name,P(t),t.choices,t.choiceLabels):e[t.name]=await _(t.name,P(t))}let c=N(t.schema),l=F(r,e,{reserved:z}),u=l.errors.length===0?c?w(t.schema,l.body):T(t.schema,l.body):l.errors;if(u.length>0)throw Error(`${u.join(`
|
|
4
4
|
`)}\n\nRun \`cf ai run ${n} --help\` for this model's input flags.`);f=l.body}if(e.dryRun){l({command:`cf ai run`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${o}/ai/run/${d}`,pathParams:{"model-name":n},bodyKind:`json`,body:f});return}let m=await s(e);e.accountId=o;let h=await u(`Running`,async()=>a(m,`POST`,`/accounts/${o}/ai/run/${d}`,{body:f,preserveNonJsonBytes:!0}));if(Buffer.isBuffer(h)){x(h);return}c(h,{successLabel:`Ran`})}},{command:`ai run`,recordArgs:!1});function W(e){return e.usage(`$0 ai authors list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{a as t,r as n}from"./auth-DJhSjNNL.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-D_mL-Kcy.mjs";import{t as o}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as s}from"./body-parser-CUWbw_Tq.mjs";function c(e){return e.usage(`$0 ai-audit robots bulk-get
|
|
3
3
|
|
|
4
4
|
Fetches and parses robots.txt files for multiple domains within a zone in a single request. Each domain must belong to the specified zone. Results are keyed by hostname.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Array of domain hostnames to fetch robots.txt for. Each domain must end with the zone name. Maximum 25 domains per request.`})}const l={command:`bulk-get`,describe:`Bulk get robots.txt rules`,builder:c,handler:async c=>o({command:`ai-audit robots bulk-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf ai-audit robots bulk-get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ai-audit/robots/bulk`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>25){let n=Math.ceil(e.length/25),i=null;for(let r=0;r<e.length;r+=25){let s=e.slice(r,r+25);i=await a(`Loading: batch ${Math.floor(r/25)+1}/${n}`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:s}))}r(i,{successLabel:`Loaded`});return}r(await a(`Loading`,async()=>t(o,`POST`,`/zones/${c.zoneId}/ai-audit/robots/bulk`,{body:e})),{successLabel:`Loaded`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function u(e){return e.usage(`$0 ai-audit robots get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 ai-gateway account-providers costs create
|
|
3
3
|
|
|
4
4
|
Creates a new AI Gateway.`).option(`account-provider-id`,{type:`string`,description:`The account_provider_id field`}).option(`cost-in`,{type:`number`,description:`The cost_in field`}).option(`cost-out`,{type:`number`,description:`The cost_out field`}).option(`cost-type`,{type:`string`,description:`The cost_type field`,default:`tokens`}).option(`enable`,{type:`boolean`,description:`The enable field`}).option(`model`,{type:`string`,description:`The model field`}).option(`model-rule`,{type:`string`,description:`The model_rule field`,choices:[`equals`,`starts-with`,`contains`],default:`equals`}).option(`token-pricing-input-audio-tokens`,{type:`number`,description:`The token_pricing.input_audio_tokens field`}).option(`token-pricing-input-cache-creation-tokens`,{type:`number`,description:`The token_pricing.input_cache_creation_tokens field`}).option(`token-pricing-input-cached-tokens`,{type:`number`,description:`The token_pricing.input_cached_tokens field`}).option(`token-pricing-input-image-count`,{type:`number`,description:`The token_pricing.input_image_count field`}).option(`token-pricing-input-image-tokens`,{type:`number`,description:`The token_pricing.input_image_tokens field`}).option(`token-pricing-input-text-tokens`,{type:`number`,description:`The token_pricing.input_text_tokens field`}).option(`token-pricing-input-tokens`,{type:`number`,description:`The token_pricing.input_tokens field`}).option(`token-pricing-input-video-tokens`,{type:`number`,description:`The token_pricing.input_video_tokens field`}).option(`token-pricing-output-image-count`,{type:`number`,description:`The token_pricing.output_image_count field`}).option(`token-pricing-output-reasoning-tokens`,{type:`number`,description:`The token_pricing.output_reasoning_tokens field`}).option(`token-pricing-output-tokens`,{type:`number`,description:`The token_pricing.output_tokens field`}).option(`token-pricing-total-tokens`,{type:`number`,description:`The token_pricing.total_tokens field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create a new Account Provider Cost`,builder:ee,handler:async l=>s({command:`ai-gateway account-providers costs create`,classification:{safeFlags:[`enable`,`model-rule`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf ai-gateway account-providers costs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-gateway/custom-providers/costs`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({account_provider_id:d(l[`account-provider-id`],`account-provider-id`,`text`),cost_in:l[`cost-in`],cost_out:l[`cost-out`],cost_type:d(l[`cost-type`],`cost-type`,`text`),enable:l.enable,model:d(l.model,`model`,`text`),model_rule:d(l[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:l[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:l[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:l[`token-pricing-input-cached-tokens`],input_image_count:l[`token-pricing-input-image-count`],input_image_tokens:l[`token-pricing-input-image-tokens`],input_text_tokens:l[`token-pricing-input-text-tokens`],input_tokens:l[`token-pricing-input-tokens`],input_video_tokens:l[`token-pricing-input-video-tokens`],output_image_count:l[`token-pricing-output-image-count`],output_reasoning_tokens:l[`token-pricing-output-reasoning-tokens`],output_tokens:l[`token-pricing-output-tokens`],total_tokens:l[`token-pricing-total-tokens`]}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.aiGateway.accountProviders.costs.create({...e,account_id:p})),{successLabel:`Created`});return}l[`account-provider-id`]===void 0&&(l[`account-provider-id`]=await f(`account-provider-id`,`The account_provider_id field`)),l.model===void 0&&(l.model=await f(`model`,`The model field`));let m=u({account_provider_id:d(l[`account-provider-id`],`account-provider-id`,`text`),cost_in:l[`cost-in`],cost_out:l[`cost-out`],cost_type:d(l[`cost-type`],`cost-type`,`text`),enable:l.enable,model:d(l.model,`model`,`text`),model_rule:d(l[`model-rule`],`model-rule`,`text`),token_pricing:{input_audio_tokens:l[`token-pricing-input-audio-tokens`],input_cache_creation_tokens:l[`token-pricing-input-cache-creation-tokens`],input_cached_tokens:l[`token-pricing-input-cached-tokens`],input_image_count:l[`token-pricing-input-image-count`],input_image_tokens:l[`token-pricing-input-image-tokens`],input_text_tokens:l[`token-pricing-input-text-tokens`],input_tokens:l[`token-pricing-input-tokens`],input_video_tokens:l[`token-pricing-input-video-tokens`],output_image_count:l[`token-pricing-output-image-count`],output_reasoning_tokens:l[`token-pricing-output-reasoning-tokens`],output_tokens:l[`token-pricing-output-tokens`],total_tokens:l[`token-pricing-total-tokens`]}});i(await o(`Creating`,async()=>s.aiGateway.accountProviders.costs.create({...m,account_id:p})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 ai-gateway account-providers costs delete <id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-sL_yMZbI.mjs";import{t as _}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-lSVttVJF.mjs";function v(e){return e.usage(`$0 ai-search chat-completions <id>
|
|
3
3
|
|
|
4
4
|
Performs a chat completion request against an AI Search instance, using indexed content as context for generating responses.`).positional(`id`,{type:`string`,description:`AI Search instance ID.`,demandOption:!0}).option(`name`,{type:`string`,description:`Namespace to use for this operation.`,demandOption:!0}).option(`ai-search-options-cache-cache-threshold`,{type:`string`,description:`The ai_search_options.cache.cache_threshold field`,choices:[`super_strict_match`,`close_enough`,`flexible_friend`,`anything_goes`]}).option(`ai-search-options-cache-enabled`,{type:`boolean`,description:`The ai_search_options.cache.enabled field`}).option(`ai-search-options-query-rewrite-enabled`,{type:`boolean`,description:`The ai_search_options.query_rewrite.enabled field`}).option(`ai-search-options-query-rewrite-model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`ai-search-options-query-rewrite-rewrite-prompt`,{type:`string`,description:`The ai_search_options.query_rewrite.rewrite_prompt field`}).option(`ai-search-options-reranking-enabled`,{type:`boolean`,description:`The ai_search_options.reranking.enabled field`}).option(`ai-search-options-reranking-match-threshold`,{type:`number`,description:`The ai_search_options.reranking.match_threshold field`}).option(`ai-search-options-reranking-model`,{type:`string`,description:`The ai_search_options.reranking.model field`}).option(`ai-search-options-retrieval-context-expansion`,{type:`number`,description:`The ai_search_options.retrieval.context_expansion field`}).option(`ai-search-options-retrieval-fusion-method`,{type:`string`,description:`The ai_search_options.retrieval.fusion_method field`,choices:[`max`,`rrf`]}).option(`ai-search-options-retrieval-keyword-match-mode`,{type:`string`,description:`Controls which documents are candidates for BM25 scoring. 'and' restricts candidates to documents containing all query terms; 'or' includes any document containing at least one term, ranked by BM25 relevance. When omitted, falls back to the instance-level retrieval_options.keyword_match_mode, then to 'and'.`,choices:[`and`,`or`]}).option(`ai-search-options-retrieval-match-threshold`,{type:`number`,description:`The ai_search_options.retrieval.match_threshold field`}).option(`ai-search-options-retrieval-max-num-results`,{type:`number`,description:`The ai_search_options.retrieval.max_num_results field`}).option(`ai-search-options-retrieval-retrieval-type`,{type:`string`,description:`The ai_search_options.retrieval.retrieval_type field`,choices:[`vector`,`keyword`,`hybrid`]}).option(`ai-search-options-retrieval-return-on-failure`,{type:`boolean`,description:`The ai_search_options.retrieval.return_on_failure field`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`model`,{type:`string`,description:`A Workers AI model ID or an AI Gateway model ID compatible with the OpenAI Chat Completions API. An empty string uses the configured or default model.`}).option(`stream`,{type:`boolean`,description:`The stream field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`chat-completions <id>`,describe:`Chat Completions`,builder:v,handler:async r=>c({command:`ai-search chat-completions`,classification:{safeFlags:[`ai-search-options-cache-cache-threshold`,`ai-search-options-cache-enabled`,`ai-search-options-query-rewrite-enabled`,`ai-search-options-reranking-enabled`,`ai-search-options-retrieval-fusion-method`,`ai-search-options-retrieval-keyword-match-mode`,`ai-search-options-retrieval-retrieval-type`,`ai-search-options-retrieval-return-on-failure`,`stream`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf ai-search chat-completions`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/ai-search/namespaces/${r.name==null?`<name>`:encodeURIComponent(String(r.name))}/instances/${r.id==null?`<id>`:encodeURIComponent(String(r.id))}/chat/completions`,pathParams:{id:String(r.id??``),name:String(r.name??``)},bodyKind:`json`,body:r.body===void 0?d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream}):l(r.body)});return}let c=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...e,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`});return}if(r.messages===void 0)throw Error(`--messages is required (or pass --body with this field set).`);let m=d({ai_search_options:{cache:{cache_threshold:f(r[`ai-search-options-cache-cache-threshold`],`ai-search-options-cache-cache-threshold`,`text`),enabled:r[`ai-search-options-cache-enabled`]},query_rewrite:{enabled:r[`ai-search-options-query-rewrite-enabled`],model:f(r[`ai-search-options-query-rewrite-model`],`ai-search-options-query-rewrite-model`,`text`),rewrite_prompt:f(r[`ai-search-options-query-rewrite-rewrite-prompt`],`ai-search-options-query-rewrite-rewrite-prompt`,`text`)},reranking:{enabled:r[`ai-search-options-reranking-enabled`],match_threshold:r[`ai-search-options-reranking-match-threshold`],model:f(r[`ai-search-options-reranking-model`],`ai-search-options-reranking-model`,`text`)},retrieval:{context_expansion:r[`ai-search-options-retrieval-context-expansion`],fusion_method:f(r[`ai-search-options-retrieval-fusion-method`],`ai-search-options-retrieval-fusion-method`,`text`),keyword_match_mode:f(r[`ai-search-options-retrieval-keyword-match-mode`],`ai-search-options-retrieval-keyword-match-mode`,`text`),match_threshold:r[`ai-search-options-retrieval-match-threshold`],max_num_results:r[`ai-search-options-retrieval-max-num-results`],retrieval_type:f(r[`ai-search-options-retrieval-retrieval-type`],`ai-search-options-retrieval-retrieval-type`,`text`),return_on_failure:r[`ai-search-options-retrieval-return-on-failure`]}},messages:u(r.messages,`messages`),model:f(r.model,`model`,`text`),stream:r.stream});a(await s(`Creating`,async()=>c.aiSearch.chatCompletions({...m,account_id:p,name:r.name,id:r.id})),{successLabel:`Created`})})};function b(e){return e.usage(`$0 ai-search create <name> <id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./prompt-sL_yMZbI.mjs";function u(e){return e.usage(`$0 ai-security custom-topics get
|
|
3
3
|
|
|
4
4
|
Get the custom topic categories defined for the zone. While AI Security for Apps is enabled, it scores every incoming prompt against these topics and writes the scores to the \`cf.llm.prompt.custom_topic_categories\` field, keyed by topic label. Topics can be configured while the detection is disabled, but no prompt is scored until you enable it.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get the AI Security for Apps custom topics of a zone.`,builder:u,handler:async o=>a({command:`ai-security custom-topics get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf ai-security custom-topics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.aiSecurity.customTopics.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 ai-security custom-topics update\n\nUpdate the custom topic list of the zone, overwriting it entirely with the topics in the request, so include every topic you want to keep. Changes can take up to a minute to propagate. Each entry has a `label`, used to reference the topic in rule expressions and analytics, and a `topic` description, which the classifier scores prompts against while AI Security for Apps is enabled. The following rules apply: - A zone can hold at most 20 topics. - `label` must be 2–20 characters, using only lowercase letters (a–z), digits (0–9), and hyphens. - `topic` must be 2–50 printable ASCII characters. - Labels must be unique within the zone, and so must topic descriptions.").option(`topics`,{type:`string`,description:`Custom topic categories for AI Security for Apps content detection. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`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 p={command:`update`,describe:`Update the AI Security for Apps custom topics of a zone.`,builder:f,handler:async u=>a({command:`ai-security custom-topics update`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){r({command:`cf ai-security custom-topics update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/ai-security/custom-topics`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({topics:s(u.topics,`topics`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,!await l({force:!!u.force,message:`This operation overwrites the AI Security for Apps custom topics for a zone.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}if(u.body){let e=o(u.body);n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:e,zone_id:d})),{successLabel:`Deleted`});return}let f=c({topics:s(u.topics,`topics`)});n(await i(`Deleting`,async()=>a.aiSecurity.customTopics.update({body:f,zone_id:d})),{successLabel:`Deleted`})})},m={command:`custom-topics`,describe:`Organization-specific topic categories used by AI Security for Apps content detection`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.usage(`$0 ai-security get
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{n as m,t as h}from"./raw-fetch-lSVttVJF.mjs";function ee(e){return e.usage(`$0 alerting available-alerts list
|
|
3
3
|
|
|
4
4
|
Gets a list of all alert types for which an account is eligible.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`Get Alert Types`,builder:ee,handler:async c=>s({command:`alerting available-alerts list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf alerting available-alerts list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/alerting/v3/available_alerts`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.alerting.availableAlerts.list({account_id:l})),{successLabel:`Loaded`})})},_={command:`available-alerts`,describe:`Operations for available-alerts`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.usage(`$0 alerting destinations eligible get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as u,n as d,r as f,t as p}from"./body-parser-CUWbw_Tq.mjs";import{n as m,t as h}from"./input-validation-Ch4Vllrm.mjs";import{a as g}from"./prompt-sL_yMZbI.mjs";function _(e){return e.usage(`$0 analytics latency colos get
|
|
3
3
|
|
|
4
4
|
Retrieves Argo Smart Routing analytics broken down by geographic points of presence (PoPs). Shows latency improvements and routing efficiency per location.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get`,describe:`Argo Analytics for a zone at different PoPs`,builder:_,handler:async e=>l({command:`analytics latency colos get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf analytics latency colos get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/analytics/latency/colos`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.analytics.latency.colos.get({zone_id:r})),{successLabel:`Loaded`})})},y={command:`colos`,describe:`Operations for latency.colos`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 analytics latency get
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 analytics_engine sql query
|
|
3
3
|
|
|
4
4
|
Executes a SQL query against Workers Analytics Engine data. Pass the SQL query in the request body as plain text. The response uses newline-delimited JSON (NDJSON) by default, or a single JSON object when the query includes a FORMAT JSON clause. Prefer this method for longer queries that may exceed URL length limits.`).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`})}const f={command:`query`,describe:`Execute an Analytics Engine SQL query via request body`,builder:d,handler:async d=>c({command:`analytics_engine sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){o({command:`cf analytics_engine sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/analytics_engine/sql`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await i(d),f=d.local?e:await t();if(d.accountId=f,d.file){let e=u(d.file);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(d.body){let e=l(d.body,`body`,`binary`);a(await s(`Loading`,async()=>r(c,`POST`,`/accounts/${f}/analytics_engine/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}a(await s(`Loading`,async()=>c.analyticsEngine.sql.query({account_id:f})),{successLabel:`Loaded`})})},p={command:`sql`,describe:`Operations for sql`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},m={command:`analytics_engine`,describe:`analytics_engine`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-Dzk6Gy-6.mjs";import{a as i,r as a}from"./auth-DJhSjNNL.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-D_mL-Kcy.mjs";import{t as l}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-sL_yMZbI.mjs";import{t as _}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 api-security schema-validation schemas create
|
|
3
3
|
|
|
4
4
|
Uploads an OpenAPI schema that defines expected request formats for API operations.`).option(`kind`,{type:`string`,description:`The kind of the schema`,choices:[`openapi_v3`]}).option(`name`,{type:`string`,description:`A human-readable name for the schema`}).option(`source`,{type:`string`,description:`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`}).option(`validation-enabled`,{type:`boolean`,description:`An indicator if this schema is enabled`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Upload a schema`,builder:ee,handler:async e=>l({command:`api-security schema-validation schemas create`,classification:{safeFlags:[`kind`,`validation-enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf api-security schema-validation schemas create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/schema_validation/schemas`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]}):u(e.body)});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=u(e.body);o(await c(`Creating`,async()=>n.apiSecurity.schemaValidation.schemas.create({...t,zone_id:r})),{successLabel:`Created`});return}if(e.kind===void 0&&(e.kind=await h(`kind`,`The kind of the schema`,[`openapi_v3`])),e.name===void 0&&(e.name=await m(`name`,`A human-readable name for the schema`)),e.source===void 0&&(e.source=await m(`source`,`The raw schema, e.g., the OpenAPI schema, either as JSON or YAML`)),e[`validation-enabled`]===void 0)throw Error(`--validation-enabled is required (or pass --body with this field set).`);let i=f({kind:p(e.kind,`kind`,`text`),name:p(e.name,`name`,`text`),source:p(e.source,`source`,`text`),validation_enabled:e[`validation-enabled`]});o(await c(`Creating`,async()=>n.apiSecurity.schemaValidation.schemas.create({...i,zone_id:r})),{successLabel:`Created`})})};function v(e){return e.usage(`$0 api-security schema-validation schemas delete <schema-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l}from"./prompt-sL_yMZbI.mjs";function u(e){return e.usage(`$0 argo smart-routing edit
|
|
3
3
|
|
|
4
4
|
Configures the value of the Argo Smart Routing enablement setting.`).option(`value`,{type:`string`,description:`Specifies the enablement value of Argo Smart Routing.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Configures the enablement of Argo Smart Routing.`})}const d={command:`edit`,describe:`Patch Argo Smart Routing setting`,builder:u,handler:async u=>a({command:`argo smart-routing edit`,classification:{safeFlags:[`value`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf argo smart-routing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/argo/smart_routing`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({value:c(u.value,`value`,`text`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...e,zone_id:d})),{successLabel:`Updated`});return}u.value===void 0&&(u.value=await l(`value`,`Specifies the enablement value of Argo Smart Routing.`,[`on`,`off`]));let f=s({value:c(u.value,`value`,`text`)});n(await i(`Updating`,async()=>a.argo.smartRouting.edit({...f,zone_id:d})),{successLabel:`Updated`})})};function f(e){return e.usage(`$0 argo smart-routing get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-sL_yMZbI.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";import{n as m,t as h}from"./raw-fetch-lSVttVJF.mjs";function ee(e){return e.usage(`$0 artifacts namespaces create
|
|
3
3
|
|
|
4
4
|
Creates an empty Artifacts namespace for an account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`unrestricted`,`us`,`eu`,`fedramp`],default:`unrestricted`}).option(`namespace`,{type:`string`,description:`The namespace field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create a namespace`,builder:ee,handler:async f=>s({command:`artifacts namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf artifacts namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/artifacts/namespaces`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...e,account_id:p})),{successLabel:`Created`});return}f.namespace===void 0&&(f.namespace=await d(`namespace`,`The namespace field`));let m=l({jurisdiction:u(f.jurisdiction,`jurisdiction`,`text`),namespace:u(f.namespace,`namespace`,`text`)});i(await o(`Creating`,async()=>s.artifacts.namespaces.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 artifacts namespaces delete <namespace>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{t as c}from"./cli-types-tt_LZMbn.mjs";function l(e){return e.usage(`$0 audit-logs list
|
|
3
3
|
|
|
4
4
|
Gets a list of audit logs for an account. Can be filtered by who made the change, on which zone, and the timeframe of the change.`).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`export`,{type:`boolean`,description:`Indicates that this request is an export of logs in CSV format.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-ip`,{type:`string`,description:`Filters by the IP address of the request that made the change by specific IP address or valid CIDR Range.`}).option(`actor-email`,{type:`string`,description:`Filters by the email address of the actor that made the change.`}).option(`since`,{type:`string`,description:"Limits the returned results to logs newer than the specified date. A `full-date` that conforms to RFC3339."}).option(`before`,{type:`string`,description:"Limits the returned results to logs older than the specified date. A `full-date` that conforms to RFC3339."}).option(`zone-name`,{type:`string`,description:`Filters by the name of the zone associated to the change.`}).option(`direction`,{type:`string`,description:`Changes the direction of the chronological sorting.`,choices:[`desc`,`asc`]}).option(`per-page`,{type:`number`,description:`Sets the number of results to return per page.`}).option(`page`,{type:`number`,description:`Defines which page of results to return.`}).option(`hide-user-logs`,{type:`boolean`,description:`Indicates whether or not to hide user level audit logs.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`list`,describe:`Get account audit logs`,builder:c(l),handler:async c=>s({command:`audit-logs list`,classification:{safeFlags:[`export`,`direction`,`hide-user-logs`,`dry-run`]}},c,async()=>{let s={id:c.id,export:c.export,"action.type":c[`action-type`],"actor.ip":c[`actor-ip`],"actor.email":c[`actor-email`],since:c.since,before:c.before,"zone.name":c[`zone-name`],direction:c.direction,per_page:c[`per-page`],page:c.page,hide_user_logs:c[`hide-user-logs`]};if(c.dryRun){a({command:`cf audit-logs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/audit_logs`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.auditLogs.list({account_id:u,...s})),{successLabel:`Loaded`})})},d={command:`audit-logs`,describe:`audit-logs`,builder:e=>e.command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{d as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e,r as t,t as n}from"./sdk-
|
|
2
|
+
import{n as e,r as t,t as n}from"./sdk-CsWOex96.mjs";import{E as r}from"./dist-dc4E1u01.mjs";import{o as i}from"./chunk-XLADBZ7F-BXKOjWbx.mjs";import{h as a,s as o,v as s}from"./oauth-Dzk6Gy-6.mjs";import{n as c}from"./request-headers-POBKmu93.mjs";const l=3e4,u=e.Default;function d(e){return e instanceof FormData||e instanceof Blob||e instanceof ArrayBuffer||ArrayBuffer.isView(e)||e instanceof ReadableStream||e instanceof URLSearchParams}function f(e){return Object.keys(e).some(e=>e.toLowerCase()===`content-type`)}async function p(e){let t=e.headers.get(`content-type`)??``;try{return t.includes(`application/json`)?await e.json():await e.text()}catch{return null}}function m(e,t,n){if(!(n==null||n===``)){if(Array.isArray(n)){for(let r of n)m(e,t,r);return}e.append(t,String(n))}}function h(e){let t=new URLSearchParams;for(let[n,r]of Object.entries(e))m(t,n,r);return t.toString()}function g(e,t,n){let r=new URL(t.endsWith(`/`)?t:`${t}/`),i=new URL(e.startsWith(`/`)?e.slice(1):e,r);if(i.origin!==r.origin)throw Error(`Refusing to send an authenticated request to ${i.origin} (expected ${r.origin})`);let a=h(n??{});return a&&(i.search=a),i.toString()}const _=new WeakMap;async function v(e,n,r,i={}){let a=g(r,_.get(e)??u,i.query),o={...i.headers},s;i.body!==void 0&&(d(i.body)||typeof i.body==`string`&&f(o)?s=i.body:(o[`Content-Type`]??=`application/json`,s=JSON.stringify(i.body)));let c;try{c=await e.fetch(a,{method:n,headers:o,body:s,signal:i.signal},{timeoutInSeconds:i.timeout?i.timeout/1e3:void 0,abortSignal:i.signal})}catch(e){throw i.signal?.aborted?Error(`Request aborted`):e instanceof Error&&e.name===`AbortError`?Error(`Request timed out after ${i.timeout??3e4}ms`):e instanceof Error?Error(`Request failed: ${e.message}`):e}if(!c.ok)throw new t({statusCode:c.status,body:await p(c),rawResponse:{status:c.status,statusText:c.statusText,url:c.url||a,headers:c.headers,redirected:c.redirected,type:c.type}});if(c.status===204)return null;let l=c.headers.get(`content-type`)??``;if(!l.includes(`application/json`)&&i.preserveNonJsonBytes)return Buffer.from(await c.arrayBuffer());let m=await c.text();if(m===``)return null;if(!l.includes(`application/json`))return m;let h=JSON.parse(m);if(h.success===!1)throw new t({message:`API error: ${h.errors?.map(e=>e.message).filter(Boolean).join(`, `)||`unknown error`}`,statusCode:c.status,body:h});return`result`in h?h.result:h}function y(e){let t=e.baseURL??u,r=new n({baseUrl:t,auth:async()=>({headers:{Authorization:`Bearer ${e.apiToken}`}}),headers:e.defaultHeaders,timeoutInSeconds:(e.timeout??3e4)/1e3,maxRetries:0,fetch:e.fetch??globalThis.fetch});return _.set(r,t),r}async function b(){let e=i({allowGlobalAuthKey:!1});if(e&&`apiToken`in e)return e.apiToken;let t=await o();if(t)return t;throw Error(`No authentication token found.
|
|
3
3
|
|
|
4
4
|
Please set one of the following:
|
|
5
5
|
1. Set the CLOUDFLARE_API_TOKEN environment variable
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-BiIYWOed.mjs";import{a as t,i as n,r}from"./ui-DH95w1Qk.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-
|
|
2
|
+
import{a as e}from"./theme-BiIYWOed.mjs";import{a as t,i as n,r}from"./ui-DH95w1Qk.mjs";import{c as i,d as a,i as o,p as s,r as c,t as l,u}from"./oauth-Dzk6Gy-6.mjs";import{i as d,n as f}from"./auth-DJhSjNNL.mjs";import{t as p}from"./output-Bia1u2k5.mjs";import{n as m}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{a as h,c as g,i as _,n as v,o as y,r as b,s as x,t as S}from"./login-CLW108XX.mjs";const C={command:`logout`,describe:`Log out and remove stored credentials`,handler:async a=>{_(a,`logout`,"Run `cf auth delete <name>` to remove a named profile.");let l=c();l!==`default`&&console.log(t(`This directory has profile "${l}" active. \`cf auth logout\` removes the default profile's token, not "${l}".\nTo delete "${l}", run \`cf auth delete ${l}\`.`)),s(`default`);let d=i(),f=!!process.env.CLOUDFLARE_API_TOKEN;if(!d){f?(console.log(n(`No cf OAuth credentials found, but CLOUDFLARE_API_TOKEN environment variable is set.`)),console.log(n(`Unset it with: unset CLOUDFLARE_API_TOKEN`))):(console.log(n(`You are not currently logged in.`)),console.log(r(`Run ${e.code(`cf auth login`)} to authenticate.`)));return}console.log(n(`Logging out...`)),await u(`default`),console.log(`${e.info(`Removed:`)} OAuth tokens from ${e.muted(o())}`),f&&(console.log(``),console.log(t(`CLOUDFLARE_API_TOKEN environment variable is still set.`)),console.log(n(`You will remain authenticated via the env var. Unset it with: unset CLOUDFLARE_API_TOKEN`)))}},w={command:`whoami`,describe:`Show current user and authentication status`,builder:e=>e,handler:async e=>{let t=process.env.CLOUDFLARE_API_TOKEN,n=a(),r;r=t?`CLOUDFLARE_API_TOKEN environment variable`:n?.oauth_token?`OAuth token from ${o()}`:`none`;let i;try{i=await d()}catch{p({authenticated:!1,error:`Not logged in`});return}let s=f({apiToken:i}),c,u=[],[m,h]=await Promise.allSettled([s.user.get(),l()]);if(m.status===`fulfilled`){let e=m.value;e&&`email`in e&&typeof e.email==`string`&&(c=e.email)}else process.env.DEBUG&&console.error(`User lookup error:`,m.reason);h.status===`fulfilled`?u=h.value:process.env.DEBUG&&console.error(`Account lookup error:`,h.reason);let g=m.status===`fulfilled`||h.status===`fulfilled`,_={authenticated:!0,authSource:r,tokenValid:g,...c&&{email:c},accounts:u};n?.oauth_token&&(_.scopes=n.scopes,_.expiresAt=n.expiration_time),p(_)}},T={command:`auth`,describe:`Manage authentication and profiles`,builder:e=>e.command(m(S,{command:`auth login`,classification:v})).command(E(C,`auth logout`)).command(E(w,`auth whoami`)).command(E(h,`auth create`,[`browser`,`device`])).command(E(x,`auth delete`)).command(E(b,`auth activate`)).command(E(y,`auth deactivate`)).command(E(g,`auth list`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e,t,n=[],r){return m(e,{command:t,classification:{safeFlags:n,shortFlagAliases:r}})}export{T as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{n as f}from"./prompt-sL_yMZbI.mjs";function p(e){return e.usage(`$0 billing addresses validate
|
|
3
3
|
|
|
4
4
|
Validates a billing address and returns validated address suggestions. Authentication is not enforced to support pre-signup address validation flows, so credentials are accepted but not required.`).option(`address`,{type:`string`,description:`Address line 1.`}).option(`address2`,{type:`string`,description:`Address line 2.`}).option(`city`,{type:`string`,description:`City.`}).option(`country`,{type:`string`,description:`Country code.`}).option(`state`,{type:`string`,description:`State or province.`}).option(`zipcode`,{type:`string`,description:`Postal or zip code.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`validate`,describe:`Validate Billing Address`,builder:p,handler:async e=>s({command:`billing addresses validate`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){a({command:`cf billing addresses validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/billing/address-validation`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)}):c(e.body)});return}let t=await r(e);if(e.body){let n=c(e.body);i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`});return}let n=u({address:d(e.address,`address`,`text`),address2:d(e.address2,`address2`,`text`),city:d(e.city,`city`,`text`),country:d(e.country,`country`,`text`),state:d(e.state,`state`,`text`),zipcode:d(e.zipcode,`zipcode`,`text`)});i(await o(`Creating`,async()=>t.billing.addresses.validate({...n})),{successLabel:`Created`})})},h={command:`addresses`,describe:`Operations for addresses`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 billing profiles create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u}from"./prompt-sL_yMZbI.mjs";function d(e){return e.usage("$0 bot-management feedback create\n\nSubmit a feedback report for the specified zone. Use `type` to indicate whether the report is a false positive (good traffic flagged as bot) or a false negative (bot traffic missed). Furthermore, you can also use `expression` as a wirefilter to identify the affected traffic sample. See more accepted API fields and expression types at https://developers.cloudflare.com/bots/concepts/feedback-loop/#api-fields and https://developers.cloudflare.com/bots/concepts/feedback-loop/#expression-fields, respectively.").option(`description`,{type:`string`,description:`The description field`}).option(`expression`,{type:`string`,description:`Wirefilter expression describing the traffic being reported.`}).option(`first-request-seen-at`,{type:`string`,description:`The first_request_seen_at field`}).option(`last-request-seen-at`,{type:`string`,description:`The last_request_seen_at field`}).option(`requests`,{type:`number`,description:`The requests field`}).option(`subtype`,{type:`string`,description:`The subtype field`}).option(`type`,{type:`string`,description:`Type of feedback report.`,choices:[`false_positive`,`false_negative`]}).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 f={command:`create`,describe:`Submit a feedback report`,builder:d,handler:async d=>a({command:`bot-management feedback create`,classification:{safeFlags:[`type`,`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf bot-management feedback create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${d.zone??d.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(d.zone??d[`zone-id`]??``)},bodyKind:`json`,body:d.body===void 0?s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)}):o(d.body)});return}let a=await t(d),f=await e({zone:d.zone},a,{quiet:d.quiet});if(d.zoneId=f,d.body){let e=o(d.body);n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:e,zone_id:f})),{successLabel:`Created`});return}if(d.description===void 0&&(d.description=await l(`description`,`The description field`)),d.expression===void 0&&(d.expression=await l(`expression`,`Wirefilter expression describing the traffic being reported.`)),d[`first-request-seen-at`]===void 0&&(d[`first-request-seen-at`]=await l(`first-request-seen-at`,`The first_request_seen_at field`)),d[`last-request-seen-at`]===void 0&&(d[`last-request-seen-at`]=await l(`last-request-seen-at`,`The last_request_seen_at field`)),d.requests===void 0)throw Error(`--requests is required (or pass --body with this field set).`);d.type===void 0&&(d.type=await u(`type`,`Type of feedback report.`,[`false_positive`,`false_negative`]));let p=s({description:c(d.description,`description`,`text`),expression:c(d.expression,`expression`,`text`),first_request_seen_at:c(d[`first-request-seen-at`],`first-request-seen-at`,`text`),last_request_seen_at:c(d[`last-request-seen-at`],`last-request-seen-at`,`text`),requests:d.requests,subtype:c(d.subtype,`subtype`,`text`),type:c(d.type,`type`,`text`)});n(await i(`Creating`,async()=>a.botManagement.feedback.create({body:p,zone_id:f})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 bot-management feedback list
|
|
3
3
|
|
|
4
4
|
Returns all feedback reports previously submitted for the specified zone. Feedback reports help improve detection by sharing samples of traffic that were misclassified as bots or humans.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List zone feedback reports`,builder:p,handler:async o=>a({command:`bot-management feedback list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf bot-management feedback list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/bot_management/feedback`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.botManagement.feedback.list({zone_id:s})),{successLabel:`Loaded`})})},h={command:`feedback`,describe:`Operations for feedback`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 bot-management get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c}from"./prompt-sL_yMZbI.mjs";function l(e){return e.usage(`$0 botnet-feed asn day-report <asn-id>
|
|
3
3
|
|
|
4
4
|
Gets all the data the botnet tracking database has for a given ASN registered to user account for given date. If no date is given, it will return results for the previous day.`).positional(`asn-id`,{type:`string`,description:`Asn ID`,demandOption:!0}).option(`date`,{type:`string`,description:`Date`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`day-report <asn-id>`,describe:`Get daily report`,builder:l,handler:async c=>s({command:`botnet-feed asn day-report`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={date:c.date};if(c.dryRun){a({command:`cf botnet-feed asn day-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/botnet_feed/asn/${c[`asn-id`]==null?`<asn-id>`:encodeURIComponent(String(c[`asn-id`]))}/day_report`,pathParams:{"asn-id":String(c[`asn-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.botnetFeed.asn.dayReport({account_id:u,asn_id:c[`asn-id`],...s})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 botnet-feed asn full-report <asn-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function g(e){return e.usage(`$0 brand-protection logo-matches get
|
|
3
3
|
|
|
4
4
|
Get paginated list of logo matches for a specific brand protection logo query`).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`query-id`,{type:`string`,description:`Query ID`,demandOption:!0}).option(`download`,{type:`string`,description:`Download`}).option(`order-by`,{type:`string`,description:`Column to sort by. Options: 'matchedAt', 'domain', 'similarityScore', or 'registrar'`,choices:[`matchedAt`,`domain`,`similarityScore`,`registrar`]}).option(`order`,{type:`string`,description:`Sort order. Options: 'asc' (ascending) or 'desc' (descending)`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`get`,describe:`List logo matches`,builder:h(g),handler:async c=>s({command:`brand-protection logo-matches get`,classification:{safeFlags:[`order-by`,`order`,`dry-run`]}},c,async()=>{let s={offset:c.offset,limit:c.limit,query_id:c[`query-id`],download:c.download,orderBy:c[`order-by`],order:c.order};if(c.dryRun){a({command:`cf brand-protection logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/v2/brand-protection/logo/matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.brandProtection.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},v={command:`logo-matches`,describe:`Operations for logo-matches`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.usage(`$0 brand-protection logos create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,n as p}from"./prompt-sL_yMZbI.mjs";function m(e){return e.usage(`$0 browser-extension config create
|
|
3
3
|
|
|
4
4
|
Creates the browser extension configuration for an account.`).option(`config-min-extension-version`,{type:`string`,description:`Minimum required browser extension version.`}).option(`config-team-name`,{type:`string`,description:"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`create`,describe:`Create browser extension configuration`,builder:m,handler:async l=>s({command:`browser-extension config create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf browser-extension config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-extension/config`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.browserExtension.config.create({...e,account_id:p})),{successLabel:`Created`});return}l[`config-team-name`]===void 0&&(l[`config-team-name`]=await f(`config-team-name`,"Access team name. The service derives `team_domain` as `<team_name>.cloudflareaccess.com`."));let m=u({config:{min_extension_version:d(l[`config-min-extension-version`],`config-min-extension-version`,`text`),team_name:d(l[`config-team-name`],`config-team-name`,`text`)}});i(await o(`Creating`,async()=>s.browserExtension.config.create({...m,account_id:p})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 browser-extension config delete
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p}from"./input-validation-Ch4Vllrm.mjs";import{n as m}from"./prompt-sL_yMZbI.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";import{n as g,t as _}from"./raw-fetch-lSVttVJF.mjs";function v(e){return e.usage("$0 browser-run crawl create\n\nStarts a crawl job for the provided URL and its children. Check available options like `gotoOptions` and `waitFor*` to control page load behaviour.").option(`cache-ttl`,{type:`number`,description:`Cache TTL default is 5s. Set to 0 to disable.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ee={command:`create`,describe:`Crawl websites.`,builder:v,handler:async l=>c({command:`browser-run crawl create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={cacheTTL:l[`cache-ttl`]};if(l.dryRun){o({command:`cf browser-run crawl create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-rendering/crawl`,pathParams:{},query:c,bodyKind:`json`,body:l.body===void 0?void 0:u(l.body)});return}let d=await i(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=u(l.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString(),a(await s(`Creating`,async()=>d.browserRun.crawl.create({body:e,account_id:f,...c})),{successLabel:`Created`});return}a(await s(`Creating`,async()=>r(d,`POST`,`/accounts/${f}/browser-rendering/crawl`,{query:c})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 browser-run crawl delete <job-id>
|
|
3
3
|
|
|
4
4
|
Cancels an ongoing crawl job by setting its status to cancelled and stopping all queued URLs.`).positional(`job-id`,{type:`string`,description:`The ID of the crawl job to cancel.`,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 <job-id>`,describe:`Cancel a crawl job.`,builder:te,handler:async r=>c({command:`browser-run crawl delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf browser-run crawl delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/browser-rendering/crawl/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}a(await s(`Deleting`,async()=>c.browserRun.crawl.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 browser-run crawl get <job-id>
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./src-Hw-TlVAO.mjs";import{v as t}from"./dist-dc4E1u01.mjs";import{a as n,o as r}from"./theme-BiIYWOed.mjs";import"./ui-DH95w1Qk.mjs";import{n as i}from"./dist-BpadEMNY.mjs";import{a,i as o,n as s,r as c,t as l}from"./spawn-BWEuIO-w.mjs";import u from"node:path";import{readBuildOutput as d}from"@cloudflare/build-output-utils";import{convertToWranglerConfig as f}from"@cloudflare/config";var p=class extends Error{constructor(e){super(e),this.name=`BuildOutputConfigError`}};function m(e,t,n={}){if(e===void 0){if(n.requireRequestedMode&&t!==void 0)throw new p(`The Build Output was created with mode "${t}", but this command did not specify a mode. Rerun with "--mode ${t}".`);return}if(t===void 0)throw new p(`The Build Output does not record which mode it was created with, but this command requested mode "${e}". Rebuild with "--mode ${e}" before deploying.`);if(t!==e)throw new p(`The Build Output was created with mode "${t}", but this command requested mode "${e}". To use the existing Build Output, rerun with "--mode ${t}". To deploy in ${e} mode, rebuild with "--mode ${e}" before deploying.`)}const h={type:`string`,description:`Name of the Worker in the Build Output to use (defaults to the default Worker)`,requiresArg:!0,coerce:e=>{if(Array.isArray(e))throw Error(`--worker can only be specified once.`);return e}};function g(e,t){if(t===void 0)return e.default;let n=Object.values(e).filter(e=>e.config.name===t);if(n.length>1)throw new p(`The Build Output contains more than one Worker named "${t}".`);if(n[0]!==void 0)return n[0];let{default:r,...i}=e;throw new p(`The Build Output has no Worker named "${t}". Available Workers: ${[`${r.config.name} (default)`,...Object.values(i).map(e=>e.config.name).sort()].join(`, `)}.`)}function _(e,t){let n=e.config,{buildContext:r,...i}=t,{manifest:a,...o}=n,s=f({...i,worker:o,containers:[]});n.manifest?.mainModule&&e.bundleDir&&(s.main=u.join(e.bundleDir,n.manifest.mainModule));let c=u.resolve(`cloudflare.config.ts`),{validationConfig:l,containerReferences:d}=y(s),p=v(l,e.configPath,c);b(p,d);let{containers:m,...h}=p;return{wranglerConfig:h,builtConfig:n}}function v(e,n,r){let{config:i,diagnostics:a}=t(e,n,r,{});if(a.hasErrors())throw new p(a.renderErrors());return a.hasWarnings()&&console.warn(a.renderWarnings()),i}function y(e){let{containers:t,...n}=e,r=new Map;return n.exports!==void 0&&(n.exports=Object.fromEntries(Object.entries(n.exports).map(([e,t])=>{if(!(`container`in t)||typeof t.container!=`string`)return[e,t];r.set(e,t.container);let{container:n,...i}=t;return[e,i]}))),{validationConfig:n,containerReferences:r}}function b(e,t){e.exports===void 0||t.size===0||(e.exports=Object.fromEntries(Object.entries(e.exports).map(([e,n])=>{let r=t.get(e);return[e,r===void 0?n:{...n,container:r}]})))}function x(e){return e}async function S(t,{worker:u,...f}={},p={}){let m=f.output??`stdout`,h=process.cwd(),v=await c(h,f),y=v?.buildCommand,b={...v?.env,...p.isPreview?{CLOUDFLARE_PREVIEW_BUILD:`true`}:{}};if(v&&!v.configured&&(y=(await o(v,f)).buildCommand),y&&t&&!v?.framework?.supportsMode)throw Error(`The detected command \`${y}\` does not currently support \`--mode\`.`);m!==`silent`&&i.message(n.bold(`Build`),{symbol:r.dim(`├`),spacing:0,output:m===`stderr`?process.stderr:void 0});let x=t?[`--mode`,t]:[],S;if(y)S=await a(y,h,{...f,env:b,args:x});else{let e=s(h);m!==`silent`&&i.message(`Delegating to ${C(e)}`,{spacing:0,output:m===`stderr`?process.stderr:void 0}),S=await l(e,`build`,x,{...f,env:b})}if(S.exitCode!==0||S.signal)throw new e(S.exitCode,{signal:S.signal});let{workers:w,rootConfig:T}=await d(h);_(g(w,u),T),m!==`silent`&&i.success(`Build complete`,{spacing:0,output:m===`stderr`?process.stderr:void 0})}function C(e){switch(e.impl.pkg){case`@cloudflare/vite-plugin`:return`Vite`;case`wrangler`:return`Wrangler`;case`cloudflare-py-dev-server`:return`the Python dev server`;case`cloudflare-rs-dev-server`:return`the Rust dev server`;default:return e.impl.pkg}}const w={command:`build`,describe:`Build a project for Cloudflare`,builder:x,handler:async e=>{await S(e.mode)}};export{g as a,_ as i,S as n,m as o,h as r,p as s,w as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-sL_yMZbI.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 builds cancel <build-uuid>
|
|
3
3
|
|
|
4
4
|
Cancel a queued or running build.`).positional(`build-uuid`,{type:`string`,description:`Build UUID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`cancel <build-uuid>`,describe:`Cancel a Workers build`,builder:h,handler:async c=>s({command:`builds cancel`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf builds cancel`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/builds/builds/${c[`build-uuid`]==null?`<build-uuid>`:encodeURIComponent(String(c[`build-uuid`]))}/cancel`,pathParams:{"build-uuid":String(c[`build-uuid`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Updating`,async()=>s.builds.cancel({account_id:l,build_uuid:c[`build-uuid`]})),{successLabel:`Updated`})})};function te(e){return e.usage(`$0 builds create <trigger-uuid>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{a as t,r as n}from"./auth-DJhSjNNL.mjs";import{t as r}from"./output-Bia1u2k5.mjs";import{t as i}from"./dry-run-CLX6Pbtq.mjs";import{t as a}from"./progress-D_mL-Kcy.mjs";import{t as o}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,i as d,n as f}from"./prompt-sL_yMZbI.mjs";function p(e){return e.usage("$0 cache origin-cloud-regions bulk-delete\n\nRemoves up to 100 IP-to-cloud-region mappings in a single request. Each IP is validated independently — successfully deleted items are returned in the `succeeded` array and IPs that could not be found or are invalid are returned in the `failed` array.").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:`bulk-delete`,describe:`Batch delete origin cloud region mappings`,builder:p,handler:async c=>o({command:`cache origin-cloud-regions bulk-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),!await f({force:!!c.force,message:`Are you sure you want to delete these Origin Cloud Region configurations?`})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}if(c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Deleting: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Deleted`});return}r(await a(`Deleting`,async()=>t(o,`DELETE`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Deleted`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage("$0 cache origin-cloud-regions bulk-update\n\nUpserts up to 100 IP-to-cloud-region mappings in a single request. Items in the request body are created or replaced; mappings not included in the request body are preserved unchanged (this is a merge operation, not a full collection replacement). Each item is validated independently — valid items are applied and invalid items are returned in the `failed` array. The vendor and region for every item are validated against the list from `GET /zones/{zone_id}/origin/cloud_regions/supported_regions`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const h={command:`bulk-update`,describe:`Batch create or replace origin cloud region mappings`,builder:m,handler:async c=>o({command:`cache origin-cloud-regions bulk-update`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){i({command:`cf cache origin-cloud-regions bulk-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/origin/cloud_regions/batch`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let o=await n(c);if(c.zoneId=await e({zone:c.zone},o,{quiet:c.quiet}),c.body){let e=s(c.body);if(Array.isArray(e)&&e.length>100){let n=Math.ceil(e.length/100),i=null;for(let r=0;r<e.length;r+=100){let s=e.slice(r,r+100);i=await a(`Updating: batch ${Math.floor(r/100)+1}/${n}`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:s}))}r(i,{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(o,`PUT`,`/zones/${c.zoneId}/origin/cloud_regions/batch`,{body:e})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function g(e){return e.usage(`$0 cache origin-cloud-regions delete <origin-ip>
|
|
4
4
|
|
|
5
5
|
Removes the cloud region mapping for a single origin IP address. The IP path parameter is normalized before lookup. Returns the deleted IP on success. Returns 404 if no mapping exists for the specified IP. When the last mapping for the zone is removed the underlying rule record is also deleted.`).positional(`origin-ip`,{type:`string`,description:`Origin IP address whose mapping should be deleted.`,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 _={command:`delete <origin-ip>`,describe:`Delete an origin cloud region mapping`,builder:g,handler:async t=>o({command:`cache origin-cloud-regions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){i({command:`cf cache origin-cloud-regions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/origin/cloud_regions/${t[`origin-ip`]==null?`<origin-ip>`:encodeURIComponent(String(t[`origin-ip`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"origin-ip":String(t[`origin-ip`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await f({force:!!t.force,message:`Are you sure you want to delete this Origin Cloud Region configuration?`})){process.stderr.write(`Aborted.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";function l(e){return e.usage(`$0 certificate-authorities hostname-associations get
|
|
3
3
|
|
|
4
4
|
List Hostname Associations.`).option(`mtls-certificate-id`,{type:`string`,description:`The UUID to match against for a certificate that was uploaded to the mTLS Certificate Management endpoint. If no mtls_certificate_id is given, the results will be the hostnames associated to your active Cloudflare Managed CA.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`get`,describe:`List Hostname Associations`,builder:l,handler:async o=>a({command:`certificate-authorities hostname-associations get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{let a={mtls_certificate_id:o[`mtls-certificate-id`]};if(o.dryRun){r({command:`cf certificate-authorities hostname-associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/certificate_authorities/hostname_associations`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.certificateAuthorities.hostnameAssociations.get({zone_id:c,...a})),{successLabel:`Loaded`})})};function d(e){return e.usage(`$0 certificate-authorities hostname-associations update
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-sL_yMZbI.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 client-certificates create
|
|
3
3
|
|
|
4
4
|
Create a new API Shield mTLS Client Certificate.`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`validity-days`,{type:`number`,description:`The number of days the Client Certificate will be valid after the issued_on date.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Client Certificate`,builder:f,handler:async u=>a({command:`client-certificates create`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf client-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/client_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Creating`,async()=>a.clientCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await l(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u[`validity-days`]===void 0)throw Error(`--validity-days is required (or pass --body with this field set).`);let f=s({csr:c(u.csr,`csr`,`text`),validity_days:u[`validity-days`]});n(await i(`Creating`,async()=>a.clientCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 client-certificates delete <client-certificate-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-sL_yMZbI.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 client-side-security connections get <connection-id>
|
|
3
3
|
|
|
4
4
|
Returns a webpage connection detected on the zone by connection ID.`).positional(`connection-id`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <connection-id>`,describe:`Get a detected connection`,builder:p,handler:async o=>a({command:`client-side-security connections get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf client-side-security connections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/page_shield/connections/${o[`connection-id`]==null?`<connection-id>`:encodeURIComponent(String(o[`connection-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"connection-id":String(o[`connection-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.clientSideSecurity.connections.get({zone_id:s,connection_id:o[`connection-id`]})),{successLabel:`Loaded`})})};function h(e){return e.usage(`$0 client-side-security connections list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-Dzk6Gy-6.mjs";import{r as t}from"./auth-DJhSjNNL.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{t as a}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as o}from"./body-parser-CUWbw_Tq.mjs";function s(e){return e.usage(`$0 cloud-connector rules list
|
|
3
3
|
|
|
4
4
|
Retrieves the Cloud Connector rules configured for a zone. Rules define how traffic is routed to cloud services.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`Rules`,builder:s,handler:async o=>a({command:`cloud-connector rules list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf cloud-connector rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cloud_connector/rules`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.cloudConnector.rules.list({zone_id:s})),{successLabel:`Loaded`})})};function l(e){return e.usage(`$0 cloud-connector rules update
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{a as r,r as i}from"./auth-DJhSjNNL.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-D_mL-Kcy.mjs";import{t as c}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-sL_yMZbI.mjs";import{t as v}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-lSVttVJF.mjs";function y(e){return e.usage(`$0 cloudforce-one binary-storage create
|
|
3
3
|
|
|
4
4
|
Uploads a binary file to Cloudforce One's binary database for malware analysis and threat intelligence correlation.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Binary file to be uploaded to the database.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const b={command:`create`,describe:`Posts a file to Binary Storage`,builder:y,handler:async l=>c({command:`cloudforce-one binary-storage create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){o({command:`cf cloudforce-one binary-storage create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/cloudforce-one/binary`,pathParams:{},bodyKind:`multipart`,body:{body:l.body,file:l.file}});return}let c=await i(l),u=l.local?e:await t();if(l.accountId=u,l.file!==void 0||l.body!==void 0){let e=new FormData;if(l.file){let t=m(l.file);e.append(`file`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`file`,l.body);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e})),{successLabel:`Created`});return}if(l.body){let e=p(l.body,`body`,`binary`);a(await s(`Creating`,async()=>r(c,`POST`,`/accounts/${u}/cloudforce-one/binary`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function x(e){return e.usage(`$0 cloudforce-one binary-storage get <hash>
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./src-
|
|
2
|
+
import{t as e}from"./src-Hw-TlVAO.mjs";import{n as t,t as n}from"./cloudflared-DhItYrCq.mjs";const r={command:`quick-start <url>`,describe:`Expose a local URL with a temporary trycloudflare.com tunnel. The tunnel remains active until cf exits.`,builder:e=>e.positional(`url`,{type:`string`,description:`Local URL to expose (for example, http://localhost:3000)`,demandOption:!0}).option(`log-level`,{type:`string`,choices:n,default:`info`,description:`cloudflared log level`}),handler:async n=>{throw n.local?Error(`--local is not supported by cf tunnels quick-start.`):new e(await t([`tunnel`,`--url`,n.url,`--loglevel`,n[`log-level`]]))}};export{r as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./src-
|
|
2
|
+
import{t as e}from"./src-Hw-TlVAO.mjs";import{r as t}from"./resolve-CUDKxUrW.mjs";import{m as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./progress-D_mL-Kcy.mjs";import{n as a,t as o}from"./cloudflared-DhItYrCq.mjs";const s=1e3;async function c(e,n,r){if(t(r))return r;let i=0,a;for(let t=1;;t++){let o=await e.tunnel.list({account_id:n,name:r,is_deleted:!1,page:t,per_page:s}),c=o.result??[];for(let e of c)e.name===r&&(i++,a=e.id);let l=o.result_info?.per_page||s;if(c.length<l)break}if(i===0)throw Error(`"${r}" is neither the ID nor the name of any tunnel. Run \`cf tunnels list\` to see available tunnels.`);if(i>1)throw Error(`Found multiple tunnels named "${r}". Pass the tunnel UUID instead.`);if(!a)throw Error(`Tunnel "${r}" was found but has no ID. Pass the tunnel UUID instead.`);return a}async function l(e,t,n){let r=await e.tunnels.token.get({account_id:t,tunnel_id:n});if(typeof r!=`string`||r.length===0)throw Error(`The API returned an empty token for tunnel ${n}.`);return r}function u(e){return e.positional(`tunnel`,{type:`string`,description:`Tunnel name or UUID; required unless --token is provided`}).option(`token`,{type:`string`,description:`Tunnel token supplied directly to cloudflared`}).option(`log-level`,{type:`string`,choices:o,default:`info`,description:`cloudflared log level`})}const d={command:`run [tunnel]`,describe:`Run a named Cloudflare Tunnel using the cf-managed cloudflared binary.`,builder:u,handler:async t=>{if(t.local)throw Error(`--local is not supported by cf tunnels run.`);let o=t.token,s=t.tunnel;if(!o){if(!s)throw Error(`Either a tunnel name/UUID or --token must be provided.`);let e=await r(t),a=await n();o=await i(`Fetching tunnel token`,async()=>l(e,a,await c(e,a,s)))}let u=[`tunnel`,`--loglevel`,t[`log-level`]];throw u.push(`run`),new e(await a(u,{env:{TUNNEL_TOKEN:o}}))}};export{d as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{d as e}from"./dist-dc4E1u01.mjs";import{t}from"./chunk-QBZBEHZB-Byagrlop.mjs";import{i as n,n as r,t as i}from"./startup-profile-CgWHy4rE.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{a as s,i as c,n as l,o as u,r as d,s as f}from"./build-1a8CiNIT.mjs";import{t as p}from"./deploy-input-COEKxOA1.mjs";import m from"node:path";import{writeFile as h}from"node:fs/promises";import{readBuildOutput as g}from"@cloudflare/build-output-utils";function _(e){return e.option(`outfile`,{type:`string`,description:`Output file for the startup CPU profile`,default:`worker-startup.cpuprofile`,requiresArg:!0}).option(`prebuilt`,{type:`boolean`,description:`Use existing Build Output Specification files without building`,default:!1}).option(`worker`,d)}const v={command:`check`,describe:`Profile a Worker's startup performance`,builder:_,handler:async d=>{if(d.local)throw Error(`--local is not supported by cf workers check.`);d.prebuilt||await l(d.mode,{output:d.quiet?`silent`:`stderr`,worker:d.worker});let{workers:_,rootConfig:v}=await g(process.cwd());u(d.mode,v.buildContext.mode,{requireRequestedMode:d.prebuilt});let y=s(_,d.worker),{wranglerConfig:b,builtConfig:x}=c(y,v),S=p(y,x);if(!S.resolvedEntryPointPath)throw new f(`Startup profiling requires a Worker entrypoint; assets-only projects cannot be profiled.`);if(S.bundleType===`commonjs`)throw new f(`Startup profiling does not support service-worker format Workers. Refer to https://developers.cloudflare.com/workers/reference/migrate-to-module-workers/ for migration guidance.`);let C=t({name:b.name??y.config.name??`worker`,main:{name:x.manifest?.mainModule??m.basename(S.resolvedEntryPointPath),filePath:S.resolvedEntryPointPath,content:S.content,type:S.bundleType},modules:S.modules,sourceMaps:S.sourceMaps,compatibility_date:b.compatibility_date,compatibility_flags:b.compatibility_flags??[],assets:void 0,containers:void 0,migrations:void 0,exports:void 0,keepVars:void 0,keepSecrets:void 0,logpush:void 0,placement:void 0,tail_consumers:void 0,streaming_tail_consumers:void 0,limits:void 0,annotations:void 0,observability:void 0,cache:void 0,package_dependencies:void 0},e(b),{dryRun:!0,unsafe:b.unsafe}),w=await r(C),T=d.quiet?await i(C):await o(`Profiling Worker startup`,()=>i(C)),E=n(T);await h(d.outfile,JSON.stringify(T)),a({bundle:{sizeBytes:w.size,gzipSizeBytes:w.gzipSize},startup:{profileWindowMs:E.profileWindow/1e3,sampledTimeMs:E.sampledTime/1e3,activeTimeMs:E.activeTime/1e3,garbageCollectionTimeMs:E.garbageCollectionTime/1e3,idleTimeMs:E.idleTime/1e3,sampleCount:E.sampleCount},profile:d.outfile,note:`This profile was measured locally. Use it to understand where startup time is spent, not to predict startup time on Cloudflare.`},{quiet:d.quiet})}};export{v as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";function u(e){return e.usage(`$0 connector-interrupts create <connector-id>
|
|
3
3
|
|
|
4
4
|
Creates an interrupt for a Magic WAN Connector.`).positional(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`reboot-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`restart-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`shutdown-purge`,{type:`boolean`,description:`Purge connector state.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Interrupt action for a connector.`})}const d={command:`create <connector-id>`,describe:`Create Interrupt`,builder:u,handler:async u=>s({command:`connector-interrupts create`,classification:{safeFlags:[`reboot-purge`,`restart-purge`,`shutdown-purge`,`dry-run`]}},u,async()=>{if(u.dryRun){a({command:`cf connector-interrupts create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${u[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(u[`connector-id`]))}/interrupts`,pathParams:{"connector-id":String(u[`connector-id`]??``)},bodyKind:`json`,body:u.body===void 0?l({reboot:{purge:u[`reboot-purge`]},restart:{purge:u[`restart-purge`]},shutdown:{purge:u[`shutdown-purge`]}}):c(u.body)});return}let s=await r(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=c(u.body);i(await o(`Creating`,async()=>s.connectorInterrupts.create({...e,account_id:d,connector_id:u[`connector-id`]})),{successLabel:`Created`});return}let f=l({reboot:{purge:u[`reboot-purge`]},restart:{purge:u[`restart-purge`]},shutdown:{purge:u[`shutdown-purge`]}});i(await o(`Creating`,async()=>s.connectorInterrupts.create({...f,account_id:d,connector_id:u[`connector-id`]})),{successLabel:`Created`})})};function f(e){return e.usage(`$0 connector-interrupts list
|
|
5
5
|
|
package/dist/{connector-telemetry-events-_M8CCK6_.mjs → connector-telemetry-events-B7qLZsZJ.mjs}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 connector-telemetry-events get <event-n>
|
|
3
3
|
|
|
4
4
|
Gets Magic WAN Connector Telemetry Event`).positional(`event-n`,{type:`string`,description:`Event n`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`event-t`,{type:`string`,description:`Event t`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get <event-n>`,describe:`Get Event`,builder:c,handler:async c=>s({command:`connector-telemetry-events get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connector-telemetry-events get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/events/${c[`event-t`]==null?`<event-t>`:encodeURIComponent(String(c[`event-t`]))}.${c[`event-n`]==null?`<event-n>`:encodeURIComponent(String(c[`event-n`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``),"event-t":String(c[`event-t`]??``),"event-n":String(c[`event-n`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectorTelemetryEvents.get({account_id:l,connector_id:c[`connector-id`],event_t:c[`event-t`],event_n:c[`event-n`]})),{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 connector-telemetry-events list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";function c(e){return e.usage(`$0 connector-telemetry-snapshots get <snapshot-t>
|
|
3
3
|
|
|
4
4
|
Gets Magic WAN Connector Telemetry Snapshot`).positional(`snapshot-t`,{type:`string`,description:`Snapshot t`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`Connector ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`get <snapshot-t>`,describe:`Get Snapshot`,builder:c,handler:async c=>s({command:`connector-telemetry-snapshots get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf connector-telemetry-snapshots get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors/${c[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(c[`connector-id`]))}/telemetry/snapshots/${c[`snapshot-t`]==null?`<snapshot-t>`:encodeURIComponent(String(c[`snapshot-t`]))}`,pathParams:{"connector-id":String(c[`connector-id`]??``),"snapshot-t":String(c[`snapshot-t`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.connectorTelemetrySnapshots.get({account_id:l,connector_id:c[`connector-id`],snapshot_t:c[`snapshot-t`]})),{successLabel:`Loaded`})})};function u(e){return e.usage(`$0 connector-telemetry-snapshots list
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-Dzk6Gy-6.mjs";import{r}from"./auth-DJhSjNNL.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-D_mL-Kcy.mjs";import{t as s}from"./run-DtN51G2A.mjs";import"./telemetry-DAf9gLyH.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{n as d}from"./prompt-sL_yMZbI.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 connectors create
|
|
3
3
|
|
|
4
4
|
Creates a Magic WAN Connector.`).option(`device-id`,{type:`string`,description:`The device.id field`}).option(`device-provision-license`,{type:`boolean`,description:`When true, create and provision a new licence key for the connector.`}).option(`device-serial-number`,{type:`string`,description:`The device.serial_number field`}).option(`activated`,{type:`boolean`,description:`The activated field`}).option(`interrupt-window-days-of-week`,{type:`string`,array:!0,description:`Allowed days of the week for upgrades. Default is all days.`}).option(`interrupt-window-duration-hours`,{type:`number`,description:`The interrupt_window_duration_hours field`}).option(`interrupt-window-embargo-dates`,{type:`string`,array:!0,description:`List of dates (YYYY-MM-DD) when upgrades are blocked.`}).option(`interrupt-window-hour-of-day`,{type:`number`,description:`The interrupt_window_hour_of_day field`}).option(`notes`,{type:`string`,description:`The notes field`}).option(`timezone`,{type:`string`,description:`The timezone field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create Connector`,builder:p,handler:async d=>s({command:`connectors create`,classification:{safeFlags:[`device-provision-license`,`activated`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf connectors create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/magic/connectors`,pathParams:{},bodyKind:`json`,body:d.body===void 0?l({device:{id:u(d[`device-id`],`device-id`,`text`),provision_license:d[`device-provision-license`],serial_number:u(d[`device-serial-number`],`device-serial-number`,`text`)},activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.connectors.create({...e,account_id:f})),{successLabel:`Created`});return}let p=l({device:{id:u(d[`device-id`],`device-id`,`text`),provision_license:d[`device-provision-license`],serial_number:u(d[`device-serial-number`],`device-serial-number`,`text`)},activated:d.activated,interrupt_window_days_of_week:d[`interrupt-window-days-of-week`],interrupt_window_duration_hours:d[`interrupt-window-duration-hours`],interrupt_window_embargo_dates:d[`interrupt-window-embargo-dates`],interrupt_window_hour_of_day:d[`interrupt-window-hour-of-day`],notes:u(d.notes,`notes`,`text`),timezone:u(d.timezone,`timezone`,`text`)});i(await o(`Creating`,async()=>s.connectors.create({...p,account_id:f})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 connectors delete <connector-id>
|
|
5
5
|
|