cf 0.9.1 → 0.11.0
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 +20 -5
- package/dist/_meta/agent-context.json +46 -39
- package/dist/_meta/commands.json +9358 -10581
- package/dist/_meta/hand-written-commands.json +784 -0
- package/dist/_meta/schemas.json +14870 -14667
- package/dist/abuse-reports-sDBTV0qZ.mjs +8 -0
- package/dist/{access-CxyW_sIW.mjs → access-DcNzuCue.mjs} +1 -1
- package/dist/account-BX90zXn5.mjs +2 -0
- package/dist/account-tags-Bz3JG5hI.mjs +9 -0
- package/dist/accounts-DCuW3xyZ.mjs +28 -0
- package/dist/{acm-CHacxa3s.mjs → acm-zjfShZLS.mjs} +1 -1
- package/dist/{addressing-BnqNmmYN.mjs → addressing-DORQ64Ux.mjs} +11 -11
- package/dist/{agent-context-Bu6yvDqA.mjs → agent-context-BgPR_aQr.mjs} +1 -1
- package/dist/agent-memory-C0hAUMeC.mjs +6 -0
- package/dist/ai-BpEBGMT2.mjs +5 -0
- package/dist/ai-audit-DnU3vn3E.mjs +2 -0
- package/dist/ai-gateway-COOrr_Yw.mjs +13 -0
- package/dist/ai-search-DKbN9Tyd.mjs +7 -0
- package/dist/ai-security-C_I5lo58.mjs +4 -0
- package/dist/{alerting-qa8SkXlD.mjs → alerting-4T8gmZs-.mjs} +4 -4
- package/dist/analytics-Bxh4TCP7.mjs +3 -0
- package/dist/analytics_engine-fV56bjVN.mjs +2 -0
- package/dist/{api-security-MfHbfZyf.mjs → api-security-COk_i184.mjs} +20 -20
- package/dist/argo-DIRfvxvv.mjs +2 -0
- package/dist/args-DlUhyGU0.mjs +2 -0
- package/dist/artifacts-BBfXNfUg.mjs +4 -0
- package/dist/audit-logs-BlOrlAWe.mjs +2 -0
- package/dist/{auth-DuLchM18.mjs → auth-D3X9HYhD.mjs} +3 -3
- package/dist/auth-DPhNN3Ly.mjs +5 -0
- package/dist/billing-B9e4PnvN.mjs +3 -0
- package/dist/body-parser-BshbixEq.mjs +2 -0
- package/dist/bot-management-D2JVeS-V.mjs +5 -0
- package/dist/botnet-feed-BTzTYs5d.mjs +3 -0
- package/dist/brand-protection-C5Q6Gpw9.mjs +3 -0
- package/dist/{browser-extension-q79xHrVW.mjs → browser-extension-u5uA0Lwk.mjs} +1 -1
- package/dist/browser-run-CHGOCTdG.mjs +4 -0
- package/dist/build-D0FhOj40.mjs +8 -0
- package/dist/{cache-Cl7vKJwH.mjs → cache-C6V7PbQM.mjs} +1 -1
- package/dist/{calls-DtK_ANxq.mjs → calls-Bye8Tyy-.mjs} +1 -1
- package/dist/certificate-authorities-B-U_e6JJ.mjs +2 -0
- package/dist/cf-Ds4JFovl.mjs +18 -0
- package/dist/chunk-LQW53VED-22IYZovK.mjs +119 -0
- package/dist/chunk-QBZBEHZB-CKzQKcIp.mjs +2 -0
- package/dist/{client-certificates-BtPU9GsQ.mjs → client-certificates-3RrC-6LG.mjs} +1 -1
- package/dist/{client-side-security-DAn-3jwp.mjs → client-side-security-DIdKvRMT.mjs} +1 -1
- package/dist/cloud-connector-CL1jPQud.mjs +2 -0
- package/dist/cloudforce-one-DULeqLkR.mjs +36 -0
- package/dist/command-C9VP3xaA.mjs +2 -0
- package/dist/{completions-BHE4pRjB.mjs → completions-CqgGKRAC.mjs} +3 -3
- package/dist/config.d.mts +1460 -1348
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-CXlLObDv.mjs +2 -0
- package/dist/connector-telemetry-events-BrYX4ig4.mjs +2 -0
- package/dist/connector-telemetry-events-latest-BbpcII3_.mjs +2 -0
- package/dist/connector-telemetry-snapshots-BdeBQYcM.mjs +2 -0
- package/dist/connector-telemetry-snapshots-latest-DuCiimXl.mjs +2 -0
- package/dist/{connectors-Bo6ZT8PT.mjs → connectors-BQwyBJ4_.mjs} +1 -1
- package/dist/containers-BrQtGiNp.mjs +58 -0
- package/dist/{content-scan-D03UfK2X.mjs → content-scan-DNzhXYkY.mjs} +1 -1
- package/dist/{csamScanner-DgS-7ADh.mjs → csamScanner-CFq5s1Q3.mjs} +1 -1
- package/dist/{ct-alerting-8AKtNnUg.mjs → ct-alerting-CH6UmsGQ.mjs} +1 -1
- package/dist/custom-certificates-DnG73Wg2.mjs +5 -0
- package/dist/custom-csrs-bhClr2SU.mjs +3 -0
- package/dist/custom-hostnames-C0eiGvG9.mjs +5 -0
- package/dist/custom-nameservers-CVMhhLm6.mjs +3 -0
- package/dist/custom-pages-DTINMR30.mjs +3 -0
- package/dist/d1-sKdExJYF.mjs +20 -0
- package/dist/data-security-mV3a6UfW.mjs +7 -0
- package/dist/dcv-delegation-dBu3jdRw.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-DGlmjPTS.mjs → deploy-BL59O1O1.mjs} +1 -1
- package/dist/deploy-input-Dz6q-__n.mjs +2 -0
- package/dist/{dev-BbLV0Ti-.mjs → dev-BDaavgH1.mjs} +2 -2
- package/dist/diagnostics-CJV6qWUA.mjs +3 -0
- package/dist/{directory-CCndFkbQ.mjs → directory-B5zCMusW.mjs} +1 -1
- package/dist/{dispatch-namespaces-C48JQ9EA.mjs → dispatch-namespaces-Dg5lu5xX.mjs} +1 -1
- package/dist/dist-BHi7UhXO.mjs +72 -0
- package/dist/dist-BWpErtDM.mjs +384 -0
- package/dist/{dls-BBq99pjI.mjs → dls-t0hnIe_P.mjs} +1 -1
- package/dist/dns-C8FC2hbh.mjs +29 -0
- package/dist/{dns-firewall-DdwVtm12.mjs → dns-firewall-CuhhUm55.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-C_xd7eTS.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
- package/dist/dry-run-DL2V6yFm.mjs +2 -0
- package/dist/durable-objects-BLrgM3Cw.mjs +2 -0
- package/dist/email-auth-BmYrl0pO.mjs +2 -0
- package/dist/email-routing-CF3_Z957.mjs +6 -0
- package/dist/email-security-F7OYcMkZ.mjs +18 -0
- package/dist/email-sending-EyU3WvGQ.mjs +7 -0
- package/dist/fieldExtractors-Cno37T2m.mjs +3 -0
- package/dist/firewall-8YWWy4iB.mjs +11 -0
- package/dist/flagship-C4x0l-8J.mjs +4 -0
- package/dist/{fraud-AH47n-wL.mjs → fraud-HR_SdUx3.mjs} +1 -1
- package/dist/google-tag-gateway-BdcS0WnX.mjs +2 -0
- package/dist/{healthchecks-DfEUG007.mjs → healthchecks-4qOvjrTN.mjs} +2 -2
- package/dist/{hostnames-DQUiD3Vr.mjs → hostnames-DehdYOMz.mjs} +1 -1
- package/dist/{hyperdrive-RyQboMWI.mjs → hyperdrive-3gD3hn70.mjs} +1 -1
- package/dist/iam-DR72hmii.mjs +6 -0
- package/dist/images-CeKc5JPh.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-DtFix9WL.mjs +8 -0
- package/dist/{interactive-mV8PABm6.mjs → interactive-C7M55Wxx.mjs} +1 -1
- package/dist/ips-CtWCjXAN.mjs +2 -0
- package/dist/{keyless-certificates-oNu5jWKF.mjs → keyless-certificates-Dk24yQFz.mjs} +1 -1
- package/dist/keys-BmhG6Kn1.mjs +2 -0
- package/dist/{kv-Bi9B4E0A.mjs → kv-BuVPAuZP.mjs} +1 -1
- package/dist/{leaked-credential-checks-DKRjBLcr.mjs → leaked-credential-checks-XcZmt1I-.mjs} +1 -1
- package/dist/load-balancers-CylN-l7n.mjs +6 -0
- package/dist/{local-DTyuGwTw.mjs → local-Be3lg_9E.mjs} +1 -1
- package/dist/{local-runtime-IAXhEugU.mjs → local-runtime-Ce7k598H.mjs} +1 -1
- package/dist/logexplorer-CvRPoKbj.mjs +17 -0
- package/dist/logo-matches-Heuft3yF.mjs +2 -0
- package/dist/logos-DRYjGBDq.mjs +3 -0
- package/dist/logpush-Dve9jOMp.mjs +4 -0
- package/dist/{logs-DmWWL5f9.mjs → logs-SC86FE89.mjs} +1 -1
- package/dist/{magic-cloud-networking-XbTa6P52.mjs → magic-cloud-networking-DXzeqwX-.mjs} +4 -4
- package/dist/magic-network-monitoring-DW0Jl74i.mjs +4 -0
- package/dist/magic-transit-BK_3asH2.mjs +111 -0
- package/dist/managed-transforms-B6TV4qoE.mjs +3 -0
- package/dist/matches-Iss9Fo4R.mjs +2 -0
- package/dist/mcp-8wxXT6JU.mjs +4 -0
- package/dist/mesh-Bf9UAS4J.mjs +4 -0
- package/dist/{moq-CJpE-eNj.mjs → moq-ZKMFOeVz.mjs} +1 -1
- package/dist/mtls-certificates-DoWm6GiE.mjs +3 -0
- package/dist/{network-D2WRXCDe.mjs → network-B1lBARU9.mjs} +1 -1
- package/dist/{network-interconnects-Clq4X1U8.mjs → network-interconnects-CLYIFHfU.mjs} +1 -1
- package/dist/oauth-DuEONNgC.mjs +14 -0
- package/dist/{oauth-clients-hilWfAlm.mjs → oauth-clients-DgiTzLzu.mjs} +1 -1
- package/dist/oauth-scopes-BOBRMxjm.mjs +2 -0
- package/dist/observability-Jya7-zkl.mjs +4 -0
- package/dist/{open-PBXRGS4R-C46yIm3u.mjs → open-PBXRGS4R-CX8K4WYl.mjs} +3 -3
- package/dist/{organization-D41rIvJa.mjs → organization-CYxYV4e0.mjs} +6 -6
- package/dist/organizations-SacGUW44.mjs +2 -0
- package/dist/origin-ca-certificates-Ph1bJGQ1.mjs +3 -0
- package/dist/origin-post-quantum-encryption-BBLiGAGB.mjs +2 -0
- package/dist/origin-tls-client-auth-DSDgTN2X.mjs +4 -0
- package/dist/{output-DgW1hQGX.mjs → output-Ccqw2WOb.mjs} +1 -1
- package/dist/page-rules-BqEyFR2c.mjs +27 -0
- package/dist/pages-CQ7ZVWk1.mjs +14 -0
- package/dist/pay-per-crawl-BMe_3_Qj.mjs +4 -0
- package/dist/pipelines-6De2Pe2C.mjs +6 -0
- package/dist/precursor-iwK-1P_d.mjs +4 -0
- package/dist/progress-BqQcF5QH.mjs +2 -0
- package/dist/project-settings-C_1-JI6Y.mjs +3 -0
- package/dist/prompt-B0sWIs9c.mjs +3 -0
- package/dist/{public-BwQqexwo-DbWj8rrr.mjs → public-BYCVISMH-DnMJ5Jct.mjs} +1 -1
- package/dist/queries-c7zvnfEQ.mjs +3 -0
- package/dist/queues-BU6y16qS.mjs +6 -0
- package/dist/r2-Jo3QMahK.mjs +24 -0
- package/dist/{r2-data-catalog-DLtf9d6o.mjs → r2-data-catalog-B-tw-JdG.mjs} +1 -1
- package/dist/radar-DIYAMEof.mjs +2 -0
- package/dist/{rate-limits-B1YjnGue.mjs → rate-limits-DewOcznT.mjs} +1 -1
- package/dist/raw-fetch-Cc-MjHeL.mjs +2 -0
- package/dist/realtimekit-cnZEVNDn.mjs +7 -0
- package/dist/registrar-BsWr_aPM.mjs +23 -0
- package/dist/{registrar-sandbox-0i1T3zne.mjs → registrar-sandbox-BlcpUyIH.mjs} +6 -6
- package/dist/{registry-DDcSvd8H.mjs → registry-jifR3_Y6.mjs} +1 -1
- package/dist/reporting--1AyTV7k.mjs +2 -0
- package/dist/request-tracers-C_VX7X6-.mjs +2 -0
- package/dist/{resource-sharing-Ctdi9D-j.mjs → resource-sharing-Br5dqr3o.mjs} +1 -1
- package/dist/resource-tagging-C33U6T74.mjs +2 -0
- package/dist/rules-BfjzALMi.mjs +4 -0
- package/dist/rulesets-3i_1Vwt-.mjs +5 -0
- package/dist/rum-CjmIckiR.mjs +4 -0
- package/dist/{schema-BeXPWeK9.mjs → schema-1mwmslUV.mjs} +1 -1
- package/dist/schema-flags-llLJuFFw.mjs +5 -0
- package/dist/{scim-BgGsmHrL.mjs → scim-pApmzA5B.mjs} +1 -1
- package/dist/sdk-ZctLa5jW.mjs +3 -0
- package/dist/{secrets-store-BCpFhYFv.mjs → secrets-store-DBC9WJau.mjs} +1 -1
- package/dist/security-center-Djm06dq-.mjs +2 -0
- package/dist/{security-txt-Be2Bif0z.mjs → security-txt-Ci7bP4zH.mjs} +1 -1
- package/dist/{share-Bz2tFTUP.mjs → share-Dj-MNXrw.mjs} +4 -4
- package/dist/shared-BJvq4DkR.mjs +290 -0
- package/dist/smart-shield--8EpJjrF.mjs +4 -0
- package/dist/snippets-Dyz0PH60.mjs +4 -0
- package/dist/{spawn-CHkoow5W.mjs → spawn-C5Z7oWdp.mjs} +108 -112
- package/dist/{spectrum-BA0a42eM.mjs → spectrum-rAHWz8rH.mjs} +1 -1
- package/dist/{speed-mmOjxOzo.mjs → speed-BKepWBXj.mjs} +1 -1
- package/dist/src-gJma71Ec.mjs +108 -0
- package/dist/{ssl-Yr6kELqg.mjs → ssl-KdFiY3ev.mjs} +1 -1
- package/dist/startup-profile-GLNPHQ9U.mjs +17 -0
- package/dist/{state-DZC531l2.mjs → state-Cu3cItUg.mjs} +1 -1
- package/dist/{stream-Cu0kYWbc.mjs → stream-CKJ6Tb0M.mjs} +13 -13
- package/dist/submit-BxbKKhBn.mjs +2 -0
- package/dist/tags-DA8dq9fx.mjs +2 -0
- package/dist/tenant-DLXw48hS.mjs +2 -0
- package/dist/tenant-custom-nameservers-9G93XuvU.mjs +3 -0
- package/dist/{tools-D2Xxfkrc.mjs → tools-x8bj9E6b.mjs} +1 -1
- package/dist/{tunnel-CDYkWjnt.mjs → tunnel-CNQA5Flp.mjs} +1 -1
- package/dist/tunnels-CC10EOsU.mjs +2 -0
- package/dist/turnstile-CH58hnf4.mjs +23 -0
- package/dist/{ui-DIpjthrV.mjs → ui-CmnnBm_O.mjs} +1 -1
- package/dist/url-info-BpCgdUtL.mjs +2 -0
- package/dist/{url-normalization-BeKkOZz7.mjs → url-normalization-BzuynEy1.mjs} +1 -1
- package/dist/url-scanner-APIZbhB7.mjs +2 -0
- package/dist/user-2-NGebfI.mjs +12 -0
- package/dist/values-S_bNv819.mjs +2 -0
- package/dist/{vectorize-CjXfiFH4.mjs → vectorize-Bv7feLBC.mjs} +1 -1
- package/dist/waiting-rooms-Dk4LIpvm.mjs +11 -0
- package/dist/{web-assets-BzM5vVzy.mjs → web-assets-C1UmOyzD.mjs} +1 -1
- package/dist/web3-GnUocVYH.mjs +4 -0
- package/dist/workers-J1-PLwdl.mjs +28 -0
- package/dist/{workers-builds-B44wc67O.mjs → workers-builds-DCHmWOMS.mjs} +4 -4
- package/dist/{workflows-rFuQWClt.mjs → workflows-CArfEI2c.mjs} +2 -2
- package/dist/zaraz-mg2YlR3_.mjs +2 -0
- package/dist/zero-trust-DVdUPtj1.mjs +93 -0
- package/dist/zone-DMAfrDJX.mjs +2 -0
- package/dist/zones-CNwxUi7I.mjs +21 -0
- package/package.json +10 -7
- package/dist/abuse-reports-CzDAjFpo.mjs +0 -8
- package/dist/account-Dd4-tDYJ.mjs +0 -2
- package/dist/account-tags-65fAlHrf.mjs +0 -9
- package/dist/accounts-Bp5KGc6r.mjs +0 -28
- package/dist/agent-memory-D--BQS0W.mjs +0 -6
- package/dist/ai-BnVlQDiI.mjs +0 -5
- package/dist/ai-audit-CfpDKXkD.mjs +0 -2
- package/dist/ai-gateway-oG4j_oYN.mjs +0 -13
- package/dist/ai-search-B2l3B_jn.mjs +0 -7
- package/dist/ai-security-byjIIrfl.mjs +0 -4
- package/dist/analytics-DeIKjC9n.mjs +0 -3
- package/dist/analytics_engine-BnECMIWJ.mjs +0 -2
- package/dist/argo-DFerMyXF.mjs +0 -2
- package/dist/artifacts-CtyEYYDa.mjs +0 -4
- package/dist/audit-logs-retFtvow.mjs +0 -2
- package/dist/auth-aazs91XL.mjs +0 -5
- package/dist/billing-CxQVqpGZ.mjs +0 -3
- package/dist/body-parser-CYD7PKFC.mjs +0 -2
- package/dist/bot-management-Rli7v7tg.mjs +0 -5
- package/dist/botnet-feed-Cw6XSEf8.mjs +0 -3
- package/dist/brand-protection-CTvnHGfV.mjs +0 -3
- package/dist/browser-run-FwtwnBzA.mjs +0 -4
- package/dist/build-Dji9BYmV.mjs +0 -2
- package/dist/certificate-authorities-DZP1RzAs.mjs +0 -2
- package/dist/cf-oSz9pud_.mjs +0 -18
- package/dist/chunk-LQW53VED-Xakf_rUn.mjs +0 -499
- package/dist/cloud-connector-BpVcvhjZ.mjs +0 -2
- package/dist/cloudforce-one-2PecncfX.mjs +0 -30
- package/dist/connector-interrupts-ollUcksZ.mjs +0 -2
- package/dist/connector-telemetry-events-D5_3X7XW.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CJ9gLRFR.mjs +0 -2
- package/dist/containers-Bog7j0Hw.mjs +0 -54
- package/dist/custom-certificates-4y35UC1X.mjs +0 -5
- package/dist/custom-csrs-DwBrLh-H.mjs +0 -4
- package/dist/custom-hostnames-CDIAnsRa.mjs +0 -5
- package/dist/custom-nameservers-stk7ymnP.mjs +0 -3
- package/dist/custom-pages-vfDxrXbt.mjs +0 -4
- package/dist/d1-Cllm-iTT.mjs +0 -20
- package/dist/data-security-rnoSCEdL.mjs +0 -7
- package/dist/dcv-delegation-DCRCOL6l.mjs +0 -2
- package/dist/deploy-input-DhCo1I0I.mjs +0 -242
- package/dist/diagnostics-D5Yo2xqx.mjs +0 -3
- package/dist/dist-COfwjT96.mjs +0 -72
- package/dist/dns-DdQYtenF.mjs +0 -29
- package/dist/durable-objects-BvxXBht_.mjs +0 -2
- package/dist/email-CGOC_evd.mjs +0 -2
- package/dist/email-auth-DFvXKSkg.mjs +0 -2
- package/dist/email-routing-QBRPBlyl.mjs +0 -6
- package/dist/email-security-BFagcRPP.mjs +0 -18
- package/dist/email-sending-Ddhe7xjN.mjs +0 -7
- package/dist/filters-CGisPGD1.mjs +0 -4
- package/dist/firewall-DD8U-Brd.mjs +0 -11
- package/dist/flagship-FJHc4mFi.mjs +0 -4
- package/dist/google-tag-gateway-149kbuG_.mjs +0 -2
- package/dist/iam-BhHYhMXO.mjs +0 -6
- package/dist/images-CDViyKtZ.mjs +0 -8
- package/dist/intel-YHZbPlS3.mjs +0 -8
- package/dist/ips-BpCdldFx.mjs +0 -2
- package/dist/keys-yYtv7Ztr.mjs +0 -2
- package/dist/load-balancers-jRCN75mX.mjs +0 -7
- package/dist/logexplorer-kO8CULiK.mjs +0 -24
- package/dist/logo-matches-LyDAYPbI.mjs +0 -2
- package/dist/logos-O9f5bGSB.mjs +0 -3
- package/dist/logpush-dtXLu3Ck.mjs +0 -5
- package/dist/magic-network-monitoring-CpfkgZMp.mjs +0 -4
- package/dist/magic-transit-DwgZeIj-.mjs +0 -111
- package/dist/managed-transforms-DCmogkxv.mjs +0 -3
- package/dist/matches-BAeN8VM1.mjs +0 -2
- package/dist/mcp-DKZ2D050.mjs +0 -4
- package/dist/media-CnxgOViL.mjs +0 -2
- package/dist/mesh-CzIPtuaM.mjs +0 -4
- package/dist/mtls-certificates-Bbm_1lQI.mjs +0 -3
- package/dist/oauth-BPizUUqP.mjs +0 -15
- package/dist/oauth-scopes-CmbgsPYd.mjs +0 -2
- package/dist/observability-DXYgDdU5.mjs +0 -4
- package/dist/organizations-eNzfOwlP.mjs +0 -2
- package/dist/origin-ca-certificates-DaiAmw45.mjs +0 -3
- package/dist/origin-post-quantum-encryption-7YztBged.mjs +0 -2
- package/dist/origin-tls-client-auth-DRwURM8s.mjs +0 -4
- package/dist/page-rules-B2Csdc4h.mjs +0 -18
- package/dist/pages-BAL6Q7OY.mjs +0 -14
- package/dist/pay-per-crawl-C-1-ZAtn.mjs +0 -4
- package/dist/pipelines-cyQOuFLb.mjs +0 -6
- package/dist/precursor-BrweY39h.mjs +0 -4
- package/dist/progress-B84wYh91.mjs +0 -2
- package/dist/prompt-CDtLWxNv.mjs +0 -3
- package/dist/queries-oM8uGZy5.mjs +0 -3
- package/dist/queues-CTx04ZNw.mjs +0 -6
- package/dist/r2-CnlIUn7R.mjs +0 -24
- package/dist/radar-CGNgGh8v.mjs +0 -2
- package/dist/raw-fetch-Dz-QBoP_.mjs +0 -2
- package/dist/realtimekit-BPwzhNS9.mjs +0 -7
- package/dist/registrar-BEcb90RX.mjs +0 -21
- package/dist/reporting-CLbjHlnw.mjs +0 -2
- package/dist/request-tracers-BcKpofP1.mjs +0 -2
- package/dist/resource-tagging-DGEyVTDN.mjs +0 -2
- package/dist/rules-CmuB5rIN.mjs +0 -4
- package/dist/rulesets-CGaMq8vG.mjs +0 -8
- package/dist/rum-QT6EP4JK.mjs +0 -4
- package/dist/schema-flags-DHryz6SF.mjs +0 -5
- package/dist/sdk-m4xeaua4.mjs +0 -3
- package/dist/security-center-BNm4uPVB.mjs +0 -2
- package/dist/session-Ckt20hHa.mjs +0 -2
- package/dist/shared-BzPQog8H.mjs +0 -2
- package/dist/smart-shield-SODkOUyO.mjs +0 -4
- package/dist/snippets-B5jY8v_7.mjs +0 -4
- package/dist/src-CHW7s5IS.mjs +0 -108
- package/dist/submit-Dl_27e0n.mjs +0 -2
- package/dist/tags-Cdo_Pwtr.mjs +0 -2
- package/dist/tenant-EX-ANl6X.mjs +0 -2
- package/dist/tenant-custom-nameservers-BPHUeckw.mjs +0 -3
- package/dist/triggers-Bf9hbP3h.mjs +0 -2
- package/dist/tunnels-CgyX8R2J.mjs +0 -2
- package/dist/turnstile-BUtzlW-0.mjs +0 -23
- package/dist/url-info-CJsa1Oc9.mjs +0 -2
- package/dist/url-scanner-Cz-yl0_3.mjs +0 -2
- package/dist/user-BxHjEqpd.mjs +0 -12
- package/dist/values-C43NurfT.mjs +0 -2
- package/dist/versions-BFbc90Wu.mjs +0 -2
- package/dist/waiting-rooms-C5jSQv_r.mjs +0 -11
- package/dist/web3-Ctv9HGiR.mjs +0 -4
- package/dist/workers-D-YbIedB.mjs +0 -24
- package/dist/zaraz-BA6kY-b6.mjs +0 -2
- package/dist/zero-trust-DOFLlUz1.mjs +0 -102
- package/dist/zone-B_rgejLV.mjs +0 -2
- package/dist/zone-tags-BWdza4rH.mjs +0 -9
- package/dist/zones-DTWO7Vvn.mjs +0 -21
- /package/dist/{Page-C-JHZnIy.mjs → Page-9ry_XAVC.mjs} +0 -0
- /package/dist/{alerts-B85uj2Vx.mjs → alerts-15-IW4jE.mjs} +0 -0
- /package/dist/{autorag-Do9l_LyY.mjs → autorag-CFwRkEKw.mjs} +0 -0
- /package/dist/{brands-DateHCdd.mjs → brands-BgT1vu9B.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-l8tR2Qyj.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
- /package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-DVMMVVEs.mjs} +0 -0
- /package/dist/{clear-CB2kgcEB.mjs → clear-BlCK85Me.mjs} +0 -0
- /package/dist/{cli-types-BWdZbsFE.mjs → cli-types-DAYeL_Mj.mjs} +0 -0
- /package/dist/{domain-info-DJHEt8JJ.mjs → domain-info-C7LBxPBt.mjs} +0 -0
- /package/dist/{health-buY5f5pp.mjs → health-DZFfafkX.mjs} +0 -0
- /package/dist/{input-validation-BBKJRoRB.mjs → input-validation-QDIYu7Vb.mjs} +0 -0
- /package/dist/{internal-CwyoJUHh.mjs → internal-BKHC2D1Y.mjs} +0 -0
- /package/dist/{live-wEpA5V_n.mjs → live-DwCvDmaH.mjs} +0 -0
- /package/dist/{metadata-8AkOftcB.mjs → metadata-B5yfL0ln.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Bf1uT0lT.mjs → rate-limit-analytics-B8Vuu1sU.mjs} +0 -0
- /package/dist/{ready-CBSCPiHE.mjs → ready-D9H2zHHI.mjs} +0 -0
- /package/dist/{recent-submissions-Dpmq1f7z.mjs → recent-submissions-BPo0J80d.mjs} +0 -0
- /package/dist/{refute-u7ZPQJZy.mjs → refute-2W8NLCN4.mjs} +0 -0
- /package/dist/{resolve-XgxRJ-Ys.mjs → resolve-B8CyM1mi.mjs} +0 -0
- /package/dist/{scan-logo-Ba8WZAyp.mjs → scan-logo-D5x6F1Y0.mjs} +0 -0
- /package/dist/{scan-page-Bcq3Ei86.mjs → scan-page-CWhta3x7.mjs} +0 -0
- /package/dist/{search-D9WDwnV4.mjs → search-DZmBQJL9.mjs} +0 -0
- /package/dist/{signed-url-CjPbG5zV.mjs → signed-url-CQrmWgz5.mjs} +0 -0
- /package/dist/{submission-info-Z9hhp9Rq.mjs → submission-info-C98A0bqq.mjs} +0 -0
- /package/dist/{theme-BePJemMn.mjs → theme-CrIBazAF.mjs} +0 -0
- /package/dist/{total-queries-aKAYX1iX.mjs → total-queries-BZoaFoDE.mjs} +0 -0
- /package/dist/{tracked-domains-Ck7Jm4Kn.mjs → tracked-domains-CNHogPHx.mjs} +0 -0
- /package/dist/{verify-2yi0H93r.mjs → verify-4e4L9IRk.mjs} +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n,h as r}from"./oauth-BPizUUqP.mjs";import{a as i,r as a}from"./auth-DuLchM18.mjs";import{t as o}from"./output-DgW1hQGX.mjs";import{n as s,t as c}from"./progress-B84wYh91.mjs";import{n as l,t as u}from"./body-parser-CYD7PKFC.mjs";import{n as d,t as f}from"./input-validation-BBKJRoRB.mjs";import{a as p,n as m}from"./prompt-CDtLWxNv.mjs";function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`available`,describe:`Returns all dataset types that this account can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account. When creating or updating a dataset, only fields available to your account can be enabled. If you request a field that is not available, you will receive an error.`,builder:h,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets/available`,pathParams:{},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.logexplorer.account.datasets.available({account_id:l})),{successLabel:`Loaded`})}};function _(e){return e.option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
|
|
3
|
-
If provided, replaces the dataset's default filter entirely.
|
|
4
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
5
|
-
for syntax and examples.
|
|
6
|
-
`}).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 v={command:`create`,describe:"Create a new Log Explorer dataset for the account. List available account datasets to see the dataset types and fields you can use. The `fields` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/",builder:_,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({dataset:d(r.dataset,`dataset`,`text`),filter:d(r.filter,`filter`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Creating`,async()=>i.logexplorer.account.datasets.create({body:e,account_id:f})),{successLabel:`Created`});return}r.dataset===void 0&&(r.dataset=await p(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let m=u({dataset:d(r.dataset,`dataset`,`text`),filter:d(r.filter,`filter`,`text`)});o(await c(`Creating`,async()=>i.logexplorer.account.datasets.create({body:m,account_id:f})),{successLabel:`Created`})}};function y(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,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 b={command:`delete <dataset-id>`,describe:`Deletes a Log Explorer dataset for the account. Dataset deletion must not be protected.`,builder:y,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}o(await c(`Deleting`,async()=>i.logexplorer.account.datasets.delete({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Deleted`})}};function x(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <dataset-id>`,describe:`Retrieve a single Log Explorer dataset by ID for the account.`,builder:x,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let i=await a(r),l=r.local?e:await t();r.accountId=l,o(await c(`Loading`,async()=>i.logexplorer.account.datasets.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})}};function C(e){return e.option(`include-zones`,{type:`boolean`,description:`Set to true to include zone-scoped datasets belonging to this account.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:"Returns all Log Explorer datasets configured for the account. Pass `include_zones=true` to also include zone-level datasets that belong to this account. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.",builder:C,handler:async r=>{let i={include_zones:r[`include-zones`]};if(r.dryRun){s({command:`cf logexplorer account datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(r),u=r.local?e:await t();r.accountId=u,o(await c(`Loading`,async()=>l.logexplorer.account.datasets.list({account_id:u,...i})),{successLabel:`Loaded`})}};function T(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
|
|
8
|
-
ingested. If omitted, the existing filter is left unchanged. Set
|
|
9
|
-
to an empty string (\`""\`) to clear the filter. Otherwise,
|
|
10
|
-
replaces the dataset's filter entirely.
|
|
11
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
12
|
-
for syntax and examples.
|
|
13
|
-
`}).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 E={command:`update <dataset-id>`,describe:`Updates the enabled state and/or field configuration of an account dataset.`,builder:T,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({deletion_protection:r[`deletion-protection`],enabled:r.enabled,filter:d(r.filter,`filter`,`text`)}):l(r.body)});return}let i=await a(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);o(await c(`Updating`,async()=>i.logexplorer.account.datasets.update({body:e,account_id:f,dataset_id:r[`dataset-id`]})),{successLabel:`Updated`});return}if(r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let p=u({deletion_protection:r[`deletion-protection`],enabled:r.enabled,filter:d(r.filter,`filter`,`text`)});o(await c(`Updating`,async()=>i.logexplorer.account.datasets.update({body:p,account_id:f,dataset_id:r[`dataset-id`]})),{successLabel:`Updated`})}},D={command:`datasets`,describe:`Operations for account.datasets`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const k={command:`query`,describe:`Run a SQL query against account-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured account datasets to see enabled account-level datasets. Zone-level datasets will not appear here. List available account datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`,builder:O,handler:async r=>{if(r.dryRun){s({command:`cf logexplorer account query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logs/explorer/query/sql`,pathParams:{},bodyKind:`octet-stream`,body:r.body});return}let l=await a(r),u=r.local?e:await t();if(r.accountId=u,r.file){let e=f(r.file);o(await c(`Loading`,async()=>i(l,`POST`,`/accounts/${u}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(r.body){let e=d(r.body,`body`,`binary`);o(await c(`Loading`,async()=>i(l,`POST`,`/accounts/${u}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>l.logexplorer.account.query({account_id:u})),{successLabel:`Loaded`})}},A={command:`account`,describe:`Operations for account`,builder:e=>e.command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`available`,describe:`Returns all dataset types that this zone can create. Each entry includes the dataset schema and timestamp field. The schema shows all possible fields for a dataset. However, not all fields may be available for your account. When creating or updating a dataset, only fields available to your account can be enabled. If you request a field that is not available, you will receive an error.`,builder:j,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets/available`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.logexplorer.zone.datasets.available({zone_id:n})),{successLabel:`Loaded`})}};function N(e){return e.option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
|
|
14
|
-
If provided, replaces the dataset's default filter entirely.
|
|
15
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
16
|
-
for syntax and examples.
|
|
17
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`create`,describe:"Create a new Log Explorer dataset for the zone. List available zone datasets to see the dataset types and fields you can use. The `fields` property is optional. If not specified, all available fields will be enabled. For dataset field definitions, see: https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/",builder:N,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({dataset:d(e.dataset,`dataset`,`text`),filter:d(e.filter,`filter`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Creating`,async()=>t.logexplorer.zone.datasets.create({body:r,zone_id:n})),{successLabel:`Created`});return}e.dataset===void 0&&(e.dataset=await p(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let i=u({dataset:d(e.dataset,`dataset`,`text`),filter:d(e.filter,`filter`,`text`)});o(await c(`Creating`,async()=>t.logexplorer.zone.datasets.create({body:i,zone_id:n})),{successLabel:`Created`})}};function F(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,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 I={command:`delete <dataset-id>`,describe:`Deletes a Log Explorer dataset for the zone. Dataset deletion must not be protected.`,builder:F,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await m({force:!!e.force,message:`This operation deletes a Log Explorer dataset for the zone.`})){process.stderr.write(`Aborted.
|
|
18
|
-
`);return}o(await c(`Deleting`,async()=>t.logexplorer.zone.datasets.delete({zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Deleted`})}};function L(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <dataset-id>`,describe:`Retrieve a single Log Explorer dataset by ID for the zone.`,builder:L,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.logexplorer.zone.datasets.get({zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Loaded`})}};function z(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:"Returns all Log Explorer datasets configured for the zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.",builder:z,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,o(await c(`Loading`,async()=>t.logexplorer.zone.datasets.list({zone_id:n})),{successLabel:`Loaded`})}};function V(e){return e.positional(`dataset-id`,{type:`string`,description:`Log Explorer dataset ID.`,demandOption:!0}).option(`deletion-protection`,{type:`boolean`,description:"Set to `false` to allow deletion of this dataset."}).option(`enabled`,{type:`boolean`,description:`Whether to enable or disable log ingest for this dataset.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
|
|
19
|
-
ingested. If omitted, the existing filter is left unchanged. Set
|
|
20
|
-
to an empty string (\`""\`) to clear the filter. Otherwise,
|
|
21
|
-
replaces the dataset's filter entirely.
|
|
22
|
-
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
23
|
-
for syntax and examples.
|
|
24
|
-
`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`update <dataset-id>`,describe:`Updates the enabled state and/or field configuration of a zone dataset.`,builder:V,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"dataset-id":String(e[`dataset-id`]??``)},bodyKind:`json`,body:e.body===void 0?u({deletion_protection:e[`deletion-protection`],enabled:e.enabled,filter:d(e.filter,`filter`,`text`)}):l(e.body)});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=l(e.body);o(await c(`Updating`,async()=>t.logexplorer.zone.datasets.update({body:r,zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Updated`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let i=u({deletion_protection:e[`deletion-protection`],enabled:e.enabled,filter:d(e.filter,`filter`,`text`)});o(await c(`Updating`,async()=>t.logexplorer.zone.datasets.update({body:i,zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Updated`})}},U={command:`datasets`,describe:`Operations for zone.datasets`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const G={command:`query`,describe:`Run a SQL query against zone-level datasets. Timestamp fields are RFC3339 strings. Filter with: WHERE {timestamp_field} >= now() - INTERVAL '30' DAY WHERE {timestamp_field} >= '2026-04-01T00:00:00Z' WHERE {timestamp_field} BETWEEN '2026-04-01T00:00:00Z' AND '2026-04-30T23:59:59Z' List configured zone datasets to see enabled zone-level datasets. List available zone datasets to inspect their schemas and timestamp fields. For more information about the datasets, and the meaning of each field, check out https://developers.cloudflare.com/logs/logpush/logpush-job/datasets/`,builder:W,handler:async e=>{if(e.dryRun){s({command:`cf logexplorer zone query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/explorer/query/sql`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`octet-stream`,body:e.body});return}let t=await a(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.file){let n=f(e.file);o(await c(`Loading`,async()=>i(t,`POST`,`/zones/${e.zoneId}/logs/explorer/query/sql`,{body:n,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(e.body){let n=d(e.body,`body`,`binary`);o(await c(`Loading`,async()=>i(t,`POST`,`/zones/${e.zoneId}/logs/explorer/query/sql`,{body:n,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>t.logexplorer.zone.query({zone_id:n})),{successLabel:`Loaded`})}},K={command:`zone`,describe:`Operations for zone`,builder:e=>e.command(G).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},q={command:`logexplorer`,describe:`logexplorer`,builder:e=>e.command(A).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{q as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";function s(e){return e.option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`get`,describe:`Return matches as CSV for logo queries based on ID`,builder:s,handler:async s=>{let c={logo_id:s[`logo-id`],offset:s.offset,limit:s.limit};if(s.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logo-matches/download`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.download.get({account_id:u,...c})),{successLabel:`Loaded`})}},l={command:`download`,describe:`Operations for download`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.option(`logo-id`,{type:`string`,description:`Logo ID`}).option(`offset`,{type:`string`,description:`Offset`}).option(`limit`,{type:`string`,description:`Limit`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Return matches for logo queries based on ID`,builder:u,handler:async s=>{let c={logo_id:s[`logo-id`],offset:s.offset,limit:s.limit};if(s.dryRun){a({command:`cf logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logo-matches`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.get({account_id:u,...c})),{successLabel:`Loaded`})}},f={command:`logo-matches`,describe:`logo-matches`,builder:e=>e.command(d).command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{f as default};
|
package/dist/logos-O9f5bGSB.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{a as r,r as i}from"./auth-DuLchM18.mjs";import{t as a}from"./output-DgW1hQGX.mjs";import{n as o,t as s}from"./progress-B84wYh91.mjs";import{n as c,t as l}from"./input-validation-BBKJRoRB.mjs";import{n as u}from"./prompt-CDtLWxNv.mjs";function d(e){return e.option(`tag`,{type:`string`,description:`Tag`}).option(`match-type`,{type:`string`,description:`Match type`}).option(`threshold`,{type:`number`,description:`Threshold`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const f={command:`create`,describe:`Return new saved logo queries created from image files`,builder:d,handler:async u=>{let d={tag:u.tag,match_type:u[`match-type`],threshold:u.threshold};if(u.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logos`,pathParams:{},query:d,bodyKind:`octet-stream`,body:u.body});return}let f=await i(u),p=u.local?e:await t();if(u.accountId=p,u.file){let e=l(u.file);a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(u.body){let e=c(u.body,`body`,`binary`),t=new URLSearchParams(Object.entries(d).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Creating`,async()=>r(f,`POST`,`/accounts/${p}/brand-protection/logos${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/x-www-form-urlencoded`}})),{successLabel:`Created`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function p(e){return e.positional(`logo-id`,{type:`string`,description:`Logo ID`,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 m={command:`delete <logo-id>`,describe:`Return a success message after deleting saved logo queries by ID`,builder:p,handler:async r=>{if(r.dryRun){o({command:`cf logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/logos/${r[`logo-id`]==null?`<logo-id>`:encodeURIComponent(String(r[`logo-id`]))}`,pathParams:{"logo-id":String(r[`logo-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await u({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>c.logos.delete({account_id:l,logo_id:r[`logo-id`]})),{successLabel:`Deleted`})}},h={command:`logos`,describe:`logos`,builder:e=>e.command(f).command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{h as default};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n,h as r}from"./oauth-BPizUUqP.mjs";import{r as i}from"./auth-DuLchM18.mjs";import{t as a}from"./output-DgW1hQGX.mjs";import{n as o,t as s}from"./progress-B84wYh91.mjs";import{n as c,t as l}from"./body-parser-CYD7PKFC.mjs";import{n as u}from"./input-validation-BBKJRoRB.mjs";import{a as d,n as f}from"./prompt-CDtLWxNv.mjs";function p(e){return e.positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <dataset-id>`,describe:`Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`,builder:p,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/fields`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})}},ee={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function te(e){return e.positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <dataset-id>`,describe:`Lists Logpush jobs for an account for a dataset.`,builder:te,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/datasets/${r[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(r[`dataset-id`]))}/jobs`,pathParams:{"dataset-id":String(r[`dataset-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.accountDatasets.jobs.get({account_id:l,dataset_id:r[`dataset-id`]})),{successLabel:`Loaded`})}},g={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(ee).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:`access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`create`,describe:`Creates a new Logpush job for an account.`,builder:v,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/jobs`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({dataset:u(r.dataset,`dataset`,`text`),destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),enabled:r.enabled,filter:u(r.filter,`filter`,`text`),frequency:u(r.frequency,`frequency`,`text`),kind:u(r.kind,`kind`,`text`),logpull_options:u(r[`logpull-options`],`logpull-options`,`text`),name:u(r.name,`name`,`text`),output_options:{"CVE-2021-44228":r[`output-options-cve-2021-44228`],batch_prefix:u(r[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(r[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(r[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:r[`output-options-field-names`],merge_subrequests:r[`output-options-merge-subrequests`],output_type:u(r[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(r[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(r[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(r[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(r[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:r[`output-options-sample-rate`],timestamp_format:u(r[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountJobs.create({...e,account_id:p})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let m=l({dataset:u(r.dataset,`dataset`,`text`),destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),enabled:r.enabled,filter:u(r.filter,`filter`,`text`),frequency:u(r.frequency,`frequency`,`text`),kind:u(r.kind,`kind`,`text`),logpull_options:u(r[`logpull-options`],`logpull-options`,`text`),name:u(r.name,`name`,`text`),output_options:{"CVE-2021-44228":r[`output-options-cve-2021-44228`],batch_prefix:u(r[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(r[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(r[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:r[`output-options-field-names`],merge_subrequests:r[`output-options-merge-subrequests`],output_type:u(r[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(r[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(r[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(r[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(r[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:r[`output-options-sample-rate`],timestamp_format:u(r[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountJobs.create({...m,account_id:p})),{successLabel:`Created`})}};function b(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,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 x={command:`delete <job-id>`,describe:`Deletes a Logpush job.`,builder:b,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>c.logpush.accountJobs.delete({account_id:l,job_id:r[`job-id`]})),{successLabel:`Deleted`})}};function S(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <job-id>`,describe:`Gets the details of a Logpush job.`,builder:S,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.accountJobs.get({account_id:l,job_id:r[`job-id`]})),{successLabel:`Loaded`})}};function w(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`Lists Logpush jobs for an account.`,builder:w,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/jobs`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.accountJobs.list({account_id:l})),{successLabel:`Loaded`})}};function E(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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:`update <job-id>`,describe:`Updates a Logpush job.`,builder:E,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/jobs/${r[`job-id`]==null?`<job-id>`:encodeURIComponent(String(r[`job-id`]))}`,pathParams:{"job-id":String(r[`job-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),enabled:r.enabled,filter:u(r.filter,`filter`,`text`),frequency:u(r.frequency,`frequency`,`text`),kind:u(r.kind,`kind`,`text`),logpull_options:u(r[`logpull-options`],`logpull-options`,`text`),name:u(r.name,`name`,`text`),output_options:{"CVE-2021-44228":r[`output-options-cve-2021-44228`],batch_prefix:u(r[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(r[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(r[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:r[`output-options-field-names`],merge_subrequests:r[`output-options-merge-subrequests`],output_type:u(r[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(r[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(r[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(r[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(r[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:r[`output-options-sample-rate`],timestamp_format:u(r[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.logpush.accountJobs.update({...e,account_id:f,job_id:r[`job-id`]})),{successLabel:`Updated`});return}let p=l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),enabled:r.enabled,filter:u(r.filter,`filter`,`text`),frequency:u(r.frequency,`frequency`,`text`),kind:u(r.kind,`kind`,`text`),logpull_options:u(r[`logpull-options`],`logpull-options`,`text`),name:u(r.name,`name`,`text`),output_options:{"CVE-2021-44228":r[`output-options-cve-2021-44228`],batch_prefix:u(r[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(r[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(r[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:r[`output-options-field-names`],merge_subrequests:r[`output-options-merge-subrequests`],output_type:u(r[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(r[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(r[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(r[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(r[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:r[`output-options-sample-rate`],timestamp_format:u(r[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Updating`,async()=>d.logpush.accountJobs.update({...p,account_id:f,job_id:r[`job-id`]})),{successLabel:`Updated`})}},O={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(y).command(x).command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function k(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`Gets a new ownership challenge sent to your destination.`,builder:k,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/ownership`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountOwnership.create({...e,account_id:p})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let m=l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountOwnership.create({...m,account_id:p})),{successLabel:`Created`})}};function j(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`create`,describe:`Validates ownership challenge of the destination.`,builder:j,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-ownership validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/ownership/validate`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountOwnership.validate.create({...e,account_id:p})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`})),r[`ownership-challenge`]===void 0&&(r[`ownership-challenge`]=await d(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let m=l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`),ownership_challenge:u(r[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountOwnership.validate.create({...m,account_id:p})),{successLabel:`Created`})}},N={command:`validate`,describe:`Operations for account-ownership.validate`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},P={command:`account-ownership`,describe:`Operations for account-ownership`,builder:e=>e.command(A).command(N).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function F(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 I={command:`destination-exists-delete`,describe:`Checks if there is an existing job with a destination.`,builder:F,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-validate destination-exists-delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/validate/destination/exists`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountValidate.destinationExistsDelete({...e,account_id:p})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let m=l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountValidate.destinationExistsDelete({...m,account_id:p})),{successLabel:`Created`})}};function L(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 R={command:`delete`,describe:`Validates destination.`,builder:L,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-validate destination delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/validate/destination`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountValidate.destination.delete({...e,account_id:p})),{successLabel:`Created`});return}r[`destination-conf`]===void 0&&(r[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let m=l({destination_conf:u(r[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountValidate.destination.delete({...m,account_id:p})),{successLabel:`Created`})}},z={command:`destination`,describe:`Operations for account-validate.destination`,builder:e=>e.command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).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 V={command:`create`,describe:`Validates logpull origin with logpull_options.`,builder:B,handler:async r=>{if(r.dryRun){o({command:`cf logpush account-validate origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/validate/origin`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({logpull_options:u(r[`logpull-options`],`logpull-options`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.accountValidate.origin.create({...e,account_id:p})),{successLabel:`Created`});return}r[`logpull-options`]===void 0&&(r[`logpull-options`]=await d(`logpull-options`,"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."));let m=l({logpull_options:u(r[`logpull-options`],`logpull-options`,`text`)});a(await s(`Creating`,async()=>f.logpush.accountValidate.origin.create({...m,account_id:p})),{successLabel:`Created`})}},H={command:`origin`,describe:`Operations for account-validate.origin`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},U={command:`account-validate`,describe:`Operations for account-validate`,builder:e=>e.command(I).command(z).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get <dataset-id>`,describe:`Lists all fields available for a dataset. The response result is. an object with key-value pairs, where keys are field names, and values are descriptions.`,builder:W,handler:async e=>{if(e.dryRun){o({command:`cf logpush datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/fields`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.logpush.datasets.fields.get({zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Loaded`})}},K={command:`fields`,describe:`Operations for datasets.fields`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.positional(`dataset-id`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get <dataset-id>`,describe:`Lists Logpush jobs for a zone for a dataset.`,builder:q,handler:async e=>{if(e.dryRun){o({command:`cf logpush datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/datasets/${e[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(e[`dataset-id`]))}/jobs`,pathParams:{"dataset-id":String(e[`dataset-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.logpush.datasets.jobs.get({zone_id:n,dataset_id:e[`dataset-id`]})),{successLabel:`Loaded`})}},Y={command:`jobs`,describe:`Operations for datasets.jobs`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(K).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Z(e){return e.option(`fields`,{type:`string`,description:`Comma-separated list of fields.`}).option(`filter`,{type:`string`,description:`Filters to drill down into specific events.`}).option(`sample`,{type:`number`,description:`The sample parameter is the sample rate of the records set by the client: "sample": 1 is 100% of records "sample": 10 is 10% and so on.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Q={command:`create`,describe:`Creates a new Instant Logs job for a zone.`,builder:Z,handler:async e=>{if(e.dryRun){o({command:`cf logpush edge create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({fields:u(e.fields,`fields`,`text`),filter:u(e.filter,`filter`,`text`),sample:e.sample}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.edge.create({...r,zone_id:n})),{successLabel:`Created`});return}let d=l({fields:u(e.fields,`fields`,`text`),filter:u(e.filter,`filter`,`text`),sample:e.sample});a(await s(`Creating`,async()=>t.logpush.edge.create({...d,zone_id:n})),{successLabel:`Created`})}};function ne(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const re={command:`get`,describe:`Lists Instant Logs jobs for a zone.`,builder:ne,handler:async e=>{if(e.dryRun){o({command:`cf logpush edge get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/edge/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.logpush.edge.get({zone_id:n})),{successLabel:`Loaded`})}},ie={command:`edge`,describe:`Operations for edge`,builder:e=>e.command(Q).command(re).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ae(e){return e.option(`dataset`,{type:`string`,description:`Name of the dataset. A list of supported datasets can be found on the [Developer Docs](https://developers.cloudflare.com/logs/reference/log-fields/).`,choices:`access_requests.account_abuse_protection_events.audit_logs.audit_logs_v2.biso_user_actions.casb_findings.device_posture_results.dex_application_tests.dex_device_state_events.dlp_forensic_copies.dns_firewall_logs.dns_logs.email_security_alerts.email_security_post_delivery_events.firewall_events.gateway_dns.gateway_http.gateway_network.http_requests.ipsec_logs.magic_bgp_logs.magic_ids_detections.mcp_portal_logs.mnm_flow_logs.nel_reports.network_analytics_logs.page_shield_events.sinkhole_http_logs.spectrum_events.ssh_logs.turnstile_events.warp_config_changes.warp_toggle_changes.websocket_analytics.workers_trace_events.zaraz_events.zero_trust_network_sessions`.split(`.`),default:`http_requests`}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`,default:!1}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`],default:`high`}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`],default:``}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const oe={command:`create`,describe:`Creates a new Logpush job for a zone.`,builder:ae,handler:async e=>{if(e.dryRun){o({command:`cf logpush jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({dataset:u(e.dataset,`dataset`,`text`),destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:u(e.filter,`filter`,`text`),frequency:u(e.frequency,`frequency`,`text`),kind:u(e.kind,`kind`,`text`),logpull_options:u(e[`logpull-options`],`logpull-options`,`text`),name:u(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:u(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:u(e[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:u(e[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.jobs.create({...r,zone_id:n})),{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let f=l({dataset:u(e.dataset,`dataset`,`text`),destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:u(e.filter,`filter`,`text`),frequency:u(e.frequency,`frequency`,`text`),kind:u(e.kind,`kind`,`text`),logpull_options:u(e[`logpull-options`],`logpull-options`,`text`),name:u(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:u(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:u(e[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:u(e[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>t.logpush.jobs.create({...f,zone_id:n})),{successLabel:`Created`})}};function se(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,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 ce={command:`delete <job-id>`,describe:`Deletes a Logpush job.`,builder:se,handler:async e=>{if(e.dryRun){o({command:`cf logpush jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,!await f({force:!!e.force})){process.stderr.write(`Aborted.
|
|
4
|
-
`);return}a(await s(`Deleting`,async()=>t.logpush.jobs.delete({zone_id:n,job_id:e[`job-id`]})),{successLabel:`Deleted`})}};function le(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ue={command:`get <job-id>`,describe:`Gets the details of a Logpush job.`,builder:le,handler:async e=>{if(e.dryRun){o({command:`cf logpush jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.logpush.jobs.get({zone_id:n,job_id:e[`job-id`]})),{successLabel:`Loaded`})}};function de(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`list`,describe:`Lists Logpush jobs for a zone.`,builder:de,handler:async e=>{if(e.dryRun){o({command:`cf logpush jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/jobs`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,a(await s(`Loading`,async()=>t.logpush.jobs.list({zone_id:n})),{successLabel:`Loaded`})}};function pe(e){return e.positional(`job-id`,{type:`string`,description:`Unique id of the job.`,demandOption:!0}).option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`enabled`,{type:`boolean`,description:`Flag that indicates if the job is enabled.`}).option(`filter`,{type:`string`,description:`The filters to select the events to include and/or remove from your logs. For more information, refer to [Filters](https://developers.cloudflare.com/logs/reference/filters/).`}).option(`frequency`,{type:`string`,description:"This field is deprecated. Please use `max_upload_*` parameters instead. . The frequency at which Cloudflare sends batches of logs to your destination. Setting frequency to high sends your logs in larger quantities of smaller files. Setting frequency to low sends logs in smaller quantities of larger files.",choices:[`high`,`low`]}).option(`kind`,{type:`string`,description:`The kind parameter (optional) is used to differentiate between Logpush and Edge Log Delivery jobs (when supported by the dataset).`,choices:[`edge`]}).option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).option(`name`,{type:`string`,description:`Optional human readable job name. Not unique. Cloudflare suggests. that you set this to a meaningful string, like the domain name, to make it easier to identify your job.`}).option(`output-options-cve-2021-44228`,{type:`boolean`,description:"If set to true, will cause all occurrences of `${` in the generated files to be replaced with `x{`."}).option(`output-options-batch-prefix`,{type:`string`,description:`String to be prepended before each batch.`}).option(`output-options-batch-suffix`,{type:`string`,description:`String to be appended after each batch.`}).option(`output-options-field-delimiter`,{type:`string`,description:"String to join fields. This field be ignored when `record_template` is set."}).option(`output-options-field-names`,{type:`string`,array:!0,description:`List of field names to be included in the Logpush output. For the moment, there is no option to add all fields at once, so you must specify all the fields names you are interested in.`}).option(`output-options-merge-subrequests`,{type:`boolean`,description:"If set to true, subrequests will be merged into the parent request. Only supported for the `http_requests` dataset."}).option(`output-options-output-type`,{type:`string`,description:"Specifies the output type, such as `ndjson` or `csv`. This sets default values for the rest of the settings, depending on the chosen output type. Some formatting rules, like string quoting, are different between output types.",choices:[`ndjson`,`csv`]}).option(`output-options-record-delimiter`,{type:`string`,description:`String to be inserted in-between the records as separator.`}).option(`output-options-record-prefix`,{type:`string`,description:`String to be prepended before each record.`}).option(`output-options-record-suffix`,{type:`string`,description:`String to be appended after each record.`}).option(`output-options-record-template`,{type:`string`,description:"String to use as template for each record instead of the default json key value mapping. All fields used in the template must be present in `field_names` as well, otherwise they will end up as null. Format as a Go `text/template` without any standard functions, like conditionals, loops, sub-templates, etc."}).option(`output-options-sample-rate`,{type:`number`,description:"Floating number to specify sampling rate. Sampling is applied on top of filtering, and regardless of the current `sample_interval` of the data."}).option(`output-options-timestamp-format`,{type:`string`,description:"String to specify the format for timestamps, such as `unixnano`, `unix`, `rfc3339`, `rfc3339ms` or `rfc3339ns`.",choices:[`unixnano`,`unix`,`rfc3339`,`rfc3339ms`,`rfc3339ns`]}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).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 me={command:`update <job-id>`,describe:`Updates a Logpush job.`,builder:pe,handler:async e=>{if(e.dryRun){o({command:`cf logpush jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/jobs/${e[`job-id`]==null?`<job-id>`:encodeURIComponent(String(e[`job-id`]))}`,pathParams:{"job-id":String(e[`job-id`]??``),"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:u(e.filter,`filter`,`text`),frequency:u(e.frequency,`frequency`,`text`),kind:u(e.kind,`kind`,`text`),logpull_options:u(e[`logpull-options`],`logpull-options`,`text`),name:u(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:u(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:u(e[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:u(e[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Updating`,async()=>t.logpush.jobs.update({...r,zone_id:n,job_id:e[`job-id`]})),{successLabel:`Updated`});return}let d=l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),enabled:e.enabled,filter:u(e.filter,`filter`,`text`),frequency:u(e.frequency,`frequency`,`text`),kind:u(e.kind,`kind`,`text`),logpull_options:u(e[`logpull-options`],`logpull-options`,`text`),name:u(e.name,`name`,`text`),output_options:{"CVE-2021-44228":e[`output-options-cve-2021-44228`],batch_prefix:u(e[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:u(e[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:u(e[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:e[`output-options-field-names`],merge_subrequests:e[`output-options-merge-subrequests`],output_type:u(e[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:u(e[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:u(e[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:u(e[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:u(e[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:e[`output-options-sample-rate`],timestamp_format:u(e[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Updating`,async()=>t.logpush.jobs.update({...d,zone_id:n,job_id:e[`job-id`]})),{successLabel:`Updated`})}},he={command:`jobs`,describe:`Operations for jobs`,builder:e=>e.command(oe).command(ce).command(ue).command(fe).command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ge(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 _e={command:`create`,describe:`Gets a new ownership challenge sent to your destination.`,builder:ge,handler:async e=>{if(e.dryRun){o({command:`cf logpush ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/ownership`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.ownership.create({...r,zone_id:n})),{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let f=l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>t.logpush.ownership.create({...f,zone_id:n})),{successLabel:`Created`})}};function ve(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).option(`ownership-challenge`,{type:`string`,description:`Ownership challenge token to prove destination ownership.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const ye={command:`validate`,describe:`Validates ownership challenge of the destination.`,builder:ve,handler:async e=>{if(e.dryRun){o({command:`cf logpush ownership validate`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/ownership/validate`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.ownership.validate({...r,zone_id:n})),{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`})),e[`ownership-challenge`]===void 0&&(e[`ownership-challenge`]=await d(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let f=l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`),ownership_challenge:u(e[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>t.logpush.ownership.validate({...f,zone_id:n})),{successLabel:`Created`})}},be={command:`ownership`,describe:`Operations for ownership`,builder:e=>e.command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`version-id`,{type:`number`,description:`Specific version ID to retrieve. When omitted, the latest version is returned.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Se={command:`get <transformer-id>`,describe:"Returns the SQL query content for a transformer. Without query params, returns the latest version. With `version_id`, returns the specified version.",builder:xe,handler:async r=>{let c={version_id:r[`version-id`]};if(r.dryRun){o({command:`cf logpush transformers content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}/content`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.content.get({account_id:u,transformer_id:r[`transformer-id`],...c})),{successLabel:`Loaded`})}},Ce={command:`content`,describe:`Operations for transformers.content`,builder:e=>e.command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function we(e){return e.option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Te={command:`create`,describe:`Creates a new custom log transformer for an account.`,builder:we,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({code:u(r.code,`code`,`text`),description:u(r.description,`description`,`text`),name:u(r.name,`name`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.logpush.transformers.create({...e,account_id:p})),{successLabel:`Created`});return}r.code===void 0&&(r.code=await d(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),r.name===void 0&&(r.name=await d(`name`,`Customer-provided name for identification.`));let m=l({code:u(r.code,`code`,`text`),description:u(r.description,`description`,`text`),name:u(r.name,`name`,`text`)});a(await s(`Creating`,async()=>f.logpush.transformers.create({...m,account_id:p})),{successLabel:`Created`})}};function Ee(e){return e.positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,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 De={command:`delete <transformer-id>`,describe:`Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`,builder:Ee,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await f({force:!!r.force})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}a(await s(`Deleting`,async()=>c.logpush.transformers.delete({account_id:l,transformer_id:r[`transformer-id`]})),{successLabel:`Deleted`})}};function Oe(e){return e.positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ke={command:`get <transformer-id>`,describe:`Gets a single custom log transformer by ID.`,builder:Oe,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.get({account_id:l,transformer_id:r[`transformer-id`]})),{successLabel:`Loaded`})}};function Ae(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`list`,describe:`Lists all custom log transformers for an account.`,builder:Ae,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.list({account_id:l})),{successLabel:`Loaded`})}};function Me(e){return e.option(`sql`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).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 Ne={command:`preview`,describe:`Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`,builder:Me,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/preview`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({sql:u(r.sql,`sql`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Loading`,async()=>f.logpush.transformers.preview({...e,account_id:p})),{successLabel:`Loaded`});return}r.sql===void 0&&(r.sql=await d(`sql`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`));let m=l({sql:u(r.sql,`sql`,`text`)});a(await s(`Loading`,async()=>f.logpush.transformers.preview({...m,account_id:p})),{successLabel:`Loaded`})}};function Pe(e){return e.positional(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`code`,{type:`string`,description:`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`}).option(`description`,{type:`string`,description:`Optional customer-provided description.`}).option(`name`,{type:`string`,description:`Customer-provided name for identification.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`update <transformer-id>`,describe:"Updates an existing custom log transformer. When `code` is provided, the SQL query is validated and a new version is created. When `code` is omitted, only the name and description are updated. Omitting `description` clears the existing description.",builder:Pe,handler:async r=>{if(r.dryRun){o({command:`cf logpush transformers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({code:u(r.code,`code`,`text`),description:u(r.description,`description`,`text`),name:u(r.name,`name`,`text`)}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Updating`,async()=>f.logpush.transformers.update({...e,account_id:p,transformer_id:r[`transformer-id`]})),{successLabel:`Updated`});return}r.name===void 0&&(r.name=await d(`name`,`Customer-provided name for identification.`));let m=l({code:u(r.code,`code`,`text`),description:u(r.description,`description`,`text`),name:u(r.name,`name`,`text`)});a(await s(`Updating`,async()=>f.logpush.transformers.update({...m,account_id:p,transformer_id:r[`transformer-id`]})),{successLabel:`Updated`})}};function Fe(e){return e.option(`transformer-id`,{type:`string`,description:`The transformer ID.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Maximum number of versions to return.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ie={command:`list`,describe:`Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`,builder:Fe,handler:async r=>{let c={limit:r.limit};if(r.dryRun){o({command:`cf logpush transformers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/logpush/transformers/${r[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(r[`transformer-id`]))}/versions`,pathParams:{"transformer-id":String(r[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.versions.list({account_id:u,transformer_id:r[`transformer-id`],...c})),{successLabel:`Loaded`})}},Le={command:`versions`,describe:`Operations for transformers.versions`,builder:e=>e.command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Re={command:`transformers`,describe:`Operations for transformers`,builder:e=>e.command(Te).command(De).command(ke).command(je).command(Ne).command($).command(Ce).command(Le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ze(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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:`destination-exists`,describe:`Checks if there is an existing job with a destination.`,builder:ze,handler:async e=>{if(e.dryRun){o({command:`cf logpush validate destination-exists`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/validate/destination/exists`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.validate.destinationExists({...r,zone_id:n})),{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let f=l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>t.logpush.validate.destinationExists({...f,zone_id:n})),{successLabel:`Created`})}};function Ve(e){return e.option(`destination-conf`,{type:`string`,description:`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`}).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 He={command:`destination`,describe:`Validates destination.`,builder:Ve,handler:async e=>{if(e.dryRun){o({command:`cf logpush validate destination`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/validate/destination`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.validate.destination({...r,zone_id:n})),{successLabel:`Created`});return}e[`destination-conf`]===void 0&&(e[`destination-conf`]=await d(`destination-conf`,`Uniquely identifies a resource (such as an s3 bucket) where data. will be pushed. Additional configuration parameters supported by the destination may be included.`,{kind:`secret`}));let f=l({destination_conf:u(e[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>t.logpush.validate.destination({...f,zone_id:n})),{successLabel:`Created`})}};function Ue(e){return e.option(`logpull-options`,{type:`string`,description:"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."}).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 We={command:`origin`,describe:`Validates logpull origin with logpull_options.`,builder:Ue,handler:async e=>{if(e.dryRun){o({command:`cf logpush validate origin`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logpush/validate/origin`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?l({logpull_options:u(e[`logpull-options`],`logpull-options`,`text`)}):c(e.body)});return}let t=await i(e),n=await r({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let r=c(e.body);a(await s(`Creating`,async()=>t.logpush.validate.origin({...r,zone_id:n})),{successLabel:`Created`});return}e[`logpull-options`]===void 0&&(e[`logpull-options`]=await d(`logpull-options`,"This field is deprecated. Use `output_options` instead. Configuration string. It specifies things like requested fields and timestamp formats. If migrating from the logpull api, copy the url (full url or just the query string) of your call here, and logpush will keep on making this call for you, setting start and end times appropriately."));let f=l({logpull_options:u(e[`logpull-options`],`logpull-options`,`text`)});a(await s(`Creating`,async()=>t.logpush.validate.origin({...f,zone_id:n})),{successLabel:`Created`})}},Ge={command:`validate`,describe:`Operations for validate`,builder:e=>e.command(He).command(Be).command(We).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Ke={command:`logpush`,describe:`logpush`,builder:e=>e.command(_).command(O).command(P).command(U).command(X).command(ie).command(he).command(be).command(Re).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ke as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{a as r,r as i}from"./auth-DuLchM18.mjs";import{t as a}from"./output-DgW1hQGX.mjs";import{n as o,t as s}from"./progress-B84wYh91.mjs";import{n as c,t as l}from"./body-parser-CYD7PKFC.mjs";import{n as u}from"./input-validation-BBKJRoRB.mjs";import{a as d,i as f,n as p}from"./prompt-CDtLWxNv.mjs";function m(e){return e.option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`,default:1}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips 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 h={command:`create`,describe:`Create a new network monitoring configuration.`,builder:m,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Creating`,async()=>f.magicNetworkMonitoring.configs.create({...e,account_id:p})),{successLabel:`Created`});return}if(r[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await d(`name`,`The account name.`));let m=l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]});a(await s(`Creating`,async()=>f.magicNetworkMonitoring.configs.create({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete`,describe:`Delete an existing network monitoring configuration.`,builder:g,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}a(await s(`Deleting`,async()=>c.magicNetworkMonitoring.configs.delete({account_id:l})),{successLabel:`Deleted`})}};function v(e){return e.option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`edit`,describe:`Update fields in an existing network monitoring configuration.`,builder:v,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]}):c(r.body)});return}let d=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=c(r.body);a(await s(`Updating`,async()=>d.magicNetworkMonitoring.configs.edit({...e,account_id:f})),{successLabel:`Updated`});return}let p=l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]});a(await s(`Updating`,async()=>d.magicNetworkMonitoring.configs.edit({...p,account_id:f})),{successLabel:`Updated`})}};function b(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`get`,describe:`Lists default sampling, router IPs, warp devices, and rules for account.`,builder:b,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs full get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config/full`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicNetworkMonitoring.configs.full.get({account_id:l})),{successLabel:`Loaded`})}},S={command:`full`,describe:`Operations for configs.full`,builder:e=>e.command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Lists default sampling, router IPs and warp devices for account.`,builder:C,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicNetworkMonitoring.configs.get({account_id:l})),{successLabel:`Loaded`})}};function T(e){return e.option(`default-sampling`,{type:`number`,description:`Fallback sampling rate of flow messages being sent in packets per second. This should match the packet sampling rate configured on the router.`}).option(`name`,{type:`string`,description:`The account name.`}).option(`router-ips`,{type:`string`,array:!0,description:`The router_ips 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 E={command:`update`,describe:`Update an existing network monitoring configuration, requires the entire configuration to be updated at once.`,builder:T,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring configs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/config`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]}):c(r.body)});return}let f=await i(r),p=r.local?e:await t();if(r.accountId=p,r.body){let e=c(r.body);a(await s(`Updating`,async()=>f.magicNetworkMonitoring.configs.update({...e,account_id:p})),{successLabel:`Updated`});return}if(r[`default-sampling`]===void 0)throw Error(`--default-sampling is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await d(`name`,`The account name.`));let m=l({default_sampling:r[`default-sampling`],name:u(r.name,`name`,`text`),router_ips:r[`router-ips`]});a(await s(`Updating`,async()=>f.magicNetworkMonitoring.configs.update({...m,account_id:p})),{successLabel:`Updated`})}},D={command:`configs`,describe:`Account-level monitoring configuration — sampling rates, thresholds, and notification settings`,builder:e=>e.command(h).command(_).command(y).command(w).command(E).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`edit <rule-id>`,describe:`Update advertisement for rule.`,builder:O,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules advertisements edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}/advertisement`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Updating`,async()=>c.magicNetworkMonitoring.rules.advertisements.edit({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Updated`})}},A={command:`advertisements`,describe:`Operations for rules.advertisements`,builder:e=>e.command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`],default:`1m`}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`create`,describe:`Create network monitoring rules for account. Currently only supports creating a single rule per API request.`,builder:j,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)}):c(r.body)});return}let p=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=c(r.body);a(await s(`Creating`,async()=>p.magicNetworkMonitoring.rules.create({body:e,account_id:m})),{successLabel:`Created`});return}if(r[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(r.name===void 0&&(r.name=await d(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),r.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);r.type===void 0&&(r.type=await f(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)});a(await s(`Creating`,async()=>p.magicNetworkMonitoring.rules.create({body:h,account_id:m})),{successLabel:`Created`})}};function N(e){return e.positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,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 P={command:`delete <rule-id>`,describe:`Delete a network monitoring rule for account.`,builder:N,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await p({force:!!r.force})){process.stderr.write(`Aborted.
|
|
4
|
-
`);return}a(await s(`Deleting`,async()=>c.magicNetworkMonitoring.rules.delete({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Deleted`})}};function F(e){return e.positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <rule-id>`,describe:`List a single network monitoring rule for account.`,builder:F,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicNetworkMonitoring.rules.get({account_id:l,rule_id:r[`rule-id`]})),{successLabel:`Loaded`})}};function L(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`list`,describe:`Lists network monitoring rules for account.`,builder:L,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.magicNetworkMonitoring.rules.list({account_id:l})),{successLabel:`Loaded`})}};function z(e){return e.positional(`rule-id`,{type:`string`,description:`The id of the rule. Must be unique.`,demandOption:!0}).option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).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:`magicNetworkMonitoringRulesUpdateRule <rule-id>`,describe:`Update a network monitoring rule for account.`,builder:z,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules magicNetworkMonitoringRulesUpdateRule`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules/${r[`rule-id`]==null?`<rule-id>`:encodeURIComponent(String(r[`rule-id`]))}`,pathParams:{"rule-id":String(r[`rule-id`]??``)},bodyKind:`json`,body:r.body===void 0?l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)}):c(r.body)});return}let p=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=c(r.body);a(await s(`Updating`,async()=>p.magicNetworkMonitoring.rules.magicNetworkMonitoringRulesUpdateRule({body:e,account_id:m,rule_id:r[`rule-id`]})),{successLabel:`Updated`});return}if(r[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(r.name===void 0&&(r.name=await d(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),r.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);r.type===void 0&&(r.type=await f(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)});a(await s(`Updating`,async()=>p.magicNetworkMonitoring.rules.magicNetworkMonitoringRulesUpdateRule({body:h,account_id:m,rule_id:r[`rule-id`]})),{successLabel:`Updated`})}};function V(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`magicNetworkMonitoringRulesUpdateRulesBulk`,describe:`Update multiple network monitoring rules for account in a single request. Supports up to 100 rules per request. All rules in a single request must be of the same type.`,builder:V,handler:async l=>{if(l.dryRun){o({command:`cf magic-network-monitoring rules magicNetworkMonitoringRulesUpdateRulesBulk`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules/bulk`,pathParams:{},bodyKind:`json`,body:l.body===void 0?void 0:c(l.body)});return}let u=await i(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);if(Array.isArray(e)&&e.length>100){let t=Math.ceil(e.length/100),n=null;for(let i=0;i<e.length;i+=100){let a=e.slice(i,i+100);n=await s(`Updating: batch ${Math.floor(i/100)+1}/${t}`,async()=>r(u,`PUT`,`/accounts/${d}/mnm/rules/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${d}/mnm/rules/bulk`,{body:e})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function U(e){return e.option(`automatic-advertisement`,{type:`boolean`,description:`Toggle on if you would like Cloudflare to automatically advertise the IP Prefixes within the rule via Magic Transit when the rule is triggered. Only available for users of Magic Transit.`}).option(`bandwidth-threshold`,{type:`number`,description:`The number of bits per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`duration`,{type:`string`,description:`The amount of time that the rule threshold must be exceeded to send an alert notification. The final value must be equivalent to one of the following 8 values ["1m","5m","10m","15m","20m","30m","45m","60m"].`,choices:[`1m`,`5m`,`10m`,`15m`,`20m`,`30m`,`45m`,`60m`]}).option(`name`,{type:`string`,description:`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`}).option(`packet-threshold`,{type:`number`,description:`The number of packets per second for the rule. When this value is exceeded for the set duration, an alert notification is sent. Minimum of 1 and no maximum.`}).option(`prefix-match`,{type:`string`,description:`Prefix match type to be applied for a prefix auto advertisement when using an advanced_ddos rule.`,choices:[`exact`,`subnet`,`supernet`]}).option(`prefixes`,{type:`string`,array:!0,description:`The prefixes field`}).option(`type`,{type:`string`,description:`MNM rule type.`,choices:[`threshold`,`zscore`,`advanced_ddos`]}).option(`zscore-sensitivity`,{type:`string`,description:`Level of sensitivity set for zscore rules.`,choices:[`low`,`medium`,`high`]}).option(`zscore-target`,{type:`string`,description:`Target of the zscore rule analysis.`,choices:[`bits`,`packets`]}).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 W={command:`update`,describe:`Update network monitoring rules for account.`,builder:U,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/rules`,pathParams:{},bodyKind:`json`,body:r.body===void 0?l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)}):c(r.body)});return}let p=await i(r),m=r.local?e:await t();if(r.accountId=m,r.body){let e=c(r.body);a(await s(`Updating`,async()=>p.magicNetworkMonitoring.rules.update({body:e,account_id:m})),{successLabel:`Updated`});return}if(r[`automatic-advertisement`]===void 0)throw Error(`--automatic-advertisement is required (or pass --body with this field set).`);if(r.name===void 0&&(r.name=await d(`name`,`The name of the rule. Must be unique. Supports characters A-Z, a-z, 0-9, underscore (_), dash (-), period (.), and tilde (~). You can’t have a space in the rule name. Max 256 characters.`)),r.prefixes===void 0)throw Error(`--prefixes is required (or pass --body with this field set).`);r.type===void 0&&(r.type=await f(`type`,`MNM rule type.`,[`threshold`,`zscore`,`advanced_ddos`]));let h=l({automatic_advertisement:r[`automatic-advertisement`],bandwidth_threshold:r[`bandwidth-threshold`],duration:u(r.duration,`duration`,`text`),name:u(r.name,`name`,`text`),packet_threshold:r[`packet-threshold`],prefix_match:u(r[`prefix-match`],`prefix-match`,`text`),prefixes:r.prefixes,type:u(r.type,`type`,`text`),zscore_sensitivity:u(r[`zscore-sensitivity`],`zscore-sensitivity`,`text`),zscore_target:u(r[`zscore-target`],`zscore-target`,`text`)});a(await s(`Updating`,async()=>p.magicNetworkMonitoring.rules.update({body:h,account_id:m})),{successLabel:`Updated`})}},G={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(M).command(P).command(I).command(R).command(B).command(H).command(W).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`create`,describe:`Generate authentication token for VPC flow logs export.`,builder:K,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring vpc-flows tokens create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mnm/vpc-flows/token`,pathParams:{},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Creating`,async()=>c.magicNetworkMonitoring.vpcFlows.tokens.create({account_id:l})),{successLabel:`Created`})}},J={command:`tokens`,describe:`Operations for vpc-flows.tokens`,builder:e=>e.command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`vpc-flows`,describe:`Ingest VPC flow logs from cloud providers for network visibility and anomaly detection`,builder:e=>e.command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`magic-network-monitoring`,describe:`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,builder:e=>e.command(D).command(G).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
|