cf 1.0.0-beta.18 → 1.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/_meta/commands.json +3003 -1544
- package/dist/_meta/hand-written-commands.json +6 -0
- package/dist/_meta/schemas.json +2127 -1070
- package/dist/{abuse-reports-Ce-g5uZP.mjs → abuse-reports-DhgunVFo.mjs} +3 -3
- package/dist/{access-BtsMwesh.mjs → access-BDoDq_WZ.mjs} +1 -1
- package/dist/{accounts-X5QVzEUW.mjs → accounts-DLTCzZJg.mjs} +24 -26
- package/dist/{acm-C_NepMi6.mjs → acm-DS1CosYq.mjs} +1 -1
- package/dist/{addressing-BkQY1hoA.mjs → addressing-DFeYj8TY.mjs} +2 -2
- package/dist/{agent-memory-1OPgC3lK.mjs → agent-memory-DXjQ8N0g.mjs} +1 -1
- package/dist/{ai-Bb0_Zknm.mjs → ai-V5YopMkS.mjs} +4 -4
- package/dist/{ai-audit-DuEjVdML.mjs → ai-audit-yg8D0azz.mjs} +2 -2
- package/dist/{ai-gateway-Cm2vWMSI.mjs → ai-gateway--dkH9qGz.mjs} +13 -13
- package/dist/ai-search-BRtsUaUI.mjs +79 -0
- package/dist/{ai-security-A2STvE1b.mjs → ai-security-DRJCcLpF.mjs} +1 -1
- package/dist/{alerting-CIwSk-Ks.mjs → alerting-8DsyMKGG.mjs} +30 -30
- package/dist/{analytics-H--uM3DA.mjs → analytics-BpYUZTtQ.mjs} +1 -1
- package/dist/{analytics-engine-Alu7cllT.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
- package/dist/{api-security-D-pcnhUL.mjs → api-security-CBhWZE8z.mjs} +6 -6
- package/dist/{argo-Lvmcx3am.mjs → argo-B0u2N3Dh.mjs} +1 -1
- package/dist/{artifacts-xT5S-mVa.mjs → artifacts-B6XzjMiM.mjs} +1 -1
- package/dist/{audit-logs-DEoRBLkU.mjs → audit-logs-59fCc1aw.mjs} +1 -1
- package/dist/auth-5cgi8ePZ.mjs +2 -0
- package/dist/auth-BaUNb1Ed.mjs +2 -0
- package/dist/auth-ChYOc_rS.mjs +2 -0
- package/dist/{auth-token-D9XIPlwf.mjs → auth-token-B1pP2jaK.mjs} +1 -1
- package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
- package/dist/{basin-catalog-DFHt3cWi.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
- package/dist/{billing-Bm2JNSGa.mjs → billing-Ad-rK-JH.mjs} +3 -3
- package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
- package/dist/body-parser-ChnyBsfm.mjs +2 -0
- package/dist/{bot-management-CSr38g-O.mjs → bot-management-CGpfjQ4w.mjs} +1 -1
- package/dist/{botnet-feed-ebeWWSJj.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
- package/dist/{brand-protection-BCn9Mv-d.mjs → brand-protection-CP73_yX8.mjs} +1 -1
- package/dist/{browser-run-BcWxzhAn.mjs → browser-run-OpUfawh_.mjs} +21 -21
- package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
- package/dist/build-DQZ2w_dQ.mjs +2 -0
- package/dist/{builds-BMwDzi7G.mjs → builds-DsRNlILV.mjs} +39 -39
- package/dist/{cache-_VaTLC5T.mjs → cache-RppXjxXA.mjs} +3 -3
- package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
- package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
- package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
- package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
- package/dist/{cli-P3q5DG3W.mjs → cli-Dd1n2YAJ.mjs} +1 -1
- package/dist/{client-side-security-CjSXrpa9.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
- package/dist/{cloud-connector-BPJBeP06.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
- package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
- package/dist/{cloudforce-one-DXX31GMi.mjs → cloudforce-one-C1xdpspb.mjs} +200 -210
- package/dist/{command-Bkc04OyY.mjs → command-BioiZMm9.mjs} +1 -1
- package/dist/{command-BbsPxJBT.mjs → command-C0nJ2LRd.mjs} +1 -1
- package/dist/{command-DDcBC4px.mjs → command-C5ARgURy.mjs} +1 -1
- package/dist/{command-CL7LLXM7.mjs → command-C7NIRU-u.mjs} +1 -1
- package/dist/{command-BXiA79DP.mjs → command-C8DV-x_C.mjs} +1 -1
- package/dist/{command-BtTc28ql.mjs → command-CFV1cqfR.mjs} +1 -1
- package/dist/{command-NoxvOARP.mjs → command-ChQXv0jP.mjs} +1 -1
- package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
- package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
- package/dist/{command-CBZhxmKD.mjs → command-DWE7YdeC.mjs} +1 -1
- package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
- package/dist/{command-CxWLFv5Y.mjs → command-DmPQXNRg.mjs} +1 -1
- package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
- package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
- package/dist/{command-CYyfigfC.mjs → command-yAXk5NXh.mjs} +1 -1
- package/dist/{completions-CrDmwKnK.mjs → completions-Bh0Hz-hA.mjs} +3 -3
- package/dist/{connector-interrupts-V4HGULCM.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
- package/dist/{connector-telemetry-events-D9mTcfbJ.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-COrPVKol.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
- package/dist/{connectors-DvVlxGDx.mjs → connectors-RUEU1QDB.mjs} +1 -1
- package/dist/containers-xU-0EhLO.mjs +78 -0
- package/dist/{containers-BtcOgwm5.mjs → containers-yUOvm-4V.mjs} +211 -211
- package/dist/{content-scan-DldLmTjy.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
- package/dist/{context-C_a8oSY9.mjs → context-BQ6KeMgq.mjs} +2 -2
- package/dist/{cps-REo1OWP1.mjs → cps-CgPduy0H.mjs} +1 -1
- package/dist/{csam-scanner-CIbbdoJK.mjs → csam-scanner-B0Ra6fXL.mjs} +1 -1
- package/dist/{custom-csrs-iGNc3rSZ.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
- package/dist/{custom-hostnames-BNxYbTyu.mjs → custom-hostnames-Dzov_CPw.mjs} +15 -15
- package/dist/{custom-nameservers-BMJoTSlQ.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
- package/dist/{custom-pages-Qdemt1Fm.mjs → custom-pages-DxVD_f10.mjs} +1 -1
- package/dist/{d1-DvCiQibO.mjs → d1-D7p4uJ-e.mjs} +10 -12
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-K664XPOb.mjs → deploy-BjWvVZol.mjs} +1 -1
- package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
- package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
- package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
- package/dist/{diagnostics-Cw0mtcep.mjs → diagnostics-DdhTemYB.mjs} +1 -1
- package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
- package/dist/discover-DEjUARkU.mjs +2 -0
- package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
- package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
- package/dist/{dls-DoqfqutH.mjs → dls-BBODA9Rk.mjs} +1 -1
- package/dist/{dns-DC6WcO3m.mjs → dns-CK_hyn5q.mjs} +5 -5
- package/dist/{dns-firewall-DpQH9BCE.mjs → dns-firewall-DbvX9R-7.mjs} +1 -1
- package/dist/{docs-CqNRBHab.mjs → docs-BDTijwM3.mjs} +1 -1
- package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
- package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
- package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
- package/dist/{durable-objects-CJDDy3CC.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
- package/dist/{email-auth--NHg1TjG.mjs → email-auth-BEgDxU-g.mjs} +1 -1
- package/dist/{email-routing-COjENK55.mjs → email-routing-DKWmPOVo.mjs} +1 -1
- package/dist/{email-security-rdjH95T2.mjs → email-security-RWbAp8qa.mjs} +15 -15
- package/dist/{email-sending-26VJhR6Q.mjs → email-sending-BbJy_vl8.mjs} +1 -1
- package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
- package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
- package/dist/{field-extractors-DBOvGOwz.mjs → field-extractors-Bob6udAc.mjs} +1 -1
- package/dist/{firewall-D8K93ffF.mjs → firewall-DziiEsR8.mjs} +1 -1
- package/dist/{flagship-CHdmCmvQ.mjs → flagship-xOtgddUK.mjs} +1 -1
- package/dist/{fraud-CY4TV5Vc.mjs → fraud-BUS7i5Yh.mjs} +1 -1
- package/dist/generate-D6V4Q58z.mjs +2 -0
- package/dist/get-BTisquA3.mjs +2 -0
- package/dist/{google-tag-gateway-DzSt4wlz.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
- package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
- package/dist/{healthchecks-B52Mf3uL.mjs → healthchecks-CbD2PsnM.mjs} +1 -1
- package/dist/{hyperdrive-CHsW0r6Z.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
- package/dist/{iam-o1n9eUXf.mjs → iam-DvsCztqU.mjs} +5 -5
- package/dist/{images-CJHAGxX6.mjs → images-BipVjHNw.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-LvFgCsNX.mjs +43 -0
- package/dist/{intel-B3S1gxUg.mjs → intel-D1LPkkBM.mjs} +31 -41
- package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
- package/dist/interactive-pjVqirHx.mjs +2 -0
- package/dist/{ips-q_UJMiy8.mjs → ips-2iUGs8ws.mjs} +1 -1
- package/dist/{k2-BNqVZnDN.mjs → k2-DGzRm3NJ.mjs} +1 -1
- package/dist/{kv-B0nXSOcW.mjs → kv-BW-s9MJY.mjs} +4 -4
- package/dist/{lazy-command-4ccdBqrc.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
- package/dist/{leaked-credential-checks-BXwIjlTs.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
- package/dist/{load-balancers-DJtMztJ0.mjs → load-balancers-CtnusAzP.mjs} +1 -1
- package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
- package/dist/local-DCnFIgLJ.mjs +2 -0
- package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
- package/dist/login-CqZJgUF1.mjs +5 -0
- package/dist/{login-D-1FiBNv.mjs → login-DR60WiAY.mjs} +1 -1
- package/dist/{logo-matches-qVYq8tWL.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
- package/dist/{logos-tnIahhcu.mjs → logos-Yzhd-VKb.mjs} +2 -2
- package/dist/{logpush-D4s3pJRw.mjs → logpush-JYG4gXZ-.mjs} +3 -3
- package/dist/{logs-cw7UL5V2.mjs → logs-DLblEjK0.mjs} +1 -1
- package/dist/{magic-cloud-networking-CLEHztNY.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
- package/dist/{magic-network-monitoring-DRwygeVq.mjs → magic-network-monitoring-D2px4Ep4.mjs} +3 -3
- package/dist/{magic-transit-BFopRdPs.mjs → magic-transit-Bnwsi0UQ.mjs} +61 -61
- package/dist/{managed-defense-D5kpmq0T.mjs → managed-defense-CTtNoxzW.mjs} +3 -3
- package/dist/{managed-transforms-CT4jjnzJ.mjs → managed-transforms-B92mJi5i.mjs} +1 -1
- package/dist/{matches-ClJ_24EY.mjs → matches-CzbL1XD-.mjs} +1 -1
- package/dist/{mcp-50os3IRG.mjs → mcp-Cic_aMer.mjs} +1 -1
- package/dist/{mesh-jxtQP8sS.mjs → mesh-DZTgD16C.mjs} +14 -14
- package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
- package/dist/{monetization-D6cCDi-h.mjs → monetization-DCQ2_niU.mjs} +1 -1
- package/dist/{network-dnWHB2uY.mjs → network-BqMqD2qn.mjs} +1 -1
- package/dist/{network-interconnects-Cf8qSVdt.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
- package/dist/{o11y-oMSg1pG4.mjs → o11y-CS5q1vSh.mjs} +5 -5
- package/dist/oauth-DPLYUvRl.mjs +2 -0
- package/dist/oauth-DdYSPYoE.mjs +4 -0
- package/dist/{oauth-clients-XDmoe-b4.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
- package/dist/{oauth-scopes-D9VYGuTs.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
- package/dist/{organization-94lHeeOs.mjs → organization-DFRN2g6z.mjs} +1 -1
- package/dist/{organizations-BJf3UTFi.mjs → organizations-yiGopnKf.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-DMytVSUZ.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
- package/dist/output-O6b9MR9R.mjs +2 -0
- package/dist/{page-rules-BUI-50oz.mjs → page-rules-F1Jdxx6A.mjs} +1 -1
- package/dist/{pages-CcdpCzHs.mjs → pages-CezC0YrR.mjs} +2 -2
- package/dist/{pay-per-crawl-B1uHZn9j.mjs → pay-per-crawl-fZ-kTBbN.mjs} +2 -2
- package/dist/{pay-per-use-t066I5wm.mjs → pay-per-use-B14BTKVI.mjs} +2 -2
- package/dist/{pipelines-Co6S044l.mjs → pipelines-BN7ydBHl.mjs} +5 -5
- package/dist/{precursor-BftyvS86.mjs → precursor-B88RDDZT.mjs} +2 -2
- package/dist/previews-CiqRIq_k.mjs +7 -0
- package/dist/process-DiXf4VPi.mjs +2 -0
- package/dist/{progress-Q5w9PNTT.mjs → progress-CdlDthXA.mjs} +1 -1
- package/dist/{prompt-C0hKSr-R.mjs → prompt-1AC-qwxS.mjs} +1 -1
- package/dist/{queries-4MubO6Sz.mjs → queries-C2sgUI9j.mjs} +1 -1
- package/dist/{queues-CteS5M92.mjs → queues-DCP5x-PZ.mjs} +1 -1
- package/dist/{r2-2QpT_Gso.mjs → r2-D7UhzWR7.mjs} +26 -26
- package/dist/{radar-ODKaK4FJ.mjs → radar-osOiFeY_.mjs} +1 -1
- package/dist/{raw-fetch-CEOuoKl9.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
- package/dist/{realtime-DkfU8uEX.mjs → realtime-DCnqxiWo.mjs} +90 -87
- package/dist/{registrar-DM6JTVPS.mjs → registrar-DAFYjjRa.mjs} +8 -8
- package/dist/{registrar-sandbox-BPNGf65G.mjs → registrar-sandbox-zeNHABZ0.mjs} +4 -4
- package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
- package/dist/{reporting-5yFNXbJg.mjs → reporting-KehV_PXm.mjs} +1 -1
- package/dist/{request-headers-DXvswze2.mjs → request-headers-ojAw3pQO.mjs} +1 -1
- package/dist/{request-tracers-BarLZY95.mjs → request-tracers-BStCgh6m.mjs} +1 -1
- package/dist/resolve-BGNMAcGR.mjs +2 -0
- package/dist/{resource-sharing-BVEwBPs8.mjs → resource-sharing-3xtSgWG7.mjs} +3 -3
- package/dist/{rules-_C31X4Jz.mjs → rules-7F-G2Bg_.mjs} +3 -3
- package/dist/{rulesets-8RwxoFhG.mjs → rulesets-B0YtS2br.mjs} +20 -20
- package/dist/{rum-CAUcpXpM.mjs → rum-B3V6tqS-.mjs} +1 -1
- package/dist/{run-DtFLvOHB.mjs → run-B_07PrkW.mjs} +1 -1
- package/dist/run-D6AJfZT-.mjs +2 -0
- package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
- package/dist/{schema-flags-DibfxEF6.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
- package/dist/{scim-DX5XrQ4w.mjs → scim-CQ9TdajH.mjs} +6 -6
- package/dist/{secrets-store-DSqqrr25.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
- package/dist/{security-insights-FSktO04S.mjs → security-insights-BsLMdo1r.mjs} +2 -2
- package/dist/{security-txt-D2g3lQdg.mjs → security-txt-pCAiHvys.mjs} +1 -1
- package/dist/session-BsNzFtPi.mjs +2 -0
- package/dist/shared-CWBjMZDR.mjs +2 -0
- package/dist/{smart-shield-IVb2sR0C.mjs → smart-shield-BTXQsVxz.mjs} +1 -1
- package/dist/{snippets-cWwWficN.mjs → snippets-CYVieyc3.mjs} +2 -2
- package/dist/source-AlTrHNem.mjs +6 -0
- package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
- package/dist/{spectrum-DYiIBYRB.mjs → spectrum-DLRr4Q03.mjs} +14 -14
- package/dist/{speed-C7uiW2Wf.mjs → speed-BJfaDYxz.mjs} +13 -13
- package/dist/sql-DQ4xrdc2.mjs +4 -0
- package/dist/src-BnMvFE3q.mjs +125 -0
- package/dist/{ssl-xQP_HbWN.mjs → ssl-CL1B69Pw.mjs} +1 -1
- package/dist/startup-profile-DuaJFX1y.mjs +2 -0
- package/dist/startup-profile-HMblAiBi.mjs +29 -0
- package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
- package/dist/state-DePlO0Kv.mjs +2 -0
- package/dist/{stream-CfWgj8Cr.mjs → stream-DrMZOO5u.mjs} +17 -17
- package/dist/{submit-DxGr1T40.mjs → submit-DjlLoVk2.mjs} +1 -1
- package/dist/{tags-LEJ2VYhQ.mjs → tags-DY7Ur1k-.mjs} +4 -4
- package/dist/{telemetry-BHne10Yy.mjs → telemetry-BG3kcYsV.mjs} +1 -1
- package/dist/telemetry-Dpm6GfZD.mjs +2 -0
- package/dist/{tenant-7d5vwc6K.mjs → tenant-BEMfNMjO.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BkxlPr5O.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
- package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
- package/dist/tunnels-_JXe-UgM.mjs +29 -0
- package/dist/{turnstile-DhLkdhij.mjs → turnstile-DXEfneQq.mjs} +1 -1
- package/dist/ui-CY79jlGZ.mjs +2 -0
- package/dist/update-check-DfbYVefm.mjs +2 -0
- package/dist/{update-check-wvjOsnGK.mjs → update-check-atcehhBC.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-CeoV5dBc.mjs → url-info-B1kL9asc.mjs} +1 -1
- package/dist/{url-normalization-9NoaoRNh.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
- package/dist/{url-scanner-w_-Sumz-.mjs → url-scanner-OnZP_-jm.mjs} +2 -2
- package/dist/{user-D33B3alX.mjs → user-BBBuFNj4.mjs} +1 -1
- package/dist/{vectorize-Wp9De13y.mjs → vectorize-DcctB8bw.mjs} +3 -3
- package/dist/version-CLgSHoNm.mjs +2 -0
- package/dist/{waiting-rooms-BE8FloRd.mjs → waiting-rooms-JaFE5wP1.mjs} +2 -2
- package/dist/{web-assets-ew0iaP7c.mjs → web-assets-Cu0swUPe.mjs} +10 -10
- package/dist/{web3-BUyXBaqq.mjs → web3-C67z4OtQ.mjs} +1 -1
- package/dist/{workers-pP5tsDbD.mjs → workers-ClTP0Ysl.mjs} +5 -5
- package/dist/{workers-builds-DzU9NGno.mjs → workers-builds-C5wKhvKe.mjs} +7 -7
- package/dist/{workers-for-platforms-B4xzFNxJ.mjs → workers-for-platforms-rxwkYyb3.mjs} +5 -5
- package/dist/{workers-vpc-Bre_t9Al.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
- package/dist/{workflows-DXYGKtqq.mjs → workflows-COJ5jwvk.mjs} +24 -24
- package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
- package/dist/{zaraz-DoH4QD0u.mjs → zaraz-BkZ7yW05.mjs} +2 -2
- package/dist/{zero-trust-DKt20rzE.mjs → zero-trust-lUFLYuL1.mjs} +496 -444
- package/dist/{zone-BXM3p0JR.mjs → zone-CC1_qxt-.mjs} +1 -1
- package/dist/{zones-CJdtqEBx.mjs → zones-BRiLlTmW.mjs} +37 -28
- package/package.json +11 -11
- package/dist/ai-search-DDRpxyOM.mjs +0 -79
- package/dist/auth-B73lQS2h.mjs +0 -2
- package/dist/auth-DMzEmOhG.mjs +0 -2
- package/dist/auth-Db1KT0vm.mjs +0 -2
- package/dist/body-parser-DnBfDdx3.mjs +0 -2
- package/dist/build-BRJnyeu8.mjs +0 -2
- package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
- package/dist/containers-Bt2zFsFd.mjs +0 -78
- package/dist/deploy-context-ClNVJYlR.mjs +0 -56
- package/dist/discover-DIDEGKo3.mjs +0 -2
- package/dist/error-sanitization-CIQOep3I.mjs +0 -2
- package/dist/generate-D80-1GnZ.mjs +0 -2
- package/dist/get-By1q8YlI.mjs +0 -2
- package/dist/hostnames-BMITIM8P.mjs +0 -11
- package/dist/init-CqQDL6i3.mjs +0 -43
- package/dist/interactive-DGUWZ2Gk.mjs +0 -2
- package/dist/local-DxWDQDnG.mjs +0 -2
- package/dist/login-chQP8825.mjs +0 -5
- package/dist/oauth-BfBdHhPS.mjs +0 -4
- package/dist/oauth-DDOiiH7h.mjs +0 -2
- package/dist/output-Co4xdFf6.mjs +0 -2
- package/dist/previews-BLhnhElx.mjs +0 -7
- package/dist/process-2wmDCy17.mjs +0 -2
- package/dist/resolve-BpgXeklt.mjs +0 -2
- package/dist/run-LcOb9rhI.mjs +0 -2
- package/dist/session-Cq3YNLoI.mjs +0 -2
- package/dist/shared-eefMO8R4.mjs +0 -2
- package/dist/source-mXUcrTVw.mjs +0 -6
- package/dist/sql-TGV8qQMj.mjs +0 -4
- package/dist/src-BUH-P_zd.mjs +0 -125
- package/dist/startup-profile-BOaseXnO.mjs +0 -29
- package/dist/startup-profile-BwEZFVGS.mjs +0 -2
- package/dist/state-CODDG9Nx.mjs +0 -2
- package/dist/telemetry-BavSU4ku.mjs +0 -2
- package/dist/tunnels-DlGODvwT.mjs +0 -29
- package/dist/ui-BtIBQeaG.mjs +0 -2
- package/dist/update-check-nLfkSfdz.mjs +0 -2
- package/dist/version-B2RUUqGT.mjs +0 -2
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as u,r as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h}from"./prompt-1AC-qwxS.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function _(e){return e.usage(`$0 managed-defense vulnerability-discovery reports get <scan-id>
|
|
3
3
|
|
|
4
4
|
Gets the repository projection of the active operator-reviewed scan report. \`scan_id\` is the customer scan's stable request ID.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <scan-id>`,describe:`Get reviewed vulnerability report`,builder:_,handler:async e=>l({command:`managed-defense vulnerability-discovery reports get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"repo-id":String(e[`repo-id`]??``),"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(g,{account_id:l,repo_id:e[`repo-id`],scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})},y={command:`reports`,describe:`Operations for vulnerability-discovery.reports`,builder:e=>e.command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories create
|
|
5
5
|
|
|
6
|
-
Creates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name 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 x={command:`create`,describe:`Create repository`,builder:b,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):
|
|
6
|
+
Creates an upload repository or reserves an asynchronous deployed Worker import by name. Worker imports require Idempotency-Key.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`name`,{type:`string`,description:`The name field`}).option(`worker-script-name`,{type:`string`,description:`The worker_script_name 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 x={command:`create`,describe:`Create repository`,builder:b,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),worker_script_name:m(e[`worker-script-name`],`worker-script-name`,`text`)}):u(e.body)});return}let d=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`The name field`));let _={};e.name!==void 0&&f(_,[`name`],m(e.name,`name`,`text`)),e[`worker-script-name`]!==void 0&&f(_,[`worker_script_name`],m(e[`worker-script-name`],`worker-script-name`,`text`));let v=await c(`Creating`,async()=>n(d,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/repos`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var S={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos/${t.repo_id}`,query:[`scan_limit`,`scan_cursor`],errors:{404:`NotFoundError`}};function C(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories get <repo-id>
|
|
7
7
|
|
|
8
8
|
Gets repository metadata, source readiness, and customer scan history.`).positional(`repo-id`,{type:`string`,description:`Repo ID`,demandOption:!0}).option(`scan-limit`,{type:`number`,description:`Scan limit`}).option(`scan-cursor`,{type:`string`,description:`Scan cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <repo-id>`,describe:`Get repository`,builder:C,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={scan_limit:e[`scan-limit`],scan_cursor:e[`scan-cursor`]};if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery repositories get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/repos/${e[`repo-id`]==null?`<repo-id>`:encodeURIComponent(String(e[`repo-id`]))}`,pathParams:{"repo-id":String(e[`repo-id`]??``)},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(S,{account_id:u,repo_id:e[`repo-id`],...n}));o(d,{successLabel:`Loaded`})})};var T={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/repos`,query:[`limit`,`cursor`],errors:{404:`NotFoundError`}};function E(e){return e.usage(`$0 managed-defense vulnerability-discovery repositories list
|
|
9
9
|
|
|
10
10
|
Lists repositories available for vulnerability discovery in an account.`).option(`limit`,{type:`number`,description:`Limit`}).option(`cursor`,{type:`string`,description:`Cursor`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List repositories`,builder:E,handler:async e=>l({command:`managed-defense vulnerability-discovery repositories list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={limit:e.limit,cursor:e.cursor};if(e.dryRun){let e=await i();s({command:`cf managed-defense vulnerability-discovery repositories list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/managed-defense/vulnerability-discovery/repos`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(T,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})},O={command:`repositories`,describe:`Operations for vulnerability-discovery.repositories`,builder:e=>e.command(x).command(w).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.usage(`$0 managed-defense vulnerability-discovery scans create
|
|
11
11
|
|
|
12
|
-
Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit \`repo_hosts\` must be authorized before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repo-hosts`,{type:`string`,description:`Explicit hostname scopes. Every hostname must be authorized for its repository before review admission; rejected scopes return 422 and do not persist a scan request. Provide as a JSON object or @path/to/file.json.`}).option(`repos`,{type:`string`,array:!0,description:`The repos field`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start 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)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const A={command:`create`,describe:`Create scan`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repo_hosts:
|
|
12
|
+
Submits repository intent for operator review. This endpoint does not immediately start execution. Worker-imported repositories must be ready; explicit \`repo_hosts\` must be authorized before the request is persisted.`).option(`idempotency-key`,{type:`string`,description:"Optional. Supply this header to safely retry a request. Required when `worker_script_name` is supplied."}).option(`repo-hosts`,{type:`string`,description:`Explicit hostname scopes. Every hostname must be authorized for its repository before review admission; rejected scopes return 422 and do not persist a scan request. Provide as a JSON object or @path/to/file.json.`}).option(`repos`,{type:`string`,array:!0,description:`The repos field`}).option(`telemetry-window-end`,{type:`string`,description:`The telemetry_window.end field`}).option(`telemetry-window-start`,{type:`string`,description:`The telemetry_window.start 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)`}).check(e=>{if([`telemetry-window-end`,`telemetry-window-start`].some(t=>e[t]!==void 0)){let t=[`telemetry-window-end`,`telemetry-window-start`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --telemetry_window-* flag is set`)}return!0})}const A={command:`create`,describe:`Create scan`,builder:k,handler:async e=>l({command:`managed-defense vulnerability-discovery scans create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let l={};if(e[`idempotency-key`]!==void 0&&(l[`Idempotency-Key`]=String(e[`idempotency-key`])),e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({repo_hosts:d(e[`repo-hosts`],`repo-hosts`),repos:e.repos,telemetry_window:{end:m(e[`telemetry-window-end`],`telemetry-window-end`,`text`),start:m(e[`telemetry-window-start`],`telemetry-window-start`,`text`)}},[[`repo_hosts`]]):u(e.body)});return}let h=await r(e),g=e.local?t:await a();if(e.accountId=g,e.body){let t=u(e.body),r=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:t,headers:Object.keys(l).length>0?l:void 0}));o(r,{successLabel:`Created`});return}if(e.repos===void 0)throw Error(`--repos is required (or pass --body with this field set).`);let _={};e[`repo-hosts`]!==void 0&&f(_,[`repo_hosts`],d(e[`repo-hosts`],`repo-hosts`)),e.repos!==void 0&&f(_,[`repos`],e.repos),e[`telemetry-window-end`]!==void 0&&f(_,[`telemetry_window`,`end`],m(e[`telemetry-window-end`],`telemetry-window-end`,`text`)),e[`telemetry-window-start`]!==void 0&&f(_,[`telemetry_window`,`start`],m(e[`telemetry-window-start`],`telemetry-window-start`,`text`));let v=await c(`Creating`,async()=>n(h,`POST`,`/accounts/${g}/managed-defense/vulnerability-discovery/scans`,{body:_,headers:Object.keys(l).length>0?l:void 0}));o(v,{successLabel:`Created`})})};var j={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}/report`,errors:{404:`NotFoundError`}};function M(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get-report <scan-id>
|
|
13
13
|
|
|
14
14
|
Gets the active operator-reviewed scan report. Repository metadata records report readiness even when no publication is available.`).positional(`scan-id`,{type:`string`,description:`Scan ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get-report <scan-id>`,describe:`Get reviewed vulnerability report`,builder:M,handler:async e=>l({command:`managed-defense vulnerability-discovery scans get-report`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf managed-defense vulnerability-discovery scans get-report`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/managed-defense/vulnerability-discovery/scans/${e[`scan-id`]==null?`<scan-id>`:encodeURIComponent(String(e[`scan-id`]))}/report`,pathParams:{"scan-id":String(e[`scan-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(j,{account_id:l,scan_id:e[`scan-id`]}));o(u,{successLabel:`Loaded`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/managed-defense/vulnerability-discovery/scans/${t.scan_id}`,errors:{404:`NotFoundError`}};function F(e){return e.usage(`$0 managed-defense vulnerability-discovery scans get <scan-id>
|
|
15
15
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as s,n as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./prompt-1AC-qwxS.mjs";var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/managed_headers`,response:!1};function f(e){return e.usage(`$0 managed-transforms delete
|
|
3
3
|
|
|
4
4
|
Disables all Managed Transforms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const p={command:`delete`,describe:`Delete Managed Transforms`,builder:f,handler:async e=>o({command:`managed-transforms delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf managed-transforms delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/managed_headers`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await u({force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}let c=await a(`Deleting`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/managed_headers`};function h(e){return e.usage(`$0 managed-transforms list
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/matches/download`,query:[`id`,`offset`,`limit`,`include_domain_id`,`include_dismissed`],errors:{422:`UnprocessableEntityError`}};function u(e){return e.usage(`$0 matches download get
|
|
3
3
|
|
|
4
4
|
Return matches as CSV for string queries based on ID`).option(`id`,{type:`string`,description:`ID`}).option(`offset`,{type:`number`,description:`Offset`}).option(`limit`,{type:`number`,description:`Limit`}).option(`include-domain-id`,{type:`boolean`,description:`Include domain ID`}).option(`include-dismissed`,{type:`boolean`,description:`Include dismissed`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Download matches for string queries by ID`,builder:u,handler:async e=>c({command:`matches download get`,classification:{safeFlags:[`include-domain-id`,`include-dismissed`,`dry-run`]}},e,async()=>{let c={id:e.id,offset:e.offset,limit:e.limit,include_domain_id:e[`include-domain-id`],include_dismissed:e[`include-dismissed`]};if(e.dryRun){let e=await r();o({command:`cf matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/matches/download`,pathParams:{},query:c,bodyKind:`none`});return}let u=await n(e),d=e.local?t:await i();e.accountId=d;let f=await s(`Loading`,async()=>u.send(l,{account_id:d,...c}));a(f,{successLabel:`Loaded`})})},f={command:`download`,describe:`Operations for download`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var p={method:`GET`,path:t=>e`/accounts/${t.account_id}/brand-protection/matches`,query:[`id`,`offset`,`limit`,`include_domain_id`,`include_dismissed`],errors:{422:`UnprocessableEntityError`}};function m(e){return e.usage(`$0 matches get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as l,n as u,t as d}from"./body-parser-ChnyBsfm.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-1AC-qwxS.mjs";var g={method:`GET`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,query:[`granularity`,`aggregate`,`tz`,`days`,`response_status`],errors:{400:`BadRequestError`}};function _(e){return e.usage(`$0 mcp portals account-tool-call-analytics
|
|
3
3
|
|
|
4
4
|
Returns daily or monthly tool-call counts across the account.`).option(`granularity`,{type:`string`,description:`Granularity`,choices:[`daily`,`monthly`]}).option(`aggregate`,{type:`string`,description:`Aggregate`,choices:[`true`,`false`]}).option(`tz`,{type:`string`,description:`Tz`}).option(`days`,{type:`number`,description:`Daily trailing-window size; defaults to 7 and is ignored for monthly`}).option(`response-status`,{type:`string`,description:`Response status to count; 'all' counts every status`,choices:[`success`,`error`,`cached`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`account-tool-call-analytics`,describe:`Account-global MCP tool-call timeseries`,builder:_,handler:async e=>c({command:`mcp portals account-tool-call-analytics`,classification:{safeFlags:[`granularity`,`aggregate`,`response-status`,`dry-run`]}},e,async()=>{let c={granularity:e.granularity,aggregate:e.aggregate,tz:e.tz,days:e.days,response_status:e[`response-status`]};if(e.dryRun){let e=await r();o({command:`cf mcp portals account-tool-call-analytics`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/access/ai-controls/mcp/analytics/tool-calls/timeseries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(g,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var y={method:`POST`,path:t=>e`/accounts/${t.account_id}/access/ai-controls/mcp/portals`,body:`json`,errors:{400:`BadRequestError`}};function b(e){return e.usage(`$0 mcp portals create
|
|
5
5
|
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{i as n,n as r}from"./auth-BaUNb1Ed.mjs";import{a as i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,s as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-1AC-qwxS.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`};function y(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
|
|
3
3
|
|
|
4
|
-
Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Gets the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <tunnel-id>`,describe:`Get Mesh node HA configuration`,builder:y,handler:async e=>l({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`none`});return}let n=await r(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>n.send(v,{account_id:l,tunnel_id:e[`tunnel-id`]}));o(u,{successLabel:`Loaded`})})};var x={method:`PUT`,path:t=>e`/accounts/${t.account_id}/warp_connector/${t.tunnel_id}/configurations`,body:`json`};function S(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
|
|
5
5
|
|
|
6
|
-
Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`mesh-config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>
|
|
6
|
+
Adds or updates the high-availability configuration for a Mesh node.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`mesh-config-fnr-id`,{type:`string`,description:`Floating Network Resource ID — the secondary ENI that is moved between nodes on failover.`}).option(`mesh-config-vips`,{type:`string`,description:`VIPs to assign on the CloudflareWARP interface. Provide as a JSON array of objects or @path/to/file.json.`}).option(`mesh-config-vips-previous`,{type:`string`,description:`VIPs to clean up on demotion or version drift. Provide as a JSON array of objects or @path/to/file.json.`}).option(`ha-mode`,{type:`string`,description:"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",choices:[`none`,`disabled`,`aws`,`local`]}).coerce(`ha-mode`,e=>m(e,`ha-mode`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`mesh-config-fnr-id`,[`mesh-config-vips`,`mesh-config-vips-previous`]).conflicts(`mesh-config-vips`,[`mesh-config-fnr-id`]).conflicts(`mesh-config-vips-previous`,[`mesh-config-fnr-id`])}const C={command:`update <tunnel-id>`,describe:`Update Mesh node HA configuration`,builder:S,handler:async e=>l({command:`mesh nodes configurations update`,classification:{safeFlags:[`ha-mode`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes configurations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(e[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(e[`tunnel-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n.send(x,{body:t,account_id:l,tunnel_id:e[`tunnel-id`]}));o(r,{successLabel:`Updated`});return}e[`ha-mode`]===void 0&&(e[`ha-mode`]=await g(`ha-mode`,"High-availability mode for the Mesh node. `none` means HA is enabled but no provider is configured yet (newly created nodes default to this). `disabled` means HA is explicitly turned off. `aws` uses AWS ENI move for failover. `local` uses virtual IPs (VIPs) on the local interface.",[`none`,`disabled`,`aws`,`local`]));let f=p({config:{fnr_id:m(e[`mesh-config-fnr-id`],`mesh-config-fnr-id`,`text`),vips:u(e[`mesh-config-vips`],`mesh-config-vips`),vips_previous:u(e[`mesh-config-vips-previous`],`mesh-config-vips-previous`)},ha_mode:e[`ha-mode`]}),h=await c(`Updating`,async()=>n.send(x,{body:f,account_id:l,tunnel_id:e[`tunnel-id`]}));o(h,{successLabel:`Updated`})})},w={command:`configurations`,describe:`Operations for nodes.configurations`,builder:e=>e.command(b).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage(`$0 mesh nodes connections list
|
|
7
7
|
|
|
8
|
-
Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
8
|
+
Lists connection details for a Mesh node.`).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List Mesh node connections`,builder:T,handler:async e=>l({command:`mesh nodes connections list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connections`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connections`));o(d,{successLabel:`Loaded`})})},D={command:`connections`,describe:`Operations for nodes.connections`,builder:e=>e.command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.usage(`$0 mesh nodes connectors get <connector-id>
|
|
9
9
|
|
|
10
|
-
Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
10
|
+
Fetches connector and connection details for a Mesh node.`).positional(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`,demandOption:!0}).option(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get <connector-id>`,describe:`Get a Mesh node connector`,builder:O,handler:async e=>l({command:`mesh nodes connectors get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes connectors get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/connectors/${e[`connector-id`]==null?`<connector-id>`:encodeURIComponent(String(e[`connector-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``),"connector-id":String(e[`connector-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/connectors/${encodeURIComponent(String(e[`connector-id`]))}`));o(d,{successLabel:`Loaded`})})},A={command:`connectors`,describe:`Operations for nodes.connectors`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`POST`,path:t=>e`/accounts/${t.account_id}/warp_connector`,body:`json`};function M(e){return e.usage(`$0 mesh nodes create
|
|
11
11
|
|
|
12
|
-
Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).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
|
|
12
|
+
Creates a new Mesh node in an account.`).option(`ha`,{type:`boolean`,description:`Indicates that the tunnel will be created to be highly available. If omitted, defaults to false.`,default:!1}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).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 N={command:`create`,describe:`Create a Mesh node`,builder:M,handler:async e=>l({command:`mesh nodes create`,classification:{safeFlags:[`ha`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({ha:e.ha,name:m(e.name,`name`,`text`)}):d(e.body)});return}let n=await r(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),r=await c(`Creating`,async()=>n.send(j,{body:t,account_id:l}));o(r,{successLabel:`Created`});return}e.name===void 0&&(e.name=await h(`name`,`A user-friendly name for a tunnel.`));let u=p({ha:e.ha,name:m(e.name,`name`,`text`)}),f=await c(`Creating`,async()=>n.send(j,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};function P(e){return e.usage(`$0 mesh nodes delete <node-id>
|
|
13
13
|
|
|
14
|
-
Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,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
|
|
15
|
-
`);return}let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function
|
|
14
|
+
Deletes a Mesh node from an account.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,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 F={command:`delete <node-id>`,describe:`Delete a Mesh node`,builder:P,handler:async e=>l({command:`mesh nodes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation permanently deletes a Mesh node.`})){process.stderr.write(`Aborted.
|
|
15
|
+
`);return}let d=await c(`Deleting`,async()=>n(l,`DELETE`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 mesh nodes edit <node-id>
|
|
16
16
|
|
|
17
|
-
Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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
|
|
17
|
+
Updates an existing Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`name`,{type:`string`,description:`A user-friendly name for a tunnel.`}).option(`tunnel-secret`,{type:`string`,description:`Sets the password required to run a locally-managed tunnel. Must be at least 32 bytes and encoded as a base64 string.`}).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 L={command:`edit <node-id>`,describe:`Update a Mesh node`,builder:I,handler:async e=>l({command:`mesh nodes edit`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({name:m(e.name,`name`,`text`),tunnel_secret:m(e[`tunnel-secret`],`tunnel-secret`,`text`)}):d(e.body),sensitiveBodyPaths:[[`tunnel_secret`]]});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,e.body){let t=d(e.body),r=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:t}));o(r,{successLabel:`Updated`});return}let h={};e.name!==void 0&&f(h,[`name`],m(e.name,`name`,`text`)),e[`tunnel-secret`]!==void 0&&f(h,[`tunnel_secret`],m(e[`tunnel-secret`],`tunnel-secret`,`text`));let g=await c(`Updating`,async()=>n(l,`PATCH`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`,{body:h}));o(g,{successLabel:`Updated`})})};function R(e){return e.usage(`$0 mesh nodes failover <node-id>
|
|
18
18
|
|
|
19
|
-
Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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
|
|
20
|
-
`);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${
|
|
19
|
+
Triggers a manual failover for a specific Mesh node, setting the specified client as the active connector. The tunnel must be configured for high availability (HA) and the client must be linked to the tunnel.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`connector-id`,{type:`string`,description:`UUID of the Cloudflare Tunnel connector.`}).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 z={command:`failover <node-id>`,describe:`Trigger a manual failover for a Mesh node`,builder:R,handler:async e=>l({command:`mesh nodes failover`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes failover`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/failover`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({client_id:m(e[`connector-id`],`connector-id`,`text`)}):d(e.body)});return}let l=await r(e),u=e.local?t:await a();if(e.accountId=u,!await _({force:!!e.force,message:`This operation triggers a manual failover, changing the active connector for a Mesh node.`})){process.stderr.write(`Aborted.
|
|
20
|
+
`);return}if(e.body){let t=d(e.body),r=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:t}));o(r,{successLabel:`Deleted`});return}e[`connector-id`]===void 0&&(e[`connector-id`]=await h(`connector-id`,`UUID of the Cloudflare Tunnel connector.`));let g={};e[`connector-id`]!==void 0&&f(g,[`client_id`],m(e[`connector-id`],`connector-id`,`text`));let v=await c(`Deleting`,async()=>n(l,`PUT`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/failover`,{body:g}));o(v,{successLabel:`Deleted`})})};function B(e){return e.usage(`$0 mesh nodes get <node-id>
|
|
21
21
|
|
|
22
|
-
Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
22
|
+
Fetches a single Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <node-id>`,describe:`Get a Mesh node`,builder:B,handler:async e=>l({command:`mesh nodes get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}`));o(d,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/accounts/${t.account_id}/warp_connector`,query:[`name`,`is_deleted`,`existed_at`,`uuid`,`was_active_at`,`was_inactive_at`,`include_prefix`,`exclude_prefix`,`status`,`per_page`,`page`]};function U(e){return e.usage(`$0 mesh nodes list
|
|
23
23
|
|
|
24
|
-
Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
24
|
+
Lists and filters Mesh nodes in an account.`).option(`name`,{type:`string`,description:`A user-friendly name for the tunnel.`}).option(`is-deleted`,{type:`boolean`,description:"If `true`, only include deleted tunnels. If `false`, exclude deleted tunnels. If empty, all tunnels will be included."}).option(`existed-at`,{type:`string`,description:`If provided, include only resources that were created (and not deleted) before this time. URL encoded.`}).option(`uuid`,{type:`string`,description:`UUID of the tunnel.`}).option(`was-active-at`,{type:`string`,description:`Was active at`}).option(`was-inactive-at`,{type:`string`,description:`Was inactive at`}).option(`include-prefix`,{type:`string`,description:`Include prefix`}).option(`exclude-prefix`,{type:`string`,description:`Exclude prefix`}).option(`status`,{type:`string`,description:"The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).",choices:[`inactive`,`degraded`,`healthy`,`down`]}).option(`per-page`,{type:`number`,description:`Number of results to display.`}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Mesh nodes`,builder:U,handler:async e=>l({command:`mesh nodes list`,classification:{safeFlags:[`is-deleted`,`status`,`dry-run`]}},e,async()=>{let n={name:e.name,is_deleted:e[`is-deleted`],existed_at:e[`existed-at`],uuid:e.uuid,was_active_at:e[`was-active-at`],was_inactive_at:e[`was-inactive-at`],include_prefix:e[`include-prefix`],exclude_prefix:e[`exclude-prefix`],status:e.status,per_page:e[`per-page`],page:e.page};if(e.dryRun){let e=await i();s({command:`cf mesh nodes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/warp_connector`,pathParams:{},query:n,bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(H,{account_id:u,...n}));o(d,{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 mesh nodes token get <node-id>
|
|
25
25
|
|
|
26
|
-
Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
26
|
+
Gets the token used to associate a WARP device with a specific Mesh node.`).positional(`node-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <node-id>`,describe:`Get a Mesh node token`,builder:G,handler:async e=>l({command:`mesh nodes token get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await i();s({command:`cf mesh nodes token get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/warp_connector/${e[`node-id`]==null?`<node-id>`:encodeURIComponent(String(e[`node-id`]))}/token`,pathParams:{"node-id":String(e[`node-id`]??``)},bodyKind:`none`});return}let l=await r(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>n(l,`GET`,`/accounts/${u}/warp_connector/${encodeURIComponent(String(e[`node-id`]))}/token`));o(d,{successLabel:`Loaded`})})},q={command:`token`,describe:`Operations for nodes.token`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`nodes`,describe:`Operations for nodes`,builder:e=>e.command(N).command(F).command(L).command(z).command(V).command(W).command(w).command(D).command(A).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`mesh`,describe:`mesh`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Y as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import"./ui-CY79jlGZ.mjs";import{i as t,r as n,t as r}from"./wrangler-migration-Cp546RDG.mjs";function i(e){return e.positional(`path`,{type:`string`,description:`Path to a Wrangler configuration file`}).option(`bundler`,{choices:[`vite`,`wrangler`],description:`Bundler to use in the migrated project (defaults to vite when @cloudflare/vite-plugin is declared, otherwise wrangler)`}).option(`dry-run`,{type:`boolean`,default:!1,description:`Show the files that would change without writing them`}).option(`force`,{type:`boolean`,default:!1,description:`Run even if the Git worktree is not clean`}).option(`install`,{type:`boolean`,default:!0,description:`Install cf as a project dependency (use --no-install to skip)`})}function a(t){console.log(e.muted(t===`vite`?`Using the Vite bundler because @cloudflare/vite-plugin is declared. Pass --bundler wrangler to override.`:`Using the Wrangler bundler because @cloudflare/vite-plugin is not declared. Pass --bundler vite to override.`))}const o={command:`migrate [path]`,describe:`Migrate a Wrangler project to cf`,builder:i,handler:async e=>{let i=await n(e.path),o=e.bundler??await r(i);e.bundler===void 0&&a(o),await t(i,{bundler:o,dryRun:e[`dry-run`],force:e.force,installDependencies:e.install})}};export{o as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,t as f}from"./body-parser-ChnyBsfm.mjs";import{n as p}from"./input-validation-D7z60HJH.mjs";import{n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,body:`json`,constants:{acceptedTermsOfService:!0}};function g(e){return e.usage(`$0 monetization account-eligibility check
|
|
3
3
|
|
|
4
4
|
Checks the account or zone for Monetization Gateway eligibility and returns its pending, approved, or rejected decision.`).option(`accepted-terms-of-service`,{type:`boolean`,description:`Confirms acceptance of the Monetization Gateway terms of service.`}).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 _={command:`check`,describe:`Check account or zone monetization eligibility`,builder:g,handler:async e=>l({command:`monetization account-eligibility check`,classification:{safeFlags:[`accepted-terms-of-service`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=e.zone===void 0?await r():void 0,n=e.zone===void 0?`accounts`:`zones`,i=e.zone??t??`<account-id>`;s({command:`cf monetization account-eligibility check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${i}/monetization`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(i)},bodyKind:`json`,body:e.body===void 0?f({acceptedTermsOfService:e[`accepted-terms-of-service`]}):d(e.body)});return}let l=await n(e),u=e.zone===void 0?`accounts`:`zones`,p=u===`zones`?await i({zone:e.zone},l,{quiet:e.quiet}):e.local?t:await a();if(u===`zones`?e.zoneId=p:e.accountId=p,e.body){let t=d(e.body),n=await c(`Creating`,async()=>l.send(h,{body:t,account_or_zone:u,account_or_zone_id:p}));o(n,{successLabel:`Created`});return}if(e[`accepted-terms-of-service`]===void 0)throw Error(`--accepted-terms-of-service is required (or pass --body with this field set).`);let m=f({acceptedTermsOfService:e[`accepted-terms-of-service`]}),g=await c(`Creating`,async()=>l.send(h,{body:m,account_or_zone:u,account_or_zone_id:p}));o(g,{successLabel:`Created`})})};var v={method:`GET`,path:t=>e`/${t.account_or_zone}/${t.account_or_zone_id}/monetization`,errors:{404:`NotFoundError`}};function y(e){return e.usage(`$0 monetization account-eligibility get
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-1AC-qwxS.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/teamnet/routes`,body:`json`};function h(e){return e.usage(`$0 network routes cidr create
|
|
3
3
|
|
|
4
4
|
Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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 tunnel route`,builder:h,handler:async e=>c({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}):l(e.body)});return}let c=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:p}));a(n,{successLabel:`Created`});return}e.network===void 0&&(e.network=await f(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let h=u({comment:d(e.comment,`comment`,`text`),network:d(e.network,`network`,`text`),virtual_network_id:d(e[`virtual-network-id`],`virtual-network-id`,`text`)}),g=await s(`Creating`,async()=>c.send(m,{body:h,account_id:p}));a(g,{successLabel:`Created`})})};var _={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/teamnet/routes/${t.route_id}`};function v(e){return e.usage(`$0 network routes cidr delete <route-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,n as p}from"./prompt-1AC-qwxS.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,body:`json`,errors:{400:`BadRequestError`,409:`ConflictError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 network-interconnects cnis create
|
|
3
3
|
|
|
4
4
|
Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session
|
|
5
5
|
Prefixes containing host bits will be normalized to contain network bits only.
|
|
@@ -23,7 +23,7 @@ or more of these disallowed characters will be rejected.`}).option(`interconnect
|
|
|
23
23
|
Permanently removes a Cloud Network Interconnect (CNI) configuration. The private network connection will be terminated.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,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 ee={command:`delete <cni>`,describe:`Delete a specified CNI object`,builder:v,handler:async e=>c({command:`network-interconnects cnis delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
24
24
|
`);return}let u=await s(`Deleting`,async()=>c.send(_,{account_id:l,cni:e.cni}));a(u,{successLabel:`Deleted`})})};var te={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis/${t.cni}`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function y(e){return e.usage(`$0 network-interconnects cnis get <cni>
|
|
25
25
|
|
|
26
|
-
Retrieves configuration details for a specific Cloud Network Interconnect (CNI), including connection status and parameters.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <cni>`,describe:`Get information about a CNI object`,builder:y,handler:async e=>c({command:`network-interconnects cnis get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l,cni:e.cni}));a(u,{successLabel:`Loaded`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,query:[`slot`,`tunnel_id`,`cursor`,`limit`],errors:{400:`BadRequestError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 network-interconnects cnis list
|
|
26
|
+
Retrieves configuration details for a specific Cloud Network Interconnect (CNI), including connection status and parameters.`).positional(`cni`,{type:`string`,description:`CNI ID to retrieve information about`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <cni>`,describe:`Get information about a CNI object`,builder:y,handler:async e=>c({command:`network-interconnects cnis get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf network-interconnects cnis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/cni/cnis/${e.cni==null?`<cni>`:encodeURIComponent(String(e.cni))}`,pathParams:{cni:String(e.cni??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(te,{account_id:l,cni:e.cni}));a(u,{successLabel:`Loaded`})})};var x={method:`GET`,path:t=>e`/accounts/${t.account_id}/cni/cnis`,query:[`slot`,`tunnel_id`,`cursor`,`limit`],errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function S(e){return e.usage(`$0 network-interconnects cnis list
|
|
27
27
|
|
|
28
28
|
Lists all Cloud Network Interconnects (CNIs) configured for the account, showing connection status and parameters.`).option(`slot`,{type:`string`,description:`If specified, only show CNIs associated with the specified slot`}).option(`tunnel-id`,{type:`string`,description:`If specified, only show cnis associated with the specified tunnel id`}).option(`cursor`,{type:`number`,description:`Cursor`}).option(`limit`,{type:`number`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`list`,describe:`List existing CNI objects`,builder:S,handler:async e=>c({command:`network-interconnects cnis list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let c={slot:e.slot,tunnel_id:e[`tunnel-id`],cursor:e.cursor,limit:e.limit};if(e.dryRun){let e=await r();o({command:`cf network-interconnects cnis list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/cni/cnis`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(x,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var w={method:`PUT`,path:t=>e`/accounts/${t.account_id}/cni/cnis/${t.cni}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,500:`InternalServerError`}};function T(e){return e.usage(`$0 network-interconnects cnis update <cni>
|
|
29
29
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,i,t as a}from"./context-BQ6KeMgq.mjs";import{t as o}from"./output-O6b9MR9R.mjs";import{t as s}from"./dry-run-DQmFkNK_.mjs";import{t as c}from"./progress-CdlDthXA.mjs";import{t as l}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{a as u,n as d,r as f,t as p}from"./body-parser-ChnyBsfm.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-1AC-qwxS.mjs";var ee={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function te(e){return e.usage(`$0 o11y agents sessions list
|
|
3
3
|
|
|
4
4
|
Lists sessions in which the specified agent participated, ordered by most recent activity. A session is identified by gen_ai.conversation.id and includes authorized activity from every agent in that conversation during the requested time range. Agent invocation and chat spans without a conversation ID are attributed only when their trace is associated with exactly one observed conversation.`).option(`service`,{type:`string`,description:`Worker service name associated with the participating agent.`,demandOption:!0}).option(`agent`,{type:`string`,description:`Agent name reported in gen_ai.agent.name. The request is limited to conversations in which this service and agent participated.`,demandOption:!0}).option(`from`,{type:`number`,description:`Start of the requested time range, as Unix epoch milliseconds. Values earlier than the 7-day retention boundary are clamped.`,demandOption:!0}).option(`to`,{type:`number`,description:`End of the requested time range, as Unix epoch milliseconds. Must be later than from.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response.`}).option(`per-page`,{type:`number`,description:`Maximum number of items to return. Defaults to 20 and cannot exceed 100.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List Agent sessions`,builder:te,handler:async e=>l({command:`o11y agents sessions list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let e=await r();s({command:`cf o11y agents sessions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/sessions`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ee,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/sessions/${t.conversationId}/runs`,query:[`service`,`agent`,`from`,`to`,`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents sessions runs <conversationId>
|
|
5
5
|
|
|
@@ -51,18 +51,18 @@ List resources configured for Workers Observability metrics export.`).option(`dr
|
|
|
51
51
|
|
|
52
52
|
Create or replace resources configured for Workers Observability metrics export.`).option(`requester-requester-id`,{type:`string`,description:`The requester.requesterId field`}).option(`requester-requester-type`,{type:`string`,description:`The requester.requesterType field`,choices:[`workers`]}).coerce(`requester-requester-type`,e=>m(e,`requester-requester-type`,`text`)).option(`resources`,{type:`string`,description:`The resources field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Je={command:`upsert`,describe:`Upsert Metrics Exports`,builder:qe,handler:async e=>l({command:`o11y metrics-export upsert`,classification:{safeFlags:[`requester-requester-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y metrics-export upsert`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({requester:{requesterId:m(e[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:e[`requester-requester-type`]},resources:u(e.resources,`resources`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(H,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`requester-requester-id`]===void 0&&(e[`requester-requester-id`]=await h(`requester-requester-id`,`The requester.requesterId field`)),e[`requester-requester-type`]===void 0&&(e[`requester-requester-type`]=await g(`requester-requester-type`,`The requester.requesterType field`,[`workers`])),e.resources===void 0)throw Error(`--resources is required (or pass --body with this field set).`);let f=p({requester:{requesterId:m(e[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:e[`requester-requester-type`]},resources:u(e.resources,`resources`)}),_=await c(`Creating`,async()=>i.send(H,{body:f,account_id:l}));o(_,{successLabel:`Created`})})},Ye={command:`metrics-export`,describe:`Operations for metrics-export`,builder:e=>e.command(Ke).command(Je).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var U={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries`,body:`json`,errors:{401:`UnauthorizedError`,409:`ConflictError`,500:`InternalServerError`}};function Xe(e){return e.usage(`$0 o11y queries create
|
|
53
53
|
|
|
54
|
-
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const Ze={command:`create`,describe:`Save query`,builder:Xe,handler:async e=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(U,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let
|
|
54
|
+
Persist query for later use.`).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const Ze={command:`create`,describe:`Save query`,builder:Xe,handler:async e=>l({command:`o11y queries create`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(U,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Creating`,async()=>i.send(U,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var Qe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function $e(e){return e.usage(`$0 o11y queries delete <queryId>
|
|
55
55
|
|
|
56
56
|
Delete a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,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 et={command:`delete <queryId>`,describe:`Delete query`,builder:$e,handler:async e=>l({command:`o11y queries delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,!await _({force:!!e.force})){process.stderr.write(`Aborted.
|
|
57
57
|
`);return}let u=await c(`Deleting`,async()=>i.send(Qe,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Deleted`})})};var W={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,body:`json`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function tt(e){return e.usage(`$0 o11y queries edit <queryId>
|
|
58
58
|
|
|
59
|
-
Update saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const nt={command:`edit <queryId>`,describe:`Update query`,builder:tt,handler:async e=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(W,{body:t,account_id:l,queryId:e[`query-id`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let
|
|
59
|
+
Update saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`name`,{type:`string`,description:`Query name`}).option(`parameters-calculations`,{type:`string`,description:`Create Calculations to compute as part of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Set the Datasets to query. Leave it empty to query all the datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Set a Flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Configure the Filters to apply to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Define how to group the results of the query. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Configure the Having clauses that filter on calculations in the query result. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Set a limit on the number of results / records returned by the query`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`The parameters.needle.isRegex field`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`The parameters.needle.matchCase field`}).option(`parameters-order-by-order`,{type:`string`,description:`Set the order of the results`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Configure which Calculation to order the results by.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Specify the new contents of the query.`})}const nt={command:`edit <queryId>`,describe:`Update query`,builder:tt,handler:async e=>l({command:`o11y queries edit`,classification:{safeFlags:[`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Updating`,async()=>i.send(W,{body:t,account_id:l,queryId:e[`query-id`]}));o(n,{successLabel:`Updated`});return}e.description===void 0&&(e.description=await h(`description`,`The description field`)),e.name===void 0&&(e.name=await h(`name`,`Query name`)),e[`parameters-order-by-value`]===void 0&&(e[`parameters-order-by-value`]=await h(`parameters-order-by-value`,`Configure which Calculation to order the results by.`));let f=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}}}),g=await c(`Updating`,async()=>i.send(W,{body:f,account_id:l,queryId:e[`query-id`]}));o(g,{successLabel:`Updated`})})};var rt={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function it(e){return e.usage(`$0 o11y queries get <queryId>
|
|
60
60
|
|
|
61
61
|
Retrieve a saved query.`).positional(`query-id`,{type:`string`,description:`QueryId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const at={command:`get <queryId>`,describe:`Get query`,builder:it,handler:async e=>l({command:`o11y queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/queries/${e[`query-id`]==null?`<query-id>`:encodeURIComponent(String(e[`query-id`]))}`,pathParams:{"query-id":String(e[`query-id`]??``)},bodyKind:`none`});return}let i=await n(e),l=e.local?t:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(rt,{account_id:l,queryId:e[`query-id`]}));o(u,{successLabel:`Loaded`})})};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function st(e){return e.usage(`$0 o11y queries list
|
|
62
62
|
|
|
63
63
|
List saved queries.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`PerPage`}).option(`order`,{type:`string`,description:`Order`,choices:[`asc`,`desc`]}).option(`order-by`,{type:`string`,description:`OrderBy`,choices:[`created`,`updated`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ct={command:`list`,describe:`List queries`,builder:st,handler:async e=>l({command:`o11y queries list`,classification:{safeFlags:[`order`,`order-by`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`]};if(e.dryRun){let e=await r();s({command:`cf o11y queries list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/queries`,pathParams:{},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ot,{account_id:u,...i}));o(d,{successLabel:`Loaded`})})},lt={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(Ze).command(et).command(nt).command(at).command(ct).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var G={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function ut(e){return e.usage(`$0 o11y shared-queries create
|
|
64
64
|
|
|
65
|
-
Shared queries store the results of a previously run query, allowing you to share the results with others.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const dt={command:`create`,describe:`Create a sharable link to a query result`,builder:ut,handler:async e=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(G,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let u=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),f=await c(`Creating`,async()=>i.send(G,{body:u,account_id:l}));o(f,{successLabel:`Created`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query/${t.id}`,query:[`view`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function pt(e){return e.usage(`$0 o11y shared-queries get <id>
|
|
65
|
+
Shared queries store the results of a previously run query, allowing you to share the results with others.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create a sharable link to a query result.`}).check(e=>{if([`parameters-calculations`,`parameters-datasets`,`parameters-filter-combination`,`parameters-filters`,`parameters-group-bys`,`parameters-havings`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const dt={command:`create`,describe:`Create a sharable link to a query result`,builder:ut,handler:async e=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(G,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Creating`,async()=>i.send(G,{body:f,account_id:l}));o(g,{successLabel:`Created`})})};var ft={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/shared/query/${t.id}`,query:[`view`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function pt(e){return e.usage(`$0 o11y shared-queries get <id>
|
|
66
66
|
|
|
67
67
|
Shared queries store the results of a previously run query, allowing you to share the results with others.`).positional(`id`,{type:`string`,description:`Specify the ID of the shared query.`,demandOption:!0}).option(`view`,{type:`string`,description:`Select the view of the query result to return, defaults to events.`,choices:[`events`,`invocations`,`calculations`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get <id>`,describe:`View a query that has been shared`,builder:pt,handler:async e=>l({command:`o11y shared-queries get`,classification:{safeFlags:[`view`,`dry-run`]}},e,async()=>{let i={view:e.view};if(e.dryRun){let t=await r();s({command:`cf o11y shared-queries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/shared/query/${e.id==null?`<id>`:encodeURIComponent(String(e.id))}`,pathParams:{id:String(e.id??``)},query:i,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ft,{account_id:u,id:e.id,...i}));o(d,{successLabel:`Loaded`})})},ht={command:`shared-queries`,describe:`Operations for shared-queries`,builder:e=>e.command(dt).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/live-tail/heartbeat`,body:`json`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function gt(e){return e.usage(`$0 o11y telemetry heartbeat
|
|
68
68
|
|
|
@@ -72,7 +72,7 @@ List all the keys in your telemetry events.`).option(`datasets`,{type:`string`,a
|
|
|
72
72
|
|
|
73
73
|
Prepare websocket server for live tail.`).option(`filter-combination`,{type:`string`,description:`Set a flag to describe how to combine the filters on the query.`,choices:[`and`,`or`,`AND`,`OR`],default:`and`}).coerce(`filter-combination`,e=>m(e,`filter-combination`,`text`)).option(`filters`,{type:`string`,description:`Apply filters to the query. Supports nested groups via kind: 'group'. Provide as a JSON array of objects or @path/to/file.json.`}).option(`script-id`,{type:`string`,description:`The scriptId field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Create websocket server for live tail.`})}const xt={command:`live-tail`,describe:`Prepare live tail`,builder:bt,handler:async e=>l({command:`o11y telemetry live-tail`,classification:{safeFlags:[`filter-combination`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry live-tail`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/live-tail`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({filterCombination:e[`filter-combination`],filters:u(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(J,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}let f=p({filterCombination:e[`filter-combination`],filters:u(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}),h=await c(`Creating`,async()=>i.send(J,{body:f,account_id:l}));o(h,{successLabel:`Created`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/query`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function St(e){return e.usage(`$0 o11y telemetry query
|
|
74
74
|
|
|
75
|
-
Run a temporary or saved query.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-datasets`,`parameters-filter-combination`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const Ct={command:`query`,describe:`Run a query`,builder:St,handler:async e=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Loading`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Loaded`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let u=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),f=await c(`Loading`,async()=>i.send(Y,{body:u,account_id:l}));o(f,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/values`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function wt(e){return e.usage(`$0 o11y telemetry values
|
|
75
|
+
Run a temporary or saved query.`).option(`chart`,{type:`boolean`,description:`When true, includes time-series data in the response.`}).option(`chart-type`,{type:`string`,description:`Controls the SQL shape and response payload for the 'calculations' view. Omitted or 'timeseries_and_aggregate': current behaviour — both the time-series and aggregate queries. 'timeseries': time-series only. 'aggregate': aggregate only. 'distribution': a bucketed 2D histogram (time × value buckets) returned in 'distribution' instead of 'calculations'. 'distribution' is not compatible with 'compare' — combining them returns a 400.`,choices:[`timeseries_and_aggregate`,`timeseries`,`aggregate`,`distribution`]}).coerce(`chart-type`,e=>m(e,`chart-type`,`text`)).option(`compare`,{type:`boolean`,description:`When true, includes a comparison dataset from the previous time period of equal length.`}).option(`distribution-scale`,{type:`string`,description:`Value-axis bucketing for chartType 'distribution'. Omitted or 'log': geometric buckets, best for heavy-tailed latency. 'linear': fixed-width buckets, clearer for narrow or additive ranges. Ignored for other chartTypes. The response echoes the scheme used in distribution.bucketMode.`,choices:[`log`,`linear`]}).coerce(`distribution-scale`,e=>m(e,`distribution-scale`,`text`)).option(`granularity`,{type:`number`,description:`Number of time-series buckets. Only used when view is 'calculations'. Omit to let the system auto-detect an appropriate granularity.`}).option(`ignore-series`,{type:`boolean`,description:`When true, omits time-series data from the response and returns only aggregated values. Reduces response size when series are not needed.`,default:!1}).option(`limit`,{type:`number`,description:`Maximum number of events to return when view is 'events'. Also controls the number of group-by rows when view is 'calculations'.`,default:50}).option(`offset`,{type:`string`,description:`Cursor for pagination in event, trace, invocation, and agent views. Pass the $metadata.id of the last event, the trace cursor, or AgentRun.id to fetch the next page.`}).option(`offset-by`,{type:`number`,description:`Numeric offset for paginating grouped/pattern results (top-N lists). Use together with limit. Not used by cursor-based pagination.`}).option(`offset-direction`,{type:`string`,description:`Pagination direction: 'next' for forward, 'prev' for backward.`}).option(`parameters-calculations`,{type:`string`,description:`Aggregation calculations to compute (e.g. count, avg, p99). Each calculation produces aggregate values and optional time-series data. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-datasets`,{type:`string`,array:!0,description:`Datasets to query. Leave empty to query all available datasets.`}).option(`parameters-filter-combination`,{type:`string`,description:`Logical operator for combining top-level filters: 'and' (all must match) or 'or' (any must match). Defaults to 'and'.`,choices:[`and`,`or`,`AND`,`OR`]}).coerce(`parameters-filter-combination`,e=>m(e,`parameters-filter-combination`,`text`)).option(`parameters-filters`,{type:`string`,description:`Filters to narrow query results. Use the keys and values endpoints to discover available fields before building filters. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-group-bys`,{type:`string`,description:`Fields to group calculation results by. Only applicable when the query view is 'calculations'. Produces per-group aggregate values. Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-havings`,{type:`string`,description:`Post-aggregation filters applied to calculation results. Use to filter groups after aggregation (e.g. only groups where count > 100). Provide as a JSON array of objects or @path/to/file.json.`}).option(`parameters-limit`,{type:`number`,description:`Maximum number of group-by rows to return in calculation results. A value of 10 is a sensible default for most use cases.`}).option(`parameters-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`parameters-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`parameters-order-by-order`,{type:`string`,description:`Sort direction: 'asc' for ascending, 'desc' for descending.`,choices:[`asc`,`desc`]}).coerce(`parameters-order-by-order`,e=>m(e,`parameters-order-by-order`,`text`)).option(`parameters-order-by-value`,{type:`string`,description:`Alias of the calculation to order results by. Must match the alias (or operator) of a calculation in the query.`}).option(`query-id`,{type:`string`,description:`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`}).option(`timeframe-from`,{type:`number`,description:`Start timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`timeframe-to`,{type:`number`,description:`End timestamp for the query timeframe. Unix timestamp in milliseconds`}).option(`view`,{type:`string`,description:`Controls the shape of the response. 'events': individual log lines matching the query. 'calculations': aggregated metrics (count, avg, p99, etc.) with optional group-by breakdowns and time-series. 'invocations': events grouped by request ID. 'traces': distributed trace summaries. 'agents': agent-specific trace summaries.`,choices:[`traces`,`events`,`calculations`,`invocations`,`requests`,`agents`],default:`calculations`}).coerce(`view`,e=>m(e,`view`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Query your observability events, requests, and traces to build visualizations and identify insights.`}).check(e=>{if([`parameters-calculations`,`parameters-datasets`,`parameters-filter-combination`,`parameters-filters`,`parameters-group-bys`,`parameters-havings`,`parameters-limit`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0)){let t=[`parameters-order-by-value`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --parameters-* flag is set`)}return!0})}const Ct={command:`query`,describe:`Run a query`,builder:St,handler:async e=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`ignore-series`,`parameters-filter-combination`,`parameters-needle-is-regex`,`parameters-needle-match-case`,`parameters-order-by-order`,`view`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/query`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Loading`,async()=>i.send(Y,{body:t,account_id:l}));o(n,{successLabel:`Loaded`});return}if(e[`query-id`]===void 0&&(e[`query-id`]=await h(`query-id`,`Identifier for the query. When parameters are omitted, this ID is used to load a previously saved query's parameters. When providing parameters inline, pass any identifier (e.g. an ad-hoc ID).`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);let f=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],granularity:e.granularity,ignoreSeries:e[`ignore-series`],limit:e.limit,offset:m(e.offset,`offset`,`text`),offsetBy:e[`offset-by`],offsetDirection:m(e[`offset-direction`],`offset-direction`,`text`),parameters:{calculations:u(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:u(e[`parameters-filters`],`parameters-filters`),groupBys:u(e[`parameters-group-bys`],`parameters-group-bys`),havings:u(e[`parameters-havings`],`parameters-havings`),limit:e[`parameters-limit`],needle:{isRegex:e[`parameters-needle-is-regex`],matchCase:e[`parameters-needle-match-case`]},orderBy:{order:e[`parameters-order-by-order`],value:m(e[`parameters-order-by-value`],`parameters-order-by-value`,`text`)}},queryId:m(e[`query-id`],`query-id`,`text`),timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},view:e.view}),g=await c(`Loading`,async()=>i.send(Y,{body:f,account_id:l}));o(g,{successLabel:`Loaded`})})};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/values`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function wt(e){return e.usage(`$0 o11y telemetry values
|
|
76
76
|
|
|
77
77
|
List unique values found in your events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters before listing values. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json.`}).option(`key`,{type:`string`,description:`The key field`}).option(`limit`,{type:`number`,description:`The limit field`,default:50}).option(`needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`timeframe-from`,{type:`number`,description:`The timeframe.from field`}).option(`timeframe-to`,{type:`number`,description:`The timeframe.to field`}).option(`type`,{type:`string`,description:`The type field`,choices:[`string`,`boolean`,`number`]}).coerce(`type`,e=>m(e,`type`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Retrieve values from your telemetry events.`})}const Tt={command:`values`,describe:`List values`,builder:wt,handler:async e=>l({command:`o11y telemetry values`,classification:{safeFlags:[`needle-is-regex`,`needle-match-case`,`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();s({command:`cf o11y telemetry values`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/values`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}):d(e.body)});return}let i=await n(e),l=e.local?t:await a();if(e.accountId=l,e.body){let t=d(e.body),n=await c(`Creating`,async()=>i.send(X,{body:t,account_id:l}));o(n,{successLabel:`Created`});return}if(e.datasets===void 0)throw Error(`--datasets is required (or pass --body with this field set).`);if(e.key===void 0&&(e.key=await h(`key`,`The key field`)),e[`timeframe-from`]===void 0)throw Error(`--timeframe-from is required (or pass --body with this field set).`);if(e[`timeframe-to`]===void 0)throw Error(`--timeframe-to is required (or pass --body with this field set).`);e.type===void 0&&(e.type=await g(`type`,`The type field`,[`string`,`boolean`,`number`]));let f=p({datasets:e.datasets,filters:u(e.filters,`filters`),key:m(e.key,`key`,`text`),limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},timeframe:{from:e[`timeframe-from`],to:e[`timeframe-to`]},type:e.type}),_=await c(`Creating`,async()=>i.send(X,{body:f,account_id:l}));o(_,{successLabel:`Created`})})},Et={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(_t).command(yt).command(xt).command(Ct).command(Tt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Dt={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ot(e){return e.usage(`$0 o11y tracing rules delete
|
|
78
78
|
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{r as t,t as n}from"./session-BsNzFtPi.mjs";import{t as r}from"./cli-exit-CstFZ1eJ.mjs";import{n as i,t as a}from"./version-CLgSHoNm.mjs";import{n as o}from"./blocks-CKb_aLWN.mjs";import{n as s,t as c}from"./project-settings-nBMEx1f-.mjs";import{a as l,n as u,o as d,t as f}from"./cf-PISMdEje.mjs";import{i as p,n as m,o as h,s as g}from"./dist-DAeCUX-u.mjs";import{n as _}from"./interactive-d_lFnSev.mjs";import{n as v}from"./context-BQ6KeMgq.mjs";import{relative as y}from"node:path";function b(t,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,a=n.columns??(i.columns||80),l=s(r),u=l?y(r,l):c,d=l?`To make this the project's default account, add accountId to ${u}:`:`To make this the project's default account, create ${u}:`,f=/* @__PURE__ */ new Set([`accountId`,u]),p=o(d,Math.max(20,a-3)).map(t=>t.split(` `).map(t=>{let n=t.replace(/:$/,``);return f.has(n)?`${e.code(n)}${t.slice(n.length)}`:t}).join(` `));m.info(p.join(`
|
|
3
|
+
`),{output:i});let h=`accountId: ${e.jsonString(JSON.stringify(t))},`,g=l?[h]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${h}`,`});`],_=` `.repeat(3);i.write(`\n${g.map(e=>e&&_+e).join(`
|
|
4
|
+
`)}\n\n`)}const x={debug:(...e)=>{process.env.DEBUG&&console.error(...e)},info:(...e)=>console.error(...e),log:(...e)=>console.error(...e),warn:(...e)=>console.error(...e),error:(...e)=>console.error(...e)};var S=class extends Error{};async function C(e){if(_())throw new S;n(i);let t=await h({message:e});if(g(t)||typeof t!=`string`)throw new r(130,{cancelled:!0});return t}async function w(e,a){if(_())throw new S;n(i);let o=await p({message:e,options:a.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(g(o)||typeof o!=`string`)throw new r(130,{cancelled:!0});return t()||b(o),o}const T=f({logger:x,userAgent:a,prompt:C,select:w,isNoDefaultValueProvidedError:e=>e instanceof S});async function E(e,t){return T.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await v(t)})}function D(){return T.getActiveAccountId({})}async function O(){return T.fetchAllAccounts({compliance_region:await v()},{throwOnEmpty:!1})}async function k(e){if(e?.scopes&&!d(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return T.login({compliance_region:await v()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function A(e){return T.logout(e)}function j(e){T.setProfile(e)}function M(e){l(e,{logger:x,getCredentialStore:()=>T.getCredentialStore()})}function N(){return T.getActiveProfile()}function P(){return u({logger:x})}function F(e,t=process.cwd()){let n=P().resolve({profile:e,cwd:t});return j(n),n}function I(){return T.getOAuthTokenFromLocalState()}function L(){return T.readAuthCredentials()?.oauth_token!==void 0}function R(){return T.readAuthCredentials()}function z(){return T.getCredentialStore().path()}export{E as a,L as c,R as d,F as f,z as i,k as l,j as m,D as n,P as o,M as p,N as r,I as s,O as t,A as u};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-B4sZZTRA.mjs";import{n}from"./auth-BaUNb1Ed.mjs";import{a as r,t as i}from"./context-BQ6KeMgq.mjs";import{t as a}from"./output-O6b9MR9R.mjs";import{t as o}from"./dry-run-DQmFkNK_.mjs";import{t as s}from"./progress-CdlDthXA.mjs";import{t as c}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as l,t as u}from"./body-parser-ChnyBsfm.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-1AC-qwxS.mjs";var h={method:`POST`,path:t=>e`/accounts/${t.account_id}/oauth_clients`,body:`json`};function g(e){return e.usage(`$0 oauth-clients create
|
|
3
3
|
|
|
4
4
|
Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).coerce(`token-endpoint-auth-method`,e=>d(e,`token-endpoint-auth-method`,`text`)).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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 _={command:`create`,describe:`Create OAuth Client`,builder:g,handler:async e=>c({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:e.body===void 0?u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}):l(e.body)});return}let c=await n(e),m=e.local?t:await i();if(e.accountId=m,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(h,{body:t,account_id:m}));a(n,{successLabel:`Created`});return}if(e[`client-name`]===void 0&&(e[`client-name`]=await f(`client-name`,`Human-readable name of the OAuth client.`)),e[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(e[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(e[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(e.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);e[`token-endpoint-auth-method`]===void 0&&(e[`token-endpoint-auth-method`]=await p(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let g=u({allowed_cors_origins:e[`allowed-cors-origins`],client_name:d(e[`client-name`],`client-name`,`text`),client_uri:d(e[`client-uri`],`client-uri`,`text`),grant_types:e[`grant-types`],logo_uri:d(e[`logo-uri`],`logo-uri`,`text`),optional_scopes:e[`optional-scopes`],policy_uri:d(e[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:e[`post-logout-redirect-uris`],redirect_uris:e[`redirect-uris`],response_types:e[`response-types`],scopes:e.scopes,token_endpoint_auth_method:e[`token-endpoint-auth-method`],tos_uri:d(e[`tos-uri`],`tos-uri`,`text`)}),_=await s(`Creating`,async()=>c.send(h,{body:g,account_id:m}));a(_,{successLabel:`Created`})})};var v={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/oauth_clients/${t.oauth_client_id}/rotate_secret`};function y(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-BaUNb1Ed.mjs";import{t}from"./output-O6b9MR9R.mjs";import{t as n}from"./dry-run-DQmFkNK_.mjs";import{t as r}from"./progress-CdlDthXA.mjs";import{t as i}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";var a={method:`GET`,path:()=>`/oauth/scopes`};function o(e){return e.usage(`$0 oauth-scopes list
|
|
3
3
|
|
|
4
4
|
List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`list`,describe:`List OAuth Scopes`,builder:o,handler:async o=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(o),s=await r(`Loading`,async()=>i.send(a));t(s,{successLabel:`Loaded`})})},c={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|