cf 0.10.0 → 0.12.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 +15 -5
- package/dist/_meta/agent-context.json +13 -5
- package/dist/_meta/commands.json +2393 -262
- package/dist/_meta/hand-written-commands.json +960 -0
- package/dist/_meta/schemas.json +1882 -155
- package/dist/{abuse-reports-CGF4zcKf.mjs → abuse-reports-D40QFl-y.mjs} +2 -2
- package/dist/{access-lhLJo1v2.mjs → access-Dl2IU1ID.mjs} +1 -1
- package/dist/account-CPbieCZ4.mjs +2 -0
- package/dist/{account-tags-B88TotoH.mjs → account-tags-skfP7H8k.mjs} +4 -4
- package/dist/{accounts-BSIAT_iP.mjs → accounts-CSgR6909.mjs} +12 -12
- package/dist/{acm-VULm1djv.mjs → acm-CVvCTaNk.mjs} +1 -1
- package/dist/{addressing-BHPBIkRY.mjs → addressing-Uq5hEDDP.mjs} +11 -11
- package/dist/{agent-context-KBy48G1b.mjs → agent-context-BvuDdaJb.mjs} +1 -1
- package/dist/agent-memory-BrHMIU0E.mjs +6 -0
- package/dist/ai-audit-BoZuL84i.mjs +2 -0
- package/dist/ai-gateway-DE50Jem1.mjs +13 -0
- package/dist/ai-search-Fx7NHCHB.mjs +7 -0
- package/dist/ai-security-DyLbY9kv.mjs +4 -0
- package/dist/ai-v2fP1r0s.mjs +5 -0
- package/dist/{alerting-Bl8OqViR.mjs → alerting-5mFZjTcD.mjs} +1 -1
- package/dist/analytics-BygTfozw.mjs +3 -0
- package/dist/analytics_engine-4L-q362P.mjs +2 -0
- package/dist/{api-security-4FVrD4n8.mjs → api-security-DjFsRYWx.mjs} +20 -20
- package/dist/argo-TzXPN7tz.mjs +2 -0
- package/dist/args-CDgWUP4J.mjs +2 -0
- package/dist/{artifacts-CVDGnr2V.mjs → artifacts-dEw2UUBV.mjs} +1 -1
- package/dist/audit-logs-CqY7zzwv.mjs +2 -0
- package/dist/auth-CPLdkOC7.mjs +5 -0
- package/dist/{auth-MQEamPN9.mjs → auth-DY_Y2bXC.mjs} +3 -3
- package/dist/billing-DHQuRT8S.mjs +3 -0
- package/dist/body-parser-BGVbwPeM.mjs +2 -0
- package/dist/bot-management-CfqG79hF.mjs +5 -0
- package/dist/botnet-feed-BOeNnDoH.mjs +3 -0
- package/dist/brand-protection-DYttrKIM.mjs +3 -0
- package/dist/{browser-extension-BtpCbh-2.mjs → browser-extension-CTUCdgfn.mjs} +1 -1
- package/dist/browser-run-373D4e1i.mjs +4 -0
- package/dist/build-D0ir_S70.mjs +2 -0
- package/dist/{cache-VyWK1SjY.mjs → cache-DJXBmc3w.mjs} +1 -1
- package/dist/{calls-BxoRYxs4.mjs → calls-COO0Eoz1.mjs} +1 -1
- package/dist/certificate-authorities-DbHLmKbd.mjs +2 -0
- package/dist/cf-yPz_IqW6.mjs +18 -0
- package/dist/chunk-LQW53VED-9MACsvSG.mjs +119 -0
- package/dist/chunk-QBZBEHZB-yeyhVUeD.mjs +2 -0
- package/dist/{client-certificates-DDUv8K0a.mjs → client-certificates-RBRqYP3f.mjs} +1 -1
- package/dist/{client-side-security-D4ysjwWT.mjs → client-side-security-HOmA37et.mjs} +1 -1
- package/dist/cloud-connector-C7hw1c1f.mjs +2 -0
- package/dist/cloudforce-one-DLOj76q4.mjs +36 -0
- package/dist/command-BV87D4tR.mjs +2 -0
- package/dist/{completions-BHE4pRjB.mjs → completions-BnD46cXe.mjs} +3 -3
- package/dist/config.d.mts +1451 -1366
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-DY-z_LrH.mjs +2 -0
- package/dist/connector-telemetry-events-DCXmcAc9.mjs +2 -0
- package/dist/connector-telemetry-snapshots-D8GNuzx3.mjs +2 -0
- package/dist/{connectors-BqxYMMtQ.mjs → connectors-fEOn-J_i.mjs} +1 -1
- package/dist/containers-BDBsEs7-.mjs +58 -0
- package/dist/{content-scan-Dgd7A8KF.mjs → content-scan-Cmj9--XY.mjs} +1 -1
- package/dist/{csamScanner-DYL37wLc.mjs → csamScanner-BRXyMCyH.mjs} +1 -1
- package/dist/{ct-alerting-CkhSbfAs.mjs → ct-alerting-9AvYys-f.mjs} +1 -1
- package/dist/custom-certificates-C5qrlyhb.mjs +5 -0
- package/dist/custom-csrs-BgOnTbBW.mjs +3 -0
- package/dist/{custom-hostnames-q_nsnlye.mjs → custom-hostnames-CbQD9aYo.mjs} +1 -1
- package/dist/custom-nameservers-2ZajBkRC.mjs +3 -0
- package/dist/custom-pages-Buki_Cb8.mjs +3 -0
- package/dist/d1-n2in0cSF.mjs +20 -0
- package/dist/data-security-DzOQMkv3.mjs +7 -0
- package/dist/dcv-delegation-BTP9LCOm.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/deploy-BUSz35vq.mjs +2 -0
- package/dist/deploy-input-BvD9aRP1.mjs +2 -0
- package/dist/dev-DY_DquQx.mjs +4 -0
- package/dist/{diagnostics-BTH-8nJH.mjs → diagnostics-BvHV8kQb.mjs} +1 -1
- package/dist/{directory-BlH6N6Qy.mjs → directory-BeiSyg8A.mjs} +1 -1
- package/dist/{dispatch-namespaces-BCjH1JzB.mjs → dispatch-namespaces-Dp8Jjpwy.mjs} +1 -1
- package/dist/dist-BBx1io2f.mjs +2 -0
- package/dist/dist-Cb9TJ2VV.mjs +9 -0
- package/dist/dist-DV7LR38l.mjs +387 -0
- package/dist/dist-DvizctjW.mjs +48 -0
- package/dist/{dls-BF5iN78p.mjs → dls-BwoU29mS.mjs} +1 -1
- package/dist/{dns-CeCTNqRk.mjs → dns-DISAfuzj.mjs} +13 -13
- package/dist/{dns-firewall-B54MaLGm.mjs → dns-firewall-wBcCx_ua.mjs} +1 -1
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-wwGHcwAa.mjs} +1 -1
- package/dist/dry-run-ILZRVpnp.mjs +2 -0
- package/dist/durable-objects-DhDL3San.mjs +2 -0
- package/dist/email-auth-BROqK6-C.mjs +2 -0
- package/dist/email-routing-BZXHDAOO.mjs +6 -0
- package/dist/email-security-DVumybrk.mjs +18 -0
- package/dist/email-sending-CDQ3_wyz.mjs +7 -0
- package/dist/fieldExtractors-Cy1rxHEF.mjs +3 -0
- package/dist/{firewall-CBPGJ43p.mjs → firewall-C0g5X7Zd.mjs} +9 -9
- package/dist/flagship-fFBiZUz-.mjs +4 -0
- package/dist/{fraud-BIhS8pLf.mjs → fraud-CjIETOaM.mjs} +1 -1
- package/dist/google-tag-gateway-hPa5IHUx.mjs +2 -0
- package/dist/{healthchecks-FiXIk-KP.mjs → healthchecks-CoycpTf9.mjs} +1 -1
- package/dist/{hostnames-Bx0mykMR.mjs → hostnames-x_Yezxpr.mjs} +1 -1
- package/dist/{hyperdrive-C8qCabBF.mjs → hyperdrive-BlfrTwSq.mjs} +1 -1
- package/dist/iam-Bk7K_PPO.mjs +6 -0
- package/dist/images-BAEFb9q1.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/{intel-B-9Z_sJs.mjs → intel-DDkyJVaP.mjs} +1 -1
- package/dist/interactive-CRnq-B5I.mjs +11 -0
- package/dist/{interactive-DtsCYfrK.mjs → interactive-cytQzL94.mjs} +1 -1
- package/dist/ips-DU0ti0i0.mjs +2 -0
- package/dist/{keyless-certificates-THHvoXX3.mjs → keyless-certificates-E1P9jBTb.mjs} +1 -1
- package/dist/keys-DqldTZqH.mjs +2 -0
- package/dist/{kv-BFDUCnft.mjs → kv-CcfCfnwq.mjs} +1 -1
- package/dist/{leaked-credential-checks-DUlUCOoJ.mjs → leaked-credential-checks-CqmKaEbd.mjs} +1 -1
- package/dist/load-balancers-Dg4pDad1.mjs +6 -0
- package/dist/{local-D-aVNu6A.mjs → local-DGiIS1uM.mjs} +1 -1
- package/dist/local-runtime--IQr44qq.mjs +2 -0
- package/dist/logexplorer-Bu2mG5rh.mjs +17 -0
- package/dist/logo-matches-CWUzxY7G.mjs +2 -0
- package/dist/logos-BTfdkDPi.mjs +3 -0
- package/dist/{logpush-BK34mMQs.mjs → logpush-BZyay3h2.mjs} +1 -1
- package/dist/{logs-CLAqX9h2.mjs → logs-BqF7jjQO.mjs} +1 -1
- package/dist/{magic-cloud-networking-h_ozrC5S.mjs → magic-cloud-networking-Dhd8pTyM.mjs} +4 -4
- package/dist/magic-network-monitoring-D0FnkjuN.mjs +4 -0
- package/dist/magic-transit-B5skt0G7.mjs +111 -0
- package/dist/managed-transforms-B6X_crcJ.mjs +3 -0
- package/dist/matches-DeYaB4I0.mjs +2 -0
- package/dist/mcp-ChjBiMx2.mjs +4 -0
- package/dist/mesh-DRVAFLBX.mjs +4 -0
- package/dist/{moq-qmuVPAO0.mjs → moq-DE7VDEFS.mjs} +1 -1
- package/dist/mtls-certificates-Cbc3uAkN.mjs +3 -0
- package/dist/{network-D74cSy3t.mjs → network-CDPZNFbn.mjs} +1 -1
- package/dist/{network-interconnects-BJ0Nc48J.mjs → network-interconnects-CMRs_chR.mjs} +1 -1
- package/dist/oauth-DAa7SwkM.mjs +14 -0
- package/dist/{oauth-clients-Br-smLxQ.mjs → oauth-clients-DAI_gcuL.mjs} +1 -1
- package/dist/oauth-scopes-BE6xF4_h.mjs +2 -0
- package/dist/observability-DnyI8rPJ.mjs +4 -0
- package/dist/{open-PBXRGS4R-R-qesf18.mjs → open-PBXRGS4R-DIiYQyU9.mjs} +3 -3
- package/dist/{organization-NX7yCZrq.mjs → organization-yh0mSUdI.mjs} +6 -6
- package/dist/organizations-B3aU-RCG.mjs +2 -0
- package/dist/origin-ca-certificates-BaNWfVqf.mjs +3 -0
- package/dist/origin-post-quantum-encryption-CIUtQgyv.mjs +2 -0
- package/dist/origin-tls-client-auth-CvEpbX2Q.mjs +4 -0
- package/dist/{output-DrpYYfnB.mjs → output-BqDR9h74.mjs} +1 -1
- package/dist/page-rules-CzbyXbt6.mjs +27 -0
- package/dist/pages-CX8yefTI.mjs +14 -0
- package/dist/pay-per-crawl-v4vBOMWD.mjs +4 -0
- package/dist/pipelines-BZ1KGupx.mjs +6 -0
- package/dist/precursor-D42A9ay5.mjs +4 -0
- package/dist/progress-jYW64HY7.mjs +2 -0
- package/dist/project-settings-BN7tL0c7.mjs +3 -0
- package/dist/prompt-CyATfGUu.mjs +3 -0
- package/dist/{public-BwQqexwo-CNW_dPly.mjs → public-BMg6-Hxh-DgIH5obr.mjs} +1 -1
- package/dist/queries-xvETUjUE.mjs +3 -0
- package/dist/queues-CpqHDtxF.mjs +6 -0
- package/dist/{r2-data-catalog-Du7hN9jA.mjs → r2-data-catalog-DgKmlTKR.mjs} +1 -1
- package/dist/r2-jhmLvD1z.mjs +24 -0
- package/dist/radar-C2J16wpX.mjs +2 -0
- package/dist/{rate-limits-yBF3qoYD.mjs → rate-limits-CoH9Xma0.mjs} +1 -1
- package/dist/raw-fetch-CNKIypJ7.mjs +2 -0
- package/dist/{realtimekit-CIP7lP-a.mjs → realtimekit-CDs0Z5WW.mjs} +1 -1
- package/dist/registrar-BI5ewTAk.mjs +23 -0
- package/dist/{registrar-sandbox-DiXg8p_1.mjs → registrar-sandbox-al1znWMc.mjs} +4 -4
- package/dist/{registry-Bck_zFkz.mjs → registry-5-I2XLwF.mjs} +1 -1
- package/dist/reporting-CxsdHAH3.mjs +2 -0
- package/dist/request-tracers-DJJCncft.mjs +2 -0
- package/dist/{resource-sharing-D1pSDvtf.mjs → resource-sharing-qQGn8AEn.mjs} +1 -1
- package/dist/resource-tagging-aTtpX5e5.mjs +2 -0
- package/dist/rules-PpsDU89Q.mjs +4 -0
- package/dist/rulesets-DP12Aqik.mjs +5 -0
- package/dist/rum-DxvpzJYc.mjs +4 -0
- package/dist/{schema-B34Q9tLF.mjs → schema-DlLbiOJj.mjs} +1 -1
- package/dist/schema-flags-CTfQVGCs.mjs +5 -0
- package/dist/schemas-BFCBlp_W.mjs +65 -0
- package/dist/{scim-CcSyfKCH.mjs → scim-DJ4AVU20.mjs} +1 -1
- package/dist/{secrets-store-DFmvtphu.mjs → secrets-store-D6KDNo_s.mjs} +1 -1
- package/dist/security-center-008FMs_z.mjs +2 -0
- package/dist/{security-txt-DqnFpjMI.mjs → security-txt-CqcfrhlN.mjs} +1 -1
- package/dist/{share-BuwYUzOL.mjs → share-D5fzsVAJ.mjs} +4 -4
- package/dist/{deploy-input-CrvuoDGJ.mjs → shared-DlKGNPiT.mjs} +97 -99
- package/dist/smart-shield-DpFscIk8.mjs +4 -0
- package/dist/snippets-CCKgI2ZX.mjs +4 -0
- package/dist/spawn-C3_tJ3RB.mjs +526 -0
- package/dist/{spectrum-b7N1ZRAm.mjs → spectrum-LmdqY3ki.mjs} +1 -1
- package/dist/{speed-cw31yFva.mjs → speed-CEK36h3A.mjs} +1 -1
- package/dist/src-CEb2fgtT.mjs +108 -0
- package/dist/{ssl-CsEhRVTO.mjs → ssl-ChHUyaQm.mjs} +1 -1
- package/dist/startup-profile-Dpxg-MjV.mjs +17 -0
- package/dist/{state-Bb5Cbc_L.mjs → state-DeX23Kmg.mjs} +1 -1
- package/dist/{stream-DFOao6Gu.mjs → stream-DfUSELMX.mjs} +13 -13
- package/dist/submit-DF2G5CIz.mjs +2 -0
- package/dist/tags-nFJJHlLJ.mjs +2 -0
- package/dist/tenant-CRLw1oRU.mjs +2 -0
- package/dist/tenant-custom-nameservers-BvBQRDcs.mjs +3 -0
- package/dist/{tools-BHfBOZOU.mjs → tools-j8UGEtP1.mjs} +1 -1
- package/dist/{tunnel-DkMiNtVY.mjs → tunnel-CMQeBgmb.mjs} +1 -1
- package/dist/tunnels-iVA3MrdS.mjs +2 -0
- package/dist/turnstile-DQHP6-_b.mjs +23 -0
- package/dist/{ui-DE8CNn6c.mjs → ui-DJFcf61J.mjs} +1 -1
- package/dist/url-info-BVgdb_pf.mjs +2 -0
- package/dist/{url-normalization-ClfFiruK.mjs → url-normalization-BTcxLxIQ.mjs} +1 -1
- package/dist/url-scanner-DwuDZLPk.mjs +2 -0
- package/dist/user-I_MbB_KX.mjs +12 -0
- package/dist/values-S-Q7-5o8.mjs +2 -0
- package/dist/{vectorize-CVKu7lEt.mjs → vectorize-CNZdF_0A.mjs} +1 -1
- package/dist/waiting-rooms-Bo-OSsxu.mjs +11 -0
- package/dist/{web-assets-C2s9kzWf.mjs → web-assets-tlFzKdNL.mjs} +1 -1
- package/dist/web3-CdbfoZ2x.mjs +4 -0
- package/dist/workers-DQ9Q7czn.mjs +28 -0
- package/dist/{workers-builds-B55-oXOa.mjs → workers-builds-CGRhYx-x.mjs} +1 -1
- package/dist/{workflows-B-kGHxFu.mjs → workflows-BhEy-crm.mjs} +1 -1
- package/dist/zaraz-DbKvA_8C.mjs +2 -0
- package/dist/{zero-trust-DV3sIOvu.mjs → zero-trust-DrHCPVOc.mjs} +67 -66
- package/dist/zone-D2zrbJI2.mjs +2 -0
- package/dist/zones-DrpxQ_-A.mjs +21 -0
- package/package.json +12 -8
- package/dist/account-CYRm3yoN.mjs +0 -2
- package/dist/agent-memory-DDv_Gxr7.mjs +0 -6
- package/dist/ai-audit-BWZGvbca.mjs +0 -2
- package/dist/ai-gateway-jeB-sAgP.mjs +0 -13
- package/dist/ai-search-BmdskMjR.mjs +0 -7
- package/dist/ai-security-CsmfcaUx.mjs +0 -4
- package/dist/ai-viHB1tgI.mjs +0 -5
- package/dist/analytics-vOxw8Hy0.mjs +0 -3
- package/dist/analytics_engine-DO4-C0wD.mjs +0 -2
- package/dist/argo-CQfCgazW.mjs +0 -2
- package/dist/args-DlUhyGU0.mjs +0 -2
- package/dist/audit-logs-CzpwvQ6A.mjs +0 -2
- package/dist/auth-D0xZxAEa.mjs +0 -5
- package/dist/billing-aJgapeRm.mjs +0 -3
- package/dist/body-parser-C-c9gfH1.mjs +0 -2
- package/dist/bot-management-Y2q5d-pi.mjs +0 -5
- package/dist/botnet-feed-DANJqfmE.mjs +0 -3
- package/dist/brand-protection-CjpZWBjp.mjs +0 -3
- package/dist/browser-run-BFn9h2Tz.mjs +0 -4
- package/dist/build-DcflwvqN.mjs +0 -2
- package/dist/certificate-authorities-D7OAFxF_.mjs +0 -2
- package/dist/cf-C7DU4819.mjs +0 -18
- package/dist/chunk-LQW53VED-DLrXV-hE.mjs +0 -499
- package/dist/cloud-connector-Bhec6z2P.mjs +0 -2
- package/dist/cloudforce-one-J_hn9ss9.mjs +0 -36
- package/dist/connector-interrupts-Dycx8zFx.mjs +0 -2
- package/dist/connector-telemetry-events-BmxOSNtN.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CdcqfKnH.mjs +0 -2
- package/dist/containers-CKW081JA.mjs +0 -54
- package/dist/custom-certificates-BzAOnEoT.mjs +0 -5
- package/dist/custom-csrs-CgzG3pd3.mjs +0 -3
- package/dist/custom-nameservers-BUBmfhUe.mjs +0 -3
- package/dist/custom-pages-M7jA2Hit.mjs +0 -3
- package/dist/d1-BFvMd6-S.mjs +0 -20
- package/dist/data-security-Bji4Or_j.mjs +0 -7
- package/dist/dcv-delegation-BuoRQ1Yh.mjs +0 -2
- package/dist/deploy-CZ7bgNDu.mjs +0 -2
- package/dist/dev-V10MG-Bg.mjs +0 -4
- package/dist/dist-CgrMkXFx.mjs +0 -72
- package/dist/durable-objects-D8FQORrL.mjs +0 -2
- package/dist/email-auth-DJK0Eb30.mjs +0 -2
- package/dist/email-routing-NpmiKIrl.mjs +0 -6
- package/dist/email-security-BLZ7WZ9Z.mjs +0 -18
- package/dist/email-sending-dn-353Nx.mjs +0 -7
- package/dist/fieldExtractors-ahysj57J.mjs +0 -3
- package/dist/flagship-BusjRNIb.mjs +0 -4
- package/dist/google-tag-gateway-TZZ3F1tV.mjs +0 -2
- package/dist/iam-Cj63Kjc6.mjs +0 -6
- package/dist/images-CBWXCDhy.mjs +0 -8
- package/dist/ips-qs9eGJnI.mjs +0 -2
- package/dist/keys-D7N0j4-x.mjs +0 -2
- package/dist/load-balancers-D2zbQ8fT.mjs +0 -6
- package/dist/local-runtime-Dh3keC5v.mjs +0 -2
- package/dist/logexplorer-CUsfZ_bS.mjs +0 -13
- package/dist/logo-matches-CJcthPHf.mjs +0 -2
- package/dist/logos-BS65zN8q.mjs +0 -3
- package/dist/magic-network-monitoring-C7tAPNKP.mjs +0 -4
- package/dist/magic-transit-BtsFePMx.mjs +0 -111
- package/dist/managed-transforms-Cm_KVCMB.mjs +0 -3
- package/dist/matches-InA1hwII.mjs +0 -2
- package/dist/mcp-mJ7bekNJ.mjs +0 -4
- package/dist/mesh-BK4S1Ezy.mjs +0 -4
- package/dist/mtls-certificates-CU4OAAXY.mjs +0 -3
- package/dist/oauth-B0ETkNcX.mjs +0 -15
- package/dist/oauth-scopes-D5bF11ju.mjs +0 -2
- package/dist/observability-BWE0Gg3V.mjs +0 -4
- package/dist/organizations-DLhiRt8g.mjs +0 -2
- package/dist/origin-ca-certificates-Ff4McZRQ.mjs +0 -3
- package/dist/origin-post-quantum-encryption-UuTr4_SW.mjs +0 -2
- package/dist/origin-tls-client-auth-DOJ1zlH3.mjs +0 -4
- package/dist/page-rules-BSz1gO-_.mjs +0 -18
- package/dist/pages-DVDogxPs.mjs +0 -14
- package/dist/pay-per-crawl-BrLXK7gT.mjs +0 -4
- package/dist/pipelines-BszRk4sM.mjs +0 -6
- package/dist/precursor-BPNjQr76.mjs +0 -4
- package/dist/progress-CsHIt3Tp.mjs +0 -2
- package/dist/prompt-DdegNPpg.mjs +0 -3
- package/dist/queries-JL1H1Biz.mjs +0 -3
- package/dist/queues-DpkYdRUE.mjs +0 -6
- package/dist/r2-CKozthw_.mjs +0 -24
- package/dist/radar-C-92vggG.mjs +0 -2
- package/dist/raw-fetch-CteyTOM2.mjs +0 -2
- package/dist/registrar-DKKN0M29.mjs +0 -21
- package/dist/reporting-fg_GKXe1.mjs +0 -2
- package/dist/request-tracers-CkMya96z.mjs +0 -2
- package/dist/resource-tagging-z48JGHCq.mjs +0 -2
- package/dist/rules-BTmNjDN-.mjs +0 -4
- package/dist/rulesets-CsoSM-17.mjs +0 -5
- package/dist/rum-DB4iO2q5.mjs +0 -4
- package/dist/schema-flags-iGoOriJt.mjs +0 -5
- package/dist/security-center-DFKeHq5c.mjs +0 -2
- package/dist/session-D6KHthHf.mjs +0 -2
- package/dist/shared-VppSAQf4.mjs +0 -2
- package/dist/smart-shield-D6X8L7p8.mjs +0 -4
- package/dist/snippets-DIpc9pb_.mjs +0 -4
- package/dist/spawn-O1RS01vr.mjs +0 -523
- package/dist/src-D_HETJNy.mjs +0 -108
- package/dist/submit--xTzyNPy.mjs +0 -2
- package/dist/tags-efICDkah.mjs +0 -2
- package/dist/tenant-CerHuToJ.mjs +0 -2
- package/dist/tenant-custom-nameservers-C4otMBm2.mjs +0 -3
- package/dist/triggers-BEsiiKAf.mjs +0 -2
- package/dist/tunnels-D0J8lJoI.mjs +0 -2
- package/dist/turnstile-CFmtY5bn.mjs +0 -23
- package/dist/url-info-DBCeRWwb.mjs +0 -2
- package/dist/url-scanner-CNyvg65L.mjs +0 -2
- package/dist/user-bifVEQq5.mjs +0 -12
- package/dist/values-OxkdP1tV.mjs +0 -2
- package/dist/versions-BVL-Ludh.mjs +0 -2
- package/dist/waiting-rooms-CmRAl51T.mjs +0 -11
- package/dist/web3-y_cY91V_.mjs +0 -4
- package/dist/workers-jDcq14GH.mjs +0 -24
- package/dist/zaraz-27zwjLvv.mjs +0 -2
- package/dist/zone-BJix2KQ9.mjs +0 -2
- package/dist/zones-Bkj5i92c.mjs +0 -21
- /package/dist/{alerts-CRmjqOZi.mjs → alerts-9PR5sQ_z.mjs} +0 -0
- /package/dist/{autorag-BD7cu5NU.mjs → autorag-Bevo1kIH.mjs} +0 -0
- /package/dist/{brands-BhALBkX2.mjs → brands-C4M04Man.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-C3w62dek.mjs} +0 -0
- /package/dist/{clear-BgF8No7D.mjs → clear-DS0eRXOc.mjs} +0 -0
- /package/dist/{cli-types-BsTty22w.mjs → cli-types-C3nVfpSG.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BY2556uL.mjs → connector-telemetry-events-latest-CKKG6_pD.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-BHYdxUEF.mjs → connector-telemetry-snapshots-latest-Bv5OddJr.mjs} +0 -0
- /package/dist/{domain-info-C50W5GhA.mjs → domain-info-BUiaGCEq.mjs} +0 -0
- /package/dist/{health-BFNZqiAm.mjs → health-vX6Ml2Na.mjs} +0 -0
- /package/dist/{input-validation-Bav2M9F-.mjs → input-validation-1esLElok.mjs} +0 -0
- /package/dist/{internal-BTeSewwB.mjs → internal-ROz7anul.mjs} +0 -0
- /package/dist/{live-Dkiyu30_.mjs → live-CSxvigCS.mjs} +0 -0
- /package/dist/{metadata-8AkOftcB.mjs → metadata-DEqBUaSv.mjs} +0 -0
- /package/dist/{rate-limit-analytics-Dz-Wv1T0.mjs → rate-limit-analytics-CgHgKjmV.mjs} +0 -0
- /package/dist/{ready-TKOkKeRg.mjs → ready-6G9zVGPJ.mjs} +0 -0
- /package/dist/{recent-submissions-3Asm6eIi.mjs → recent-submissions-B3Smh-QM.mjs} +0 -0
- /package/dist/{refute-BVz9nMyd.mjs → refute-DjkmLSNe.mjs} +0 -0
- /package/dist/{resolve-CeBbH6Pq.mjs → resolve-DEvdeprv.mjs} +0 -0
- /package/dist/{scan-logo-ZteA-PUV.mjs → scan-logo-545qLcGs.mjs} +0 -0
- /package/dist/{scan-page-DWDSyzQ7.mjs → scan-page-DRQiVufl.mjs} +0 -0
- /package/dist/{search-DGNc37HK.mjs → search-CXbqFoqe.mjs} +0 -0
- /package/dist/{signed-url-B5Qpn2mn.mjs → signed-url-rU_nvgFA.mjs} +0 -0
- /package/dist/{submission-info-FjUolE6A.mjs → submission-info-D6PgXNQP.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-CrIBazAF.mjs} +0 -0
- /package/dist/{total-queries-NHJj1HGq.mjs → total-queries-XkFyu8H5.mjs} +0 -0
- /package/dist/{tracked-domains-CniKVHIp.mjs → tracked-domains-CmcRXHj_.mjs} +0 -0
- /package/dist/{verify-DS1PWAJe.mjs → verify-CM1NakP0.mjs} +0 -0
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n,h as r}from"./oauth-B0ETkNcX.mjs";import{a as i,r as a}from"./auth-MQEamPN9.mjs";import{t as o}from"./output-DrpYYfnB.mjs";import{n as s,t as c}from"./progress-CsHIt3Tp.mjs";import{n as l,t as u}from"./body-parser-C-c9gfH1.mjs";import{n as d,t as f}from"./input-validation-Bav2M9F-.mjs";import{a as p,n as m}from"./prompt-DdegNPpg.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 or 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 or zone. When creating or updating a dataset, only fields available to your account or zone can be enabled. If you request a field that is not available, you will receive an error.`,builder:h,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logexplorer.account.datasets.available({account_or_zone:u,account_or_zone_id:d})),{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 or zone. List available account or 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:_,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?u({dataset:d(i.dataset,`dataset`,`text`),filter:d(i.filter,`filter`,`text`)}):l(i.body)});return}let f=await a(i),m=i.zone===void 0?`accounts`:`zones`,h=m===`zones`?await r({zone:i.zone},f,{quiet:i.quiet}):i.local?e:await t();if(m===`zones`?i.zoneId=h:i.accountId=h,i.body){let e=l(i.body);o(await c(`Creating`,async()=>f.logexplorer.account.datasets.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}i.dataset===void 0&&(i.dataset=await p(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let g=u({dataset:d(i.dataset,`dataset`,`text`),filter:d(i.filter,`filter`,`text`)});o(await c(`Creating`,async()=>f.logexplorer.account.datasets.create({...g,account_or_zone:m,account_or_zone_id:h})),{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 or zone. Dataset deletion must not be protected.`,builder:y,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();if(u===`zones`?i.zoneId=d:i.accountId=d,!await m({force:!!i.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
|
|
7
|
-
`);return}o(await c(`Deleting`,async()=>l.logexplorer.account.datasets.delete({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`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 or zone.`,builder:x,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await r({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await t();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logexplorer.account.datasets.get({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`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 or zone. Pass `include_zones=true` to also include zone-level datasets that belong to this account or zone. List responses omit the `fields` property; use the single-dataset endpoint to retrieve field configuration.",builder:C,handler:async i=>{let l={include_zones:i[`include-zones`]};if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await t();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.logexplorer.account.datasets.list({account_or_zone:d,account_or_zone_id:f,...l})),{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 or zone dataset.`,builder:T,handler:async i=>{if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logexplorer account datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`json`,body:i.body===void 0?u({deletion_protection:i[`deletion-protection`],enabled:i.enabled,filter:d(i.filter,`filter`,`text`)}):l(i.body)});return}let f=await a(i),p=i.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:i.zone},f,{quiet:i.quiet}):i.local?e:await t();if(p===`zones`?i.zoneId=m:i.accountId=m,i.body){let e=l(i.body);o(await c(`Updating`,async()=>f.logexplorer.account.datasets.update({...e,account_or_zone:p,account_or_zone_id:m,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`});return}if(i.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);let h=u({deletion_protection:i[`deletion-protection`],enabled:i.enabled,filter:d(i.filter,`filter`,`text`)});o(await c(`Updating`,async()=>f.logexplorer.account.datasets.update({...h,account_or_zone:p,account_or_zone_id:m,dataset_id:i[`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 or 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 account or zone datasets to see enabled account or zone-level datasets. Zone-level datasets will not appear here. List available account or 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:O,handler:async l=>{if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;s({command:`cf logexplorer account query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`octet-stream`,body:l.body});return}let u=await a(l),p=l.zone===void 0?`accounts`:`zones`,m=p===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await t();if(p===`zones`?l.zoneId=m:l.accountId=m,l.file){let e=f(l.file);o(await c(`Loading`,async()=>i(u,`POST`,`/${p}/${m}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(l.body){let e=d(l.body,`body`,`binary`);o(await c(`Loading`,async()=>i(u,`POST`,`/${p}/${m}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>u.logexplorer.account.query({account_or_zone:p,account_or_zone_id:m})),{successLabel:`Loaded`})}},A={command:`account`,describe:`Operations for account`,builder:e=>e.command(k).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},j={command:`logexplorer`,describe:`logexplorer`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{j as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{r}from"./auth-MQEamPN9.mjs";import{t as i}from"./output-DrpYYfnB.mjs";import{n as a,t as o}from"./progress-CsHIt3Tp.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-BS65zN8q.mjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{a as r,r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./input-validation-Bav2M9F-.mjs";import{n as u}from"./prompt-DdegNPpg.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,4 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-D-aVNu6A.mjs";import{f as t,g as n}from"./oauth-B0ETkNcX.mjs";import{a as r,r as i}from"./auth-MQEamPN9.mjs";import{t as a}from"./output-DrpYYfnB.mjs";import{n as o,t as s}from"./progress-CsHIt3Tp.mjs";import{n as c,t as l}from"./body-parser-C-c9gfH1.mjs";import{n as u}from"./input-validation-Bav2M9F-.mjs";import{a as d,i as f,n as p}from"./prompt-DdegNPpg.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(`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 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:j,handler:async l=>{if(l.dryRun){o({command:`cf magic-network-monitoring rules bulk create`,method:`POST`,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(`Creating: batch ${Math.floor(i/100)+1}/${t}`,async()=>r(u,`POST`,`/accounts/${d}/mnm/rules/bulk`,{body:a}))}a(n,{successLabel:`Created`});return}a(await s(`Creating`,async()=>r(u,`POST`,`/accounts/${d}/mnm/rules/bulk`,{body:e})),{successLabel:`Created`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function N(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 P={command:`update`,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:N,handler:async l=>{if(l.dryRun){o({command:`cf magic-network-monitoring rules bulk update`,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.`)}},F={command:`bulk`,describe:`Operations for rules.bulk`,builder:e=>e.command(M).command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function I(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 L={command:`create`,describe:`Create network monitoring rules for account. Currently only supports creating a single rule per API request.`,builder:I,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 R(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 z={command:`delete <rule-id>`,describe:`Delete a network monitoring rule for account.`,builder:R,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 B(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 V={command:`edit <rule-id>`,describe:`Update a network monitoring rule for account.`,builder:B,handler:async r=>{if(r.dryRun){o({command:`cf magic-network-monitoring rules 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`]))}`,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.edit({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.edit({body:h,account_id:m,rule_id:r[`rule-id`]})),{successLabel:`Updated`})}};function H(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 U={command:`get <rule-id>`,describe:`List a single network monitoring rule for account.`,builder:H,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 W(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`list`,describe:`Lists network monitoring rules for account.`,builder:W,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 K(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 q={command:`update`,describe:`Update network monitoring rules for account.`,builder:K,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`})}},J={command:`rules`,describe:`Monitoring rules that define traffic thresholds and trigger alerts or prefix advertisements`,builder:e=>e.command(L).command(z).command(V).command(U).command(G).command(q).command(A).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`create`,describe:`Generate authentication token for VPC flow logs export.`,builder:Y,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`})}},Z={command:`tokens`,describe:`Operations for vpc-flows.tokens`,builder:e=>e.command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Q={command:`vpc-flows`,describe:`Ingest VPC flow logs from cloud providers for network visibility and anomaly detection`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},$={command:`magic-network-monitoring`,describe:`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,builder:e=>e.command(D).command(J).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{$ as default};
|