cf 1.0.0-beta.17 → 1.0.0-beta.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/_meta/commands.json +9122 -6086
- package/dist/_meta/hand-written-commands.json +6 -0
- package/dist/_meta/schemas.json +8392 -5576
- package/dist/{abuse-reports-C4LxDvUM.mjs → abuse-reports-DhgunVFo.mjs} +6 -6
- package/dist/{access-DnWW2AAT.mjs → access-BDoDq_WZ.mjs} +1 -1
- package/dist/{accounts-8UcHNm3S.mjs → accounts-DLTCzZJg.mjs} +17 -13
- package/dist/{acm-qRM3iy4Z.mjs → acm-DS1CosYq.mjs} +1 -1
- package/dist/{addressing-CAb8z2Dq.mjs → addressing-DFeYj8TY.mjs} +19 -19
- package/dist/{agent-memory-oIUP4ZV5.mjs → agent-memory-DXjQ8N0g.mjs} +6 -6
- package/dist/{ai-DnhytGdc.mjs → ai-V5YopMkS.mjs} +4 -4
- package/dist/{ai-audit-B7_5EOcN.mjs → ai-audit-yg8D0azz.mjs} +2 -2
- package/dist/{ai-gateway-b3FFu6UV.mjs → ai-gateway--dkH9qGz.mjs} +42 -42
- package/dist/ai-search-BRtsUaUI.mjs +79 -0
- package/dist/{ai-security-KUs94UW-.mjs → ai-security-DRJCcLpF.mjs} +5 -5
- package/dist/{alerting-CCmyEPzN.mjs → alerting-8DsyMKGG.mjs} +30 -30
- package/dist/{analytics-BAvBj6qx.mjs → analytics-BpYUZTtQ.mjs} +7 -7
- package/dist/{analytics-engine-DAJp89gM.mjs → analytics-engine-CT2E0Dkw.mjs} +1 -1
- package/dist/{api-security-BItVQymb.mjs → api-security-CBhWZE8z.mjs} +26 -26
- package/dist/{argo-DsJCvfml.mjs → argo-B0u2N3Dh.mjs} +1 -1
- package/dist/{artifacts-DzHXeah6.mjs → artifacts-B6XzjMiM.mjs} +1 -1
- package/dist/{audit-logs-D9XxsVZm.mjs → audit-logs-59fCc1aw.mjs} +1 -1
- package/dist/auth-5cgi8ePZ.mjs +2 -0
- package/dist/auth-BaUNb1Ed.mjs +2 -0
- package/dist/auth-ChYOc_rS.mjs +2 -0
- package/dist/{auth-token-Cw4c0y89.mjs → auth-token-B1pP2jaK.mjs} +1 -1
- package/dist/{autoconfig-9po_tqsS.mjs → autoconfig-Cdm2IFLM.mjs} +20 -20
- package/dist/{basin-catalog-DcMiZV9J.mjs → basin-catalog-CV05WlA4.mjs} +1 -1
- package/dist/{billing-COgAWTYh.mjs → billing-Ad-rK-JH.mjs} +6 -6
- package/dist/{blocks-Bat9A8V_.mjs → blocks-CKb_aLWN.mjs} +1 -1
- package/dist/body-parser-ChnyBsfm.mjs +2 -0
- package/dist/{bot-management-Dx3lh9Fi.mjs → bot-management-CGpfjQ4w.mjs} +4 -4
- package/dist/{botnet-feed-C8496Nhl.mjs → botnet-feed-CMrF6ZGq.mjs} +1 -1
- package/dist/{brand-protection-B0p8Sv6s.mjs → brand-protection-CP73_yX8.mjs} +5 -5
- package/dist/browser-run-OpUfawh_.mjs +42 -0
- package/dist/{build-i8l2qGVZ.mjs → build-CMPlf8mh.mjs} +1 -1
- package/dist/build-DQZ2w_dQ.mjs +2 -0
- package/dist/builds-DsRNlILV.mjs +71 -0
- package/dist/{cache-BUh85NRr.mjs → cache-RppXjxXA.mjs} +3 -3
- package/dist/{cf-Bq4pA4n6.mjs → cf-PISMdEje.mjs} +11 -11
- package/dist/{chunk-2HLTAS5V-D7COzUOd.mjs → chunk-2HLTAS5V-B92NbX1j.mjs} +1 -1
- package/dist/{chunk-2K52M2W5-CYxfQXUq.mjs → chunk-2K52M2W5-c__08AOB.mjs} +7 -7
- package/dist/chunk-DSGVRFIS-DfQO1boa.mjs +2 -0
- package/dist/{cli-DJhpXf38.mjs → cli-Dd1n2YAJ.mjs} +1 -1
- package/dist/{client-side-security-km3-4L_4.mjs → client-side-security-BYfwOkUo.mjs} +1 -1
- package/dist/{cloud-connector-BoKFprDD.mjs → cloud-connector-CQZUqAMQ.mjs} +2 -2
- package/dist/{cloudflared-By8BzYXc.mjs → cloudflared-C1SdXpYv.mjs} +1 -1
- package/dist/cloudforce-one-C1xdpspb.mjs +395 -0
- package/dist/{command-RC9WM5jq.mjs → command-BioiZMm9.mjs} +1 -1
- package/dist/{command-rx0Kb5pn.mjs → command-C0nJ2LRd.mjs} +1 -1
- package/dist/{command-CiApsRql.mjs → command-C5ARgURy.mjs} +1 -1
- package/dist/{command-CCq-Z2Ua.mjs → command-C7NIRU-u.mjs} +1 -1
- package/dist/{command-B694oLDo.mjs → command-C8DV-x_C.mjs} +1 -1
- package/dist/{command-Bmee6uwe.mjs → command-CFV1cqfR.mjs} +1 -1
- package/dist/{command-CbQFbfps.mjs → command-ChQXv0jP.mjs} +1 -1
- package/dist/{command-DCQgsd2U.mjs → command-D203VrTG.mjs} +1 -1
- package/dist/{command-DZfKHiru.mjs → command-D5BUzDX8.mjs} +1 -1
- package/dist/{command-CAs3SxlI.mjs → command-DWE7YdeC.mjs} +1 -1
- package/dist/{command-C6w1OdoC.mjs → command-DlB10kIb.mjs} +1 -1
- package/dist/{command-D1JR8Fb7.mjs → command-DmPQXNRg.mjs} +1 -1
- package/dist/{command-Bgb-3yPg.mjs → command-F0jlqvKr.mjs} +1 -1
- package/dist/{command-DppVezAB.mjs → command-FOQNhNqP.mjs} +1 -1
- package/dist/{command-DerHAjQL.mjs → command-yAXk5NXh.mjs} +1 -1
- package/dist/{completions-11latun5.mjs → completions-Bh0Hz-hA.mjs} +3 -3
- package/dist/{connector-interrupts-wvQcZsO1.mjs → connector-interrupts-Bd949WX0.mjs} +1 -1
- package/dist/{connector-telemetry-events-C0GGCIQk.mjs → connector-telemetry-events-Dw8iIg5Q.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-ZXzsFgea.mjs → connector-telemetry-snapshots-DqEIaz99.mjs} +1 -1
- package/dist/{connectors-DXIUG4Zi.mjs → connectors-RUEU1QDB.mjs} +1 -1
- package/dist/containers-xU-0EhLO.mjs +78 -0
- package/dist/{containers-WMWKhLkp.mjs → containers-yUOvm-4V.mjs} +211 -211
- package/dist/{content-scan-CRDmR7rD.mjs → content-scan-Cm2-Xhqo.mjs} +2 -2
- package/dist/{context-q-6bMSL-.mjs → context-BQ6KeMgq.mjs} +2 -2
- package/dist/cps-CgPduy0H.mjs +6 -0
- package/dist/csam-scanner-B0Ra6fXL.mjs +10 -0
- package/dist/{custom-csrs-BV017SqE.mjs → custom-csrs-6lfu1-RR.mjs} +1 -1
- package/dist/custom-hostnames-Dzov_CPw.mjs +27 -0
- package/dist/{custom-nameservers-BLoE8VGG.mjs → custom-nameservers-Bfhv_9_k.mjs} +1 -1
- package/dist/custom-pages-DxVD_f10.mjs +21 -0
- package/dist/{d1-Dbs8HItA.mjs → d1-D7p4uJ-e.mjs} +17 -19
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-5utIiOMN.mjs → deploy-BjWvVZol.mjs} +1 -1
- package/dist/deploy-context-C-ZdGP0Z.mjs +56 -0
- package/dist/{deploy-input-KK6yyBN_.mjs → deploy-input-B8Nq6Eh6.mjs} +1 -1
- package/dist/{dev-CnoMHxf4.mjs → dev-D20UkcYT.mjs} +1 -1
- package/dist/{diagnostics-C9B07eJY.mjs → diagnostics-DdhTemYB.mjs} +2 -2
- package/dist/{dialog-D4Y9ocuF.mjs → dialog-BnIgdgWi.mjs} +1 -1
- package/dist/discover-DEjUARkU.mjs +2 -0
- package/dist/{dist-DZRTPMMA.mjs → dist-CnKd5XoR.mjs} +19 -19
- package/dist/{dist-uRuGmkMB.mjs → dist-DAeCUX-u.mjs} +3 -3
- package/dist/{dls-lbM3i4x-.mjs → dls-BBODA9Rk.mjs} +1 -1
- package/dist/{dns-QTMPGYMa.mjs → dns-CK_hyn5q.mjs} +22 -22
- package/dist/{dns-firewall-Bfv0S44I.mjs → dns-firewall-DbvX9R-7.mjs} +9 -9
- package/dist/{docs-bV3hPwQL.mjs → docs-BDTijwM3.mjs} +1 -1
- package/dist/{dot-prop-IITUZ2XW-BnPfnQkb.mjs → dot-prop-IITUZ2XW-C4pkmT-K.mjs} +1 -1
- package/dist/{dotenv-usOKkeW7.mjs → dotenv-Ck-6V1hm.mjs} +1 -1
- package/dist/{dry-run-C2KjGX10.mjs → dry-run-DQmFkNK_.mjs} +1 -1
- package/dist/{durable-objects-0JvGTV27.mjs → durable-objects-DcFbd1Ka.mjs} +1 -1
- package/dist/{email-auth-PzRqG0ex.mjs → email-auth-BEgDxU-g.mjs} +1 -1
- package/dist/{email-routing-BgHL0Rbz.mjs → email-routing-DKWmPOVo.mjs} +13 -13
- package/dist/{email-security-CSTKIecn.mjs → email-security-RWbAp8qa.mjs} +44 -44
- package/dist/{email-sending-BSwuAir8.mjs → email-sending-BbJy_vl8.mjs} +18 -18
- package/dist/error-sanitization-Byb-_IS9.mjs +2 -0
- package/dist/{error-sanitization-pOyzm2F1.mjs → error-sanitization-DWJ5ka7h.mjs} +1 -1
- package/dist/{field-extractors-B_lFnwaL.mjs → field-extractors-Bob6udAc.mjs} +2 -2
- package/dist/{firewall-BsZxVitA.mjs → firewall-DziiEsR8.mjs} +20 -20
- package/dist/{flagship-qBohOZaM.mjs → flagship-xOtgddUK.mjs} +11 -11
- package/dist/{fraud-vGNdrSm-.mjs → fraud-BUS7i5Yh.mjs} +1 -1
- package/dist/generate-D6V4Q58z.mjs +2 -0
- package/dist/get-BTisquA3.mjs +2 -0
- package/dist/{google-tag-gateway-BHdOg4VW.mjs → google-tag-gateway-DgSzyeK-.mjs} +1 -1
- package/dist/{gt-3bcLGJ7V.mjs → gt-D6YemCLh.mjs} +1 -1
- package/dist/healthchecks-CbD2PsnM.mjs +22 -0
- package/dist/{hyperdrive-CXTqaIqk.mjs → hyperdrive-Cs_cfSXU.mjs} +1 -1
- package/dist/{iam-Dl_n_Lqq.mjs → iam-DvsCztqU.mjs} +9 -9
- package/dist/{images-vMtXk2Rf.mjs → images-BipVjHNw.mjs} +37 -37
- package/dist/index.mjs +1 -1
- package/dist/init-LvFgCsNX.mjs +43 -0
- package/dist/{intel-Bq4GGXv-.mjs → intel-D1LPkkBM.mjs} +31 -41
- package/dist/{interactive-BW9T1D1q.mjs → interactive-d_lFnSev.mjs} +3 -3
- package/dist/interactive-pjVqirHx.mjs +2 -0
- package/dist/{ips-BcvZS46g.mjs → ips-2iUGs8ws.mjs} +1 -1
- package/dist/{k2-DL4hrVTj.mjs → k2-DGzRm3NJ.mjs} +2 -2
- package/dist/{kv-BLo9wMgb.mjs → kv-BW-s9MJY.mjs} +4 -4
- package/dist/{lazy-command-CRcT6Dx-.mjs → lazy-command-Bq-rWPQe.mjs} +1 -1
- package/dist/{leaked-credential-checks-Dx4RXMyN.mjs → leaked-credential-checks-CnY6ih6p.mjs} +1 -1
- package/dist/load-balancers-CtnusAzP.mjs +76 -0
- package/dist/{local-Dil4fTWX.mjs → local-B4sZZTRA.mjs} +1 -1
- package/dist/local-DCnFIgLJ.mjs +2 -0
- package/dist/{local-runtime-B7TKFu6E.mjs → local-runtime-DoBuyriC.mjs} +1 -1
- package/dist/login-CqZJgUF1.mjs +5 -0
- package/dist/{login-Du_W6b9o.mjs → login-DR60WiAY.mjs} +1 -1
- package/dist/{logo-matches-C-1J0Oc3.mjs → logo-matches-C1-6KOkZ.mjs} +1 -1
- package/dist/{logos-BuhvSu_H.mjs → logos-Yzhd-VKb.mjs} +2 -2
- package/dist/logpush-JYG4gXZ-.mjs +46 -0
- package/dist/{logs-CaKOk-1v.mjs → logs-DLblEjK0.mjs} +3 -3
- package/dist/{magic-cloud-networking-CKxXYT8r.mjs → magic-cloud-networking-CblQwsQr.mjs} +13 -13
- package/dist/{magic-network-monitoring-BykFGQCz.mjs → magic-network-monitoring-D2px4Ep4.mjs} +9 -9
- package/dist/{magic-transit-DYULsrUP.mjs → magic-transit-Bnwsi0UQ.mjs} +170 -170
- package/dist/{managed-defense-DIb_uN25.mjs → managed-defense-CTtNoxzW.mjs} +9 -9
- package/dist/{managed-transforms-an3wQ0DW.mjs → managed-transforms-B92mJi5i.mjs} +2 -2
- package/dist/{matches-DkLSWb5X.mjs → matches-CzbL1XD-.mjs} +1 -1
- package/dist/{mcp-BcV1XqE8.mjs → mcp-Cic_aMer.mjs} +10 -10
- package/dist/{mesh-CSSlZ-0F.mjs → mesh-DZTgD16C.mjs} +14 -14
- package/dist/{migrate-DerOyuv2.mjs → migrate-DtNDRcAI.mjs} +1 -1
- package/dist/{monetization-B-nJ0SyI.mjs → monetization-DCQ2_niU.mjs} +4 -4
- package/dist/{network-ZzxQ_Dcz.mjs → network-BqMqD2qn.mjs} +27 -25
- package/dist/{network-interconnects-CI9NXQpe.mjs → network-interconnects-BFQ1yARl.mjs} +2 -2
- package/dist/o11y-CS5q1vSh.mjs +93 -0
- package/dist/oauth-DPLYUvRl.mjs +2 -0
- package/dist/oauth-DdYSPYoE.mjs +4 -0
- package/dist/{oauth-clients-BA30rTEl.mjs → oauth-clients-9BPswYm_.mjs} +1 -1
- package/dist/{oauth-scopes-hseWES1v.mjs → oauth-scopes-CLOKfQi2.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-5J5IU2MX-CKla-jDt.mjs → open-PCXX3ZDZ-5J5IU2MX-DFe2CQkm.mjs} +1 -1
- package/dist/{open-PCXX3ZDZ-D55O2jpQ.mjs → open-PCXX3ZDZ-BD2iNJqn.mjs} +1 -1
- package/dist/organization-DFRN2g6z.mjs +75 -0
- package/dist/{organizations-CcgZPmFl.mjs → organizations-yiGopnKf.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BhdlaolV.mjs → origin-post-quantum-encryption-n9gsxikn.mjs} +1 -1
- package/dist/output-O6b9MR9R.mjs +2 -0
- package/dist/{page-rules-DFfqfllI.mjs → page-rules-F1Jdxx6A.mjs} +4 -4
- package/dist/pages-CezC0YrR.mjs +54 -0
- package/dist/pay-per-crawl-fZ-kTBbN.mjs +38 -0
- package/dist/{pay-per-use-C_HxhpM4.mjs → pay-per-use-B14BTKVI.mjs} +8 -8
- package/dist/pipelines-BN7ydBHl.mjs +44 -0
- package/dist/precursor-B88RDDZT.mjs +4 -0
- package/dist/previews-CiqRIq_k.mjs +7 -0
- package/dist/process-DiXf4VPi.mjs +2 -0
- package/dist/{progress-DaQ4MzBI.mjs → progress-CdlDthXA.mjs} +1 -1
- package/dist/{prompt-KWYZvJWM.mjs → prompt-1AC-qwxS.mjs} +1 -1
- package/dist/{queries-DoyhspQf.mjs → queries-C2sgUI9j.mjs} +3 -3
- package/dist/{queues-BPxTU2rU.mjs → queues-DCP5x-PZ.mjs} +17 -17
- package/dist/{r2-CQt4S7o7.mjs → r2-D7UhzWR7.mjs} +21 -21
- package/dist/{radar-CALpR1vq.mjs → radar-osOiFeY_.mjs} +1 -1
- package/dist/{raw-fetch-Cy09TjHc.mjs → raw-fetch-1VlXDwwX.mjs} +1 -1
- package/dist/{realtime-BiHKBoI4.mjs → realtime-DCnqxiWo.mjs} +90 -87
- package/dist/registrar-DAFYjjRa.mjs +43 -0
- package/dist/{registrar-sandbox-BttFwYqE.mjs → registrar-sandbox-zeNHABZ0.mjs} +11 -9
- package/dist/{registry-CRnk93ur.mjs → registry-DG4ZiuN9.mjs} +1 -1
- package/dist/{reporting-8aRJD5HX.mjs → reporting-KehV_PXm.mjs} +1 -1
- package/dist/{request-headers-CqfJOkpO.mjs → request-headers-ojAw3pQO.mjs} +1 -1
- package/dist/request-tracers-BStCgh6m.mjs +4 -0
- package/dist/resolve-BGNMAcGR.mjs +2 -0
- package/dist/{resource-sharing-uVVpMW0w.mjs → resource-sharing-3xtSgWG7.mjs} +19 -19
- package/dist/{rules-CFOuN3t2.mjs → rules-7F-G2Bg_.mjs} +6 -6
- package/dist/{rulesets-DkhV2Hny.mjs → rulesets-B0YtS2br.mjs} +20 -20
- package/dist/{rum-BnMW0Tlb.mjs → rum-B3V6tqS-.mjs} +6 -6
- package/dist/{run-Clc3P2u7.mjs → run-B_07PrkW.mjs} +1 -1
- package/dist/run-D6AJfZT-.mjs +2 -0
- package/dist/{schema-S3pUZwpI.mjs → schema-C-tyhSnb.mjs} +1 -1
- package/dist/{schema-flags-b096XMpt.mjs → schema-flags-DY3OKCvr.mjs} +4 -4
- package/dist/{scim-tvZm6A-r.mjs → scim-CQ9TdajH.mjs} +6 -6
- package/dist/{secrets-store-DuNxSh1_.mjs → secrets-store-Dl2hDxXu.mjs} +2 -2
- package/dist/{security-insights-C17c9ZYZ.mjs → security-insights-BsLMdo1r.mjs} +2 -2
- package/dist/{security-txt-D4pRk7-w.mjs → security-txt-pCAiHvys.mjs} +1 -1
- package/dist/session-BsNzFtPi.mjs +2 -0
- package/dist/shared-CWBjMZDR.mjs +2 -0
- package/dist/smart-shield-BTXQsVxz.mjs +24 -0
- package/dist/{snippets-BIcZ6vSW.mjs → snippets-CYVieyc3.mjs} +3 -3
- package/dist/source-AlTrHNem.mjs +6 -0
- package/dist/{spawn-BW2bJmKO.mjs → spawn-Bdznd0EB.mjs} +2 -2
- package/dist/{spectrum-DjDX0geK.mjs → spectrum-DLRr4Q03.mjs} +14 -14
- package/dist/{speed-DiPoFJMm.mjs → speed-BJfaDYxz.mjs} +13 -13
- package/dist/sql-DQ4xrdc2.mjs +4 -0
- package/dist/src-BnMvFE3q.mjs +125 -0
- package/dist/ssl-CL1B69Pw.mjs +139 -0
- package/dist/startup-profile-DuaJFX1y.mjs +2 -0
- package/dist/startup-profile-HMblAiBi.mjs +29 -0
- package/dist/{state-Boubf1X6.mjs → state-DN9yfd2C.mjs} +1 -1
- package/dist/state-DePlO0Kv.mjs +2 -0
- package/dist/{stream-uhn_Zsni.mjs → stream-DrMZOO5u.mjs} +55 -55
- package/dist/{submit-C3suIDBX.mjs → submit-DjlLoVk2.mjs} +1 -1
- package/dist/tags-DY7Ur1k-.mjs +23 -0
- package/dist/{telemetry-DYjsavEr.mjs → telemetry-BG3kcYsV.mjs} +1 -1
- package/dist/telemetry-Dpm6GfZD.mjs +2 -0
- package/dist/{tenant-DK88yQM4.mjs → tenant-BEMfNMjO.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-BZ1JD1Yf.mjs → tenant-custom-nameservers-CCRbb0ch.mjs} +1 -1
- package/dist/{tools-BCCRUENY.mjs → tools-ZffhHUDd.mjs} +1 -1
- package/dist/tunnels-_JXe-UgM.mjs +29 -0
- package/dist/{turnstile-DXrbEy2A.mjs → turnstile-DXEfneQq.mjs} +5 -5
- package/dist/ui-CY79jlGZ.mjs +2 -0
- package/dist/update-check-DfbYVefm.mjs +2 -0
- package/dist/{update-check-BhhtSXVZ.mjs → update-check-atcehhBC.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-a0mY4UsC.mjs → url-info-B1kL9asc.mjs} +1 -1
- package/dist/{url-normalization-DiwpDIhc.mjs → url-normalization-CUHKRKJh.mjs} +1 -1
- package/dist/url-scanner-OnZP_-jm.mjs +16 -0
- package/dist/{user-DDH9lxf5.mjs → user-BBBuFNj4.mjs} +59 -59
- package/dist/{vectorize-DaT3amFV.mjs → vectorize-DcctB8bw.mjs} +17 -17
- package/dist/version-CLgSHoNm.mjs +2 -0
- package/dist/{waiting-rooms-BGMpu9gS.mjs → waiting-rooms-JaFE5wP1.mjs} +13 -13
- package/dist/{web-assets-NqNglLSI.mjs → web-assets-Cu0swUPe.mjs} +35 -35
- package/dist/{web3-UnCUuIfB.mjs → web3-C67z4OtQ.mjs} +6 -6
- package/dist/workers-ClTP0Ysl.mjs +43 -0
- package/dist/workers-builds-C5wKhvKe.mjs +14 -0
- package/dist/{workers-for-platforms-JscCHivQ.mjs → workers-for-platforms-rxwkYyb3.mjs} +25 -22
- package/dist/{workers-vpc-FDZQBqOu.mjs → workers-vpc-B4vyvr1W.mjs} +1 -1
- package/dist/{workflows-Dq-k81hU.mjs → workflows-COJ5jwvk.mjs} +24 -24
- package/dist/wrangler-migration-Cp546RDG.mjs +946 -0
- package/dist/zaraz-BkZ7yW05.mjs +22 -0
- package/dist/{zero-trust-CZ685QhO.mjs → zero-trust-lUFLYuL1.mjs} +509 -454
- package/dist/{zone-DcZIUTWt.mjs → zone-CC1_qxt-.mjs} +1 -1
- package/dist/{zones-BVdvYUCv.mjs → zones-BRiLlTmW.mjs} +45 -36
- package/package.json +14 -14
- package/dist/account-tags-zvHRQZxb.mjs +0 -15
- package/dist/ai-search-CtfW5fzl.mjs +0 -79
- package/dist/auth-C530fHKQ.mjs +0 -2
- package/dist/auth-Ccm5viK_.mjs +0 -2
- package/dist/auth-MNz2D-PD.mjs +0 -2
- package/dist/body-parser-DkHKPkJ7.mjs +0 -2
- package/dist/browser-run-ChXohmNG.mjs +0 -42
- package/dist/build-BRJnyeu8.mjs +0 -2
- package/dist/builds-DmEFTQTa.mjs +0 -71
- package/dist/certificate-authorities-BTLdA7EQ.mjs +0 -6
- package/dist/chunk-DSGVRFIS-C5SqiTOz.mjs +0 -2
- package/dist/client-certificates-B3UxH_Au.mjs +0 -13
- package/dist/cloudforce-one-DN5N3C3w.mjs +0 -405
- package/dist/containers-DCH6MFjY.mjs +0 -78
- package/dist/cps-Due0P5IW.mjs +0 -6
- package/dist/csam-scanner-DvLrPw45.mjs +0 -10
- package/dist/ct-alerting-BtEGkRJi.mjs +0 -5
- package/dist/custom-certificates-CMLXTTEc.mjs +0 -17
- package/dist/custom-hostnames-DI_dFaof.mjs +0 -27
- package/dist/custom-pages-ubava9Qm.mjs +0 -21
- package/dist/dcv-delegation-sGGt6UU_.mjs +0 -4
- package/dist/deploy-context-C0iVbWRG.mjs +0 -56
- package/dist/discover-DIDEGKo3.mjs +0 -2
- package/dist/error-sanitization-CIQOep3I.mjs +0 -2
- package/dist/generate-D80-1GnZ.mjs +0 -2
- package/dist/get-By1q8YlI.mjs +0 -2
- package/dist/healthchecks-DAYYLZ6u.mjs +0 -22
- package/dist/hostnames-CLlaMqHu.mjs +0 -11
- package/dist/init-_7djeBVw.mjs +0 -43
- package/dist/interactive-DGUWZ2Gk.mjs +0 -2
- package/dist/keyless-certificates-0pzjkZb6.mjs +0 -13
- package/dist/keys-BSV5IXdU.mjs +0 -4
- package/dist/load-balancers-CCCWoQXv.mjs +0 -76
- package/dist/local-DxWDQDnG.mjs +0 -2
- package/dist/login-DT6Q1UJw.mjs +0 -5
- package/dist/logpush-DgZtF9vG.mjs +0 -46
- package/dist/mtls-certificates-ukwDz6Lc.mjs +0 -13
- package/dist/o11y-LG6Y9LUZ.mjs +0 -93
- package/dist/oauth-Bx693Af5.mjs +0 -2
- package/dist/oauth-CP82E1_0.mjs +0 -4
- package/dist/organization-DMr_z6n4.mjs +0 -71
- package/dist/origin-ca-certificates-BZxUbB5N.mjs +0 -11
- package/dist/origin-tls-client-auth-DzbZvtmi.mjs +0 -30
- package/dist/output-Co4xdFf6.mjs +0 -2
- package/dist/pages-BkcL5rC4.mjs +0 -54
- package/dist/pay-per-crawl-Dulm7Xy5.mjs +0 -38
- package/dist/pipelines-DUMIVwof.mjs +0 -44
- package/dist/precursor-DsGbA_YJ.mjs +0 -4
- package/dist/previews-Cma3-M7K.mjs +0 -7
- package/dist/process-2wmDCy17.mjs +0 -2
- package/dist/registrar-gERQ3b85.mjs +0 -43
- package/dist/request-tracers-DcnwQg3K.mjs +0 -4
- package/dist/resolve-BpgXeklt.mjs +0 -2
- package/dist/resource-tagging-SlsUtLsq.mjs +0 -4
- package/dist/run-CHNyLZLG.mjs +0 -2
- package/dist/session-Cq3YNLoI.mjs +0 -2
- package/dist/shared-zePemxHi.mjs +0 -2
- package/dist/smart-shield-2egm1Vaw.mjs +0 -24
- package/dist/source-mXUcrTVw.mjs +0 -6
- package/dist/sql-DLjCt_R3.mjs +0 -4
- package/dist/src-CutrsNl4.mjs +0 -125
- package/dist/ssl-vNzK0c9S.mjs +0 -45
- package/dist/startup-profile-BOaseXnO.mjs +0 -29
- package/dist/startup-profile-BwEZFVGS.mjs +0 -2
- package/dist/state-CODDG9Nx.mjs +0 -2
- package/dist/tags-Dy2jG-Dt.mjs +0 -4
- package/dist/telemetry-Bdv5LZZs.mjs +0 -2
- package/dist/tunnels-DjbomhCa.mjs +0 -29
- package/dist/ui-BtIBQeaG.mjs +0 -2
- package/dist/update-check-Dld7rbLd.mjs +0 -2
- package/dist/url-scanner-D0egjBe5.mjs +0 -16
- package/dist/values-Bfr5-bL6.mjs +0 -4
- package/dist/version-CAuKDZAG.mjs +0 -2
- package/dist/workers-DfA9ugmb.mjs +0 -40
- package/dist/workers-builds-Cy6fdtm5.mjs +0 -14
- package/dist/wrangler-migration-R9TQ_4Qd.mjs +0 -946
- package/dist/zaraz-Dpr1pLDx.mjs +0 -22
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,o as c,t as l}from"./body-parser-ChnyBsfm.mjs";import{n as u}from"./input-validation-D7z60HJH.mjs";import{a as d,n as f}from"./prompt-1AC-qwxS.mjs";var p={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/aggregate/current`,query:[`appID`,`colo_name`]};function m(e){return e.usage(`$0 spectrum analytics aggregates currents get
|
|
3
3
|
|
|
4
|
-
Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone.`).option(`app-id`,{type:`string`,description:`Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match.`}).option(`colo-name`,{type:`string`,description:`Co-location identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone.`).option(`app-id`,{type:`string`,description:`Comma-delimited list of Spectrum Application Id(s). If provided, the response will be limited to Spectrum Application Id(s) that match.`}).option(`colo-name`,{type:`string`,description:`Co-location identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Get current aggregated analytics`,builder:m,handler:async e=>o({command:`spectrum analytics aggregates currents get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={appID:e[`app-id`],colo_name:e[`colo-name`]};if(e.dryRun){i({command:`cf spectrum analytics aggregates currents get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/aggregate/current`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(p,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},g={command:`currents`,describe:`Operations for analytics.aggregates.currents`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`aggregates`,describe:`Operations for analytics.aggregates`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/bytime`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`,`time_delta`]};function y(e){return e.usage(`$0 spectrum analytics events bytimes get
|
|
5
5
|
|
|
6
6
|
Retrieves a list of aggregate metrics grouped by time interval.`).option(`dimensions`,{type:`string`,description:`Can be used to break down the data by given attributes. Options are:
|
|
7
7
|
|
|
@@ -31,7 +31,7 @@ Operator | Name | URL Encoded
|
|
|
31
31
|
\\>= | Greater than or equal to | %3E%3D
|
|
32
32
|
\\<= | Less than or equal to | %3C%3D
|
|
33
33
|
|
|
34
|
-
Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`time-delta`,{type:`string`,description:`Used to select time series resolution.`,choices:[`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
34
|
+
Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`time-delta`,{type:`string`,description:`Used to select time series resolution.`,choices:[`year`,`quarter`,`month`,`week`,`day`,`hour`,`dekaminute`,`minute`],demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get analytics by time`,builder:y,handler:async e=>o({command:`spectrum analytics events bytimes get`,classification:{safeFlags:[`time-delta`,`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since,time_delta:e[`time-delta`]};if(e.dryRun){i({command:`cf spectrum analytics events bytimes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/bytime`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(v,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},x={command:`bytimes`,describe:`Operations for analytics.events.bytimes`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var S={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/analytics/events/summary`,query:[`dimensions`,`sort`,`until`,`metrics`,`filters`,`since`]};function C(e){return e.usage(`$0 spectrum analytics events summaries get
|
|
35
35
|
|
|
36
36
|
Retrieves a list of summarised aggregate metrics over a given time period.`).option(`dimensions`,{type:`string`,description:`Can be used to break down the data by given attributes. Options are:
|
|
37
37
|
|
|
@@ -61,23 +61,23 @@ Operator | Name | URL Encoded
|
|
|
61
61
|
\\>= | Greater than or equal to | %3E%3D
|
|
62
62
|
\\<= | Less than or equal to | %3C%3D
|
|
63
63
|
|
|
64
|
-
Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
64
|
+
Use the above to construct filters.`}).option(`since`,{type:`string`,description:`Since`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Get analytics summary`,builder:C,handler:async e=>o({command:`spectrum analytics events summaries get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let o={dimensions:e.dimensions,sort:e.sort,until:e.until,metrics:e.metrics,filters:e.filters,since:e.since};if(e.dryRun){i({command:`cf spectrum analytics events summaries get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/analytics/events/summary`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(S,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})},T={command:`summaries`,describe:`Operations for analytics.events.summaries`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},E={command:`events`,describe:`Operations for analytics.events`,builder:e=>e.command(x).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var D={method:`GET`,path:()=>`/user/spectrum_analytics/zones/report`,query:[`since`,`until`,`cdn_traffic`]};function O(e){return e.usage(`$0 spectrum analytics zones report get
|
|
65
65
|
|
|
66
|
-
Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:`Since`}).option(`until`,{type:`string`,description:`Until`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
66
|
+
Retrieves a list of total bandwidth by zone over a given time period.`).option(`since`,{type:`string`,description:`Since`}).option(`until`,{type:`string`,description:`Until`}).option(`cdn-traffic`,{type:`boolean`,description:`Include CDN traffic in the bandwidth aggregation.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`get`,describe:`Get zones bandwidth report`,builder:O,handler:async e=>o({command:`spectrum analytics zones report get`,classification:{safeFlags:[`cdn-traffic`,`dry-run`]}},e,async()=>{let n={since:e.since,until:e.until,cdn_traffic:e[`cdn-traffic`]};if(e.dryRun){i({command:`cf spectrum analytics zones report get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/user/spectrum_analytics/zones/report`,pathParams:{},query:n,bodyKind:`none`});return}let o=await t(e),s=await a(`Loading`,async()=>o.send(D,n));r(s,{successLabel:`Loaded`})})},A={command:`report`,describe:`Operations for analytics.zones.report`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`zones`,describe:`Operations for analytics.zones`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`analytics`,describe:`Real-time and historical connection analytics for Spectrum applications`,builder:e=>e.command(_).command(E).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var N={method:`POST`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,body:`json`};function P(e){return e.usage(`$0 spectrum apps create
|
|
67
67
|
|
|
68
68
|
Creates a new Spectrum application from a configuration using a name for the origin.`).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
|
|
69
|
-
Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`,default:!1}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>
|
|
70
|
-
Notes: Only available for TCP applications.`,default:!1}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>
|
|
69
|
+
Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`,default:!1}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>u(e,`dns-type`,`text`)).option(`edge-ips-connectivity`,{type:`string`,description:`The IP versions supported for inbound connections on Spectrum anycast IPs.`,choices:[`all`,`ipv4`,`ipv6`]}).coerce(`edge-ips-connectivity`,e=>u(e,`edge-ips-connectivity`,`text`)).option(`edge-ips-type`,{type:`string`,description:`The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.`,choices:[`dynamic`,`static`]}).coerce(`edge-ips-type`,e=>u(e,`edge-ips-type`,`text`)).option(`edge-ips-ips`,{type:`string`,array:!0,description:`The array of customer owned IPs we broadcast via anycast for this hostname and application.`}).option(`ip-firewall`,{type:`boolean`,description:`Enables IP Access Rules for this application.
|
|
70
|
+
Notes: Only available for TCP applications.`,default:!1}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`],default:`off`}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`],default:`off`}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`],default:`direct`}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const F={command:`create`,describe:`Create Spectrum application using a name for the origin`,builder:P,handler:async e=>o({command:`spectrum apps create`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(N,{body:t,zone_id:f}));r(n,{successLabel:`Created`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let p=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),m=await a(`Creating`,async()=>o.send(N,{body:p,zone_id:f}));r(m,{successLabel:`Created`})})};var I={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function L(e){return e.usage(`$0 spectrum apps delete <app-id>
|
|
71
71
|
|
|
72
|
-
Deletes a previously existing application.`).positional(`app-id`,{type:`string`,description:`App identifier.`,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
|
|
73
|
-
`);return}let c=await a(`Deleting`,async()=>o.send(
|
|
72
|
+
Deletes a previously existing application.`).positional(`app-id`,{type:`string`,description:`App identifier.`,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 R={command:`delete <app-id>`,describe:`Delete Spectrum application`,builder:L,handler:async e=>o({command:`spectrum apps delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=s,!await f({force:!!e.force})){process.stderr.write(`Aborted.
|
|
73
|
+
`);return}let c=await a(`Deleting`,async()=>o.send(I,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Deleted`})})};var z={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`};function B(e){return e.usage(`$0 spectrum apps get <app-id>
|
|
74
74
|
|
|
75
|
-
Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
75
|
+
Gets the application configuration of a specific application inside a zone.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`get <app-id>`,describe:`Get Spectrum application configuration`,builder:B,handler:async e=>o({command:`spectrum apps get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-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(z,{zone_id:s,app_id:e[`app-id`]}));r(c,{successLabel:`Loaded`})})};var H={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/apps`,query:[`page`,`per_page`,`direction`,`order`]};function U(e){return e.usage(`$0 spectrum apps list
|
|
76
76
|
|
|
77
|
-
Retrieves a list of currently existing Spectrum applications inside a zone.`).option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
77
|
+
Retrieves a list of currently existing Spectrum applications inside a zone.`).option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Spectrum applications`,builder:U,handler:async e=>o({command:`spectrum apps list`,classification:{safeFlags:[`direction`,`order`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],direction:e.direction,order:e.order};if(e.dryRun){i({command:`cf spectrum apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(H,{zone_id:c,...o}));r(l,{successLabel:`Loaded`})})};var G={method:`PUT`,path:t=>e`/zones/${t.zone_id}/spectrum/apps/${t.app_id}`,body:`json`};function K(e){return e.usage(`$0 spectrum apps update <app-id>
|
|
78
78
|
|
|
79
79
|
Updates a previously existing application's configuration that uses a name for the origin.`).positional(`app-id`,{type:`string`,description:`App identifier.`,demandOption:!0}).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
|
|
80
|
-
Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>
|
|
81
|
-
Notes: Only available for TCP applications.`}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>
|
|
80
|
+
Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).coerce(`dns-type`,e=>u(e,`dns-type`,`text`)).option(`edge-ips-connectivity`,{type:`string`,description:`The IP versions supported for inbound connections on Spectrum anycast IPs.`,choices:[`all`,`ipv4`,`ipv6`]}).coerce(`edge-ips-connectivity`,e=>u(e,`edge-ips-connectivity`,`text`)).option(`edge-ips-type`,{type:`string`,description:`The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.`,choices:[`dynamic`,`static`]}).coerce(`edge-ips-type`,e=>u(e,`edge-ips-type`,`text`)).option(`edge-ips-ips`,{type:`string`,array:!0,description:`The array of customer owned IPs we broadcast via anycast for this hostname and application.`}).option(`ip-firewall`,{type:`boolean`,description:`Enables IP Access Rules for this application.
|
|
81
|
+
Notes: Only available for TCP applications.`}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).coerce(`origin-dns-type`,e=>u(e,`origin-dns-type`,`text`)).option(`origin-port`,{type:`string`,description:'The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`.\nNotes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field. Accepts a JSON scalar or plain string, or @path/to/file.'}).option(`origin-worker-id`,{type:`string`,description:`Optional Worker script tag (worker ID) to use as the application's origin. Only supported for TCP applications with traffic_type "worker"; mutually exclusive with origin_direct, origin_dns, origin_port, proxy_protocol, and argo_smart_routing. tls may only be "off" or "flexible".`}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`]}).coerce(`proxy-protocol`,e=>u(e,`proxy-protocol`,`text`)).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`]}).coerce(`tls`,e=>u(e,`tls`,`text`)).option(`traffic-type`,{type:`string`,description:'Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application\'s type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare\'s HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.',choices:[`direct`,`http`,`https`,`worker`]}).coerce(`traffic-type`,e=>u(e,`traffic-type`,`text`)).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const q={command:`update <app-id>`,describe:`Update Spectrum application configuration using a name for the origin`,builder:K,handler:async e=>o({command:`spectrum apps update`,classification:{safeFlags:[`argo-smart-routing`,`dns-type`,`edge-ips-connectivity`,`edge-ips-type`,`ip-firewall`,`origin-dns-type`,`proxy-protocol`,`tls`,`traffic-type`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum apps update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/apps/${e[`app-id`]==null?`<app-id>`:encodeURIComponent(String(e[`app-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"app-id":String(e[`app-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}):s(e.body)});return}let o=await t(e),f=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=f,e.body){let t=s(e.body),n=await a(`Updating`,async()=>o.send(G,{body:t,zone_id:f,app_id:e[`app-id`]}));r(n,{successLabel:`Updated`});return}e.protocol===void 0&&(e.protocol=await d(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let p=l({argo_smart_routing:e[`argo-smart-routing`],dns:{name:u(e[`dns-name`],`dns-name`,`text`),type:e[`dns-type`]},edge_ips:{connectivity:e[`edge-ips-connectivity`],type:e[`edge-ips-type`],ips:e[`edge-ips-ips`]},ip_firewall:e[`ip-firewall`],origin_direct:e[`origin-direct`],origin_dns:{name:u(e[`origin-dns-name`],`origin-dns-name`,`text`),ttl:e[`origin-dns-ttl`],type:e[`origin-dns-type`]},origin_port:c(e[`origin-port`],`origin-port`),origin_worker_id:u(e[`origin-worker-id`],`origin-worker-id`,`text`),protocol:u(e.protocol,`protocol`,`text`),proxy_protocol:e[`proxy-protocol`],tls:e.tls,traffic_type:e[`traffic-type`],virtual_network_id:u(e[`virtual-network-id`],`virtual-network-id`,`text`)}),m=await a(`Updating`,async()=>o.send(G,{body:p,zone_id:f,app_id:e[`app-id`]}));r(m,{successLabel:`Updated`})})},J={command:`apps`,describe:`Spectrum application configurations that map protocols and ports to origin servers`,builder:e=>e.command(F).command(R).command(V).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Y={method:`GET`,path:t=>e`/zones/${t.zone_id}/spectrum/protocols`};function X(e){return e.usage(`$0 spectrum protocols list
|
|
82
82
|
|
|
83
|
-
Retrieves a list of Spectrum application protocols available for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
83
|
+
Retrieves a list of Spectrum application protocols available for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`list`,describe:`List Spectrum application protocols`,builder:X,handler:async e=>o({command:`spectrum protocols list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf spectrum protocols list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/spectrum/protocols`,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(Y,{zone_id:s}));r(c,{successLabel:`Loaded`})})},Q={command:`protocols`,describe:`Operations for protocols`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`spectrum`,describe:`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,builder:e=>e.command(M).command(J).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{n as t}from"./auth-BaUNb1Ed.mjs";import{i as n}from"./context-BQ6KeMgq.mjs";import{t as r}from"./output-O6b9MR9R.mjs";import{t as i}from"./dry-run-DQmFkNK_.mjs";import{t as a}from"./progress-CdlDthXA.mjs";import{t as o}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";import{n as u}from"./prompt-1AC-qwxS.mjs";var d={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/availabilities`};function f(e){return e.usage(`$0 speed availabilities list
|
|
3
3
|
|
|
4
|
-
Retrieves quota for all plans, as well as the current zone quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
4
|
+
Retrieves quota for all plans, as well as the current zone quota.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`list`,describe:`Get quota and availability`,builder:f,handler:async e=>o({command:`speed availabilities list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed availabilities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/availabilities`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(e),s=await n({zone:e.zone},o,{quiet:e.quiet});e.zoneId=s;let c=await a(`Loading`,async()=>o.send(d,{zone_id:s}));r(c,{successLabel:`Loaded`})})},m={command:`availabilities`,describe:`Check which speed test regions and configurations are available for your zone`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var h={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages`};function g(e){return e.usage(`$0 speed pages list
|
|
5
5
|
|
|
6
|
-
Lists all webpages which have been tested.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
6
|
+
Lists all webpages which have been tested.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List tested webpages`,builder:g,handler:async e=>o({command:`speed pages list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages`,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(h,{zone_id:s}));r(c,{successLabel:`Loaded`})})};var v={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,body:`json`};function y(e){return e.usage(`$0 speed pages tests create <url>
|
|
7
7
|
|
|
8
|
-
Starts a test for a specific webpage, in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const
|
|
8
|
+
Starts a test for a specific webpage, in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).coerce(`region`,e=>l(e,`region`,`text`)).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create <url>`,describe:`Start page test`,builder:y,handler:async e=>o({command:`speed pages tests create`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},bodyKind:`json`,body:e.body===void 0?c({region:e.region}):s(e.body)});return}let o=await t(e),l=await n({zone:e.zone},o,{quiet:e.quiet});if(e.zoneId=l,e.body){let t=s(e.body),n=await a(`Creating`,async()=>o.send(v,{body:t,zone_id:l,url:e.url}));r(n,{successLabel:`Created`});return}let u=c({region:e.region}),d=await a(`Creating`,async()=>o.send(v,{body:u,zone_id:l,url:e.url}));r(d,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`region`]};function S(e){return e.usage(`$0 speed pages tests delete <url>
|
|
9
9
|
|
|
10
|
-
Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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
|
|
11
|
-
`);return}let
|
|
10
|
+
Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const C={command:`delete <url>`,describe:`Delete all page tests`,builder:S,handler:async e=>o({command:`speed pages tests delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed pages tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force})){process.stderr.write(`Aborted.
|
|
11
|
+
`);return}let l=await a(`Deleting`,async()=>s.send(x,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Deleted`})})};var w={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests/${t.test_id}`};function T(e){return e.usage(`$0 speed pages tests get <test-id>
|
|
12
12
|
|
|
13
|
-
Retrieves the result of a specific test.`).positional(`test-id`,{type:`string`,description:`Test ID`,demandOption:!0}).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
13
|
+
Retrieves the result of a specific test.`).positional(`test-id`,{type:`string`,description:`Test ID`,demandOption:!0}).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <test-id>`,describe:`Get a page test result`,builder:T,handler:async e=>o({command:`speed pages tests get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){i({command:`cf speed pages tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests/${e[`test-id`]==null?`<test-id>`:encodeURIComponent(String(e[`test-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``),"test-id":String(e[`test-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(w,{zone_id:s,url:e.url,test_id:e[`test-id`]}));r(c,{successLabel:`Loaded`})})};var D={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/tests`,query:[`page`,`per_page`,`region`]};function O(e){return e.usage(`$0 speed pages tests list
|
|
14
14
|
|
|
15
|
-
Test history (list of tests) for a specific webpage.`).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
15
|
+
Test history (list of tests) for a specific webpage.`).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List page test history`,builder:O,handler:async e=>o({command:`speed pages tests list`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={page:e.page,per_page:e[`per-page`],region:e.region};if(e.dryRun){i({command:`cf speed pages tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/tests`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(D,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},A={command:`tests`,describe:`Operations for pages.tests`,builder:e=>e.command(b).command(C).command(E).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var j={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/pages/${t.url}/trend`,query:[`region`,`deviceType`,`start`,`end`,`tz`,`metrics`]};function M(e){return e.usage(`$0 speed pages trend <url>
|
|
16
16
|
|
|
17
|
-
Lists the core web vital metrics trend over time for a specific page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`],demandOption:!0}).option(`device-type`,{type:`string`,description:`The type of device.`,choices:[`DESKTOP`,`MOBILE`],demandOption:!0}).option(`start`,{type:`string`,description:`Start`,demandOption:!0}).option(`end`,{type:`string`,description:`End`}).option(`tz`,{type:`string`,description:`The timezone of the start and end timestamps.`,demandOption:!0}).option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to include in the results.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
17
|
+
Lists the core web vital metrics trend over time for a specific page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`],demandOption:!0}).option(`device-type`,{type:`string`,description:`The type of device.`,choices:[`DESKTOP`,`MOBILE`],demandOption:!0}).option(`start`,{type:`string`,description:`Start`,demandOption:!0}).option(`end`,{type:`string`,description:`End`}).option(`tz`,{type:`string`,description:`The timezone of the start and end timestamps.`,demandOption:!0}).option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to include in the results.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`trend <url>`,describe:`List core web vital metrics trend`,builder:M,handler:async e=>o({command:`speed pages trend`,classification:{safeFlags:[`region`,`device-type`,`dry-run`]}},e,async()=>{let o={region:e.region,deviceType:e[`device-type`],start:e.start,end:e.end,tz:e.tz,metrics:e.metrics};if(e.dryRun){i({command:`cf speed pages trend`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/pages/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}/trend`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(j,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},P={command:`pages`,describe:`Tested pages with their performance history, trends, and individual test results`,builder:e=>e.command(_).command(N).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var F={method:`POST`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`,`frequency`]};function I(e){return e.usage(`$0 speed schedule create <url>
|
|
18
18
|
|
|
19
|
-
Creates a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`frequency`,{type:`string`,description:`The frequency of the scheduled test. Defaults to WEEKLY for free plans, DAILY for paid plans.`,choices:[`DAILY`,`WEEKLY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
19
|
+
Creates a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`frequency`,{type:`string`,description:`The frequency of the scheduled test. Defaults to WEEKLY for free plans, DAILY for paid plans.`,choices:[`DAILY`,`WEEKLY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`create <url>`,describe:`Create scheduled page test`,builder:I,handler:async e=>o({command:`speed schedule create`,classification:{safeFlags:[`region`,`frequency`,`dry-run`]}},e,async()=>{let o={region:e.region,frequency:e.frequency};if(e.dryRun){i({command:`cf speed schedule create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Creating`,async()=>s.send(F,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Created`})})};var R={method:`DELETE`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function z(e){return e.usage(`$0 speed schedule delete <url>
|
|
20
20
|
|
|
21
|
-
Deletes a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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
|
|
22
|
-
`);return}let
|
|
21
|
+
Deletes a scheduled test for a page.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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 B={command:`delete <url>`,describe:`Delete scheduled page test`,builder:z,handler:async e=>o({command:`speed schedule delete`,classification:{safeFlags:[`region`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed schedule delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});if(e.zoneId=c,!await u({force:!!e.force})){process.stderr.write(`Aborted.
|
|
22
|
+
`);return}let l=await a(`Deleting`,async()=>s.send(R,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Deleted`})})};var V={method:`GET`,path:t=>e`/zones/${t.zone_id}/speed_api/schedule/${t.url}`,query:[`region`]};function H(e){return e.usage(`$0 speed schedule get <url>
|
|
23
23
|
|
|
24
|
-
Retrieves the test schedule for a page in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const
|
|
24
|
+
Retrieves the test schedule for a page in a specific region.`).positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get <url>`,describe:`Get a page test schedule`,builder:H,handler:async e=>o({command:`speed schedule get`,classification:{safeFlags:[`region`,`dry-run`]}},e,async()=>{let o={region:e.region};if(e.dryRun){i({command:`cf speed schedule get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/speed_api/schedule/${e.url==null?`<url>`:encodeURIComponent(String(e.url))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),url:String(e.url??``)},query:o,bodyKind:`none`});return}let s=await t(e),c=await n({zone:e.zone},s,{quiet:e.quiet});e.zoneId=c;let l=await a(`Loading`,async()=>s.send(V,{zone_id:c,url:e.url,...o}));r(l,{successLabel:`Loaded`})})},W={command:`schedule`,describe:`Scheduled recurring speed tests that automatically run at regular intervals`,builder:e=>e.command(L).command(B).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},G={command:`speed`,describe:`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,builder:e=>e.command(m).command(P).command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{G as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{i as e,n as t}from"./auth-BaUNb1Ed.mjs";import{t as n}from"./output-O6b9MR9R.mjs";import{t as r}from"./dry-run-DQmFkNK_.mjs";import{t as i}from"./progress-CdlDthXA.mjs";import{t as a}from"./run-B_07PrkW.mjs";import"./telemetry-Dpm6GfZD.mjs";import{n as o,s,t as c}from"./body-parser-ChnyBsfm.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";var d={method:`GET`,path:()=>`/analytics/sql/introspection`,query:[`account_tag`,`include_columns`,`include_custom_attributes`,`include_attributes`,`include_wae`,`include_lex`,`dataset_name`],errors:{400:`BadRequestError`,403:`ForbiddenError`,422:`UnprocessableEntityError`,500:`InternalServerError`,503:`ServiceUnavailableError`}};function f(e){return e.usage("$0 sql datasets\n\nReturns the analytics dataset catalogue. By default, the response contains dataset names, titles, categories, descriptions, kinds, and hidden flags. Set `include_columns` to include each dataset's column names, descriptions, data types, and hidden flags. The caller must have Account Analytics Read permission on the account identified by `account_tag`. Dataset names, descriptions, and columns are the same for every authorized account. When `include_custom_attributes` or `include_attributes` is set, the response also includes attribute names and types discovered from that account's own data, which legitimately differs per caller. `attributes` is a replacement for `custom_attributes` that will eventually be removed; until then, set either flag independently to receive the corresponding field. `hidden` marks catalogue entries a client should de-emphasise. It has no effect on access: hidden datasets and columns are returned here and remain fully queryable. The catalogue lists the datasets this deployment is able to describe, which is not a fixed list. Some datasets are described by the service that owns them and are listed only where that service is available, so the same account may see a different catalogue in different environments, and datasets may appear or disappear without a change to this API. Clients should query the catalogue rather than hard-coding it, and should not treat a dataset's absence as proof that it does not exist. Workers Analytics Engine datasets are named by the account that writes them, so they are discovered from that account's own data rather than from a fixed list. They appear as `events.analyticsEngine.<dataset_name>` and differ per account. A dataset is listed for as long as any of its data is retained, so it does not disappear from the catalogue merely because writes have stopped. An account with a very large number of datasets may receive a truncated list. Set `include_wae=false` to omit them. Log Explorer datasets are listed only where the account has them, so they differ per account and are not part of the static catalogue. Set `include_lex=false` to omit them.").option(`account-tag`,{type:`string`,description:`Account whose available analytics datasets are returned.`,demandOption:!0}).option(`include-columns`,{type:`boolean`,description:`Include column metadata for each returned dataset.`}).option(`include-custom-attributes`,{type:`boolean`,description:"Include a capped set of custom attribute names and types observed during the preceding seven days, as `custom_attributes`. Requires a nonempty dataset_name. Deprecated in favor of `include_attributes`."}).option(`include-attributes`,{type:`boolean`,description:"Include a capped set of attribute names and types observed during the preceding seven days, as `attributes`. Requires a nonempty dataset_name. Replaces `include_custom_attributes`, which is deprecated."}).option(`include-wae`,{type:`boolean`,description:"Include Workers Analytics Engine datasets, which are discovered from the account's own data. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`include-lex`,{type:`boolean`,description:"Include Log Explorer datasets, which are listed only where the account has them. Set to `false` to return only datasets described from the static catalogue, which avoids that lookup."}).option(`dataset-name`,{type:`string`,description:"Return only the dataset with this exact name. An empty value is treated as if the parameter had been omitted, and does not filter the catalogue. A name that matches no dataset in this deployment's catalogue is rejected with `422`; a dataset that exists but is not describable here is rejected identically, so the two cases cannot be told apart.\n\nA Workers Analytics Engine dataset is named in full, as `events.analyticsEngine.<dataset_name>`; the namespace on its own returns every such dataset the account has. A `dataset_name` the account does not have is rejected with `422` like any other unknown name."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`datasets`,describe:`List available analytics datasets`,builder:f,handler:async e=>a({command:`sql datasets`,classification:{safeFlags:[`include-columns`,`include-custom-attributes`,`include-attributes`,`include-wae`,`include-lex`,`dry-run`]}},e,async()=>{let a={account_tag:e[`account-tag`],include_columns:e[`include-columns`],include_custom_attributes:e[`include-custom-attributes`],include_attributes:e[`include-attributes`],include_wae:e[`include-wae`],include_lex:e[`include-lex`],dataset_name:e[`dataset-name`]};if(e.dryRun){r({command:`cf sql datasets`,method:`GET`,url:`https://api.cloudflare.com/client/v4/analytics/sql/introspection`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e),s=await i(`Loading`,async()=>o.send(d,a));n(s,{successLabel:`Loaded`})})};function m(e){return e.usage("$0 sql query <query>\n\nExecutes a SQL query against the analytics datasets available to the caller. Send either raw SQL or a JSON object containing the query and optional positional or named parameters, time range, and account or zone scope. Raw SQL placeholders can also be bound with query parameters named `param_<name>`. A trailing `FORMAT JSON`, `FORMAT JSONEachRow`, `FORMAT TabSeparated`, or `FORMAT TSV` is supported for all datasets. Without FORMAT, each backend retains its existing default JSON response.").positional(`query`,{type:`string`,description:`SQL query to execute. A trailing FORMAT selects JSON, JSONEachRow, TabSeparated, or TSV output on any dataset. `,demandOption:!0}).option(`scope-account`,{type:`string`,description:`Account tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
|
|
3
|
+
`}).option(`scope-zone`,{type:`string`,description:`Zone tag used to authorize and scope the query. Must be a 32-character lowercase hex string.
|
|
4
|
+
`}).option(`time-until`,{type:`string`,description:`Inclusive upper bound for the dataset's timestamp column.`}).option(`time-since`,{type:`string`,description:`Inclusive lower bound for the dataset's timestamp column.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).conflicts(`scope-account`,[`scope-zone`]).conflicts(`scope-zone`,[`scope-account`]).check(e=>{if([`time-until`,`time-since`].some(t=>e[t]!==void 0)){let t=[`time-since`].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 --time_range-* flag is set`)}return!0})}const h={command:`query <query>`,describe:`Query analytics datasets`,builder:m,handler:async d=>a({command:`sql query`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){r({command:`cf sql query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/analytics/sql`,pathParams:{},bodyKind:d.file===void 0?`json`:`octet-stream`,body:d.file===void 0?d.body===void 0?c({scope:{accountTag:l(d[`scope-account`],`scope-account`,`text`),zoneTag:l(d[`scope-zone`],`scope-zone`,`text`)},time_range:{end:l(d[`time-until`],`time-until`,`text`),start:l(d[`time-since`],`time-since`,`text`)},query:d.query}):o(d.body):{file:d.file}});return}let a=await t(d);if(d.file){let t=u(d.file),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t,headers:{"Content-Type":`text/plain`}}));n(r,{successLabel:`Loaded`});return}if(d.body){let t=o(d.body),r=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:t}));n(r,{successLabel:`Loaded`});return}let f={};d[`scope-account`]!==void 0&&s(f,[`scope`,`accountTag`],l(d[`scope-account`],`scope-account`,`text`)),d[`scope-zone`]!==void 0&&s(f,[`scope`,`zoneTag`],l(d[`scope-zone`],`scope-zone`,`text`)),d[`time-until`]!==void 0&&s(f,[`time_range`,`end`],l(d[`time-until`],`time-until`,`text`)),d[`time-since`]!==void 0&&s(f,[`time_range`,`start`],l(d[`time-since`],`time-since`,`text`)),d.query!==void 0&&(f.query=d.query);let p=await i(`Loading`,async()=>e(a,`POST`,`/analytics/sql`,{body:f}));n(p,{successLabel:`Loaded`})})},g={command:`sql`,describe:`sql`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|