cf 1.0.0-beta.28 → 1.0.0-beta.29
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 +10 -3
- package/dist/_meta/commands.json +2240 -3181
- package/dist/_meta/hand-written-commands.json +38 -8
- package/dist/_meta/schemas.json +1683 -2505
- package/dist/{abuse-reports-D9edOyag.mjs → abuse-reports-DqXYX_6F.mjs} +10 -10
- package/dist/{access-CKCCSrrU.mjs → access-Cte4yyIz.mjs} +1 -1
- package/dist/{accounts-CNb9U9bK.mjs → accounts-G-x-_cEx.mjs} +58 -57
- package/dist/{acm-CdKTAToZ.mjs → acm-Bg3HqMGG.mjs} +7 -7
- package/dist/{addressing-eZI_C-b0.mjs → addressing-BwEofGEm.mjs} +46 -46
- package/dist/{agent-memory-BBHCEE7h.mjs → agent-memory-DhwZ2KRw.mjs} +15 -15
- package/dist/{ai-Csl_QNwv.mjs → ai-DWWRIQIt.mjs} +16 -16
- package/dist/{ai-audit-DlqWsQi-.mjs → ai-audit-CMEBz6ZP.mjs} +3 -3
- package/dist/ai-gateway-D2s0isU-.mjs +76 -0
- package/dist/ai-search-a0uqr9yJ.mjs +74 -0
- package/dist/{ai-security-DvU2iYkY.mjs → ai-security-H_RqjRoL.mjs} +4 -4
- package/dist/alerting-Bgp9rE4I.mjs +52 -0
- package/dist/analytics-CFYM82FD.mjs +17 -0
- package/dist/{analytics-engine-BlIecoOe.mjs → analytics-engine-BLiEaLxb.mjs} +2 -2
- package/dist/{api-security-DZ7GWOqD.mjs → api-security-B0YtHglt.mjs} +63 -63
- package/dist/{argo-Bh0_cj49.mjs → argo-BPwbzHY7.mjs} +7 -7
- package/dist/{artifacts-VZJWVq_6.mjs → artifacts-B6UwC2PH.mjs} +20 -20
- package/dist/{audit-logs-B8cGL4B9.mjs → audit-logs-kG97iEnI.mjs} +2 -2
- package/dist/auth-Czr8ChBB.mjs +2 -0
- package/dist/auth-DA1PHaHi.mjs +2 -0
- package/dist/auth-Dwfa4S3h.mjs +7 -0
- package/dist/{auth-token-DW4dJVdj.mjs → auth-token-CE3Wa5-b.mjs} +1 -1
- package/dist/{autoconfig-C0ynlGHf.mjs → autoconfig-B4tFR6ua.mjs} +120 -116
- package/dist/{basin-catalog-TehR1sKZ.mjs → basin-catalog-DzVEPupy.mjs} +17 -17
- package/dist/{billing-B2KusU6g.mjs → billing-TERxOuLR.mjs} +11 -11
- package/dist/{blocks-BFulF68V.mjs → blocks-C3Im7AT0.mjs} +1 -1
- package/dist/body-parser-HN91kAf0.mjs +2 -0
- package/dist/{body-unions-DNs981Ia.mjs → body-unions-D9OSaf4M.mjs} +1 -1
- package/dist/{bot-management-CXHXgrQC.mjs → bot-management-SZw9jTOC.mjs} +4 -4
- package/dist/{botnet-feed-UyK7Rfp6.mjs → botnet-feed-DjdAeUtb.mjs} +5 -5
- package/dist/brand-protection-BpA7Gmf1.mjs +18 -0
- package/dist/browser-run-BvjfMK3f.mjs +40 -0
- package/dist/build-CCwo_ydV.mjs +2 -0
- package/dist/{build-FFxzigo4.mjs → build-yQOzZg6Z.mjs} +1 -1
- package/dist/builds-tMa3sbQU.mjs +62 -0
- package/dist/{cache-BacNNtLu.mjs → cache-b_EPh6Is.mjs} +18 -18
- package/dist/cf-DmvZ2L51.mjs +18 -0
- package/dist/{chunk-DSGVRFIS-BaNZNW-M.mjs → chunk-DSGVRFIS-Cj7pO-YQ.mjs} +1 -1
- package/dist/chunk-Q5KVZMHK-WOCEMyET.mjs +363 -0
- package/dist/cli-Cc7ujzAy.mjs +4 -0
- package/dist/{client-side-security-bzB9JosR.mjs → client-side-security-DVkeCzcC.mjs} +14 -14
- package/dist/{cloud-connector-BHtf37R5.mjs → cloud-connector-MVf4acRR.mjs} +3 -3
- package/dist/{cloudflared-QDdHMUEY.mjs → cloudflared-BOkMl8Gm.mjs} +1 -1
- package/dist/cloudforce-one-KrCfQbRx.mjs +318 -0
- package/dist/{command-D895kdlh.mjs → command-BQbZw4Kx.mjs} +1 -1
- package/dist/command-BVct0Dvr.mjs +2 -0
- package/dist/{command-DeutqL1n.mjs → command-C4_lMRkw.mjs} +1 -1
- package/dist/command-CJ3ldWrA.mjs +2 -0
- package/dist/command-CyOdBNur.mjs +2 -0
- package/dist/command-D2XkyO1e.mjs +2 -0
- package/dist/command-DHODgfFZ.mjs +2 -0
- package/dist/command-DIIaZx_f.mjs +2 -0
- package/dist/command-DONwHpqZ.mjs +2 -0
- package/dist/command-DdYnSf-8.mjs +2 -0
- package/dist/command-DqOU7Ql2.mjs +2 -0
- package/dist/{command-CbxXc5IW.mjs → command-HW7k43qu.mjs} +1 -1
- package/dist/command-NqM0lo4a.mjs +2 -0
- package/dist/command-bwVDyMv4.mjs +2 -0
- package/dist/command-yzqs4m83.mjs +2 -0
- package/dist/{completions-BvdKtzsX.mjs → completions-0YKvIyBT.mjs} +2 -2
- package/dist/{connector-interrupts-dUPW6Ya_.mjs → connector-interrupts-CsunbRsr.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWVCqnhn.mjs → connector-telemetry-events-DmQPD7xC.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-CeMP3qeI.mjs → connector-telemetry-snapshots-C62iHjC9.mjs} +3 -3
- package/dist/{connectors-DZFGNw3i.mjs → connectors-Bg0MU6ZT.mjs} +7 -7
- package/dist/{containers-DCzQCo79.mjs → containers-BiA_bpPR.mjs} +22 -21
- package/dist/{content-scan-XhnNJqXf.mjs → content-scan-4SA2nacB.mjs} +6 -6
- package/dist/{context-BY1Eh_Qe.mjs → context-BGm5_wTT.mjs} +1 -1
- package/dist/{cps-CohlxvuN.mjs → cps-WDmD3V5I.mjs} +3 -3
- package/dist/csam-scanner-Rmy-hBEA.mjs +8 -0
- package/dist/{custom-csrs-BVdMQjYq.mjs → custom-csrs-D-lvkyRV.mjs} +5 -5
- package/dist/{custom-hostnames-r-CxhSa1.mjs → custom-hostnames-B5BQX5m6.mjs} +12 -12
- package/dist/{custom-nameservers-CapMDyly.mjs → custom-nameservers-CZrRjcjx.mjs} +4 -4
- package/dist/{custom-pages-BVIniWfq.mjs → custom-pages-CWwjtfbj.mjs} +10 -10
- package/dist/d1-N81q-FAr.mjs +50 -0
- package/dist/{delegate-CcL6RoGw.mjs → delegate-livNdiwK.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-Ok4ncy06.mjs +2 -0
- package/dist/deploy-context-B_lLfxt7.mjs +55 -0
- package/dist/deploy-input-JZlEJwKB.mjs +2 -0
- package/dist/dev-DxbkJkzc.mjs +4 -0
- package/dist/{diagnostics-C3nqxsAO.mjs → diagnostics-DlJzpO8b.mjs} +7 -7
- package/dist/dialog-CD94-Kzw.mjs +2 -0
- package/dist/discover-D9FNaCDK.mjs +2 -0
- package/dist/discover-DGsMj9ZN.mjs +2 -0
- package/dist/{dist-D-ihn_mV.mjs → dist-BxhwE-W1.mjs} +193 -193
- package/dist/{dls-N1x8sAK3.mjs → dls-5OXuxLAB.mjs} +8 -8
- package/dist/{dns-DATWP-PF.mjs → dns-Burep9O7.mjs} +59 -69
- package/dist/{dns-firewall-n3Y2ui6W.mjs → dns-firewall-hUHaQ0DE.mjs} +8 -8
- package/dist/docs-BFVK88kB.mjs +3 -0
- package/dist/{dry-run-kJbjn4kG.mjs → dry-run-qsnRlRk6.mjs} +1 -1
- package/dist/{durable-objects-DHK9w-vO.mjs → durable-objects-D6R8S2Dk.mjs} +3 -3
- package/dist/email-auth--2KCzZNA.mjs +6 -0
- package/dist/email-routing-DzaExfVf.mjs +44 -0
- package/dist/{email-security-DK_SJ0yi.mjs → email-security-DwQJszzy.mjs} +71 -71
- package/dist/{email-sending-CTQafGec.mjs → email-sending-mQd2qB-o.mjs} +21 -21
- package/dist/errors-C_bGcR0X.mjs +11 -0
- package/dist/field-extractors-MVOizTlB.mjs +8 -0
- package/dist/{firewall-CW-fAI9m.mjs → firewall-DtSIlkfL.mjs} +19 -19
- package/dist/{flagship-RiLnDwfJ.mjs → flagship-9E5gwNki.mjs} +12 -12
- package/dist/{fraud-DvfBBTe8.mjs → fraud-DjqhVJdf.mjs} +3 -3
- package/dist/generate-BzOnRBij.mjs +2 -0
- package/dist/generate-DfxZtpn9.mjs +2 -0
- package/dist/{global-options-DiKj2cQy.mjs → global-options-4pyD17hd.mjs} +1 -1
- package/dist/{google-tag-gateway-C5WYsSXv.mjs → google-tag-gateway-BM5GmCZa.mjs} +3 -3
- package/dist/gt-BV-jij5q.mjs +4 -0
- package/dist/healthchecks-CEZ5f3XJ.mjs +20 -0
- package/dist/{hyperdrive-Ch6klUp3.mjs → hyperdrive-Da8hCcUw.mjs} +12 -12
- package/dist/{iam-LlGEzRCq.mjs → iam-BK6N7NdQ.mjs} +31 -31
- package/dist/{images-C5WqUXkK.mjs → images-3bCWE6Ml.mjs} +33 -33
- package/dist/index.mjs +1 -1
- package/dist/init-BgCF9K8h.mjs +43 -0
- package/dist/{intel-vcWyslaX.mjs → intel-BQ58CJLt.mjs} +30 -30
- package/dist/{interactive-BCDFSPtq.mjs → interactive-JBA3qOUa.mjs} +9 -9
- package/dist/{internal-BhV9WjLp.mjs → internal-CWPz0sBF.mjs} +2 -2
- package/dist/{ips-CqHjVsqd.mjs → ips-3WYegiVW.mjs} +2 -2
- package/dist/{k2-CZT2Pd5J.mjs → k2-Bc_hjmiv.mjs} +5 -5
- package/dist/{kv-Ipa7dnvF.mjs → kv-DbShBhhg.mjs} +6 -6
- package/dist/{lazy-command-DbKVgdGT.mjs → lazy-command-CbGyEqFK.mjs} +1 -1
- package/dist/leaked-credential-checks-DgPefxP9.mjs +16 -0
- package/dist/{live-C9L1bNuE.mjs → live-BTtMv1a6.mjs} +2 -2
- package/dist/load-balancers-C2hg52WA.mjs +84 -0
- package/dist/{local-DIJ7SIKC.mjs → local-B3zt9PXR.mjs} +1 -1
- package/dist/local-DRxctCh9.mjs +2 -0
- package/dist/local-runtime-BOnDiMDc.mjs +2 -0
- package/dist/{log-BWdaOGOW.mjs → log-Brx-wjJW.mjs} +3 -3
- package/dist/log-DBAHla_W.mjs +2 -0
- package/dist/login-CK3nn9a5.mjs +2 -0
- package/dist/{login-DG5ebyab.mjs → login-DiR-buzS.mjs} +3 -3
- package/dist/{logpush-C5Gw7F_9.mjs → logpush-CitvUX-J.mjs} +22 -22
- package/dist/{logs-y3REfHbb.mjs → logs-CfWHu4Ir.mjs} +14 -16
- package/dist/{magic-network-monitoring-BZBGZB6M.mjs → magic-network-monitoring-gU6yzzML.mjs} +17 -17
- package/dist/{magic-transit-BPV_POf5.mjs → magic-transit-B3JY9u5o.mjs} +139 -139
- package/dist/{managed-defense-BaUBSUcz.mjs → managed-defense-C_EQ-NYp.mjs} +9 -9
- package/dist/managed-transforms-DIGl6JkM.mjs +8 -0
- package/dist/{mcp-RPtrISTy.mjs → mcp-DqhQJVaz.mjs} +15 -15
- package/dist/{mesh-DZ4QHBPE.mjs → mesh-DXVZBNDC.mjs} +12 -12
- package/dist/{migrate-CRIUqGi2.mjs → migrate-CmXyk9vX.mjs} +1 -1
- package/dist/{monetization-CVZqM8Xo.mjs → monetization-CWg-mySr.mjs} +9 -9
- package/dist/{network-interconnects-9nS5jL__.mjs → network-interconnects-DhfKL5tG.mjs} +17 -19
- package/dist/{network-DLt2JUo1.mjs → network-jtgq5eb4.mjs} +24 -24
- package/dist/o11y-eYYs59X9.mjs +88 -0
- package/dist/oauth-BgDZMd72.mjs +5 -0
- package/dist/{oauth-Cidoyxfp.mjs → oauth-V37G-PaV.mjs} +1 -1
- package/dist/{observability-C-KNh__y.mjs → observability-CB72eC4T.mjs} +2 -2
- package/dist/{ohttp-gateway-B5nCl4s3.mjs → ohttp-gateway-K9ToEft8.mjs} +4 -4
- package/dist/{organizations-DbeeWUL4.mjs → organizations-BllV7l_c.mjs} +18 -19
- package/dist/output-hFMAotFl.mjs +2 -0
- package/dist/package-oNVeacC9.mjs +2 -0
- package/dist/page-rules-BVmi-ZFW.mjs +35 -0
- package/dist/pages-5spcBpX1.mjs +48 -0
- package/dist/{pay-per-crawl-EHYtSKxX.mjs → pay-per-crawl-BgsdGcBi.mjs} +18 -18
- package/dist/{pay-per-use-wdEhl8k4.mjs → pay-per-use-CzmI1kEA.mjs} +16 -16
- package/dist/pipelines-CbtmLRxt.mjs +40 -0
- package/dist/{precursor-Dx8lN4UJ.mjs → precursor-Dk8YOKf_.mjs} +2 -2
- package/dist/previews-Bv1HMMtO.mjs +6 -0
- package/dist/progress-DE_G09u2.mjs +2 -0
- package/dist/project-settings-D_S-UC8I.mjs +3 -0
- package/dist/prompt-D274Im1O.mjs +4 -0
- package/dist/{queues-DgMc7Z6A.mjs → queues-DGCYUr4g.mjs} +26 -26
- package/dist/{r2-BpTVicIq.mjs → r2-DtCk-Nfi.mjs} +51 -51
- package/dist/{radar-DW-S1VUh.mjs → radar-1CwqOsMZ.mjs} +150 -150
- package/dist/raw-fetch-DhlyWQtk.mjs +2 -0
- package/dist/{ready-d0li0X6r.mjs → ready-CcoEA7M7.mjs} +2 -2
- package/dist/{realtime-DMKHLYF4.mjs → realtime-DFUxwIG5.mjs} +80 -81
- package/dist/registrar-Cl1snz8z.mjs +43 -0
- package/dist/{registrar-sandbox-lVLB1-mC.mjs → registrar-sandbox-Cne9BVCZ.mjs} +9 -9
- package/dist/{reporting-WX8P3Y0k.mjs → reporting-D9FC-Z-3.mjs} +7 -7
- package/dist/request-headers-Bopp5lH_.mjs +2 -0
- package/dist/request-tracers-CSSB9_aW.mjs +4 -0
- package/dist/{resource-sharing-B2ZSt_cA.mjs → resource-sharing-D8yuzJm7.mjs} +18 -18
- package/dist/{rules-CB0QQTB3.mjs → rules-DzmOQ3MB.mjs} +8 -8
- package/dist/rulesets-DsTGcgbc.mjs +42 -0
- package/dist/{rum-BZ_24qZU.mjs → rum-DrJLI93T.mjs} +14 -14
- package/dist/run-C5yPsiO2.mjs +2 -0
- package/dist/run-CXWkMU3x.mjs +2 -0
- package/dist/schema-CfZOW8Zw.mjs +2 -0
- package/dist/{schema-cache-5NkOj7Y3.mjs → schema-cache-CtqAs0PP.mjs} +1 -1
- package/dist/schema-flags-DO3kLYBu.mjs +4 -0
- package/dist/{scim-DchxaJfE.mjs → scim-0OufLKru.mjs} +8 -8
- package/dist/{secrets-store-oAft1cFE.mjs → secrets-store-BQeLzFxv.mjs} +11 -11
- package/dist/{security-insights-DMm0qg_m.mjs → security-insights-D2pj8-O-.mjs} +20 -20
- package/dist/{security-txt-CIt0494b.mjs → security-txt-SKtgW4n-.mjs} +4 -4
- package/dist/session-COdP8BXD.mjs +2 -0
- package/dist/shared-D_2KLpP3.mjs +2 -0
- package/dist/{signed-url-gNangfwc.mjs → signed-url-CcE2zQ4Y.mjs} +2 -2
- package/dist/smart-shield-Dod9Gs6T.mjs +22 -0
- package/dist/snippets-DrrdpLnS.mjs +18 -0
- package/dist/spawn-DNf-Ge8d.mjs +5 -0
- package/dist/{spectrum-DLYIHelC.mjs → spectrum-CHBGZbZF.mjs} +11 -11
- package/dist/{speed-DugG9Tm9.mjs → speed-vOlHyG3v.mjs} +11 -11
- package/dist/sql-BCuLxGSf.mjs +4 -0
- package/dist/src-ByCoEqOw.mjs +133 -0
- package/dist/{ssl-Bg4X3WGk.mjs → ssl-BA_dcVwF.mjs} +60 -62
- package/dist/startup-profile-CyQk_f_L.mjs +2 -0
- package/dist/{startup-profile-DZL2DC44.mjs → startup-profile-uh-F0HRS.mjs} +3 -3
- package/dist/state-B6r-b_-d.mjs +2 -0
- package/dist/{state-mr5ux1Nb.mjs → state-CTLznbVs.mjs} +1 -1
- package/dist/static-assets-DGDoaJf1.mjs +386 -0
- package/dist/stream-CzlqY8hq.mjs +89 -0
- package/dist/{tags-SKz2odE_.mjs → tags-BLeaslAb.mjs} +8 -8
- package/dist/telemetry-COlodX5Z.mjs +2 -0
- package/dist/{telemetry-B4zmCpT0.mjs → telemetry-DF7A5Bpk.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BhkhBerL.mjs → tenant-custom-nameservers-C5rh6jPf.mjs} +4 -4
- package/dist/{tenants-DD-GMq0K.mjs → tenants-CRirmhxS.mjs} +3 -3
- package/dist/{tools-KW_4hvzY.mjs → tools-BRjRgZnj.mjs} +1 -1
- package/dist/tunnels-nLfIWPYT.mjs +27 -0
- package/dist/{turnstile-DhSU_Xar.mjs → turnstile-CZjXtBCr.mjs} +10 -10
- package/dist/ui-dWsVmFCG.mjs +2 -0
- package/dist/{update-check-HltjTMDE.mjs → update-check-CXMdVBhW.mjs} +1 -1
- package/dist/{update-check-CRttabfu.mjs → update-check-D_Oky9-u.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-normalization-K7gkmPvG.mjs → url-normalization-DTKgJHE8.mjs} +4 -4
- package/dist/url-scanner-9XW3zLaU.mjs +16 -0
- package/dist/user-Bk1BIqZ5.mjs +103 -0
- package/dist/{vectorize-BTBerJME.mjs → vectorize-CgOfmWYq.mjs} +15 -15
- package/dist/version-CcuBNjqg.mjs +2 -0
- package/dist/waiting-rooms-C3nTKfK9.mjs +52 -0
- package/dist/{web-assets-LHPQsrnY.mjs → web-assets-CWU3jrit.mjs} +29 -29
- package/dist/{web3-BsOio0Ae.mjs → web3-CRpQ5sl4.mjs} +13 -13
- package/dist/workers-BZMvamn0.mjs +39 -0
- package/dist/{workers-for-platforms-BGp6yr6P.mjs → workers-for-platforms-C7F2ev-5.mjs} +18 -18
- package/dist/{workers-vpc-D8lefWDo.mjs → workers-vpc-ztEKvWmq.mjs} +6 -6
- package/dist/{workflows-B-ZIG3y7.mjs → workflows-Dd88_Nqc.mjs} +24 -24
- package/dist/{wrangler-migration-6E6wT_LZ.mjs → wrangler-migration-BzMTJPdI.mjs} +294 -294
- package/dist/zaraz-BFK0p28R.mjs +22 -0
- package/dist/{zero-trust-BZDXM5r6.mjs → zero-trust-Cdjfp0Ie.mjs} +441 -455
- package/dist/{zones-B-UV_DGE.mjs → zones-DDn5jk6I.mjs} +51 -51
- package/package.json +19 -19
- package/dist/ai-gateway-Lj4On37s.mjs +0 -74
- package/dist/ai-search-BxyhS3X7.mjs +0 -74
- package/dist/alerting-r0G2X9y9.mjs +0 -52
- package/dist/analytics-C6bfqm-W.mjs +0 -17
- package/dist/auth-B-h0BHg7.mjs +0 -2
- package/dist/auth-B6tswVxH.mjs +0 -2
- package/dist/auth-clmqFEWU.mjs +0 -7
- package/dist/body-parser-DoewLePl.mjs +0 -2
- package/dist/brand-protection-kv1ba80i.mjs +0 -14
- package/dist/browser-run-D-vRoZmf.mjs +0 -40
- package/dist/build-BzJGqb2o.mjs +0 -2
- package/dist/builds-BbxINHRP.mjs +0 -64
- package/dist/cf-BQ_LRiut.mjs +0 -18
- package/dist/chunk-SOBRPAPT-QTjnHSNs.mjs +0 -363
- package/dist/cli-B7vslRfu.mjs +0 -4
- package/dist/cloudforce-one-DWBPQDA3.mjs +0 -318
- package/dist/command-AVwd7XjE.mjs +0 -2
- package/dist/command-B87T_f2f.mjs +0 -2
- package/dist/command-CEHhi3t0.mjs +0 -2
- package/dist/command-CYmQE79n.mjs +0 -2
- package/dist/command-Ce8CVLth.mjs +0 -2
- package/dist/command-CqDudQZs.mjs +0 -2
- package/dist/command-D4YcwpVp.mjs +0 -2
- package/dist/command-D9Qyi1B0.mjs +0 -2
- package/dist/command-Dl9ICrRK.mjs +0 -2
- package/dist/command-DtCSe8Hy.mjs +0 -2
- package/dist/command-DwzVtmb3.mjs +0 -2
- package/dist/command-wtBubtZ4.mjs +0 -2
- package/dist/containers-B06OGOEB.mjs +0 -380
- package/dist/csam-scanner-BV4bHq8v.mjs +0 -8
- package/dist/d1-nJCOJZb8.mjs +0 -50
- package/dist/deploy-DJMnWFNk.mjs +0 -2
- package/dist/deploy-context-YCW3eqP1.mjs +0 -56
- package/dist/deploy-input-CQLBXFEB.mjs +0 -2
- package/dist/dev-GsYHvMah.mjs +0 -4
- package/dist/dialog-D5lus4M4.mjs +0 -2
- package/dist/discover-6kAmVMPp.mjs +0 -2
- package/dist/discover-C06Syc2B.mjs +0 -2
- package/dist/docs-CRc_WOXh.mjs +0 -3
- package/dist/email-auth-ptdqNSTZ.mjs +0 -6
- package/dist/email-domains-uL22-zRY.mjs +0 -14
- package/dist/email-routing-CV43rMJC.mjs +0 -44
- package/dist/errors-VG1mgwJl.mjs +0 -11
- package/dist/field-extractors-jcZ_bAGc.mjs +0 -8
- package/dist/generate-CeeWW3eX.mjs +0 -3
- package/dist/generate-D6V4Q58z.mjs +0 -2
- package/dist/gt-BQkaDQDq.mjs +0 -3
- package/dist/healthchecks-BA1fmzTm.mjs +0 -20
- package/dist/init-EVsjBrOz.mjs +0 -43
- package/dist/leaked-credential-checks-EzT4TTjO.mjs +0 -16
- package/dist/load-balancers-Cb3VkSfc.mjs +0 -84
- package/dist/local-D5Vq6ooZ.mjs +0 -2
- package/dist/local-runtime-BZjgkacr.mjs +0 -2
- package/dist/log-DZfik9Jk.mjs +0 -2
- package/dist/login-DRJugxya.mjs +0 -2
- package/dist/managed-transforms-CjkjLzMC.mjs +0 -8
- package/dist/o11y-ySxrnP1Z.mjs +0 -88
- package/dist/oauth-CFVUl-Wv.mjs +0 -4
- package/dist/output-BZQEl3mK.mjs +0 -2
- package/dist/package-B7RgwuFR.mjs +0 -2
- package/dist/page-rules-DRw763O1.mjs +0 -38
- package/dist/pages-DfQnxiTk.mjs +0 -48
- package/dist/pipelines-DbyrI6F4.mjs +0 -40
- package/dist/previews-DEVNSip2.mjs +0 -6
- package/dist/progress-yvPscjYg.mjs +0 -2
- package/dist/project-settings-nBMEx1f-.mjs +0 -3
- package/dist/prompt-CEpZ-lQZ.mjs +0 -4
- package/dist/raw-fetch-Cl5spWC3.mjs +0 -2
- package/dist/registrar-D23gfKBi.mjs +0 -43
- package/dist/request-headers-C0FpeBhz.mjs +0 -2
- package/dist/request-tracers-qd7XOAka.mjs +0 -4
- package/dist/rulesets-DmqwixUC.mjs +0 -42
- package/dist/run-BOKI1uWa.mjs +0 -2
- package/dist/run-DBqOjD1P.mjs +0 -2
- package/dist/schema-Dj9STsWI.mjs +0 -2
- package/dist/schema-flags-CXm9iIv6.mjs +0 -4
- package/dist/session-vzNfUhPl.mjs +0 -2
- package/dist/shared-MK-_lkbn.mjs +0 -2
- package/dist/smart-shield-Boy_qbqd.mjs +0 -22
- package/dist/snippets-DdoDYXW-.mjs +0 -18
- package/dist/spawn-B5F4OIHG.mjs +0 -5
- package/dist/sql-Bb56llsb.mjs +0 -4
- package/dist/src-BoSDeQ9m.mjs +0 -133
- package/dist/startup-profile-DQVkZZpb.mjs +0 -2
- package/dist/state-DW3QZtfh.mjs +0 -2
- package/dist/stream-BuZYDbNR.mjs +0 -89
- package/dist/telemetry-DkDUr4KK.mjs +0 -2
- package/dist/tunnels-D90ztENM.mjs +0 -27
- package/dist/ui-xjCox-gU.mjs +0 -2
- package/dist/url-scanner-BRdWwka4.mjs +0 -16
- package/dist/user-Cmb1_Wu5.mjs +0 -103
- package/dist/version-6Bpy6Bgt.mjs +0 -2
- package/dist/waiting-rooms-LymmKIGr.mjs +0 -52
- package/dist/workers-BnLiOjZf.mjs +0 -39
- package/dist/workers-builds-sKpITeRk.mjs +0 -14
- package/dist/zaraz-BBKki5WS.mjs +0 -22
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,i,t as a}from"./context-BGm5_wTT.mjs";import{t as o}from"./local-B3zt9PXR.mjs";import{t as s}from"./output-hFMAotFl.mjs";import{t as c}from"./progress-DE_G09u2.mjs";import{t as l}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{i as u,o as d,r as f,t as p}from"./body-parser-HN91kAf0.mjs";import{n as m}from"./input-validation-D7z60HJH.mjs";import{a as h,i as g,n as _}from"./prompt-D274Im1O.mjs";var v={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}/events`,query:[`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ee(e){return e.usage(`$0 o11y agents traces events <traceId>
|
|
3
|
+
|
|
4
|
+
Returns a page of authorized canonical otel events for a Trace containing named Agent activity, using the existing events-query flow. Searches the full 7-day retention unless from or to narrow it. Events are ordered by event timestamp and ID, newest first. Continue with result_info.cursors.after; one page is not a complete span tree.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 100.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`events <traceId>`,describe:`List Agent Trace events`,builder:ee,handler:async e=>l({command:`o11y agents traces events`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces events`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}/events`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(v,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var y={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces/${t.traceId}`,query:[`from`,`to`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function b(e){return e.usage(`$0 o11y agents traces get <traceId>
|
|
5
|
+
|
|
6
|
+
Returns the summary of one Trace containing named Agent activity, with the same fields as the Trace list. Searches the full 7-day retention unless from or to narrow it. List the Trace's events with /agents/traces/{traceId}/events.`).positional(`trace-id`,{type:`string`,description:`Trace ID: 32 hexadecimal characters, matched case-insensitively.`,demandOption:!0}).option(`from`,{type:`number`,description:`Optional. Narrows the search, which by default covers the full 7-day retention, so any retained Trace ID can be fetched without a window. Start as Unix epoch milliseconds; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`Optional. Narrows the search; end as Unix epoch milliseconds. Defaults to now.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get <traceId>`,describe:`Get an Agent Trace`,builder:b,handler:async e=>l({command:`o11y agents traces get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to};if(e.dryRun){let t=await r();n({command:`cf o11y agents traces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/agents/traces/${e[`trace-id`]==null?`<trace-id>`:encodeURIComponent(String(e[`trace-id`]))}`,pathParams:{"trace-id":String(e[`trace-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(y,{account_id:u,traceId:e[`trace-id`],...i}));s(d,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/agents/traces`,query:[`service`,`agent`,`from`,`to`,`per_page`,`cursor`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function ie(e){return e.usage(`$0 o11y agents traces list
|
|
7
|
+
|
|
8
|
+
Lists Traces with a named Agent invocation in the window, ordered by lastActivityMs, newest first, including work without a Conversation ID. The window defaults to the last 24 hours. Summaries include the Agent names and Conversation IDs seen, authorized Trace duration, chat input/output/total tokens, models, providers, LLM/tool call counts and span-error counts within the effective window.`).option(`service`,{type:`string`,description:`Only include work in which an Agent of this Worker service took part.`}).option(`agent`,{type:`string`,description:`Only include work in which an Agent with this gen_ai.agent.name took part. With service, both must match the same Agent.`}).option(`from`,{type:`number`,description:`Start of the search window, as Unix epoch milliseconds. Defaults to 24 hours before to. Clamped to the 7-day retention boundary; the effective value is in result_info.from.`}).option(`to`,{type:`number`,description:`End of the search window, as Unix epoch milliseconds. Defaults to now.`}).option(`per-page`,{type:`number`,description:`Maximum items to return per page. Defaults to 20.`}).option(`cursor`,{type:`string`,description:`Opaque cursor from result_info.cursors.after in the previous response. Send it with the same filters; its window replaces from and to.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`list`,describe:`List Agent Traces`,builder:ie,handler:async e=>l({command:`o11y agents traces list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service,agent:e.agent,from:e.from,to:e.to,per_page:e[`per-page`],cursor:e.cursor};if(e.dryRun){let e=await r();n({command:`cf o11y agents traces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/agents/traces`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(re,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},oe={command:`traces`,describe:`Operations for agents.traces`,builder:e=>e.command(te).command(ne).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},se={command:`agents`,describe:`Operations for agents`,builder:e=>e.command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var x={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function ce(e){return e.usage(`$0 o11y destinations create
|
|
9
|
+
|
|
10
|
+
Create a new Workers Observability Telemetry Destination.`).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": string}.`}).option(`configuration-logpush-dataset`,{type:`string`,description:`The configuration.logpushDataset field`,choices:[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`]}).coerce(`configuration-logpush-dataset`,e=>m(e,`configuration-logpush-dataset`,`text`)).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck 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 le={command:`create`,describe:`Create Destination`,builder:ce,handler:async e=>l({command:`o11y destinations create`,classification:{safeFlags:[`configuration-logpush-dataset`,`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]):f(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}])});return}let i=e.body===void 0?void 0:f(e.body,[{path:[`configuration`,`headers`],flag:`configuration-headers`}]),l=await t(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(x,{body:e,account_id:d}));s(t,{successLabel:`Created`});return}if(e[`configuration-headers`]===void 0)throw Error(`--configuration-headers is required (or pass --body with this field set).`);if(e[`configuration-logpush-dataset`]===void 0&&(e[`configuration-logpush-dataset`]=await g(`configuration-logpush-dataset`,`The configuration.logpushDataset field`,[`opentelemetry-traces`,`opentelemetry-logs`,`opentelemetry-metrics`])),e[`configuration-type`]===void 0&&(e[`configuration-type`]=await g(`configuration-type`,`The configuration.type field`,[`logpush`])),e[`configuration-url`]===void 0&&(e[`configuration-url`]=await h(`configuration-url`,`The configuration.url field`)),e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await h(`name`,`The name field`));let _=p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`,!0),logpushDataset:e[`configuration-logpush-dataset`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled,name:m(e.name,`name`,`text`),skipPreflightCheck:e[`skip-preflight-check`]},[[`configuration`,`headers`]]),v=await c(`Creating`,async()=>l.send(x,{body:_,account_id:d}));s(v,{successLabel:`Created`})})};var ue={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function de(e){return e.usage(`$0 o11y destinations delete <slug>
|
|
11
|
+
|
|
12
|
+
Delete a Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const fe={command:`delete <slug>`,describe:`Delete Destination`,builder:de,handler:async e=>l({command:`o11y destinations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y destinations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations/${e.slug==null?`<slug>`:encodeURIComponent(String(e.slug))}`,pathParams:{slug:String(e.slug??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(ue,{account_id:l,slug:e.slug}));s(u,{successLabel:`Deleted`})})};var pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations`,query:[`page`,`perPage`,`order`,`orderBy`],errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function me(e){return e.usage(`$0 o11y destinations list
|
|
13
|
+
|
|
14
|
+
List your Workers Observability Telemetry Destinations.`).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 he={command:`list`,describe:`Get Destinations`,builder:me,handler:async e=>l({command:`o11y destinations 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();n({command:`cf o11y destinations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/destinations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(pe,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})};var S={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/destinations/${t.slug}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function ge(e){return e.usage(`$0 o11y destinations update <slug>
|
|
15
|
+
|
|
16
|
+
Update an existing Workers Observability Telemetry Destination.`).positional(`slug`,{type:`string`,description:`Slug`,demandOption:!0}).option(`configuration-headers`,{type:`string`,description:`The configuration.headers field. Provide as a JSON object or @path/to/file.json. Shape: {"<key>": (string | null)}.`}).option(`configuration-replace-headers`,{type:`boolean`,description:`The configuration.replaceHeaders field`}).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).coerce(`configuration-type`,e=>m(e,`configuration-type`,`text`)).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled 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=>{let t=[`configuration-headers`,`configuration-replace-headers`,`configuration-type`,`configuration-url`].some(t=>e[t]!==void 0);if(!e.body&&t){let t=[`configuration-headers`,`configuration-type`,`configuration-url`].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 --configuration-* flag is set`)}return!0})}const C={command:`update <slug>`,describe:`Update Destination`,builder:ge,handler:async e=>l({command:`o11y destinations update`,classification:{safeFlags:[`configuration-replace-headers`,`configuration-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y destinations update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/destinations/${e.slug==null?`<slug>`:encodeURIComponent(String(e.slug))}`,pathParams:{slug:String(e.slug??``)},bodyKind:`json`,body:e.body===void 0?p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`),replaceHeaders:e[`configuration-replace-headers`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),d=e.local?o:await a();if(e.accountId=d,e.body!==void 0){let t=i,n=await c(`Updating`,async()=>l.send(S,{body:t,account_id:d,slug:e.slug}));s(n,{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let h=p({configuration:{headers:u(e[`configuration-headers`],`configuration-headers`),replaceHeaders:e[`configuration-replace-headers`],type:e[`configuration-type`],url:m(e[`configuration-url`],`configuration-url`,`text`)},enabled:e.enabled},[[`configuration`,`headers`]]),g=await c(`Updating`,async()=>l.send(S,{body:h,account_id:d,slug:e.slug}));s(g,{successLabel:`Updated`})})},w={command:`destinations`,describe:`Operations for destinations`,builder:e=>e.command(le).command(fe).command(he).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var T={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}/members`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function E(e){return e.usage(`$0 o11y issues add <groupId>
|
|
17
|
+
|
|
18
|
+
Add one or more ungrouped issues to an existing issue group.`).positional(`group-id`,{type:`string`,description:`GroupId`,demandOption:!0}).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds 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 D={command:`add <groupId>`,describe:`Add issue group members`,builder:E,handler:async e=>l({command:`o11y issues add`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues add`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({issueIds:e[`issue-ids`]}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(T,{body:t,account_id:u,groupId:e[`group-id`]}));s(n,{successLabel:`Created`});return}if(e[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);let d=p({issueIds:e[`issue-ids`]}),m=await c(`Creating`,async()=>l.send(T,{body:d,account_id:u,groupId:e[`group-id`]}));s(m,{successLabel:`Created`})})};var O={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function k(e){return e.usage(`$0 o11y issues automations create
|
|
19
|
+
|
|
20
|
+
Create an account or service issue automation.`).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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 A={command:`create`,describe:`Create an issue automation`,builder:k,handler:async e=>l({command:`o11y issues automations create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues automations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(O,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}e[`policy-id`]===void 0&&(e[`policy-id`]=await h(`policy-id`,`The policyId field`));let d=p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}),g=await c(`Creating`,async()=>l.send(O,{body:d,account_id:u}));s(g,{successLabel:`Created`})})};var j={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function M(e){return e.usage(`$0 o11y issues automations delete <automationId>
|
|
21
|
+
|
|
22
|
+
Delete an issue automation while preserving its historical runs.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,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 N={command:`delete <automationId>`,describe:`Delete an issue automation`,builder:M,handler:async e=>l({command:`o11y issues automations delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues automations delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(j,{account_id:l,automationId:e[`automation-id`]}));s(u,{successLabel:`Deleted`})})};var P={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function F(e){return e.usage(`$0 o11y issues automations get <automationId>
|
|
23
|
+
|
|
24
|
+
Retrieve an issue automation.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <automationId>`,describe:`Get an issue automation`,builder:F,handler:async e=>l({command:`o11y issues automations get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues automations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(P,{account_id:l,automationId:e[`automation-id`]}));s(u,{successLabel:`Loaded`})})};var L={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function _e(e){return e.usage(`$0 o11y issues automations list
|
|
25
|
+
|
|
26
|
+
List account and service issue automations.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`list`,describe:`List issue automations`,builder:_e,handler:async e=>l({command:`o11y issues automations list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service};if(e.dryRun){let e=await r();n({command:`cf o11y issues automations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/automations`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(L,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})};var R={method:`PUT`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/automations/${t.automationId}`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ye(e){return e.usage(`$0 o11y issues automations update <automationId>
|
|
27
|
+
|
|
28
|
+
Replace an issue automation configuration.`).positional(`automation-id`,{type:`string`,description:`AutomationId`,demandOption:!0}).option(`after-inactivity-seconds`,{type:`number`,description:`The afterInactivitySeconds field`}).option(`after-occurrences`,{type:`number`,description:`The afterOccurrences field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`policy-id`,{type:`string`,description:`The policyId field`}).option(`service`,{type:`string`,description:`The service 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 be={command:`update <automationId>`,describe:`Update an issue automation`,builder:ye,handler:async e=>l({command:`o11y issues automations update`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues automations update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/automations/${e[`automation-id`]==null?`<automation-id>`:encodeURIComponent(String(e[`automation-id`]))}`,pathParams:{"automation-id":String(e[`automation-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Updating`,async()=>l.send(R,{body:t,account_id:u,automationId:e[`automation-id`]}));s(n,{successLabel:`Updated`});return}e[`policy-id`]===void 0&&(e[`policy-id`]=await h(`policy-id`,`The policyId field`));let d=p({afterInactivitySeconds:e[`after-inactivity-seconds`],afterOccurrences:e[`after-occurrences`],enabled:e.enabled,name:m(e.name,`name`,`text`),policyId:m(e[`policy-id`],`policy-id`,`text`),service:m(e.service,`service`,`text`)}),g=await c(`Updating`,async()=>l.send(R,{body:d,account_id:u,automationId:e[`automation-id`]}));s(g,{successLabel:`Updated`})})},xe={command:`automations`,describe:`Operations for issues.automations`,builder:e=>e.command(A).command(N).command(I).command(ve).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Se={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ce(e){return e.usage(`$0 o11y issues get <issueId>
|
|
29
|
+
|
|
30
|
+
Retrieve an issue.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const we={command:`get <issueId>`,describe:`Get an issue`,builder:Ce,handler:async e=>l({command:`o11y issues get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(Se,{account_id:l,issueId:e[`issue-id`]}));s(u,{successLabel:`Loaded`})})};var z={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Te(e){return e.usage(`$0 o11y issues group
|
|
31
|
+
|
|
32
|
+
Group two or more issues under a new customer-defined identity.`).option(`issue-ids`,{type:`string`,array:!0,description:`The issueIds field`}).option(`title`,{type:`string`,description:`The title 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 Ee={command:`group`,describe:`Create an issue group`,builder:Te,handler:async e=>l({command:`o11y issues group`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues group`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({issueIds:e[`issue-ids`],title:m(e.title,`title`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(z,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}if(e[`issue-ids`]===void 0)throw Error(`--issue-ids is required (or pass --body with this field set).`);e.title===void 0&&(e.title=await h(`title`,`The title field`));let d=p({issueIds:e[`issue-ids`],title:m(e.title,`title`,`text`)}),g=await c(`Creating`,async()=>l.send(z,{body:d,account_id:u}));s(g,{successLabel:`Created`})})};var De={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues`,query:[`page`,`perPage`,`order`,`orderBy`,`search`,`service`,`type`,`status`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Oe(e){return e.usage(`$0 o11y issues list
|
|
33
|
+
|
|
34
|
+
List detected issues.`).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:[`id`,`service`,`title`,`type`,`status`,`statusUpdated`,`count`,`firstObserved`,`lastObserved`,`created`,`updated`]}).option(`search`,{type:`string`,description:`Search`}).option(`service`,{type:`string`,description:`Service`}).option(`type`,{type:`string`,description:`Type`}).option(`status`,{type:`string`,description:`Status`,choices:[`active`,`resolved`,`ignored`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`list`,describe:`List detected issues`,builder:Oe,handler:async e=>l({command:`o11y issues list`,classification:{safeFlags:[`order`,`order-by`,`status`,`dry-run`]}},e,async()=>{let i={page:e.page,perPage:e[`per-page`],order:e.order,orderBy:e[`order-by`],search:e.search,service:e.service,type:e.type,status:e.status};if(e.dryRun){let e=await r();n({command:`cf o11y issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(De,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})};var B={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}/notification-runs`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function Ae(e){return e.usage(`$0 o11y issues notify <issueId>
|
|
35
|
+
|
|
36
|
+
Send the issue to one ANS policy, or every matching Real-Time Issue policy when no policy ID is provided.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`policy-id`,{type:`string`,description:`The policyId 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 je={command:`notify <issueId>`,describe:`Notify about an issue`,builder:Ae,handler:async e=>l({command:`o11y issues notify`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues notify`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/notification-runs`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({policyId:m(e[`policy-id`],`policy-id`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Creating`,async()=>l.send(B,{body:t,account_id:u,issueId:e[`issue-id`]}));s(n,{successLabel:`Created`});return}let d=p({policyId:m(e[`policy-id`],`policy-id`,`text`)}),h=await c(`Creating`,async()=>l.send(B,{body:d,account_id:u,issueId:e[`issue-id`]}));s(h,{successLabel:`Created`})})};var Me={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}/occurrences`,query:[`cursor`,`per_page`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function Ne(e){return e.usage(`$0 o11y issues occurrences <issueId>
|
|
37
|
+
|
|
38
|
+
List the retained error occurrences grouped into an issue, newest first.`).positional(`issue-id`,{type:`string`,description:`Issue ID returned by the issues API.`,demandOption:!0}).option(`cursor`,{type:`string`,description:`Opaque cursor returned in result_info.cursors.after.`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Pe={command:`occurrences <issueId>`,describe:`List issue occurrences`,builder:Ne,handler:async e=>l({command:`o11y issues occurrences`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={cursor:e.cursor,per_page:e[`per-page`]};if(e.dryRun){let t=await r();n({command:`cf o11y issues occurrences`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}/occurrences`,pathParams:{"issue-id":String(e[`issue-id`]??``)},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Me,{account_id:u,issueId:e[`issue-id`],...i}));s(d,{successLabel:`Loaded`})})};var Fe={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}/members/${t.issueId}`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,409:`ConflictError`,500:`InternalServerError`}};function Ie(e){return e.usage(`$0 o11y issues remove <issueId>
|
|
39
|
+
|
|
40
|
+
Remove an issue from a group, dissolving the group when fewer than two members remain.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`group-id`,{type:`string`,description:`GroupId`,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 Le={command:`remove <issueId>`,describe:`Remove an issue group member`,builder:Ie,handler:async e=>l({command:`o11y issues remove`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues remove`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}/members/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``),"issue-id":String(e[`issue-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Fe,{account_id:l,groupId:e[`group-id`],issueId:e[`issue-id`]}));s(u,{successLabel:`Deleted`})})};var Re={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/summary`,query:[`service`],errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function ze(e){return e.usage(`$0 o11y issues summary
|
|
41
|
+
|
|
42
|
+
Retrieve aggregate issue counts for the account.`).option(`service`,{type:`string`,description:`Service`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`summary`,describe:`Summarize detected issues`,builder:ze,handler:async e=>l({command:`o11y issues summary`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={service:e.service};if(e.dryRun){let e=await r();n({command:`cf o11y issues summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/issues/summary`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Re,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})};var Ve={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/groups/${t.groupId}`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function He(e){return e.usage(`$0 o11y issues ungroup <groupId>
|
|
43
|
+
|
|
44
|
+
Dissolve an issue group and restore its members as standalone issues.`).positional(`group-id`,{type:`string`,description:`GroupId`,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 Ue={command:`ungroup <groupId>`,describe:`Dissolve an issue group`,builder:He,handler:async e=>l({command:`o11y issues ungroup`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues ungroup`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/groups/${e[`group-id`]==null?`<group-id>`:encodeURIComponent(String(e[`group-id`]))}`,pathParams:{"group-id":String(e[`group-id`]??``)},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(Ve,{account_id:l,groupId:e[`group-id`]}));s(u,{successLabel:`Deleted`})})};var V={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/workers/observability/issues/${t.issueId}`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,404:`NotFoundError`,500:`InternalServerError`}};function We(e){return e.usage(`$0 o11y issues update <issueId>
|
|
45
|
+
|
|
46
|
+
Modify an issue status or group title.`).positional(`issue-id`,{type:`string`,description:`IssueId`,demandOption:!0}).option(`status`,{type:`string`,description:`The status field`,choices:[`active`,`resolved`,`ignored`]}).coerce(`status`,e=>m(e,`status`,`text`)).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Modify an issue status or group title.`})}const Ge={command:`update <issueId>`,describe:`Modify an issue`,builder:We,handler:async e=>l({command:`o11y issues update`,classification:{safeFlags:[`status`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y issues update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/issues/${e[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(e[`issue-id`]))}`,pathParams:{"issue-id":String(e[`issue-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({status:e.status,title:m(e.title,`title`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Updating`,async()=>l.send(V,{body:t,account_id:u,issueId:e[`issue-id`]}));s(n,{successLabel:`Updated`});return}let d=p({status:e.status,title:m(e.title,`title`,`text`)}),h=await c(`Updating`,async()=>l.send(V,{body:d,account_id:u,issueId:e[`issue-id`]}));s(h,{successLabel:`Updated`})})},Ke={command:`issues`,describe:`Operations for issues`,builder:e=>e.command(D).command(we).command(Ee).command(ke).command(je).command(Pe).command(Le).command(Be).command(Ue).command(Ge).command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var qe={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/metricsexport`,errors:{401:`UnauthorizedError`,500:`InternalServerError`}};function Je(e){return e.usage(`$0 o11y metrics-export list
|
|
47
|
+
|
|
48
|
+
List resources configured for Workers Observability metrics export.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ye={command:`list`,describe:`List Metrics Exports`,builder:Je,handler:async e=>l({command:`o11y metrics-export list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf o11y metrics-export list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/metricsexport`,pathParams:{},bodyKind:`none`});return}let i=await t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(qe,{account_id:l}));s(u,{successLabel:`Loaded`})})};var H={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/metricsexport`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,500:`InternalServerError`}};function Xe(e){return e.usage(`$0 o11y metrics-export upsert
|
|
49
|
+
|
|
50
|
+
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. Shape: [{"destinations": [string], "resourceId": string, "resourceType": "workers" | "d1" | "r2" | ...more}].`}).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 Ze={command:`upsert`,describe:`Upsert Metrics Exports`,builder:Xe,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();n({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:d(e.resources,`resources`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(H,{body:e,account_id:u}));s(t,{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 _=p({requester:{requesterId:m(e[`requester-requester-id`],`requester-requester-id`,`text`),requesterType:e[`requester-requester-type`]},resources:d(e.resources,`resources`)}),v=await c(`Creating`,async()=>l.send(H,{body:_,account_id:u}));s(v,{successLabel:`Created`})})},Qe={command:`metrics-export`,describe:`Operations for metrics-export`,builder:e=>e.command(Ye).command(Ze).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 $e(e){return e.usage(`$0 o11y queries create
|
|
51
|
+
|
|
52
|
+
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. Shape: [({"operator": "count" | "COUNT", "alias"?: string, "key"?: string, "keyType"?: "string" | "number" | "boolean"} | ...more)]. ? marks optional keys.`}).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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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. Shape: [{"type": "string" | "number" | "boolean", "value": string}].`}).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. Shape: [{"key": string, "operation": "eq" | "neq" | "gt" | ...more, "value": number}].`}).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.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){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-order-by-* flag is set`)}return!0})}const et={command:`create`,describe:`Save query`,builder:$e,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();n({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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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`)}}}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(U,{body:e,account_id:u}));s(t,{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`));let g=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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`)}}}),_=await c(`Creating`,async()=>l.send(U,{body:g,account_id:u}));s(_,{successLabel:`Created`})})};var tt={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function nt(e){return e.usage(`$0 o11y queries delete <queryId>
|
|
53
|
+
|
|
54
|
+
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 rt={command:`delete <queryId>`,describe:`Delete query`,builder:nt,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();n({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 t(e),l=e.local?o:await a();if(e.accountId=l,!await _({force:!!e.force}))return;let u=await c(`Deleting`,async()=>i.send(tt,{account_id:l,queryId:e[`query-id`]}));s(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 it(e){return e.usage(`$0 o11y queries edit <queryId>
|
|
55
|
+
|
|
56
|
+
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. Shape: [({"operator": "count" | "COUNT", "alias"?: string, "key"?: string, "keyType"?: "string" | "number" | "boolean"} | ...more)]. ? marks optional keys.`}).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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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. Shape: [{"type": "string" | "number" | "boolean", "value": string}].`}).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. Shape: [{"key": string, "operation": "eq" | "neq" | "gt" | ...more, "value": number}].`}).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.`}).check(e=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){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-order-by-* flag is set`)}return!0})}const at={command:`edit <queryId>`,describe:`Update query`,builder:it,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();n({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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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`)}}}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let t=i,n=await c(`Updating`,async()=>l.send(W,{body:t,account_id:u,queryId:e[`query-id`]}));s(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`));let g=p({description:m(e.description,`description`,`text`),name:m(e.name,`name`,`text`),parameters:{calculations:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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`)}}}),_=await c(`Updating`,async()=>l.send(W,{body:g,account_id:u,queryId:e[`query-id`]}));s(_,{successLabel:`Updated`})})};var ot={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/queries/${t.queryId}`,errors:{401:`UnauthorizedError`,404:`NotFoundError`,500:`InternalServerError`}};function st(e){return e.usage(`$0 o11y queries get <queryId>
|
|
57
|
+
|
|
58
|
+
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 ct={command:`get <queryId>`,describe:`Get query`,builder:st,handler:async e=>l({command:`o11y queries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({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 t(e),l=e.local?o:await a();e.accountId=l;let u=await c(`Loading`,async()=>i.send(ot,{account_id:l,queryId:e[`query-id`]}));s(u,{successLabel:`Loaded`})})};var lt={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 ut(e){return e.usage(`$0 o11y queries list
|
|
59
|
+
|
|
60
|
+
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 dt={command:`list`,describe:`List queries`,builder:ut,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();n({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 t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(lt,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},ft={command:`queries`,describe:`Operations for queries`,builder:e=>e.command(et).command(rt).command(at).command(ct).command(dt).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 pt(e){return e.usage(`$0 o11y shared-queries create
|
|
61
|
+
|
|
62
|
+
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(`preview`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).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. Shape: [({"operator": "count" | "COUNT", "alias"?: string, "key"?: string, "keyType"?: "string" | "number" | "boolean"} | ...more)]. ? marks optional keys.`}).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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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. Shape: [{"type": "string" | "number" | "boolean", "value": string}].`}).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. Shape: [{"key": string, "operation": "eq" | "neq" | "gt" | ...more, "value": number}].`}).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=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){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-order-by-* flag is set`)}return!0})}const mt={command:`create`,describe:`Create a sharable link to a query result`,builder:pt,handler:async e=>l({command:`o11y shared-queries create`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`preview`,`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();n({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`],dry:e.preview,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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(G,{body:e,account_id:u}));s(t,{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 g=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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}),_=await c(`Creating`,async()=>l.send(G,{body:g,account_id:u}));s(_,{successLabel:`Created`})})};var ht={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 gt(e){return e.usage(`$0 o11y shared-queries get <id>
|
|
63
|
+
|
|
64
|
+
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 _t={command:`get <id>`,describe:`View a query that has been shared`,builder:gt,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();n({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 t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(ht,{account_id:u,id:e.id,...i}));s(d,{successLabel:`Loaded`})})},vt={command:`shared-queries`,describe:`Operations for shared-queries`,builder:e=>e.command(mt).command(_t).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 yt(e){return e.usage(`$0 o11y telemetry heartbeat
|
|
65
|
+
|
|
66
|
+
Notify live tail that user is still eligible to receive live events.`).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:`Keep your live tail connection alive.`})}const bt={command:`heartbeat`,describe:`Live tail heartbeat`,builder:yt,handler:async e=>l({command:`o11y telemetry heartbeat`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y telemetry heartbeat`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/live-tail/heartbeat`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({scriptId:m(e[`script-id`],`script-id`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(K,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}let d=p({scriptId:m(e[`script-id`],`script-id`,`text`)}),h=await c(`Creating`,async()=>l.send(K,{body:d,account_id:u}));s(h,{successLabel:`Created`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/keys`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function xt(e){return e.usage(`$0 o11y telemetry keys
|
|
67
|
+
|
|
68
|
+
List all the keys in your telemetry events.`).option(`datasets`,{type:`string`,array:!0,description:`Leave this empty to use the default datasets`}).option(`filters`,{type:`string`,description:`Apply filters to narrow key discovery. Supports nested groups via kind: 'group'. Maximum nesting depth is 4. Provide as a JSON array of objects or @path/to/file.json. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).option(`from`,{type:`number`,description:`The from field`}).option(`key-needle-is-regex`,{type:`boolean`,description:`When true, treats the value as a regular expression (RE2 syntax).`}).option(`key-needle-match-case`,{type:`boolean`,description:`When true, performs a case-sensitive search. Defaults to case-insensitive.`}).option(`limit`,{type:`number`,description:`Advanced usage: set limit=1000+ to retrieve comprehensive key options without needing additional filtering.`}).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(`to`,{type:`number`,description:`The to field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Find keys in your telemetry events matching a specific filter or needle.`})}const St={command:`keys`,describe:`List keys`,builder:xt,handler:async e=>l({command:`o11y telemetry keys`,classification:{safeFlags:[`key-needle-is-regex`,`key-needle-match-case`,`needle-is-regex`,`needle-match-case`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({command:`cf o11y telemetry keys`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/workers/observability/telemetry/keys`,pathParams:{},bodyKind:`json`,body:e.body===void 0?p({datasets:e.datasets,filters:d(e.filters,`filters`),from:e.from,keyNeedle:{isRegex:e[`key-needle-is-regex`],matchCase:e[`key-needle-match-case`]},limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},to:e.to}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(q,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}let m=p({datasets:e.datasets,filters:d(e.filters,`filters`),from:e.from,keyNeedle:{isRegex:e[`key-needle-is-regex`],matchCase:e[`key-needle-match-case`]},limit:e.limit,needle:{isRegex:e[`needle-is-regex`],matchCase:e[`needle-match-case`]},to:e.to}),h=await c(`Creating`,async()=>l.send(q,{body:m,account_id:u}));s(h,{successLabel:`Created`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/workers/observability/telemetry/live-tail`,body:`json`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ct(e){return e.usage(`$0 o11y telemetry live-tail
|
|
69
|
+
|
|
70
|
+
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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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 wt={command:`live-tail`,describe:`Prepare live tail`,builder:Ct,handler:async e=>l({command:`o11y telemetry live-tail`,classification:{safeFlags:[`filter-combination`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();n({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:d(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(J,{body:e,account_id:u}));s(t,{successLabel:`Created`});return}let h=p({filterCombination:e[`filter-combination`],filters:d(e.filters,`filters`),scriptId:m(e[`script-id`],`script-id`,`text`)}),g=await c(`Creating`,async()=>l.send(J,{body:h,account_id:u}));s(g,{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 Tt(e){return e.usage(`$0 o11y telemetry query
|
|
71
|
+
|
|
72
|
+
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(`preview`,{type:`boolean`,description:`When true, executes the query without persisting the results. Useful for validation or previewing.`,default:!1}).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. Shape: [({"operator": "count" | "COUNT", "alias"?: string, "key"?: string, "keyType"?: "string" | "number" | "boolean"} | ...more)]. ? marks optional keys.`}).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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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. Shape: [{"type": "string" | "number" | "boolean", "value": string}].`}).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. Shape: [{"key": string, "operation": "eq" | "neq" | "gt" | ...more, "value": number}].`}).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=>{let t=[`parameters-order-by-order`,`parameters-order-by-value`].some(t=>e[t]!==void 0);if(!e.body&&t){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-order-by-* flag is set`)}return!0})}const Et={command:`query`,describe:`Run a query`,builder:Tt,handler:async e=>l({command:`o11y telemetry query`,classification:{safeFlags:[`chart`,`chart-type`,`compare`,`distribution-scale`,`preview`,`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();n({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`],dry:e.preview,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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Loading`,async()=>l.send(Y,{body:e,account_id:u}));s(t,{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 g=p({chart:e.chart,chartType:e[`chart-type`],compare:e.compare,distributionScale:e[`distribution-scale`],dry:e.preview,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:d(e[`parameters-calculations`],`parameters-calculations`),datasets:e[`parameters-datasets`],filterCombination:e[`parameters-filter-combination`],filters:d(e[`parameters-filters`],`parameters-filters`),groupBys:d(e[`parameters-group-bys`],`parameters-group-bys`),havings:d(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}),_=await c(`Loading`,async()=>l.send(Y,{body:g,account_id:u}));s(_,{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 Dt(e){return e.usage(`$0 o11y telemetry values
|
|
73
|
+
|
|
74
|
+
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. Shape: [({"filterCombination": "and" | "or" | "AND" | ...more, "filters": [{...}], "kind": "group"} | ...more)].`}).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 Ot={command:`values`,describe:`List values`,builder:Dt,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();n({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:d(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}):f(e.body)});return}let i=e.body===void 0?void 0:f(e.body),l=await t(e),u=e.local?o:await a();if(e.accountId=u,e.body!==void 0){let e=i,t=await c(`Creating`,async()=>l.send(X,{body:e,account_id:u}));s(t,{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 _=p({datasets:e.datasets,filters:d(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}),v=await c(`Creating`,async()=>l.send(X,{body:_,account_id:u}));s(v,{successLabel:`Created`})})},kt={command:`telemetry`,describe:`Operations for telemetry`,builder:e=>e.command(bt).command(St).command(wt).command(Et).command(Ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var At={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function jt(e){return e.usage(`$0 o11y tracing rules delete
|
|
75
|
+
|
|
76
|
+
Delete every sampling override from a zone's managed Cloudflare Traces ruleset.`).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 Mt={command:`delete`,describe:`Delete zone trace rules`,builder:jt,handler:async e=>l({command:`o11y tracing rules delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,!await _({force:!!e.force}))return;let o=await c(`Deleting`,async()=>r.send(At,{zone_id:a}));s(o,{successLabel:`Deleted`})})};var Nt={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Pt(e){return e.usage(`$0 o11y tracing rules get
|
|
77
|
+
|
|
78
|
+
Retrieve the ordered sampling overrides for a zone's managed Cloudflare Traces ruleset.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ft={command:`get`,describe:`View zone trace rules`,builder:Pt,handler:async e=>l({command:`o11y tracing rules get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let o=await c(`Loading`,async()=>r.send(Nt,{zone_id:a}));s(o,{successLabel:`Loaded`})})};var Z={method:`PUT`,path:t=>e`/zones/${t.zone_id}/observability/tracing/rules`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function It(e){return e.usage(`$0 o11y tracing rules update
|
|
79
|
+
|
|
80
|
+
Replace all sampling overrides in a zone's managed Cloudflare Traces ruleset. Rules are evaluated in the supplied order.`).option(`rules`,{type:`string`,description:`Trace rules in evaluation order. Provide as a JSON array of objects or @path/to/file.json. Shape: [{"action": "set_trace_settings", "action_parameters": {...}, "description": string, "enabled": boolean, "expression": string}].`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Replace the ordered trace rules`})}const Lt={command:`update`,describe:`Replace zone trace rules`,builder:It,handler:async e=>l({command:`o11y tracing rules update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/rules`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({rules:d(e.rules,`rules`)}):f(e.body)});return}let r=e.body===void 0?void 0:f(e.body),a=await t(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=r,t=await c(`Updating`,async()=>a.send(Z,{body:e,zone_id:o}));s(t,{successLabel:`Updated`});return}if(e.rules===void 0)throw Error(`--rules is required (or pass --body with this field set).`);let l=p({rules:d(e.rules,`rules`)}),u=await c(`Updating`,async()=>a.send(Z,{body:l,zone_id:o}));s(u,{successLabel:`Updated`})})},Rt={command:`rules`,describe:`Operations for tracing.rules`,builder:e=>e.command(Mt).command(Ft).command(Lt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var zt={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Bt(e){return e.usage(`$0 o11y tracing settings delete
|
|
81
|
+
|
|
82
|
+
Reset the zone-level Cloudflare Traces settings to their defaults while preserving the sampling rules.`).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 Vt={command:`delete`,describe:`Reset zone tracing settings`,builder:Bt,handler:async e=>l({command:`o11y tracing settings delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing settings delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});if(e.zoneId=a,!await _({force:!!e.force}))return;let o=await c(`Deleting`,async()=>r.send(zt,{zone_id:a}));s(o,{successLabel:`Deleted`})})};var Q={method:`GET`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Ht(e){return e.usage(`$0 o11y tracing settings get
|
|
83
|
+
|
|
84
|
+
Retrieve the zone-level Cloudflare Traces settings.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ut={command:`get`,describe:`View zone tracing settings`,builder:Ht,handler:async e=>l({command:`o11y tracing settings get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let r=await t(e),a=await i({zone:e.zone},r,{quiet:e.quiet});e.zoneId=a;let o=await c(`Loading`,async()=>r.send(Q,{zone_id:a}));s(o,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/zones/${t.zone_id}/observability/tracing/settings`,body:`json`,errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,500:`InternalServerError`}};function Wt(e){return e.usage(`$0 o11y tracing settings update
|
|
85
|
+
|
|
86
|
+
Update the zone-level Cloudflare Traces settings.`).option(`destinations`,{type:`string`,array:!0,description:`Up to 100 OpenTelemetry destination identifiers that receive traces.`}).option(`enabled`,{type:`boolean`,description:`Whether Cloudflare Traces is enabled for the zone.`}).option(`forward-context`,{type:`boolean`,description:`Whether trace context is sent externally or across a zone boundary.`}).option(`persist`,{type:`boolean`,description:`Whether traces are persisted in Cloudflare.`}).option(`propagation-policy`,{type:`string`,description:`When inbound trace context may be continued. Authenticated propagation is not supported yet.`,choices:[`accept`,`authenticated`,`reject`]}).coerce(`propagation-policy`,e=>m(e,`propagation-policy`,`text`)).option(`sampling-ratio`,{type:`number`,description:`The ratio of requests sampled for tracing, from 0 to 1.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update zone tracing settings`})}const Gt={command:`update`,describe:`Update zone tracing settings`,builder:Wt,handler:async e=>l({command:`o11y tracing settings update`,classification:{safeFlags:[`enabled`,`forward-context`,`persist`,`propagation-policy`,`dry-run`]}},e,async()=>{if(e.dryRun){n({command:`cf o11y tracing settings update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/observability/tracing/settings`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}):f(e.body)});return}let r=e.body===void 0?void 0:f(e.body),a=await t(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,e.body!==void 0){let e=r,t=await c(`Updating`,async()=>a.send($,{body:e,zone_id:o}));s(t,{successLabel:`Updated`});return}let l=p({destinations:e.destinations,enabled:e.enabled,forward_context:e[`forward-context`],persist:e.persist,propagation_policy:e[`propagation-policy`],sampling_ratio:e[`sampling-ratio`]}),u=await c(`Updating`,async()=>a.send($,{body:l,zone_id:o}));s(u,{successLabel:`Updated`})})},Kt={command:`settings`,describe:`Operations for tracing.settings`,builder:e=>e.command(Vt).command(Ut).command(Gt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},qt={command:`tracing`,describe:`Operations for tracing`,builder:e=>e.command(Rt).command(Kt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Jt={method:`GET`,path:t=>e`/accounts/${t.account_id}/workers/observability/usage`,query:[`from`,`to`,`tz`],errors:{400:`BadRequestError`,401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`,504:`GatewayTimeoutError`}};function Yt(e){return e.usage(`$0 o11y usage
|
|
87
|
+
|
|
88
|
+
Event counts and sizes broken down by dataset and service, bucketed by day, for up to 90 days. The top-level events field is the sum of all breakdown counts.`).option(`from`,{type:`string`,description:`Unix timestamp in milliseconds for the start of the range.`,demandOption:!0}).option(`to`,{type:`string`,description:`Unix timestamp in milliseconds for the end of the range.`,demandOption:!0}).option(`tz`,{type:`string`,description:`IANA timezone used to align daily bins to local midnight (e.g. 'America/Chicago'). Defaults to UTC.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xt={command:`usage`,describe:`Get event count`,builder:Yt,handler:async e=>l({command:`o11y usage`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let i={from:e.from,to:e.to,tz:e.tz};if(e.dryRun){let e=await r();n({command:`cf o11y usage`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/workers/observability/usage`,pathParams:{},query:i,bodyKind:`none`});return}let l=await t(e),u=e.local?o:await a();e.accountId=u;let d=await c(`Loading`,async()=>l.send(Jt,{account_id:u,...i}));s(d,{successLabel:`Loaded`})})},Zt={command:`o11y`,describe:`o11y`,builder:e=>e.command(Xt).command(se).command(w).command(Ke).command(Qe).command(ft).command(vt).command(kt).command(qt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Zt as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{c as e,i as t,l as n,o as r}from"./log-Brx-wjJW.mjs";import{n as i,o as a,r as o,s}from"./cf-DmvZ2L51.mjs";import{n as c,t as l}from"./version-CcuBNjqg.mjs";import{t as u}from"./args-BAOHroBC.mjs";import{t as d}from"./cli-exit-CstFZ1eJ.mjs";import{n as f}from"./context-BGm5_wTT.mjs";import{i as p}from"./dialog-CD94-Kzw.mjs";import{t as m}from"./errors-C_bGcR0X.mjs";import{n as h}from"./interactive-wQM7Blhm.mjs";import{t as g}from"./session-COdP8BXD.mjs";import{n as _,t as v}from"./project-settings-D_S-UC8I.mjs";import{n as y}from"./blocks-C3Im7AT0.mjs";import{r as b}from"./theme-BGHWSKCw.mjs";import{relative as x}from"node:path";function S(e,n={}){let{cwd:r=process.cwd(),output:i=process.stderr}=n,a=n.columns??(i.columns||80),o=_(r),s=o?x(r,o):v,c=`To use this account automatically in future, configure accountId in ${s}:`,l=/* @__PURE__ */ new Set([`accountId`,s]),u=y(c,Math.max(20,a-3)).map(e=>e.split(` `).map(e=>{let t=e.replace(/:$/,``);return l.has(t)?`${b.code(t)}${e.slice(t.length)}`:e}).join(` `));t.info(u.join(`
|
|
3
|
+
`),{output:i});let d=`accountId: ${b.jsonString(JSON.stringify(e))},`,f=o?[d]:[`import { defineConfig } from "cf/config";`,``,`export default defineConfig({`,` ${d}`,`});`],p=` `.repeat(3);i.write(`\n${f.map(e=>e&&p+e).join(`
|
|
4
|
+
`)}\n\n`),t.info(`Alternatively, set the ${b.code(`CLOUDFLARE_ACCOUNT_ID`)} environment variable.`,{output:i}),i.write(`
|
|
5
|
+
`)}const C={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 w=class extends Error{};async function T(t){if(h())throw new w;g(c);let r=await e({message:p(t),output:process.stderr});if(n(r)||typeof r!=`string`)throw new d(130,{cancelled:!0});return r}async function E(e,t){if(h())throw new w;g(c);let i=await r({message:e,output:process.stderr,options:t.choices.map(({title:e,value:t})=>({label:e,value:t}))});if(n(i)||typeof i!=`string`)throw new d(130,{cancelled:!0});return u()||S(i),i}const D=i({logger:C,userAgent:l,prompt:T,select:E,isNoDefaultValueProvidedError:e=>e instanceof w});let O=!1;function k(e,t){O=e,D.setTemporaryAllowed(e,t)}function A(){return O}async function j(e){if(!A())throw Error(`Temporary accounts require --temporary-account.`);try{let t=await D.requireAuth({compliance_region:e?.complianceRegion??await f(e)}),{apiToken:n}=D.requireApiToken();return{accountId:t,apiToken:n}}catch(e){throw e instanceof Error&&(e.message=e.message.replaceAll(/--temporary(?!-account)/g,`--temporary-account`)),e}}async function M(e,t){try{return await D.getOrSelectAccountId({account_id:e,compliance_region:t?.complianceRegion??await f(t)})}catch(e){throw e instanceof Error&&!(`reason`in e)&&`telemetryMessage`in e&&e.telemetryMessage===`cfetch auth login required`&&h()&&D.getAPIToken()===void 0?new m(e.message,{cause:e}):e}}function N(){return D.getActiveAccountId({})}async function P(){return D.fetchAllAccounts({compliance_region:await f()},{throwOnEmpty:!1})}async function F(e){if(e?.scopes&&!s(e.scopes))throw Error(`One or more of the requested scopes are not valid cf OAuth scopes.`);return D.login({compliance_region:await f()},{browser:e?.browser??!0,device:e?.device??!0,...e?.scopes&&{scopes:e.scopes},...e?.profile&&{profile:e.profile}})}function I(e){return D.logout(e)}function L(e){D.setProfile(e)}function R(e){a(e,{logger:C,getCredentialStore:()=>D.getCredentialStore()})}function z(){return D.getActiveProfile()}function B(){return o({logger:C})}function V(e,t=process.cwd()){let n=B().resolve({profile:e,cwd:t});return L(n),n}function H(){return D.getOAuthTokenFromLocalState()}function U(){return D.readAuthCredentials()?.oauth_token!==void 0}function W(){return D.readAuthCredentials()}function G(){return D.getCredentialStore().path()}export{k as _,M as a,U as c,I as d,W as f,L as g,R as h,G as i,A as l,V as m,N as n,B as o,j as p,z as r,H as s,P as t,F as u};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-
|
|
2
|
+
export{n as getActiveAccountId,a as getOrSelectAccountId,l as isTemporaryAccountRequested,p as requireTemporaryAccount,m as resolveProfile,_ as setTemporaryAccountRequested}from"./oauth-BgDZMd72.mjs";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{t as n}from"./dry-run-qsnRlRk6.mjs";import{a as r,t as i}from"./context-BGm5_wTT.mjs";import{t as a}from"./local-B3zt9PXR.mjs";import{t as o}from"./output-hFMAotFl.mjs";import{t as s}from"./progress-DE_G09u2.mjs";import{t as c}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";var l={method:`GET`,path:t=>e`/accounts/${t.account_id}/observability/usage/limit`,errors:{401:`UnauthorizedError`,403:`ForbiddenError`,429:`TooManyRequestsError`,500:`InternalServerError`}};function u(e){return e.usage(`$0 observability usage-limit get
|
|
3
3
|
|
|
4
|
-
Whether Workers Observability is keeping fewer of the account's events, usually because it passed its daily limit, and what that limit is. Daily limits reset at 00:00 UTC; paid accounts are brought back in stages over the following hours.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get usage limit status`,builder:u,handler:async e=>c({command:`observability usage-limit get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();
|
|
4
|
+
Whether Workers Observability is keeping fewer of the account's events, usually because it passed its daily limit, and what that limit is. Daily limits reset at 00:00 UTC; paid accounts are brought back in stages over the following hours.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get usage limit status`,builder:u,handler:async e=>c({command:`observability usage-limit get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();n({command:`cf observability usage-limit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/observability/usage/limit`,pathParams:{},bodyKind:`none`});return}let c=await t(e),u=e.local?a:await i();e.accountId=u;let d=await s(`Loading`,async()=>c.send(l,{account_id:u}));o(d,{successLabel:`Loaded`})})},f={command:`usage-limit`,describe:`Operations for usage-limit`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},p={command:`observability`,describe:`observability`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-Dnt6lRJG.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-DA1PHaHi.mjs";import{i as n}from"./context-BGm5_wTT.mjs";import{t as r}from"./dry-run-qsnRlRk6.mjs";import{t as i}from"./output-hFMAotFl.mjs";import{t as a}from"./progress-DE_G09u2.mjs";import{t as o}from"./run-CXWkMU3x.mjs";import"./telemetry-COlodX5Z.mjs";import{n as s}from"./prompt-D274Im1O.mjs";var c={method:`PUT`,path:t=>e`/zones/${t.zone_id}/settings/ohttp-gateway`,errors:{400:`BadRequestError`,403:`ForbiddenError`,500:`InternalServerError`}};function l(e){return e.usage(`$0 ohttp-gateway enablement create
|
|
3
3
|
|
|
4
|
-
Idempotently enables OHTTP Gateway for the zone. Requires product subscription to call.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`create`,describe:`Enable OHTTP Gateway`,builder:l,handler:async e=>o({command:`ohttp-gateway enablement create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
4
|
+
Idempotently enables OHTTP Gateway for the zone. Requires product subscription to call.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const u={command:`create`,describe:`Enable OHTTP Gateway`,builder:l,handler:async e=>o({command:`ohttp-gateway enablement create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf ohttp-gateway enablement create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/ohttp-gateway`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let l=await a(`Updating`,async()=>o.send(c,{zone_id:s}));i(l,{successLabel:`Updated`})})};var d={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/settings/ohttp-gateway`,errors:{400:`BadRequestError`,403:`ForbiddenError`,500:`InternalServerError`}};function f(e){return e.usage(`$0 ohttp-gateway enablement delete
|
|
5
5
|
|
|
6
|
-
Idempotently disables Oblivious HTTP Gateway for the zone. Requires product subscription to call.`).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:`Disable OHTTP Gateway`,builder:f,handler:async e=>o({command:`ohttp-gateway enablement delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){
|
|
6
|
+
Idempotently disables Oblivious HTTP Gateway for the zone. Requires product subscription to call.`).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:`Disable OHTTP Gateway`,builder:f,handler:async e=>o({command:`ohttp-gateway enablement delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){r({command:`cf ohttp-gateway enablement delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/ohttp-gateway`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),c=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=c,!await s({force:!!e.force,message:`This operation disables OHTTP Gateway for the zone.`}))return;let l=await a(`Deleting`,async()=>o.send(d,{zone_id:c}));i(l,{successLabel:`Deleted`})})};var m={method:`GET`,path:t=>e`/zones/${t.zone_id}/settings/ohttp-gateway`,errors:{400:`BadRequestError`,403:`ForbiddenError`,500:`InternalServerError`}};function h(e){return e.usage(`$0 ohttp-gateway enablement get
|
|
7
7
|
|
|
8
|
-
Returns the state of Oblivious HTTP enablement for the zone. Requires product subscription to call.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Get OHTTP Gateway enablement`,builder:h,handler:async e=>o({command:`ohttp-gateway enablement get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){
|
|
8
|
+
Returns the state of Oblivious HTTP enablement for the zone. Requires product subscription to call.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Get OHTTP Gateway enablement`,builder:h,handler:async e=>o({command:`ohttp-gateway enablement get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf ohttp-gateway enablement get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/settings/ohttp-gateway`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(m,{zone_id:s}));i(c,{successLabel:`Loaded`})})},_={command:`enablement`,describe:`Operations for enablement`,builder:e=>e.command(u).command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`ohttp-gateway`,describe:`ohttp-gateway`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
|