cf 1.0.0-beta.0 → 1.0.0-beta.10
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 +12 -0
- package/dist/_meta/commands.json +11755 -14070
- package/dist/_meta/hand-written-commands.json +610 -42
- package/dist/_meta/schemas.json +18290 -20222
- package/dist/abuse-reports-BhSTEz7h.mjs +24 -0
- package/dist/access-D4DN4XZF.mjs +2 -0
- package/dist/{account-tags-BNrSShjj.mjs → account-tags-BWEIZLID.mjs} +5 -5
- package/dist/{accounts-CCAnDjFk.mjs → accounts-ZQvIqGJz.mjs} +66 -60
- package/dist/{acm-ZPYQbZQr.mjs → acm-OQqE8FMc.mjs} +3 -3
- package/dist/{addressing-BFpzLfTn.mjs → addressing-DCFm17JQ.mjs} +50 -50
- package/dist/agent-context-GRiQ4zRU.mjs +2 -0
- package/dist/{agent-memory-DEvy2dLU.mjs → agent-memory-BtfPt2me.mjs} +15 -15
- package/dist/ai-B0_sZbmy.mjs +29 -0
- package/dist/{ai-audit-Dn03zntn.mjs → ai-audit-DaubuhYF.mjs} +1 -1
- package/dist/ai-gateway-CJ-1Dzzr.mjs +82 -0
- package/dist/{ai-search-g0tR8Cut.mjs → ai-search-Dywa1kqX.mjs} +37 -37
- package/dist/{ai-security-BXXA0Jnk.mjs → ai-security-2wxMPqKS.mjs} +1 -1
- package/dist/{alerting-Bst10SOG.mjs → alerting-yad9DYRv.mjs} +26 -26
- package/dist/analytics-DKNw2fVc.mjs +20 -0
- package/dist/{analytics_engine-B4DvcYmB.mjs → analytics_engine-BA3kF46s.mjs} +2 -2
- package/dist/{api-security-Dkx1Codr.mjs → api-security-CSuYMpMO.mjs} +61 -61
- package/dist/{argo-BvswWPlP.mjs → argo-DMfNmOV4.mjs} +1 -1
- package/dist/args-CXgkQKK7.mjs +2 -0
- package/dist/{artifacts-D8kZKJq0.mjs → artifacts-Cb3hwClm.mjs} +20 -20
- package/dist/{audit-logs-Bp_yQpXJ.mjs → audit-logs-BrjNuiLx.mjs} +2 -2
- package/dist/auth-BBlAI8HG.mjs +2 -0
- package/dist/auth-BIr56Mbx.mjs +8 -0
- package/dist/autoconfig-DPUztTL2.mjs +511 -0
- package/dist/banner-ClclgnBn.mjs +2 -0
- package/dist/basin-catalog-BLsQhJP4.mjs +46 -0
- package/dist/{billing-Cqj64fqz.mjs → billing-CRwD7oQS.mjs} +10 -10
- package/dist/{bot-management-CzZx_aml.mjs → bot-management-CyW8F8Wm.mjs} +1 -1
- package/dist/{botnet-feed-Co0c8Xdj.mjs → botnet-feed-BBKsxf3Y.mjs} +5 -5
- package/dist/{brand-protection-CDsGaPIl.mjs → brand-protection-DSeD8LXl.mjs} +13 -13
- package/dist/browser-extension-C1zmKFDG.mjs +2 -0
- package/dist/{browser-run-DFrohJ1p.mjs → browser-run-BAcUTwB4.mjs} +23 -23
- package/dist/build-B5UYMEQH.mjs +2 -0
- package/dist/build-DLZ9gBNA.mjs +2 -0
- package/dist/{builds-CamhClyb.mjs → builds-W1HEG7Bv.mjs} +31 -31
- package/dist/{cache-BiTk4-Zc.mjs → cache-B7E_PXUp.mjs} +27 -27
- package/dist/{certificate-authorities-Dal9DNjW.mjs → certificate-authorities-D_uAJH9B.mjs} +1 -1
- package/dist/cf-Bh_fTFIj.mjs +18 -0
- package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +97 -0
- package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +2 -0
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +2 -0
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +2 -0
- package/dist/cli-BeXSqJAj.mjs +6 -0
- package/dist/cli-exit-Dqoo6Jgb.mjs +2 -0
- package/dist/client-certificates-DqFcK_s1.mjs +13 -0
- package/dist/{client-side-security-CIO_YPtN.mjs → client-side-security-DJXZ1XAu.mjs} +1 -1
- package/dist/{cloud-connector-vwdixea0.mjs → cloud-connector-Czg1GdQi.mjs} +1 -1
- package/dist/{cloudflared-DhItYrCq.mjs → cloudflared-DGuau-lC.mjs} +1 -1
- package/dist/{cloudforce-one-C1cFVBGK.mjs → cloudforce-one-B1IhIZcp.mjs} +213 -222
- package/dist/command-6YTtWltE.mjs +2 -0
- package/dist/command-B6DqnUwt.mjs +2 -0
- package/dist/command-BCag-xjk.mjs +2 -0
- package/dist/command-BOLlvEan.mjs +2 -0
- package/dist/command-BrHTpaji.mjs +2 -0
- package/dist/command-CAtsHc1V.mjs +2 -0
- package/dist/command-C__qB2mo.mjs +2 -0
- package/dist/command-DUafPVUr.mjs +2 -0
- package/dist/command-DZookrfw.mjs +2 -0
- package/dist/command-DfffeX-k.mjs +2 -0
- package/dist/command-DxSJy_ym.mjs +2 -0
- package/dist/command-DzHL5LKI.mjs +2 -0
- package/dist/command-K1-DZFJS.mjs +2 -0
- package/dist/command-TCklVvOY.mjs +2 -0
- package/dist/command-xU78ACNA.mjs +2 -0
- package/dist/{completions-xPLd1cvL.mjs → completions-Cm9brGAI.mjs} +26 -26
- package/dist/{connector-interrupts-DQ5T-HMN.mjs → connector-interrupts-D93KTMkw.mjs} +3 -3
- package/dist/{connector-telemetry-events-DWam38_9.mjs → connector-telemetry-events-D6CmKR14.mjs} +3 -3
- package/dist/{connector-telemetry-snapshots-DX6AJf9Q.mjs → connector-telemetry-snapshots-WO9IUk0e.mjs} +3 -3
- package/dist/{connectors-CBhLWVd-.mjs → connectors-DNT6GTW3.mjs} +7 -7
- package/dist/{containers-C7blN-pe.mjs → containers-Btx7vCDP.mjs} +17 -17
- package/dist/{containers-Bx_44bmJ.mjs → containers-Ce7IO-Ia.mjs} +70 -72
- package/dist/{content-scan-CC91dAlv.mjs → content-scan-C_ROsbTJ.mjs} +1 -1
- package/dist/context-CEOHpZgd.mjs +7 -0
- package/dist/{cps-D9a4N_bH.mjs → cps-BPQqyL2E.mjs} +1 -1
- package/dist/{csamScanner-T7nbCnep.mjs → csamScanner-D-oO5cxT.mjs} +1 -1
- package/dist/{ct-alerting-CkjNJlla.mjs → ct-alerting-CnTRE1Fb.mjs} +1 -1
- package/dist/{custom-certificates-DnWnt9oJ.mjs → custom-certificates-DvnFBZdJ.mjs} +4 -4
- package/dist/{custom-csrs-Db2pF9Ib.mjs → custom-csrs-BZ8TXbuQ.mjs} +5 -5
- package/dist/{custom-hostnames-B_N-uSIa.mjs → custom-hostnames-CTqf-KlT.mjs} +6 -6
- package/dist/{custom-nameservers-DPA_sFY8.mjs → custom-nameservers-B0CpnUVg.mjs} +5 -5
- package/dist/{custom-pages-D6fxEBoh.mjs → custom-pages-DcoSGN56.mjs} +10 -10
- package/dist/{d1-DXs1xVmH.mjs → d1-m7UfzBzl.mjs} +16 -20
- package/dist/{dcv-delegation-as1ue_wx.mjs → dcv-delegation-yOtz90qE.mjs} +1 -1
- package/dist/{delegate-GctF_lrq.mjs → delegate-B6LetRpZ.mjs} +1 -1
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-D2XXCkqk.mjs → deploy-C4p6SzLH.mjs} +1 -1
- package/dist/{deploy-input-BCYyKXpp.mjs → deploy-input-DTjBGloL.mjs} +1 -1
- package/dist/dev-BML-bpNU.mjs +4 -0
- package/dist/{diagnostics-BKH1Oh-C.mjs → diagnostics-hOvnx5DT.mjs} +7 -7
- package/dist/dialog-BlUXJKbA.mjs +2 -0
- package/dist/discover-C5aiI6u0.mjs +2 -0
- package/dist/discover-DwczTkRX.mjs +2 -0
- package/dist/dist-BuCJ_55d.mjs +366 -0
- package/dist/dist-C3s9SXTd.mjs +48 -0
- package/dist/{dist-BpadEMNY.mjs → dist-DW47TUGh.mjs} +35 -35
- package/dist/{dls-C5kAQsN6.mjs → dls-v6DyEWTd.mjs} +8 -8
- package/dist/{dns-CYwXrdJO.mjs → dns-C9sUPsNt.mjs} +72 -63
- package/dist/{dns-firewall-BEw4QcXj.mjs → dns-firewall-EDiT-Zli.mjs} +8 -8
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +2 -0
- package/dist/dotenv-CcQjGlV0.mjs +4 -0
- package/dist/dry-run-Bq0JAsbX.mjs +2 -0
- package/dist/durable-objects-C01phVwL.mjs +6 -0
- package/dist/{email-auth-B3MD8FrJ.mjs → email-auth-BgvoEHJk.mjs} +1 -1
- package/dist/{email-routing-C4YhZGPw.mjs → email-routing-Bggn219w.mjs} +24 -24
- package/dist/email-security-_t7rzrzd.mjs +158 -0
- package/dist/{email-sending-BO1GOAho.mjs → email-sending-_dKCs2VF.mjs} +23 -23
- package/dist/error-sanitization-CJ5OLJrh.mjs +2 -0
- package/dist/error-sanitization-hmi1CqE5.mjs +2 -0
- package/dist/{fieldExtractors-BJDnzNCN.mjs → fieldExtractors-Cm5QnkE0.mjs} +4 -4
- package/dist/firewall-CZEN8iA_.mjs +36 -0
- package/dist/flagship-B_SAI_ZL.mjs +28 -0
- package/dist/{fraud-C7kS7kP9.mjs → fraud-9_9hobAh.mjs} +1 -1
- package/dist/generate-BPqoDbck.mjs +2 -0
- package/dist/generate-CLqGOlOx.mjs +3 -0
- package/dist/{google-tag-gateway-8VR-j0sa.mjs → google-tag-gateway-O_N0vHRY.mjs} +1 -1
- package/dist/gt-DmcMNPX6.mjs +2 -0
- package/dist/{healthchecks-BJleItOD.mjs → healthchecks-Bt3Gw_JZ.mjs} +1 -1
- package/dist/{hostnames-CHajvoHa.mjs → hostnames-DdOube3R.mjs} +1 -1
- package/dist/hyperdrive-C14NAh9l.mjs +37 -0
- package/dist/{iam-B7oTr6vW.mjs → iam-DUW7neMx.mjs} +24 -24
- package/dist/{images-xLAYe436.mjs → images-B9dnr1z0.mjs} +38 -38
- package/dist/index.mjs +1 -1
- package/dist/init-BGcAIvV7.mjs +39 -0
- package/dist/{intel-DwZXY1YE.mjs → intel-BQpZMck3.mjs} +38 -38
- package/dist/interactive-C-o16XQs.mjs +32 -0
- package/dist/interactive-SgAjen2z.mjs +2 -0
- package/dist/{ips-BC_9nKE7.mjs → ips-PT_uQKAf.mjs} +1 -1
- package/dist/k2-nPYti7Y0.mjs +13 -0
- package/dist/keyless-certificates-BHvas2q1.mjs +13 -0
- package/dist/{keys-K-GFzhku.mjs → keys-O5kAW9ox.mjs} +2 -2
- package/dist/kv-BUP_ZLM_.mjs +15 -0
- package/dist/lazy-command-glNW3jzf.mjs +2 -0
- package/dist/{leaked-credential-checks-D8UuxztO.mjs → leaked-credential-checks-De9hI1rl.mjs} +1 -1
- package/dist/{load-balancers-B0XeGLhT.mjs → load-balancers-Cs6bUHS1.mjs} +39 -39
- package/dist/{local-B6b2OIBW.mjs → local-B5oRPTEN.mjs} +1 -1
- package/dist/local-Bj-l0TP6.mjs +2 -0
- package/dist/{local-runtime-DD8DAIlm.mjs → local-runtime-CZnegFEM.mjs} +1 -1
- package/dist/login-C5nSIS-T.mjs +2 -0
- package/dist/login-CUup7w0e.mjs +5 -0
- package/dist/{logo-matches-DWg5ezsM.mjs → logo-matches-BkQKdu4Z.mjs} +3 -3
- package/dist/{logos-6A6gJC5C.mjs → logos-C_sv-boo.mjs} +3 -3
- package/dist/{logpush-DwehajAw.mjs → logpush-NUcyMKHi.mjs} +23 -23
- package/dist/logs-BZT4PlqZ.mjs +36 -0
- package/dist/{magic-cloud-networking--14hNj2F.mjs → magic-cloud-networking-DQnSdmgA.mjs} +34 -34
- package/dist/{magic-network-monitoring-Dzo4L6kd.mjs → magic-network-monitoring-pHTU6aS8.mjs} +17 -17
- package/dist/{magic-transit-DDO0A5v4.mjs → magic-transit-5302bQNh.mjs} +154 -158
- package/dist/{managed-defense-DQ0iwWdG.mjs → managed-defense-8OEfDzuO.mjs} +9 -9
- package/dist/{managed-transforms-DDIdcPG0.mjs → managed-transforms-CCpUz4TY.mjs} +1 -1
- package/dist/{matches-D6ahHNaP.mjs → matches-BSiYXs99.mjs} +3 -3
- package/dist/{mcp-BcIrLbRv.mjs → mcp-CCMiS75R.mjs} +15 -15
- package/dist/{mesh-wLiPcWyN.mjs → mesh-DKBGTlCD.mjs} +12 -12
- package/dist/migrate-BJ9Go_wP.mjs +2 -0
- package/dist/monetization-CFf_lb6x.mjs +20 -0
- package/dist/mtls-certificates-DsF3NFNs.mjs +13 -0
- package/dist/{network-DZsrs_sw.mjs → network-Bm0qYRqY.mjs} +24 -24
- package/dist/{network-interconnects-Cjbu4EMv.mjs → network-interconnects-YiRUBbjx.mjs} +17 -17
- package/dist/{oauth-Cu1twz9z.mjs → oauth-DxGgIwFc.mjs} +1 -1
- package/dist/oauth-cNZUky3h.mjs +9 -0
- package/dist/{oauth-clients-DR0hzakz.mjs → oauth-clients-CP6alY0_.mjs} +7 -7
- package/dist/{oauth-scopes-BDNpJJ32.mjs → oauth-scopes-xl-pcWdg.mjs} +1 -1
- package/dist/{observability-BnHy2M6p.mjs → observability-Bp71PtlD.mjs} +44 -44
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +4 -0
- package/dist/{organization-iasRm69J.mjs → organization-Dbom1gTR.mjs} +7 -7
- package/dist/{organizations-CUzCIKXV.mjs → organizations-OUMVsuen.mjs} +1 -1
- package/dist/{origin-ca-certificates-iQXSqBI0.mjs → origin-ca-certificates-B3-T0-Nn.mjs} +3 -3
- package/dist/{origin-post-quantum-encryption-DcMDK6Tz.mjs → origin-post-quantum-encryption-CGB6AfPa.mjs} +1 -1
- package/dist/{origin-tls-client-auth-D1X26X7y.mjs → origin-tls-client-auth-CgzzfAWr.mjs} +5 -5
- package/dist/output-CvQFJkvi.mjs +2 -0
- package/dist/{page-rules-CXa8EYcP.mjs → page-rules-B9BQKU4_.mjs} +1 -1
- package/dist/pages-DZPdyuT4.mjs +54 -0
- package/dist/{pay-per-crawl-DmF8xlm_.mjs → pay-per-crawl-CnveMVDi.mjs} +32 -32
- package/dist/{pay-per-use-DIp2fwJU.mjs → pay-per-use-Bpxe8PHv.mjs} +3 -3
- package/dist/{pipelines-MmXlsxYO.mjs → pipelines-CHev3o5G.mjs} +20 -20
- package/dist/precursor-C9PK9Bue.mjs +4 -0
- package/dist/previews-BIMI1dTz.mjs +4 -0
- package/dist/progress-A61dRbXl.mjs +2 -0
- package/dist/prompt-CGUzvBgY.mjs +3 -0
- package/dist/{queries-VzdcSR5H.mjs → queries-f-btyefs.mjs} +4 -4
- package/dist/{queues-BZYl2emH.mjs → queues-kLNdeb3q.mjs} +29 -35
- package/dist/r2-D_awYx2p.mjs +125 -0
- package/dist/r2-data-catalog-2jQrdAdo.mjs +2 -0
- package/dist/{radar-JzBTD249.mjs → radar-CU4T02Ag.mjs} +1 -1
- package/dist/raw-fetch-CvkmFO23.mjs +2 -0
- package/dist/{realtime-yIdAJ0Yf.mjs → realtime-C0dvcBBM.mjs} +78 -78
- package/dist/{registrar-D-Li9gNk.mjs → registrar-CHc-4vcf.mjs} +8 -8
- package/dist/{registrar-sandbox-CKSSHAyv.mjs → registrar-sandbox-Dq8LV2AI.mjs} +6 -6
- package/dist/{registry-vreNkX6u.mjs → registry-Cg5lP8oo.mjs} +1 -1
- package/dist/{reporting-Cf-pnw6h.mjs → reporting-4u21g6Dk.mjs} +7 -7
- package/dist/request-headers-D31kdxrQ.mjs +2 -0
- package/dist/{request-tracers-BegIQTzt.mjs → request-tracers-CupJ_83j.mjs} +2 -2
- package/dist/resolve-PZuJ878-.mjs +2 -0
- package/dist/{resource-sharing-DEVgiYzM.mjs → resource-sharing-CO-Lh-u7.mjs} +14 -14
- package/dist/{resource-tagging-Cm2yJkU9.mjs → resource-tagging-D0R5SzR6.mjs} +2 -2
- package/dist/{rules-DDCa7cYF.mjs → rules-BsmKzB9H.mjs} +8 -8
- package/dist/{rulesets-BhS7Hvtu.mjs → rulesets-HOOnxHZZ.mjs} +20 -20
- package/dist/{rum-EIj9ViSn.mjs → rum-wcLEvVJl.mjs} +14 -14
- package/dist/run-CIJTelJL.mjs +2 -0
- package/dist/run-quhbAvQi.mjs +2 -0
- package/dist/schema-GdBsV4P7.mjs +2 -0
- package/dist/{schema-flags--GosoCMU.mjs → schema-flags-D8vL2oiF.mjs} +2 -2
- package/dist/{scim-DA83eNe-.mjs → scim-BkdJmAS8.mjs} +10 -10
- package/dist/{sdk-CvIO3tWS.mjs → sdk-BCzcRJCi.mjs} +2 -2
- package/dist/{secrets-store-BTd3eGIB.mjs → secrets-store-CHs0oYA0.mjs} +11 -11
- package/dist/security-insights-vsl-4xFa.mjs +40 -0
- package/dist/{security-txt-DSrHhVEN.mjs → security-txt-Fnl3LdSn.mjs} +1 -1
- package/dist/session-CZTuHcbm.mjs +2 -0
- package/dist/shared-BS30oCf8.mjs +2 -0
- package/dist/{smart-shield-DnSTo-OI.mjs → smart-shield-DB0E7cZI.mjs} +1 -1
- package/dist/{snippets-An5kQs33.mjs → snippets-CFaF_NyG.mjs} +1 -1
- package/dist/source-38bULAR8.mjs +6 -0
- package/dist/spawn-B0Sl8lUu.mjs +10 -0
- package/dist/{spectrum-Ci79n7fd.mjs → spectrum-DtG0jYjE.mjs} +1 -1
- package/dist/{speed-BBL7LrLn.mjs → speed-B-RiNHGK.mjs} +1 -1
- package/dist/src-CM3XaB4p.mjs +109 -0
- package/dist/{ssl-B2psFIRm.mjs → ssl-DBVpCZAM.mjs} +4 -4
- package/dist/startup-profile-CLmojOrn.mjs +2 -0
- package/dist/startup-profile-CR7GMuLx.mjs +17 -0
- package/dist/{state-BxCejn42.mjs → state-BaGRaYow.mjs} +1 -1
- package/dist/state-CpXhcMdX.mjs +2 -0
- package/dist/{stream-Du0Q7UOh.mjs → stream-cAdBvpS1.mjs} +45 -45
- package/dist/{submit-CU8S2jBT.mjs → submit-Bkd7l2rK.mjs} +2 -2
- package/dist/{tags-C3l5aZSi.mjs → tags--eph7JbN.mjs} +2 -2
- package/dist/telemetry-51etasAu.mjs +2 -0
- package/dist/telemetry-Q3_UmwHj.mjs +2 -0
- package/dist/tenant-Bj-He2xO.mjs +10 -0
- package/dist/{tenant-custom-nameservers-DtKeyM5J.mjs → tenant-custom-nameservers-B5IIIwbz.mjs} +1 -1
- package/dist/{theme-BiIYWOed.mjs → theme-BIWQFmZ0.mjs} +2 -2
- package/dist/tools-BJZ0DDlL.mjs +2 -0
- package/dist/{tunnels-D1tRWQQi.mjs → tunnels-CgtuRpcD.mjs} +15 -15
- package/dist/turnstile-Bmcnrzw7.mjs +33 -0
- package/dist/ui-BQxRjahW.mjs +5 -0
- package/dist/update-check-BqSpgzHk.mjs +2 -0
- package/dist/update-check-DC0qP_8z.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-BRA0XGT2.mjs → url-info-DhVehaT8.mjs} +2 -2
- package/dist/{url-normalization-B6N2m5s6.mjs → url-normalization-BpGDUUQc.mjs} +1 -1
- package/dist/{url-scanner-CeKkzkhe.mjs → url-scanner-DiLdqsQk.mjs} +8 -8
- package/dist/{user-CftksgmF.mjs → user-B6P5_OjP.mjs} +1 -1
- package/dist/{values-m7w9PX3o.mjs → values-Cxx4Lxrd.mjs} +2 -2
- package/dist/{vectorize-BWBEtsgZ.mjs → vectorize-YyxVpql-.mjs} +15 -15
- package/dist/version-C0pInAZ9.mjs +2 -0
- package/dist/{waiting-rooms-BVZSYTNJ.mjs → waiting-rooms-BdahlCdD.mjs} +25 -25
- package/dist/{web-assets-CLU5vAgP.mjs → web-assets-yaKxN4w_.mjs} +1 -1
- package/dist/{web3-Dkd4XRNH.mjs → web3-Bu9c_QAt.mjs} +1 -1
- package/dist/workers-5GgoGA2e.mjs +38 -0
- package/dist/{workers-builds-BgtPSDYJ.mjs → workers-builds-h-1FJjE1.mjs} +7 -7
- package/dist/workers-for-platforms-CV9iRrp9.mjs +42 -0
- package/dist/{workers-vpc-DjGfJgQn.mjs → workers-vpc-C1oUHHqk.mjs} +6 -6
- package/dist/{workflows-Cm7WsAgB.mjs → workflows-dtMlkj1-.mjs} +20 -20
- package/dist/wrangler-migration-CJEb9hY3.mjs +2 -0
- package/dist/{zaraz-DurWe32F.mjs → zaraz-838AbMEX.mjs} +1 -1
- package/dist/{zero-trust-D8SVU8YZ.mjs → zero-trust-CYt-eELJ.mjs} +460 -434
- package/dist/{zone-B3AEAfcd.mjs → zone-uJwRLSnn.mjs} +1 -1
- package/dist/{zones-DiX5LoSU.mjs → zones-Dpofsnth.mjs} +1 -1
- package/package.json +15 -12
- package/dist/abuse-reports-BwsJLiPN.mjs +0 -26
- package/dist/access-BVbIajYr.mjs +0 -27
- package/dist/account-DBLarar2.mjs +0 -12
- package/dist/ai-BF0_0NtS.mjs +0 -31
- package/dist/ai-gateway-CVABbCjv.mjs +0 -147
- package/dist/analytics-DgEaxta8.mjs +0 -21
- package/dist/auth-B9w55oRg.mjs +0 -2
- package/dist/auth-C80y97yu.mjs +0 -8
- package/dist/browser-extension-BRHJm3Qf.mjs +0 -15
- package/dist/build-BbjcJxKq.mjs +0 -2
- package/dist/build-DQh5-KK4.mjs +0 -2
- package/dist/cf-oadujOtC.mjs +0 -18
- package/dist/chunk-6EUZQHAF-QVTL_mC-.mjs +0 -2
- package/dist/chunk-DL5FNmn1.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-Cr1H_iK6.mjs +0 -2
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +0 -2
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +0 -2
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +0 -374
- package/dist/client-certificates-DDisXoTE.mjs +0 -13
- package/dist/command-BP7ldws1.mjs +0 -2
- package/dist/command-BtNRBTP6.mjs +0 -2
- package/dist/command-CF0giIIc.mjs +0 -3
- package/dist/command-Ck9rbHA4.mjs +0 -2
- package/dist/config-B4vIa0zp.mjs +0 -2
- package/dist/data-security-CVZAIzhe.mjs +0 -71
- package/dist/dev-nsNxyg2D.mjs +0 -4
- package/dist/dialog-Dx4rRcKM.mjs +0 -2
- package/dist/dist-BDOzKthe.mjs +0 -48
- package/dist/dist-dc4E1u01.mjs +0 -272
- package/dist/dot-prop-6SRZBKHT-Dj7YOlwR.mjs +0 -2
- package/dist/dry-run-CLX6Pbtq.mjs +0 -2
- package/dist/durable-objects-3jvUgzKd.mjs +0 -8
- package/dist/email-security-BcFyWNby.mjs +0 -160
- package/dist/error-sanitization-BkgUhGVc.mjs +0 -2
- package/dist/error-sanitization-DOlqWkNu.mjs +0 -2
- package/dist/firewall-BSMa9aH3.mjs +0 -56
- package/dist/flagship-BJYMb7hb.mjs +0 -28
- package/dist/hyperdrive-DlxQrok-.mjs +0 -37
- package/dist/interactive-B6woOLo-.mjs +0 -32
- package/dist/interactive-DnUvQHjc.mjs +0 -2
- package/dist/keyless-certificates-CtsCsbZ2.mjs +0 -13
- package/dist/kv-Bfwz_ULu.mjs +0 -21
- package/dist/local-BrfySqnx.mjs +0 -2
- package/dist/login-CAsRUF4c.mjs +0 -2
- package/dist/login-DaglE6WA.mjs +0 -5
- package/dist/logs-BWg7YymF.mjs +0 -48
- package/dist/mtls-certificates-AEuNOERQ.mjs +0 -13
- package/dist/oauth-C-QCVfWz.mjs +0 -14
- package/dist/open-PBXRGS4R-C4CKEADM.mjs +0 -4
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +0 -4
- package/dist/output-Bia1u2k5.mjs +0 -2
- package/dist/pages-Cu0m9GSH.mjs +0 -60
- package/dist/precursor-jqeEG_mJ.mjs +0 -4
- package/dist/previews-Cg6lc24N.mjs +0 -4
- package/dist/progress-Bpp73hIu.mjs +0 -2
- package/dist/prompt-CpZztV8c.mjs +0 -3
- package/dist/r2-data-catalog-DISnPFPY.mjs +0 -44
- package/dist/r2-omcKF8_A.mjs +0 -127
- package/dist/raw-fetch-DxGs_eRm.mjs +0 -2
- package/dist/request-headers-DaXBfmVn.mjs +0 -2
- package/dist/resolve-BXemCSyA.mjs +0 -2
- package/dist/run-CSFE1qVX.mjs +0 -2
- package/dist/run-ChM_YpZ0.mjs +0 -2
- package/dist/schema-DCBb3Fcs.mjs +0 -2
- package/dist/security-center-DbH_7h-T.mjs +0 -30
- package/dist/shared-CtBkOWGN.mjs +0 -2
- package/dist/source-BR4_k2ad.mjs +0 -6
- package/dist/spawn-7IW1UyoH.mjs +0 -523
- package/dist/src-CNHNCZpy.mjs +0 -108
- package/dist/startup-profile-CYEokTVe.mjs +0 -2
- package/dist/startup-profile-CgWHy4rE.mjs +0 -17
- package/dist/state-DSzkxXML.mjs +0 -2
- package/dist/telemetry-CNt8H3aA.mjs +0 -2
- package/dist/telemetry-Dk1GcQ0u.mjs +0 -5
- package/dist/telemetry-PHe8XxA2.mjs +0 -2
- package/dist/tenant-BZ0ysR9L.mjs +0 -12
- package/dist/tools-BMKpYraQ.mjs +0 -2
- package/dist/turnstile-DBa4_Vyz.mjs +0 -33
- package/dist/ui-DH95w1Qk.mjs +0 -5
- package/dist/undici-DTSBJHNS.mjs +0 -96
- package/dist/update-check-AAn7EXw8.mjs +0 -2
- package/dist/update-check-BbIXBq1o.mjs +0 -2
- package/dist/version-cPq-WKL8.mjs +0 -2
- package/dist/workers-BQi4_SBS.mjs +0 -36
- package/dist/workers-for-platforms-actLCM6Q.mjs +0 -25
- /package/dist/{Page-C-JHZnIy.mjs → Page-CjJht2qT.mjs} +0 -0
- /package/dist/{alerts-CstOk8n0.mjs → alerts-DY_7Nknx.mjs} +0 -0
- /package/dist/{autorag-PRTwXGgn.mjs → autorag-K396-M2S.mjs} +0 -0
- /package/dist/{body-parser-CUWbw_Tq.mjs → body-parser-hh2avzkz.mjs} +0 -0
- /package/dist/{brands-BHRXlWDm.mjs → brands-DeLbFxSt.mjs} +0 -0
- /package/dist/{clear-UvKESVx3.mjs → clear-CRfI7WS7.mjs} +0 -0
- /package/dist/{cli-types-tt_LZMbn.mjs → cli-types-DoVT5q_M.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-DwnFeZg0.mjs → connector-telemetry-events-latest-D8p_dR8s.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Dv6rZlxs.mjs → connector-telemetry-snapshots-latest-COFmzmlk.mjs} +0 -0
- /package/dist/{domain-info-BqTDXNBo.mjs → domain-info-aiwP60Fo.mjs} +0 -0
- /package/dist/{health-CwPzzrV6.mjs → health-Bz33n-_F.mjs} +0 -0
- /package/dist/{input-validation-Ch4Vllrm.mjs → input-validation-Dk52b0me.mjs} +0 -0
- /package/dist/{internal-WLHfxX64.mjs → internal-BHrJbbdA.mjs} +0 -0
- /package/dist/{lifecycle-Ichnb2x1.mjs → lifecycle-C7tAC1Mn.mjs} +0 -0
- /package/dist/{live-D_k7eHdv.mjs → live-MeJQXIei.mjs} +0 -0
- /package/dist/{metadata-APBiectA.mjs → metadata-C33s4rc-.mjs} +0 -0
- /package/dist/{project-settings-DSXevRvj.mjs → project-settings-DO6njFg_.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CDTPxSET.mjs → rate-limit-analytics-CU55zqCU.mjs} +0 -0
- /package/dist/{rate-limits-C3K9smdl.mjs → rate-limits-CZ-qHDPK.mjs} +0 -0
- /package/dist/{ready-CvwvbdTX.mjs → ready-BOpbZ1pN.mjs} +0 -0
- /package/dist/{recent-submissions-CjzcT-iH.mjs → recent-submissions-KDqD2HyS.mjs} +0 -0
- /package/dist/{refute-CIAFMj00.mjs → refute-DkF4XIMw.mjs} +0 -0
- /package/dist/{resolve-CUDKxUrW.mjs → resolve-BCTrtcx7.mjs} +0 -0
- /package/dist/{scan-logo-zFkphtQ3.mjs → scan-logo-DQkf6glG.mjs} +0 -0
- /package/dist/{scan-page-CLl2MAkZ.mjs → scan-page-CMOJ_E0n.mjs} +0 -0
- /package/dist/{search-12jA1b4l.mjs → search-Bre1Zwn3.mjs} +0 -0
- /package/dist/{signed-url-U0T_PEMR.mjs → signed-url-24ZbX4yV.mjs} +0 -0
- /package/dist/{submission-info-CZ84a3Nb.mjs → submission-info-BmkbZVqM.mjs} +0 -0
- /package/dist/{total-queries-CJTc9Pde.mjs → total-queries-j8OAF_cE.mjs} +0 -0
- /package/dist/{tracked-domains-BKLxnnSv.mjs → tracked-domains-fe3EWYmF.mjs} +0 -0
- /package/dist/{verify-CZW5Fo1q.mjs → verify-CKgZYvln.mjs} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-
|
|
2
|
+
const e=`This command has no local equivalent. Re-run without --local to use the Cloudflare API.`;let t;async function n(){let e=t;t=void 0,await e?.()}function r(e={}){return async function(n,r){let{dispatchLocal:i,disposeLocalSession:a}=await import(`./local-runtime-CZnegFEM.mjs`);return t=a,i(new Request(n,r),e.persistTo,e.apiBaseUrl)}}const i=`local`;export{n as i,e as n,r,i as t};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./local-
|
|
2
|
+
import{n as e}from"./local-B5oRPTEN.mjs";import{i as t}from"./cf-Bh_fTFIj.mjs";import{n}from"./registry-Cg5lP8oo.mjs";import{mkdtempSync as r,rmSync as i,statSync as a}from"node:fs";import{join as o,resolve as s}from"node:path";import{tmpdir as c}from"node:os";import{randomUUID as l}from"node:crypto";import{Miniflare as u}from"miniflare";const d=/^\/accounts\/[^/]+/;function f(e){let n=e!==void 0&&e!==``?o(s(process.cwd(),e),`v3`):o(t(),`state`,`v3`);try{if(!a(n).isDirectory())throw Error(`Local persistence path must be a directory: ${n}`)}catch(e){let t=e.code;if(t===`ENOENT`)return n;throw t===`ENOTDIR`?Error(`Local persistence path must be a directory: ${n}`):e}return n}let p;function m(e){let t=n(),a=r(o(c(),`cf-local-isolated-${process.pid}-`));try{return{mf:new u({unsafeLocalExplorer:!0,cf:!1,resourcePersistencePath:e,unsafeEnableSharedStorage:!0,isolatedResourcePersistencePath:a,unsafeDevRegistryPath:t,workers:[{config:{name:`cf-local-${l()}`,compatibilityDate:`2026-08-15`,manifest:{mainModule:`cf-local.mjs`,modules:{"cf-local.mjs":{type:`esm`,contents:`export default { fetch() { return new Response(null, { status: 404 }); } };`}}}}}]}),isolatedPersistRoot:a}}catch(e){throw i(a,{recursive:!0,force:!0}),e}}async function h(t,n,r){let i=new URL(t.url),a=new URL(r??`https://api.cloudflare.com/client/v4`).pathname.replace(/\/+$/,``),o=`http://localhost/cdn-cgi/local/explorer/api${i.pathname.slice(a.length).replace(d,``)||`/`}${i.search}`,s=new Headers(t.headers);s.delete(`Authorization`),s.set(`Host`,`localhost`);let c;try{c=p??=m(f(n))}catch(e){return g(500,`Could not start the local runtime: ${_(e)}`)}let l;try{let e={method:t.method,headers:[...s],redirect:`manual`,signal:t.signal};t.body!==null&&(e.body=t.body,e.duplex=`half`),l=await c.mf.dispatchFetch(o,e)}catch(e){return g(500,`The local runtime failed to answer: ${_(e)}`)}if(l.status===404&&l.headers.get(`content-type`)?.includes(`json`)!==!0){await l.body?.cancel();let n=new URL(o).pathname.replace(/^.*\/explorer\/api/,``);return g(404,`${e} The local explorer API does not implement ${t.method} ${n}.`)}return l}function g(e,t){return new Response(JSON.stringify({success:!1,errors:[{message:t}],messages:[],result:null}),{status:e,headers:{"content-type":`application/json`}})}function _(e){return e instanceof Error?e.message:String(e)}async function v(){let e=p;if(p=void 0,e!==void 0)try{let{mf:t,isolatedPersistRoot:n}=e;await t.dispose().finally(()=>i(n,{recursive:!0,force:!0}))}catch{}}export{h as dispatchLocal,v as disposeLocalSession};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BIWQFmZ0.mjs";import{r as t}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{n}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as r,t as i}from"./login-CUup7w0e.mjs";var a=n({...i,describe:!1,handler:async n=>{n.quiet||console.error(t(`${e.code(`cf login`)} is an alias for ${e.code(`cf auth login`)}. Authentication commands are under ${e.code(`cf auth`)}.`)),await i.handler(n)}},{command:`login`,classification:r});export{a as default};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BIWQFmZ0.mjs";import{m as t,o as n}from"./chunk-FT2NMTJB-1VFYM1Ro.mjs";import{a as r,n as i,r as a}from"./banner-ClclgnBn.mjs";import"./ui-BQxRjahW.mjs";import{c as o,d as s,i as c,l,o as u,p as d,r as f,s as p,u as m}from"./oauth-cNZUky3h.mjs";import"./auth-BIr56Mbx.mjs";import{t as h}from"./output-CvQFJkvi.mjs";import g from"node:path";function _(e,t,n){if(!e.profile)return;let r=n?` ${n}`:``;throw Error(`The --profile flag cannot be used with \`cf auth ${t}\`.${r}`)}function v(){if(n({allowGlobalAuthKey:!1})!==void 0)throw Error(`Cannot manage auth profiles while CLOUDFLARE_API_TOKEN is set. Unset CLOUDFLARE_API_TOKEN and try again.`)}const y={command:`create <name>`,describe:`Create or re-authenticate a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name for the auth profile`,demandOption:!0}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async n=>{_(n,`create`,"Pass the profile name as the command argument: `cf auth create <name>`."),v(),t(n.name);let r=u().configs.exists(n.name);await l({browser:n.browser,device:n.device,scopes:n.scopes,profile:n.name}),console.log(a(r?`Profile "${n.name}" re-authenticated.`:`Profile "${n.name}" created.`)),console.log(i(`Run ${e.code(`cf auth activate ${n.name}`)} to use this profile in a directory.`))}},b={command:`delete <name>`,describe:`Delete a named auth profile`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to delete`,demandOption:!0}),handler:async n=>{_(n,`delete`),v(),t(n.name);let r=u();if(!r.configs.exists(n.name))throw Error(`Profile "${n.name}" does not exist.`);let o=r.bindings.removeAllBindingsForProfile(n.name);if(o.length>0){console.log(a(`Removed directory bindings:`));for(let e of o)console.log(` ${e}`)}await m(n.name),r.configs.delete(n.name),console.log(a(`Profile "${n.name}" deleted.`));let s=r.bindings.getProfileForDirectory(process.cwd());s?console.log(a(`Active profile for this directory: ${s}.`)):r.configs.exists(`default`)?console.log(a(`This directory now uses the default profile.`)):console.log(i(`No active profile for this directory. Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`))}},x={command:`activate <name> [dir]`,describe:`Bind a named auth profile to a directory`,builder:e=>e.positional(`name`,{type:`string`,description:`Name of the auth profile to activate`,demandOption:!0}).positional(`dir`,{type:`string`,description:`Directory to bind the profile to (defaults to current directory)`}),handler:e=>{_(e,`activate`,"Pass the profile name as the command argument: `cf auth activate <name>`."),v(),t(e.name);let n=u();if(!n.configs.exists(e.name))throw Error(`Profile "${e.name}" does not exist. Run \`cf auth create ${e.name}\` first.`);let r=e.dir??process.cwd();n.bindings.activate(e.name,r),console.log(a(`Profile "${e.name}" activated for "${g.resolve(r)}".`))}},S={command:`deactivate [dir]`,describe:`Remove the auth profile binding from a directory`,builder:e=>e.positional(`dir`,{type:`string`,description:`Directory to unbind (defaults to current directory). Must be the exact directory the profile was bound to.`}),handler:t=>{_(t,`deactivate`),v();let n=u(),r=t.dir??process.cwd(),{removedProfile:o,newResolution:s}=n.bindings.deactivate(r);console.log(a(`Profile "${o}" deactivated from "${g.resolve(r)}".`)),s.profile===void 0?console.log(i(`Run ${e.code(`cf auth login`)} to set up the default profile, or ${e.code(`cf auth create <name>`)} to create a named profile.`)):s.profile===`default`?console.log(a(`This directory now uses the default profile.`)):console.log(a(`Now using: ${s.profile} (${s.source}).`))}},C={command:`list`,describe:`List all auth profiles`,handler:e=>{_(e,`list`);let t=u(),n=t.bindings.read(),r={};for(let[e,t]of Object.entries(n))(r[t]??=[]).push(e);h(t.configs.list().map(e=>({name:e,boundDirectories:r[e]??[]})))}},w={safeFlags:[`force`,`browser`,`device`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}},T={command:`login`,describe:`Authenticate with Cloudflare`,builder:e=>e.option(`force`,{type:`boolean`,alias:`f`,description:`Force re-authentication even if already logged in`,default:!1}).option(`browser`,{type:`boolean`,description:`Open the authorization link in a browser (use --no-browser to print it instead)`,default:!0}).option(`device`,{type:`boolean`,description:`Use OAuth device authorization (use --no-device for the localhost callback flow)`,default:!0}).option(`scopes`,{type:`string`,array:!0,description:`The set of OAuth scopes to request`}),handler:async t=>{_(t,`login`,"Run `cf auth create <name>` to authenticate a named profile.");let n=f();if(n!==`default`&&console.log(r(`This directory has profile "${n}" active. \`cf auth login\` updates the default profile, not "${n}".\nTo re-authenticate "${n}", run \`cf auth create ${n}\`.`)),d(`default`),!t.force&&o()){if(await p()){let t=s();console.log(a(`You are already logged in.`)),console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),t?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(t.expiration_time).toLocaleString()}`),console.log(i(`Run ${e.code(`cf auth login --force`)} to re-authenticate, or ${e.code(`cf auth logout`)} to log out.`));return}console.log(r(`Existing tokens are invalid or expired. Starting fresh login...
|
|
3
|
+
`))}else t.force&&o()&&console.log(a(`Re-authenticating...
|
|
4
|
+
`));if(console.log(a(`Starting OAuth login flow...
|
|
5
|
+
`)),!await l({browser:t.browser,device:t.device,scopes:t.scopes,profile:`default`})){console.log(r(`CLOUDFLARE_API_TOKEN is set and takes precedence. Unset it to log in via OAuth.`));return}let u=s();console.log(`${e.info(`Config file:`)} ${e.muted(c())}`),u?.scopes&&(u.scopes.length>5?(console.log(`${e.info(`Scopes:`)} ${u.scopes.length} selected`),console.log(i(`Run ${e.code(`cf auth whoami`)} to see the full list.`))):console.log(`${e.info(`Scopes:`)} ${u.scopes.join(`, `)}`)),u?.expiration_time&&console.log(`${e.info(`Token expires:`)} ${new Date(u.expiration_time).toLocaleString()}`)}};export{y as a,C as c,_ as i,w as n,S as o,x as r,b as s,T as t};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{r}from"./auth-BIr56Mbx.mjs";import{t as i}from"./output-CvQFJkvi.mjs";import{t as a}from"./dry-run-Bq0JAsbX.mjs";import{t as o}from"./progress-A61dRbXl.mjs";import{t as s}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";function c(e){return e.usage(`$0 logo-matches download get
|
|
3
3
|
|
|
4
|
-
Return matches as CSV for logo queries based on ID`).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 l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
4
|
+
Return matches as CSV for logo queries based on ID`).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 l={command:`get`,describe:`Download matches for logo queries by ID`,builder:c,handler:async c=>s({command:`logo-matches download get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches download get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logo-matches/download`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.download.get({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`download`,describe:`Operations for download`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 logo-matches get
|
|
5
5
|
|
|
6
|
-
Return matches for logo queries based on ID`).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 f={command:`get`,describe:`Read matches for logo queries by ID`,builder:d,handler:async c=>s({command:`logo-matches get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
6
|
+
Return matches for logo queries based on ID`).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 f={command:`get`,describe:`Read matches for logo queries by ID`,builder:d,handler:async c=>s({command:`logo-matches get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={logo_id:c[`logo-id`],offset:c.offset,limit:c.limit};if(c.dryRun){a({command:`cf logo-matches get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logo-matches`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await n();c.accountId=u,i(await o(`Loading`,async()=>l.logoMatches.get({account_id:u,...s})),{successLabel:`Loaded`})})},p={command:`logo-matches`,describe:`logo-matches`,builder:e=>e.command(f).command(u).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{p as default};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,t as n}from"./context-CEOHpZgd.mjs";import{a as r,r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,t as u}from"./input-validation-Dk52b0me.mjs";import{n as d}from"./prompt-CGUzvBgY.mjs";function f(e){return e.usage(`$0 logos create
|
|
3
3
|
|
|
4
|
-
Return new saved logo queries created from image files`).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 p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
4
|
+
Return new saved logo queries created from image files`).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 p={command:`create`,describe:`Create new saved logo queries from image files`,builder:f,handler:async d=>c({command:`logos create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{let c={tag:d.tag,match_type:d[`match-type`],threshold:d.threshold};if(d.dryRun){o({command:`cf logos create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/brand-protection/logos`,pathParams:{},query:c,bodyKind:`octet-stream`,body:d.body});return}let f=await i(d),p=d.local?e:await n();if(d.accountId=p,d.file){let e=u(d.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(d.body){let e=l(d.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).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(d.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function m(e){return e.usage(`$0 logos delete <logo-id>
|
|
5
5
|
|
|
6
|
-
Return a success message after deleting saved logo queries by ID`).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 h={command:`delete <logo-id>`,describe:`Delete saved logo queries by ID`,builder:m,handler:async r=>c({command:`logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await
|
|
6
|
+
Return a success message after deleting saved logo queries by ID`).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 h={command:`delete <logo-id>`,describe:`Delete saved logo queries by ID`,builder:m,handler:async r=>c({command:`logos delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf logos delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<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 n();if(r.accountId=l,!await d({force:!!r.force})){process.stderr.write(`Aborted.
|
|
7
7
|
`);return}a(await s(`Deleting`,async()=>c.logos.delete({account_id:l,logo_id:r[`logo-id`]})),{successLabel:`Deleted`})})},g={command:`logos`,describe:`logos`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -1,46 +1,46 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{r as i}from"./auth-BIr56Mbx.mjs";import{t as a}from"./output-CvQFJkvi.mjs";import{t as o}from"./dry-run-Bq0JAsbX.mjs";import{t as s}from"./progress-A61dRbXl.mjs";import{t as c}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as l,t as u}from"./body-parser-hh2avzkz.mjs";import{n as d}from"./input-validation-Dk52b0me.mjs";import{a as f,n as p}from"./prompt-CGUzvBgY.mjs";function m(e){return e.usage(`$0 logpush account-datasets fields get <dataset-id>
|
|
3
3
|
|
|
4
|
-
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.`).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:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await
|
|
4
|
+
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.`).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:`List fields`,builder:m,handler:async l=>c({command:`logpush account-datasets fields get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/fields`,pathParams:{"account-or-zone":String(n),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.fields.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},g={command:`fields`,describe:`Operations for account-datasets.fields`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ee(e){return e.usage(`$0 logpush account-datasets jobs get <dataset-id>
|
|
5
5
|
|
|
6
|
-
Lists Logpush jobs for an account or zone for a dataset.`).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 _={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:ee,handler:async l=>c({command:`logpush account-datasets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await
|
|
6
|
+
Lists Logpush jobs for an account or zone for a dataset.`).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 _={command:`get <dataset-id>`,describe:`List Logpush jobs for a dataset`,builder:ee,handler:async l=>c({command:`logpush account-datasets jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-datasets jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/datasets/${l[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(l[`dataset-id`]))}/jobs`,pathParams:{"account-or-zone":String(n),"dataset-id":String(l[`dataset-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountDatasets.jobs.get({account_or_zone:u,account_or_zone_id:d,dataset_id:l[`dataset-id`]})),{successLabel:`Loaded`})})},v={command:`jobs`,describe:`Operations for account-datasets.jobs`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},y={command:`account-datasets`,describe:`Operations for account-datasets`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage(`$0 logpush account-jobs create
|
|
7
7
|
|
|
8
|
-
Creates a new Logpush job for an account or zone.`).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(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).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:"Specifies the sampling rate as a floating number greater than 0 and at most 1. 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 x={command:`create`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await r():void 0,t=p.zone===void 0?`accounts`:`zones`,n=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/logpush/jobs`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n)},bodyKind:`json`,body:p.body===void 0?u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await t({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await n();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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 g=u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
|
|
8
|
+
Creates a new Logpush job for an account or zone.`).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(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets.",default:!1}).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. Not supported for account-scoped jobs."}).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:"Specifies the sampling rate as a floating number greater than 0 and at most 1. 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 x={command:`create`,describe:`Create Logpush job`,builder:b,handler:async p=>c({command:`logpush account-jobs create`,classification:{safeFlags:[`dataset`,`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-jobs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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 g=u({dataset:d(p.dataset,`dataset`,`text`),destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),enabled:p.enabled,filter:d(p.filter,`filter`,`text`),filter_attack_traffic:p[`filter-attack-traffic`],frequency:d(p.frequency,`frequency`,`text`),kind:d(p.kind,`kind`,`text`),logpull_options:d(p[`logpull-options`],`logpull-options`,`text`),name:d(p.name,`name`,`text`),output_options:{"CVE-2021-44228":p[`output-options-cve-2021-44228`],batch_prefix:d(p[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(p[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(p[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:p[`output-options-field-names`],merge_subrequests:p[`output-options-merge-subrequests`],output_type:d(p[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(p[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(p[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(p[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(p[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:p[`output-options-sample-rate`],timestamp_format:d(p[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountJobs.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 logpush account-jobs delete <job-id>
|
|
9
9
|
|
|
10
|
-
Deletes a Logpush job.`).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 C={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:S,handler:async l=>c({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await
|
|
10
|
+
Deletes a Logpush job.`).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 C={command:`delete <job-id>`,describe:`Delete Logpush job`,builder:S,handler:async l=>c({command:`logpush account-jobs delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();if(u===`zones`?l.zoneId=d:l.accountId=d,!await p({force:!!l.force,message:`This operation deletes the Logpush job.`})){process.stderr.write(`Aborted.
|
|
11
11
|
`);return}a(await s(`Deleting`,async()=>c.logpush.accountJobs.delete({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]})),{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logpush account-jobs get <job-id>
|
|
12
12
|
|
|
13
|
-
Gets the details of a Logpush job.`).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 T={command:`get <job-id>`,describe:`Get Logpush job details`,builder:w,handler:async l=>c({command:`logpush account-jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await
|
|
13
|
+
Gets the details of a Logpush job.`).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 T={command:`get <job-id>`,describe:`Get Logpush job details`,builder:w,handler:async l=>c({command:`logpush account-jobs get`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/jobs/${l[`job-id`]==null?`<job-id>`:encodeURIComponent(String(l[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"job-id":String(l[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountJobs.get({account_or_zone:u,account_or_zone_id:d,job_id:l[`job-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage(`$0 logpush account-jobs list
|
|
14
14
|
|
|
15
|
-
Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Logpush jobs`,builder:E,handler:async l=>c({command:`logpush account-jobs list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await
|
|
15
|
+
Lists Logpush jobs for an account or zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`list`,describe:`List Logpush jobs`,builder:E,handler:async l=>c({command:`logpush account-jobs list`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=l.zone===void 0?await t():void 0,n=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf logpush account-jobs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/jobs`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`none`});return}let c=await i(l),u=l.zone===void 0?`accounts`:`zones`,d=u===`zones`?await n({zone:l.zone},c,{quiet:l.quiet}):l.local?e:await r();u===`zones`?l.zoneId=d:l.accountId=d,a(await s(`Loading`,async()=>c.logpush.accountJobs.list({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logpush account-jobs update <job-id>
|
|
16
16
|
|
|
17
|
-
Updates a Logpush job.`).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(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).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:"Specifies the sampling rate as a floating number greater than 0 and at most 1. 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 k={command:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await
|
|
17
|
+
Updates a Logpush job.`).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(`filter-attack-traffic`,{type:`boolean`,description:"When true, excludes DDoS attack traffic from logs. This option is supported for the `http_requests`, `firewall_events`, and `network_analytics_logs` datasets."}).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. Not supported for account-scoped jobs."}).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:"Specifies the sampling rate as a floating number greater than 0 and at most 1. 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 k={command:`update <job-id>`,describe:`Update Logpush job`,builder:O,handler:async f=>c({command:`logpush account-jobs update`,classification:{safeFlags:[`enabled`,`filter-attack-traffic`,`frequency`,`kind`,`output-options-cve-2021-44228`,`output-options-merge-subrequests`,`output-options-output-type`,`output-options-timestamp-format`,`dry-run`]}},f,async()=>{if(f.dryRun){let e=f.zone===void 0?await t():void 0,n=f.zone===void 0?`accounts`:`zones`,r=f.zone??e??`<account-id>`;o({command:`cf logpush account-jobs update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/jobs/${f[`job-id`]==null?`<job-id>`:encodeURIComponent(String(f[`job-id`]))}`,pathParams:{"account-or-zone":String(n),"job-id":String(f[`job-id`]??``),"account-or-zone-id":String(r)},bodyKind:`json`,body:f.body===void 0?u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)}):l(f.body)});return}let c=await i(f),p=f.zone===void 0?`accounts`:`zones`,m=p===`zones`?await n({zone:f.zone},c,{quiet:f.quiet}):f.local?e:await r();if(p===`zones`?f.zoneId=m:f.accountId=m,f.body){let e=l(f.body);a(await s(`Updating`,async()=>c.logpush.accountJobs.update({...e,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]})),{successLabel:`Updated`});return}let h=u({destination_conf:d(f[`destination-conf`],`destination-conf`,`text`),enabled:f.enabled,filter:d(f.filter,`filter`,`text`),filter_attack_traffic:f[`filter-attack-traffic`],frequency:d(f.frequency,`frequency`,`text`),kind:d(f.kind,`kind`,`text`),logpull_options:d(f[`logpull-options`],`logpull-options`,`text`),name:d(f.name,`name`,`text`),output_options:{"CVE-2021-44228":f[`output-options-cve-2021-44228`],batch_prefix:d(f[`output-options-batch-prefix`],`output-options-batch-prefix`,`text`),batch_suffix:d(f[`output-options-batch-suffix`],`output-options-batch-suffix`,`text`),field_delimiter:d(f[`output-options-field-delimiter`],`output-options-field-delimiter`,`text`),field_names:f[`output-options-field-names`],merge_subrequests:f[`output-options-merge-subrequests`],output_type:d(f[`output-options-output-type`],`output-options-output-type`,`text`),record_delimiter:d(f[`output-options-record-delimiter`],`output-options-record-delimiter`,`text`),record_prefix:d(f[`output-options-record-prefix`],`output-options-record-prefix`,`text`),record_suffix:d(f[`output-options-record-suffix`],`output-options-record-suffix`,`text`),record_template:d(f[`output-options-record-template`],`output-options-record-template`,`text`),sample_rate:f[`output-options-sample-rate`],timestamp_format:d(f[`output-options-timestamp-format`],`output-options-timestamp-format`,`text`)},ownership_challenge:d(f[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Updating`,async()=>c.logpush.accountJobs.update({...h,account_or_zone:p,account_or_zone_id:m,job_id:f[`job-id`]})),{successLabel:`Updated`})})},A={command:`account-jobs`,describe:`Operations for account-jobs`,builder:e=>e.command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logpush account-ownership create
|
|
18
18
|
|
|
19
|
-
Gets a new ownership challenge sent to your destination.`).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 M={command:`create`,describe:`Get ownership challenge`,builder:j,handler:async p=>c({command:`logpush account-ownership create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await
|
|
19
|
+
Gets a new ownership challenge sent to your destination.`).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 M={command:`create`,describe:`Get ownership challenge`,builder:j,handler:async p=>c({command:`logpush account-ownership create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/ownership`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountOwnership.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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 g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountOwnership.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function N(e){return e.usage(`$0 logpush account-ownership validate create
|
|
20
20
|
|
|
21
|
-
Validates ownership challenge of the destination.`).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 P={command:`create`,describe:`Validate ownership challenge`,builder:N,handler:async p=>c({command:`logpush account-ownership validate create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await
|
|
21
|
+
Validates ownership challenge of the destination.`).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 P={command:`create`,describe:`Validate ownership challenge`,builder:N,handler:async p=>c({command:`logpush account-ownership validate create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-ownership validate create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/ownership/validate`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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`})),p[`ownership-challenge`]===void 0&&(p[`ownership-challenge`]=await f(`ownership-challenge`,`Ownership challenge token to prove destination ownership.`,{kind:`secret`}));let g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`),ownership_challenge:d(p[`ownership-challenge`],`ownership-challenge`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountOwnership.validate.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},F={command:`validate`,describe:`Operations for account-ownership.validate`,builder:e=>e.command(P).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},I={command:`account-ownership`,describe:`Operations for account-ownership`,builder:e=>e.command(M).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 logpush account-validate destination-exists-delete
|
|
22
22
|
|
|
23
|
-
Checks if there is an existing job with a destination.`).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:`destination-exists-delete`,describe:`Check destination exists`,builder:L,handler:async p=>c({command:`logpush account-validate destination-exists-delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await
|
|
23
|
+
Checks if there is an existing job with a destination.`).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:`destination-exists-delete`,describe:`Check destination exists`,builder:L,handler:async p=>c({command:`logpush account-validate destination-exists-delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination-exists-delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/validate/destination/exists`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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 g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.destinationExistsDelete({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 logpush account-validate destination delete
|
|
24
24
|
|
|
25
|
-
Validates destination.`).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 B={command:`delete`,describe:`Validate destination`,builder:z,handler:async p=>c({command:`logpush account-validate destination delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await
|
|
25
|
+
Validates destination.`).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 B={command:`delete`,describe:`Validate destination`,builder:z,handler:async p=>c({command:`logpush account-validate destination delete`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate destination delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/validate/destination`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`destination-conf`]===void 0&&(p[`destination-conf`]=await f(`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 g=u({destination_conf:d(p[`destination-conf`],`destination-conf`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.destination.delete({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},te={command:`destination`,describe:`Operations for account-validate.destination`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 logpush account-validate origin create
|
|
26
26
|
|
|
27
|
-
Validates logpull origin with logpull_options.`).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 H={command:`create`,describe:`Validate origin`,builder:V,handler:async p=>c({command:`logpush account-validate origin create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await
|
|
27
|
+
Validates logpull origin with logpull_options.`).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 H={command:`create`,describe:`Validate origin`,builder:V,handler:async p=>c({command:`logpush account-validate origin create`,classification:{safeFlags:[`dry-run`]}},p,async()=>{if(p.dryRun){let e=p.zone===void 0?await t():void 0,n=p.zone===void 0?`accounts`:`zones`,r=p.zone??e??`<account-id>`;o({command:`cf logpush account-validate origin create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logpush/validate/origin`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:p.body===void 0?u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)}):l(p.body)});return}let c=await i(p),m=p.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:p.zone},c,{quiet:p.quiet}):p.local?e:await r();if(m===`zones`?p.zoneId=h:p.accountId=h,p.body){let e=l(p.body);a(await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...e,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`});return}p[`logpull-options`]===void 0&&(p[`logpull-options`]=await f(`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 g=u({logpull_options:d(p[`logpull-options`],`logpull-options`,`text`)});a(await s(`Creating`,async()=>c.logpush.accountValidate.origin.create({...g,account_or_zone:m,account_or_zone_id:h})),{successLabel:`Created`})})},U={command:`origin`,describe:`Operations for account-validate.origin`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},W={command:`account-validate`,describe:`Operations for account-validate`,builder:e=>e.command(R).command(te).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 logpush edge create
|
|
28
28
|
|
|
29
|
-
Creates a new Instant Logs job for a zone.`).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 K={command:`create`,describe:`Create Instant Logs job`,builder:G,handler:async e=>c({command:`logpush edge create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{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?u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample}):l(e.body)});return}let
|
|
29
|
+
Creates a new Instant Logs job for a zone.`).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 K={command:`create`,describe:`Create Instant Logs job`,builder:G,handler:async e=>c({command:`logpush edge create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{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?u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample}):l(e.body)});return}let t=await i(e),r=await n({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=r,e.body){let n=l(e.body);a(await s(`Creating`,async()=>t.logpush.edge.create({...n,zone_id:r})),{successLabel:`Created`});return}let c=u({fields:d(e.fields,`fields`,`text`),filter:d(e.filter,`filter`,`text`),sample:e.sample});a(await s(`Creating`,async()=>t.logpush.edge.create({...c,zone_id:r})),{successLabel:`Created`})})};function q(e){return e.usage(`$0 logpush edge get
|
|
30
30
|
|
|
31
|
-
Lists Instant Logs jobs for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List Instant Logs jobs`,builder:q,handler:async e=>c({command:`logpush edge get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{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
|
|
31
|
+
Lists Instant Logs jobs for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`List Instant Logs jobs`,builder:q,handler:async e=>c({command:`logpush edge get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{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),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,a(await s(`Loading`,async()=>t.logpush.edge.get({zone_id:r})),{successLabel:`Loaded`})})},Y={command:`edge`,describe:`Operations for edge`,builder:e=>e.command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 logpush transformers content get <transformer-id>
|
|
32
32
|
|
|
33
|
-
Returns the SQL query content for a transformer. Without query params, returns the latest version. With \`version_id\`, returns the specified version.`).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 Z={command:`get <transformer-id>`,describe:`Get transformer content`,builder:X,handler:async
|
|
33
|
+
Returns the SQL query content for a transformer. Without query params, returns the latest version. With \`version_id\`, returns the specified version.`).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 Z={command:`get <transformer-id>`,describe:`Get transformer content`,builder:X,handler:async n=>c({command:`logpush transformers content get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let c={version_id:n[`version-id`]};if(n.dryRun){o({command:`cf logpush transformers content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/${n[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(n[`transformer-id`]))}/content`,pathParams:{"transformer-id":String(n[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(n),u=n.local?e:await r();n.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.content.get({account_id:u,transformer_id:n[`transformer-id`],...c})),{successLabel:`Loaded`})})},Q={command:`content`,describe:`Operations for transformers.content`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 logpush transformers create
|
|
34
34
|
|
|
35
|
-
Creates a new custom log transformer for an account.`).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 re={command:`create`,describe:`Create transformer`,builder:ne,handler:async
|
|
35
|
+
Creates a new custom log transformer for an account.`).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 re={command:`create`,describe:`Create transformer`,builder:ne,handler:async n=>c({command:`logpush transformers create`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`json`,body:n.body===void 0?u({code:d(n.code,`code`,`text`),description:d(n.description,`description`,`text`),name:d(n.name,`name`,`text`)}):l(n.body)});return}let c=await i(n),p=n.local?e:await r();if(n.accountId=p,n.body){let e=l(n.body);a(await s(`Creating`,async()=>c.logpush.transformers.create({...e,account_id:p})),{successLabel:`Created`});return}n.code===void 0&&(n.code=await f(`code`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`)),n.name===void 0&&(n.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(n.code,`code`,`text`),description:d(n.description,`description`,`text`),name:d(n.name,`name`,`text`)});a(await s(`Creating`,async()=>c.logpush.transformers.create({...m,account_id:p})),{successLabel:`Created`})})};function ie(e){return e.usage(`$0 logpush transformers delete <transformer-id>
|
|
36
36
|
|
|
37
|
-
Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).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 ae={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:ie,handler:async
|
|
38
|
-
`);return}a(await s(`Deleting`,async()=>c.logpush.transformers.delete({account_id:l,transformer_id:
|
|
37
|
+
Deletes a custom log transformer. Returns 409 Conflict if any active logpush jobs reference the transformer.`).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 ae={command:`delete <transformer-id>`,describe:`Delete transformer`,builder:ie,handler:async n=>c({command:`logpush transformers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/${n[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(n[`transformer-id`]))}`,pathParams:{"transformer-id":String(n[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();if(n.accountId=l,!await p({force:!!n.force})){process.stderr.write(`Aborted.
|
|
38
|
+
`);return}a(await s(`Deleting`,async()=>c.logpush.transformers.delete({account_id:l,transformer_id:n[`transformer-id`]})),{successLabel:`Deleted`})})};function oe(e){return e.usage(`$0 logpush transformers get <transformer-id>
|
|
39
39
|
|
|
40
|
-
Gets a single custom log transformer by ID.`).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 se={command:`get <transformer-id>`,describe:`Get transformer`,builder:oe,handler:async
|
|
40
|
+
Gets a single custom log transformer by ID.`).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 se={command:`get <transformer-id>`,describe:`Get transformer`,builder:oe,handler:async n=>c({command:`logpush transformers get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/${n[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(n[`transformer-id`]))}`,pathParams:{"transformer-id":String(n[`transformer-id`]??``)},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.get({account_id:l,transformer_id:n[`transformer-id`]})),{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 logpush transformers list
|
|
41
41
|
|
|
42
|
-
Lists all custom log transformers for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List transformers`,builder:ce,handler:async
|
|
42
|
+
Lists all custom log transformers for an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List transformers`,builder:ce,handler:async n=>c({command:`logpush transformers list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers`,pathParams:{},bodyKind:`none`});return}let c=await i(n),l=n.local?e:await r();n.accountId=l,a(await s(`Loading`,async()=>c.logpush.transformers.list({account_id:l})),{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 logpush transformers preview
|
|
43
43
|
|
|
44
|
-
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`).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 de={command:`preview`,describe:`Preview transformer`,builder:ue,handler:async
|
|
44
|
+
Executes a SQL transformer against a single input record and returns the transformed output. This is a stateless endpoint — nothing is persisted.`).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 de={command:`preview`,describe:`Preview transformer`,builder:ue,handler:async n=>c({command:`logpush transformers preview`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/preview`,pathParams:{},bodyKind:`json`,body:n.body===void 0?u({sql:d(n.sql,`sql`,`text`)}):l(n.body)});return}let c=await i(n),p=n.local?e:await r();if(n.accountId=p,n.body){let e=l(n.body);a(await s(`Loading`,async()=>c.logpush.transformers.preview({...e,account_id:p})),{successLabel:`Loaded`});return}n.sql===void 0&&(n.sql=await f(`sql`,`The SQL transformer query. Maximum 32 KB. The query must contain a FROM clause referencing a valid logpush dataset.`));let m=u({sql:d(n.sql,`sql`,`text`)});a(await s(`Loading`,async()=>c.logpush.transformers.preview({...m,account_id:p})),{successLabel:`Loaded`})})};function fe(e){return e.usage("$0 logpush transformers update <transformer-id>\n\nUpdates 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.").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 pe={command:`update <transformer-id>`,describe:`Update transformer`,builder:fe,handler:async n=>c({command:`logpush transformers update`,classification:{safeFlags:[`dry-run`]}},n,async()=>{if(n.dryRun){o({command:`cf logpush transformers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/${n[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(n[`transformer-id`]))}`,pathParams:{"transformer-id":String(n[`transformer-id`]??``)},bodyKind:`json`,body:n.body===void 0?u({code:d(n.code,`code`,`text`),description:d(n.description,`description`,`text`),name:d(n.name,`name`,`text`)}):l(n.body)});return}let c=await i(n),p=n.local?e:await r();if(n.accountId=p,n.body){let e=l(n.body);a(await s(`Updating`,async()=>c.logpush.transformers.update({...e,account_id:p,transformer_id:n[`transformer-id`]})),{successLabel:`Updated`});return}n.name===void 0&&(n.name=await f(`name`,`Customer-provided name for identification.`));let m=u({code:d(n.code,`code`,`text`),description:d(n.description,`description`,`text`),name:d(n.name,`name`,`text`)});a(await s(`Updating`,async()=>c.logpush.transformers.update({...m,account_id:p,transformer_id:n[`transformer-id`]})),{successLabel:`Updated`})})};function $(e){return e.usage(`$0 logpush transformers versions list
|
|
45
45
|
|
|
46
|
-
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`).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 me={command:`list`,describe:`List transformer versions`,builder:$,handler:async
|
|
46
|
+
Returns version metadata for a transformer, newest first. Each version corresponds to a SQL query update.`).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 me={command:`list`,describe:`List transformer versions`,builder:$,handler:async n=>c({command:`logpush transformers versions list`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let c={limit:n.limit};if(n.dryRun){o({command:`cf logpush transformers versions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logpush/transformers/${n[`transformer-id`]==null?`<transformer-id>`:encodeURIComponent(String(n[`transformer-id`]))}/versions`,pathParams:{"transformer-id":String(n[`transformer-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(n),u=n.local?e:await r();n.accountId=u,a(await s(`Loading`,async()=>l.logpush.transformers.versions.list({account_id:u,transformer_id:n[`transformer-id`],...c})),{successLabel:`Loaded`})})},he={command:`versions`,describe:`Operations for transformers.versions`,builder:e=>e.command(me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ge={command:`transformers`,describe:`Operations for transformers`,builder:e=>e.command(re).command(ae).command(se).command(le).command(de).command(pe).command(Q).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`logpush`,describe:`logpush`,builder:e=>e.command(y).command(A).command(I).command(W).command(Y).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_e as default};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B5oRPTEN.mjs";import{a as t,i as n,t as r}from"./context-CEOHpZgd.mjs";import{a as i,r as a}from"./auth-BIr56Mbx.mjs";import{t as o}from"./output-CvQFJkvi.mjs";import{t as s}from"./dry-run-Bq0JAsbX.mjs";import{t as c}from"./progress-A61dRbXl.mjs";import{t as l}from"./run-CIJTelJL.mjs";import"./telemetry-Q3_UmwHj.mjs";import{n as u,r as d,t as f}from"./body-parser-hh2avzkz.mjs";import{n as p,t as m}from"./input-validation-Dk52b0me.mjs";import{a as h,n as g}from"./prompt-CGUzvBgY.mjs";import{t as _}from"./cli-types-DoVT5q_M.mjs";function v(e){return e.usage(`$0 logs datasets available
|
|
3
|
+
|
|
4
|
+
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.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`available`,describe:`List available account or zone datasets`,builder:v,handler:async i=>l({command:`logs datasets available`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets available`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/available`,pathParams:{"account-or-zone":String(n),"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 n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.available({account_or_zone:u,account_or_zone_id:d})),{successLabel:`Loaded`})})};function b(e){return e.usage(`$0 logs datasets create
|
|
5
|
+
|
|
6
|
+
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/`).option(`dataset`,{type:`string`,description:"Dataset type name to create (e.g. `http_requests`)."}).option(`fields`,{type:`string`,description:`Controls which fields the API ingests. Defaults to all available
|
|
7
|
+
fields when absent.
|
|
8
|
+
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are ingested.
|
|
9
|
+
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
10
|
+
for syntax and examples.
|
|
11
|
+
`}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. Defaults to\n`true` for supported datasets when omitted. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`create`,describe:`Create an account or zone dataset`,builder:b,handler:async i=>l({command:`logs datasets create`,classification:{safeFlags:[`filter-attack-traffic`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`json`,body:i.body===void 0?f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`),filter_attack_traffic:i[`filter-attack-traffic`]}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,g=m===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(m===`zones`?i.zoneId=g:i.accountId=g,i.body){let e=u(i.body);o(await c(`Creating`,async()=>l.logs.datasets.create({...e,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`});return}i.dataset===void 0&&(i.dataset=await h(`dataset`,"Dataset type name to create (e.g. `http_requests`)."));let _=f({dataset:p(i.dataset,`dataset`,`text`),fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`),filter_attack_traffic:i[`filter-attack-traffic`]});o(await c(`Creating`,async()=>l.logs.datasets.create({..._,account_or_zone:m,account_or_zone_id:g})),{successLabel:`Created`})})};function S(e){return e.usage(`$0 logs datasets delete <dataset-id>
|
|
12
|
+
|
|
13
|
+
Deletes a Log Explorer dataset for the account or zone. Dataset deletion must not be protected.`).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 C={command:`delete <dataset-id>`,describe:`Delete an account or zone dataset`,builder:S,handler:async i=>l({command:`logs datasets delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"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 n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(u===`zones`?i.zoneId=d:i.accountId=d,!await g({force:!!i.force,message:`This operation deletes a Log Explorer dataset for the account.`})){process.stderr.write(`Aborted.
|
|
14
|
+
`);return}o(await c(`Deleting`,async()=>l.logs.datasets.delete({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Deleted`})})};function w(e){return e.usage(`$0 logs datasets get <dataset-id>
|
|
15
|
+
|
|
16
|
+
Retrieve a single Log Explorer dataset by ID for the account or zone.`).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 T={command:`get <dataset-id>`,describe:`Get an account or zone dataset`,builder:w,handler:async i=>l({command:`logs datasets get`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"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 n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.logs.datasets.get({account_or_zone:u,account_or_zone_id:d,dataset_id:i[`dataset-id`]})),{successLabel:`Loaded`})})};function E(e){return e.usage("$0 logs datasets list\n\nReturns 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.").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 D={command:`list`,describe:`List account or zone datasets`,builder:E,handler:async i=>l({command:`logs datasets list`,classification:{safeFlags:[`include-zones`,`dry-run`]}},i,async()=>{let l={include_zones:i[`include-zones`]};if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets`,pathParams:{"account-or-zone":String(n),"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 n({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await r();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.logs.datasets.list({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 logs datasets update <dataset-id>
|
|
17
|
+
|
|
18
|
+
Updates the enabled state and/or field configuration of an account or zone dataset.`).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(`fields`,{type:`string`,description:`Controls which fields the API ingests after the update. Defaults
|
|
19
|
+
to all available fields when absent.
|
|
20
|
+
. Provide as a JSON array of objects or @path/to/file.json.`}).option(`filter`,{type:`string`,description:`Optional Logpush filter predicate to restrict which events are
|
|
21
|
+
ingested. If omitted, the existing filter is left unchanged. Set
|
|
22
|
+
to an empty string (\`""\`) to clear the filter. Otherwise,
|
|
23
|
+
replaces the dataset's filter entirely.
|
|
24
|
+
See [Logpush filters](https://developers.cloudflare.com/logs/reference/filters/)
|
|
25
|
+
for syntax and examples.
|
|
26
|
+
`}).option(`filter-attack-traffic`,{type:`boolean`,description:"Whether to filter attack traffic from the Logpush job. If omitted,\nthe existing setting is left unchanged. Supported datasets are\n`http_requests`, `firewall_events`, and `network_analytics_logs`.\n"}).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 k={command:`update <dataset-id>`,describe:`Update an account or zone dataset`,builder:O,handler:async i=>l({command:`logs datasets update`,classification:{safeFlags:[`deletion-protection`,`enabled`,`filter-attack-traffic`,`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await t():void 0,n=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf logs datasets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/datasets/${i[`dataset-id`]==null?`<dataset-id>`:encodeURIComponent(String(i[`dataset-id`]))}`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r),"dataset-id":String(i[`dataset-id`]??``)},bodyKind:`json`,body:i.body===void 0?f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`),filter_attack_traffic:i[`filter-attack-traffic`]}):u(i.body)});return}let l=await a(i),m=i.zone===void 0?`accounts`:`zones`,h=m===`zones`?await n({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await r();if(m===`zones`?i.zoneId=h:i.accountId=h,i.body){let e=u(i.body);o(await c(`Updating`,async()=>l.logs.datasets.update({...e,account_or_zone:m,account_or_zone_id:h,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 g=f({deletion_protection:i[`deletion-protection`],enabled:i.enabled,fields:d(i.fields,`fields`),filter:p(i.filter,`filter`,`text`),filter_attack_traffic:i[`filter-attack-traffic`]});o(await c(`Updating`,async()=>l.logs.datasets.update({...g,account_or_zone:m,account_or_zone_id:h,dataset_id:i[`dataset-id`]})),{successLabel:`Updated`})})},A={command:`datasets`,describe:`Operations for datasets`,builder:e=>e.command(y).command(x).command(C).command(T).command(D).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function j(e){return e.usage(`$0 logs list get
|
|
27
|
+
|
|
28
|
+
Lists R2 objects containing logs matching the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`limit`,{type:`number`,description:`Maximum number of results to return.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get`,describe:`List log files`,builder:j,handler:async n=>l({command:`logs list get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let l={start:n.start,end:n.end,bucket:n.bucket,prefix:n.prefix,limit:n.limit},u={};if(n[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(n[`r2-access-key-id`])),n[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(n[`r2-secret-access-key`])),n.dryRun){s({command:`cf logs list get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/list`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(n),f=n.local?e:await r();n.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/list`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},N={command:`list`,describe:`Operations for list`,builder:e=>e.command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage(`$0 logs query
|
|
29
|
+
|
|
30
|
+
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/`).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:`query`,describe:`Run a log query`,builder:P,handler:async u=>l({command:`logs query`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){let e=u.zone===void 0?await t():void 0,n=u.zone===void 0?`accounts`:`zones`,r=u.zone??e??`<account-id>`;s({command:`cf logs query`,method:`POST`,url:`https://api.cloudflare.com/client/v4/${n}/${r}/logs/explorer/query/sql`,pathParams:{"account-or-zone":String(n),"account-or-zone-id":String(r)},bodyKind:`octet-stream`,body:u.body});return}let l=await a(u),d=u.zone===void 0?`accounts`:`zones`,f=d===`zones`?await n({zone:u.zone},l,{quiet:u.quiet}):u.local?e:await r();if(d===`zones`?u.zoneId=f:u.accountId=f,u.file){let e=m(u.file);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}if(u.body){let e=p(u.body,`body`,`binary`);o(await c(`Loading`,async()=>i(l,`POST`,`/${d}/${f}/logs/explorer/query/sql`,{body:e,headers:{"Content-Type":`text/plain`}})),{successLabel:`Loaded`});return}o(await c(`Loading`,async()=>l.logs.query({account_or_zone:d,account_or_zone_id:f})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 logs rayid get <ray-id>
|
|
31
|
+
|
|
32
|
+
The \`/rayids\` api route allows lookups by specific rayid. The rayids route will return zero, one, or more records (ray ids are not unique).`).positional(`ray-id`,{type:`string`,description:`Ray identifier.`,demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <ray-id>`,describe:`Get logs RayIDs`,builder:_(I),handler:async e=>l({command:`logs rayid get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={fields:e.fields,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs rayid get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/rayids/${e[`ray-id`]==null?`<ray-id>`:encodeURIComponent(String(e[`ray-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"ray-id":String(e[`ray-id`]??``)},query:t,bodyKind:`none`});return}let r=await a(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.rayid.get({zone_id:i,ray_id:e[`ray-id`],...t})),{successLabel:`Loaded`})})},R={command:`rayid`,describe:`Operations for rayid`,builder:e=>e.command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function z(e){return e.usage(`$0 logs received fields get
|
|
33
|
+
|
|
34
|
+
Lists all fields available. The response is json object with key-value pairs, where keys are field names, and values are descriptions.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`get`,describe:`List fields`,builder:z,handler:async e=>l({command:`logs received fields get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf logs received fields get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received/fields`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let t=await a(e),r=await n({zone:e.zone},t,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>t.logs.received.fields.get({zone_id:r})),{successLabel:`Loaded`})})},V={command:`fields`,describe:`Operations for received.fields`,builder:e=>e.command(B).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function H(e){return e.usage('$0 logs received get\n\nThe `/received` api route allows customers to retrieve their edge HTTP logs. The basic access pattern is "give me all the logs for zone Z for minute M", where the minute M refers to the time records were received at Cloudflare\'s central data center. `start` is inclusive, and `end` is exclusive. Because of that, to get all data, at minutely cadence, starting at 10AM, the proper values are: `start=2018-05-20T10:00:00Z&end=2018-05-20T10:01:00Z`, then `start=2018-05-20T10:01:00Z&end=2018-05-20T10:02:00Z` and so on; the overlap will be handled properly.').option(`start`,{type:`string`,description:`Sets the (inclusive) beginning of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. At this point in time, it cannot exceed a time in the past greater than seven days.`}).option(`end`,{type:`string`,description:"Sets the (exclusive) end of the requested time frame. This can be a unix timestamp (in seconds or nanoseconds), or an absolute timestamp that conforms to RFC 3339. `end` must be at least five minutes earlier than now and must be later than `start`. Difference between `start` and `end` must be not greater than one hour.",demandOption:!0}).option(`fields`,{type:`string`,description:"The `/received` route by default returns a limited set of fields, and allows customers to override the default field set by specifying individual fields. The reasons for this are: 1. Most customers require only a small subset of fields, but that subset varies from customer to customer; 2. Flat schema is much easier to work with downstream (importing into BigTable etc); 3. Performance (time to process, file size). If `?fields=` is not specified, default field set is returned. This default field set may change at any time. When `?fields=` is provided, each record is returned with the specified fields. `fields` must be specified as a comma separated list without any whitespaces, and all fields must exist. The order in which fields are specified does not matter, and the order of fields in the response is not specified."}).option(`sample`,{type:`number`,description:"When `?sample=` is provided, a sample of matching records is returned. If `sample=0.1` then 10% of records will be returned. Sampling is random: repeated calls will not only return different records, but likely will also vary slightly in number of returned records. When `?count=` is also specified, `count` is applied to the number of returned records, not the sampled records. So, with `sample=0.05` and `count=7`, when there is a total of 100 records available, approximately five will be returned. When there are 1000 records, seven will be returned. When there are 10,000 records, seven will be returned."}).option(`count`,{type:`number`,description:"When `?count=` is provided, the response will contain up to `count` results. Since results are not sorted, you are likely to get different data for repeated requests. `count` must be an integer > 0."}).option(`timestamps`,{type:`string`,description:"By default, timestamps in responses are returned as Unix nanosecond integers. The `?timestamps=` argument can be set to change the format in which response timestamps are returned. Possible values are: `unix`, `unixnano`, `rfc3339`. Note that `unix` and `unixnano` return timestamps as integers; `rfc3339` returns timestamps as strings.",choices:[`unix`,`unixnano`,`rfc3339`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get`,describe:`Get logs received`,builder:_(H),handler:async e=>l({command:`logs received get`,classification:{safeFlags:[`timestamps`,`dry-run`]}},e,async()=>{let t={start:e.start,end:e.end,fields:e.fields,sample:e.sample,count:e.count,timestamps:e.timestamps};if(e.dryRun){s({command:`cf logs received get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/logs/received`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:t,bodyKind:`none`});return}let r=await a(e),i=await n({zone:e.zone},r,{quiet:e.quiet});e.zoneId=i,o(await c(`Loading`,async()=>r.logs.received.get({zone_id:i,...t})),{successLabel:`Loaded`})})},W={command:`received`,describe:`Received log operations`,builder:e=>e.command(U).command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 logs retrieve get
|
|
35
|
+
|
|
36
|
+
Returns logs stored in R2 that match the provided query parameters.`).option(`start`,{type:`string`,description:`Start time in RFC3339 format.`,demandOption:!0}).option(`end`,{type:`string`,description:`End time in RFC3339 format.`,demandOption:!0}).option(`bucket`,{type:`string`,description:`R2 bucket name.`,demandOption:!0}).option(`prefix`,{type:`string`,description:`R2 bucket prefix logs are stored under.`}).option(`r2-access-key-id`,{type:`string`,description:`The R2-Access-Key-Id header`,demandOption:!0}).option(`r2-secret-access-key`,{type:`string`,description:`The R2-Secret-Access-Key header`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get`,describe:`Retrieve logs`,builder:G,handler:async n=>l({command:`logs retrieve get`,classification:{safeFlags:[`dry-run`]}},n,async()=>{let l={start:n.start,end:n.end,bucket:n.bucket,prefix:n.prefix},u={};if(n[`r2-access-key-id`]!==void 0&&(u[`R2-Access-Key-Id`]=String(n[`r2-access-key-id`])),n[`r2-secret-access-key`]!==void 0&&(u[`R2-Secret-Access-Key`]=String(n[`r2-secret-access-key`])),n.dryRun){s({command:`cf logs retrieve get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await t()??`<account-id>`}/logs/retrieve`,pathParams:{},query:l,bodyKind:`none`});return}let d=await a(n),f=n.local?e:await r();n.accountId=f,o(await c(`Loading`,async()=>i(d,`GET`,`/accounts/${f}/logs/retrieve`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Loaded`})})},q={command:`retrieve`,describe:`Operations for retrieve`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`logs`,describe:`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,builder:e=>e.command(F).command(A).command(N).command(R).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|