cf 1.0.0-beta.10 → 1.0.0-beta.12
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/bin/cf +1 -1
- package/dist/abuse-reports-Cy9RcWPu.mjs +24 -0
- package/dist/{access-D4DN4XZF.mjs → access-DwJm1qet.mjs} +1 -1
- package/dist/account-tags-d0RkEw6s.mjs +15 -0
- package/dist/accounts-BSd4b-1j.mjs +138 -0
- package/dist/{acm-OQqE8FMc.mjs → acm-BfI0p2sX.mjs} +8 -8
- package/dist/addressing-lfeJf7YB.mjs +93 -0
- package/dist/agent-context-DFEgYjEQ.mjs +2 -0
- package/dist/agent-memory-CP1qpn-y.mjs +34 -0
- package/dist/ai-audit-B_tSl78A.mjs +6 -0
- package/dist/ai-gateway-CJaUlfGc.mjs +82 -0
- package/dist/ai-jFzFBANM.mjs +29 -0
- package/dist/ai-search-PTlpY1T9.mjs +79 -0
- package/dist/ai-security-CKGE547U.mjs +10 -0
- package/dist/alerting-CuxoqG3S.mjs +56 -0
- package/dist/analytics-NPND7aHB.mjs +20 -0
- package/dist/analytics_engine-BoapM9wd.mjs +4 -0
- package/dist/ansi-styles-kSC6bEIq.mjs +2 -0
- package/dist/{api-security-CSuYMpMO.mjs → api-security-Nk_bg-Kg.mjs} +61 -61
- package/dist/{argo-DMfNmOV4.mjs → argo-DYfLQhd2.mjs} +5 -5
- package/dist/artifacts-BS6cEqCB.mjs +43 -0
- package/dist/{audit-logs-BrjNuiLx.mjs → audit-logs-x5tLqeX2.mjs} +2 -2
- package/dist/auth-AobvBmz4.mjs +2 -0
- package/dist/auth-CBtzZ3Sw.mjs +2 -0
- package/dist/auth-CKotxfap.mjs +2 -0
- package/dist/auth-token-CtguMdmF.mjs +8 -0
- package/dist/autoconfig-PfnbLuEO.mjs +532 -0
- package/dist/{banner-ClclgnBn.mjs → banner-D03JEqRs.mjs} +1 -1
- package/dist/basin-catalog-Ddi-t3q9.mjs +46 -0
- package/dist/billing-CDMc4tvX.mjs +23 -0
- package/dist/bot-management-UrCM3P8K.mjs +9 -0
- package/dist/botnet-feed-CVwRm42k.mjs +11 -0
- package/dist/brand-protection-DfNf5REj.mjs +27 -0
- package/dist/browser-run-DVaiBLYX.mjs +46 -0
- package/dist/build-BKPVP5ip.mjs +2 -0
- package/dist/build-C4giET85.mjs +2 -0
- package/dist/builds-BG5DHqU3.mjs +71 -0
- package/dist/cache-C05hHXUp.mjs +45 -0
- package/dist/{certificate-authorities-D_uAJH9B.mjs → certificate-authorities-DyCFmZwR.mjs} +3 -3
- package/dist/cf-B9aqZZKD.mjs +18 -0
- package/dist/chunk-AUSY7DKT-BJX6Fdc4.mjs +312 -0
- package/dist/chunk-FT2NMTJB-DQ7s3x7Q.mjs +361 -0
- package/dist/chunk-KKDV4JPS-D3kwd1Nq.mjs +2 -0
- package/dist/chunk-U6NEESU5-DqqRCaWH.mjs +2 -0
- package/dist/chunk-WMOON6TZ-C0dmPHpM.mjs +2 -0
- package/dist/{cli-BeXSqJAj.mjs → cli-D9qlPB-6.mjs} +1 -1
- package/dist/cli-exit-CstFZ1eJ.mjs +2 -0
- package/dist/{client-certificates-DqFcK_s1.mjs → client-certificates-B-m8rfM9.mjs} +7 -7
- package/dist/{client-side-security-DJXZ1XAu.mjs → client-side-security-M4oIUqID.mjs} +15 -15
- package/dist/cloud-connector-B63Dwn6n.mjs +6 -0
- package/dist/cloudflared-B48cfu95.mjs +2 -0
- package/dist/cloudforce-one-Dlc1GNFy.mjs +447 -0
- package/dist/{command-xU78ACNA.mjs → command-BQpXcGKV.mjs} +1 -1
- package/dist/{command-DUafPVUr.mjs → command-BWlpCtHe.mjs} +1 -1
- package/dist/{command-BOLlvEan.mjs → command-BlGILcTA.mjs} +1 -1
- package/dist/{command-K1-DZFJS.mjs → command-CKQlxypn.mjs} +1 -1
- package/dist/{command-C__qB2mo.mjs → command-CRl00uA2.mjs} +1 -1
- package/dist/{command-DZookrfw.mjs → command-CUkXxZsc.mjs} +1 -1
- package/dist/command-CXxh5Hce.mjs +2 -0
- package/dist/{command-BCag-xjk.mjs → command-CzvlHvov.mjs} +1 -1
- package/dist/{command-DxSJy_ym.mjs → command-DBaNgfA4.mjs} +1 -1
- package/dist/command-DEQSv-S1.mjs +2 -0
- package/dist/{command-BrHTpaji.mjs → command-DyE8v4sd.mjs} +1 -1
- package/dist/command-Rv2MR-eh.mjs +2 -0
- package/dist/{command-B6DqnUwt.mjs → command-SS1z_t68.mjs} +1 -1
- package/dist/{command-6YTtWltE.mjs → command-VuxpEvmH.mjs} +1 -1
- package/dist/{command-DzHL5LKI.mjs → command-ZBQ1WITj.mjs} +1 -1
- package/dist/{completions-Cm9brGAI.mjs → completions-lf50FBGm.mjs} +2 -2
- package/dist/connector-interrupts-DHN1KtUE.mjs +6 -0
- package/dist/connector-telemetry-events-CHg7FmXh.mjs +6 -0
- package/dist/connector-telemetry-snapshots-CSifYi9r.mjs +6 -0
- package/dist/connectors-0UwPUav-.mjs +15 -0
- package/dist/containers-DRzgE46U.mjs +375 -0
- package/dist/containers-DuIsM7lM.mjs +78 -0
- package/dist/{content-scan-C_ROsbTJ.mjs → content-scan-COyTz0Wb.mjs} +8 -8
- package/dist/{context-CEOHpZgd.mjs → context-Bwkz4Lm_.mjs} +2 -2
- package/dist/{cps-BPQqyL2E.mjs → cps-B7_BJaAU.mjs} +3 -3
- package/dist/{csamScanner-D-oO5cxT.mjs → csamScanner-jez2EYXC.mjs} +3 -3
- package/dist/ct-alerting-CACDrY0E.mjs +5 -0
- package/dist/{custom-certificates-DvnFBZdJ.mjs → custom-certificates-BBd92YlF.mjs} +8 -8
- package/dist/{custom-csrs-BZ8TXbuQ.mjs → custom-csrs-DTwBiNMX.mjs} +6 -6
- package/dist/{custom-hostnames-CTqf-KlT.mjs → custom-hostnames-DIWlqvN9.mjs} +15 -15
- package/dist/custom-nameservers-DISy8v8u.mjs +9 -0
- package/dist/custom-pages-BHXO_NFv.mjs +21 -0
- package/dist/d1-MvAQMvvo.mjs +89 -0
- package/dist/{dcv-delegation-yOtz90qE.mjs → dcv-delegation-Buq0hcm_.mjs} +2 -2
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-C4p6SzLH.mjs → deploy-BS47vZvJ.mjs} +1 -1
- package/dist/deploy-context-Cfushp8j.mjs +56 -0
- package/dist/{deploy-input-DTjBGloL.mjs → deploy-input-BAhS5LYx.mjs} +1 -1
- package/dist/{dev-BML-bpNU.mjs → dev-D8FGPKRt.mjs} +2 -2
- package/dist/diagnostics-ChDfJ-Gv.mjs +15 -0
- package/dist/{dialog-BlUXJKbA.mjs → dialog-CL1Zy4pn.mjs} +1 -1
- package/dist/discover-DIDEGKo3.mjs +2 -0
- package/dist/discover-P20XeGBF.mjs +2 -0
- package/dist/{dist-DW47TUGh.mjs → dist-8rP3V95o.mjs} +5 -5
- package/dist/dist-CYFkGHYv.mjs +487 -0
- package/dist/dls-8D00tqvC.mjs +17 -0
- package/dist/{dns-C9sUPsNt.mjs → dns-C-A5pwf3.mjs} +68 -68
- package/dist/{dns-firewall-EDiT-Zli.mjs → dns-firewall-DIiF4pro.mjs} +9 -9
- package/dist/dot-prop-IITUZ2XW-BnPfnQkb.mjs +2 -0
- package/dist/dotenv-DpXaxfho.mjs +4 -0
- package/dist/dry-run-DmsbOMF1.mjs +2 -0
- package/dist/durable-objects-CnIqbj84.mjs +6 -0
- package/dist/{email-auth-BgvoEHJk.mjs → email-auth-v97Md32E.mjs} +3 -3
- package/dist/{email-routing-Bggn219w.mjs → email-routing-I29RG4hb.mjs} +24 -24
- package/dist/{email-security-_t7rzrzd.mjs → email-security-BCarmbky.mjs} +86 -86
- package/dist/email-sending-CsHk2HAJ.mjs +47 -0
- package/dist/error-sanitization-BWnGnB73.mjs +2 -0
- package/dist/error-sanitization-C_a2LxOK.mjs +2 -0
- package/dist/errors-_sob7Ihu.mjs +3 -0
- package/dist/fieldExtractors-GIVe9jZa.mjs +9 -0
- package/dist/{firewall-CZEN8iA_.mjs → firewall-DpgFqJr3.mjs} +19 -19
- package/dist/flagship-BVaXXlsX.mjs +28 -0
- package/dist/{fraud-9_9hobAh.mjs → fraud-B5GQdEF2.mjs} +3 -3
- package/dist/{generate-CLqGOlOx.mjs → generate-CeeWW3eX.mjs} +1 -1
- package/dist/generate-D80-1GnZ.mjs +2 -0
- package/dist/{google-tag-gateway-O_N0vHRY.mjs → google-tag-gateway-C4O61lp-.mjs} +3 -3
- package/dist/gt-3bcLGJ7V.mjs +3 -0
- package/dist/{healthchecks-Bt3Gw_JZ.mjs → healthchecks-BwYMnKSF.mjs} +12 -12
- package/dist/{hostnames-DdOube3R.mjs → hostnames-DhrGRFeI.mjs} +6 -6
- package/dist/{hyperdrive-C14NAh9l.mjs → hyperdrive-DAA8Fazg.mjs} +10 -10
- package/dist/iam-sRKDU2Z3.mjs +52 -0
- package/dist/images-DXdekLVs.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/init-j47MT4Qe.mjs +39 -0
- package/dist/intel-CnVeSjIS.mjs +76 -0
- package/dist/interactive-Dqv0RWVU.mjs +42 -0
- package/dist/interactive-Wpd3FcDc.mjs +2 -0
- package/dist/{ips-PT_uQKAf.mjs → ips-COCUG8mk.mjs} +2 -2
- package/dist/k2-CmHkArHL.mjs +13 -0
- package/dist/{keyless-certificates-BHvas2q1.mjs → keyless-certificates-l2_S__h3.mjs} +7 -7
- package/dist/keys-CDZreums.mjs +4 -0
- package/dist/kv-DkpKVimq.mjs +15 -0
- package/dist/{lazy-command-glNW3jzf.mjs → lazy-command-_vZGz6mv.mjs} +1 -1
- package/dist/{leaked-credential-checks-De9hI1rl.mjs → leaked-credential-checks-edbapECI.mjs} +10 -10
- package/dist/lifecycle-oud60haK.mjs +2 -0
- package/dist/{load-balancers-Cs6bUHS1.mjs → load-balancers-C5YMvhXD.mjs} +40 -40
- package/dist/{local-B5oRPTEN.mjs → local-C0lQ9sTg.mjs} +1 -1
- package/dist/local-D5L5Bwju.mjs +2 -0
- package/dist/{local-runtime-CZnegFEM.mjs → local-runtime-DtnWXN0a.mjs} +1 -1
- package/dist/login-BrjOuHKu.mjs +5 -0
- package/dist/login-DeOM4v0L.mjs +2 -0
- package/dist/logo-matches-CF8321pb.mjs +6 -0
- package/dist/logos-Bd8xNRKW.mjs +7 -0
- package/dist/logpush-BYk3qqwY.mjs +46 -0
- package/dist/logs-Jcj2NN8H.mjs +36 -0
- package/dist/magic-cloud-networking-Dgdb9H0f.mjs +71 -0
- package/dist/magic-network-monitoring-CxVU4MZB.mjs +36 -0
- package/dist/magic-transit-KDyfUgTv.mjs +383 -0
- package/dist/managed-defense-CxaDeNUd.mjs +18 -0
- package/dist/{managed-transforms-CCpUz4TY.mjs → managed-transforms-C7rT5E-x.mjs} +5 -5
- package/dist/{matches-BSiYXs99.mjs → matches-BtKqG8T9.mjs} +3 -3
- package/dist/{mcp-CCMiS75R.mjs → mcp-QDd1Iyc0.mjs} +17 -17
- package/dist/mesh-DtrIzl5z.mjs +26 -0
- package/dist/metadata-Df5kCWJv.mjs +2 -0
- package/dist/{migrate-BJ9Go_wP.mjs → migrate-DHlfR_gZ.mjs} +1 -1
- package/dist/{monetization-CFf_lb6x.mjs → monetization-pLalYYMI.mjs} +11 -11
- package/dist/mtls-certificates-DYA9Wu-c.mjs +13 -0
- package/dist/network-DrJxPWXQ.mjs +50 -0
- package/dist/{network-interconnects-YiRUBbjx.mjs → network-interconnects-D73MlYG8.mjs} +19 -19
- package/dist/{oauth-cNZUky3h.mjs → oauth-B08YQ4xq.mjs} +2 -2
- package/dist/{oauth-DxGgIwFc.mjs → oauth-TGbM1Q0V.mjs} +1 -1
- package/dist/oauth-clients-CkPDLFd-.mjs +16 -0
- package/dist/{oauth-scopes-xl-pcWdg.mjs → oauth-scopes-VgliqcQe.mjs} +2 -2
- package/dist/observability-CvN9oxAo.mjs +80 -0
- package/dist/open-PCXX3ZDZ-D55O2jpQ.mjs +4 -0
- package/dist/{organization-Dbom1gTR.mjs → organization-DIwqRBBV.mjs} +16 -16
- package/dist/{organizations-OUMVsuen.mjs → organizations-Dk0D9ukm.mjs} +2 -2
- package/dist/{origin-ca-certificates-B3-T0-Nn.mjs → origin-ca-certificates-BSFqMTn-.mjs} +5 -5
- package/dist/{origin-post-quantum-encryption-CGB6AfPa.mjs → origin-post-quantum-encryption-BOKWKDTY.mjs} +3 -3
- package/dist/{origin-tls-client-auth-CgzzfAWr.mjs → origin-tls-client-auth-BzE3WpcN.mjs} +16 -16
- package/dist/output-BGqhvqe2.mjs +2 -0
- package/dist/{page-rules-B9BQKU4_.mjs → page-rules-BKaU37cM.mjs} +8 -8
- package/dist/pages-2Xg-lrMf.mjs +54 -0
- package/dist/pay-per-crawl-5-KTQXRr.mjs +65 -0
- package/dist/pay-per-use-sGebKzNK.mjs +6 -0
- package/dist/pipelines-BM-T7mMK.mjs +44 -0
- package/dist/precursor-DmQ32-Sp.mjs +4 -0
- package/dist/previews-DDQ9ACDJ.mjs +4 -0
- package/dist/{progress-A61dRbXl.mjs → progress-BYVZuEcG.mjs} +1 -1
- package/dist/{prompt-CGUzvBgY.mjs → prompt-F5wxc8zq.mjs} +1 -1
- package/dist/queries-DPBkVynK.mjs +9 -0
- package/dist/queues-CCXRs98q.mjs +57 -0
- package/dist/r2-BKuBSW8h.mjs +125 -0
- package/dist/{radar-CU4T02Ag.mjs → radar-Gv1yFoRX.mjs} +150 -150
- package/dist/raw-fetch-DyYWa923.mjs +2 -0
- package/dist/realtime-CVl-rvgx.mjs +172 -0
- package/dist/registrar-sandbox-cmOYDnkp.mjs +56 -0
- package/dist/registrar-swlnh22i.mjs +43 -0
- package/dist/{registry-Cg5lP8oo.mjs → registry-C20J1MW0.mjs} +1 -1
- package/dist/reporting-Bgwsvol1.mjs +14 -0
- package/dist/request-headers-CUee83pa.mjs +2 -0
- package/dist/request-tracers-BBiJvVDz.mjs +4 -0
- package/dist/resolve-DvxgnWjL.mjs +2 -0
- package/dist/resolve-qwL1LmKN.mjs +2 -0
- package/dist/resource-sharing-C1JiYLbl.mjs +40 -0
- package/dist/resource-tagging-C9VOSlDR.mjs +4 -0
- package/dist/rules-BDunCGMj.mjs +18 -0
- package/dist/{rulesets-HOOnxHZZ.mjs → rulesets-BMGxrnv9.mjs} +20 -20
- package/dist/rum-B7XiECe9.mjs +30 -0
- package/dist/run-CrZgB8L_.mjs +2 -0
- package/dist/run-nNxXb_Cv.mjs +2 -0
- package/dist/schema-DC0kdqgV.mjs +2 -0
- package/dist/schema-flags-BUZR9SLd.mjs +5 -0
- package/dist/scim-CORcs2wK.mjs +18 -0
- package/dist/secrets-store-BoZQaFey.mjs +24 -0
- package/dist/security-insights-DblK_6sg.mjs +40 -0
- package/dist/{security-txt-Fnl3LdSn.mjs → security-txt-Dl7RPnRb.mjs} +5 -5
- package/dist/{session-CZTuHcbm.mjs → session-BWe9et4K.mjs} +1 -1
- package/dist/shared-0N31BXkY.mjs +2 -0
- package/dist/{smart-shield-DB0E7cZI.mjs → smart-shield-DX0-8ruu.mjs} +13 -13
- package/dist/snippets-BFN-Lg3K.mjs +20 -0
- package/dist/source-mXUcrTVw.mjs +6 -0
- package/dist/spawn-DZ9A-xXb.mjs +10 -0
- package/dist/{spectrum-DtG0jYjE.mjs → spectrum-HYWLWB0X.mjs} +12 -12
- package/dist/{speed-B-RiNHGK.mjs → speed-Dj0YhfRe.mjs} +13 -13
- package/dist/src-CAiZlihY.mjs +117 -0
- package/dist/{ssl-DBVpCZAM.mjs → ssl-BQL1fNtD.mjs} +17 -17
- package/dist/startup-profile-0X5ebbng.mjs +29 -0
- package/dist/startup-profile-CXnsF4c7.mjs +2 -0
- package/dist/state-BA2CanJ_.mjs +2 -0
- package/dist/{state-BaGRaYow.mjs → state-Dy6-rKNd.mjs} +1 -1
- package/dist/stream-DKv2TtZN.mjs +102 -0
- package/dist/submit-Byt2KBGI.mjs +4 -0
- package/dist/{tags--eph7JbN.mjs → tags-BIBsdG68.mjs} +2 -2
- package/dist/telemetry-DBXOMuLh.mjs +2 -0
- package/dist/{telemetry-51etasAu.mjs → telemetry-bu3txnIR.mjs} +1 -1
- package/dist/{tenant-Bj-He2xO.mjs → tenant-Bs4Ac4n3.mjs} +5 -5
- package/dist/{tenant-custom-nameservers-B5IIIwbz.mjs → tenant-custom-nameservers-DcaELeCE.mjs} +4 -4
- package/dist/{theme-BIWQFmZ0.mjs → theme-CQ_TYifs.mjs} +2 -2
- package/dist/{tools-BJZ0DDlL.mjs → tools-BbTX7rlM.mjs} +1 -1
- package/dist/tunnels-DWcrz9Sf.mjs +29 -0
- package/dist/turnstile-2MIGp2ce.mjs +33 -0
- package/dist/{ui-BQxRjahW.mjs → ui-YmjF66Ct.mjs} +1 -1
- package/dist/update-check-B-CvDAUz.mjs +2 -0
- package/dist/update-check-CfB0PNTY.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-B8udoxlx.mjs +4 -0
- package/dist/{url-normalization-BpGDUUQc.mjs → url-normalization-C6AdWtaE.mjs} +5 -5
- package/dist/url-scanner-Dg0c_yVb.mjs +16 -0
- package/dist/{user-B6P5_OjP.mjs → user-BLZ-0Bgv.mjs} +51 -51
- package/dist/values-BUK-m0Jg.mjs +4 -0
- package/dist/vectorize-DEUSEQXY.mjs +32 -0
- package/dist/version-BZNc7Y3t.mjs +2 -0
- package/dist/waiting-rooms-BycGk2Y0.mjs +53 -0
- package/dist/{web-assets-yaKxN4w_.mjs → web-assets-CLZdWOmN.mjs} +35 -35
- package/dist/{web3-Bu9c_QAt.mjs → web3-DjeavuLg.mjs} +15 -15
- package/dist/workers-C_SfyU-v.mjs +38 -0
- package/dist/workers-builds-COn5Ne5G.mjs +14 -0
- package/dist/workers-for-platforms-tchCXwNF.mjs +42 -0
- package/dist/{workers-vpc-C1oUHHqk.mjs → workers-vpc-CKts8Av0.mjs} +7 -7
- package/dist/workflows-BibtWuOx.mjs +43 -0
- package/dist/{wrangler-migration-CJEb9hY3.mjs → wrangler-migration-BpJqCFAa.mjs} +1 -1
- package/dist/zaraz-BvQZB0YY.mjs +22 -0
- package/dist/zero-trust-FStq4uhn.mjs +821 -0
- package/dist/{zone-uJwRLSnn.mjs → zone-tymlghWb.mjs} +2 -2
- package/dist/{zones-Dpofsnth.mjs → zones-Bz6dgT9_.mjs} +47 -47
- package/package.json +25 -21
- package/dist/abuse-reports-BhSTEz7h.mjs +0 -24
- package/dist/account-tags-BWEIZLID.mjs +0 -15
- package/dist/accounts-ZQvIqGJz.mjs +0 -138
- package/dist/addressing-DCFm17JQ.mjs +0 -93
- package/dist/agent-context-GRiQ4zRU.mjs +0 -2
- package/dist/agent-memory-BtfPt2me.mjs +0 -34
- package/dist/ai-B0_sZbmy.mjs +0 -29
- package/dist/ai-audit-DaubuhYF.mjs +0 -6
- package/dist/ai-gateway-CJ-1Dzzr.mjs +0 -82
- package/dist/ai-search-Dywa1kqX.mjs +0 -79
- package/dist/ai-security-2wxMPqKS.mjs +0 -10
- package/dist/alerting-yad9DYRv.mjs +0 -56
- package/dist/analytics-DKNw2fVc.mjs +0 -20
- package/dist/analytics_engine-BA3kF46s.mjs +0 -4
- package/dist/ansi-styles-eKEZXVwN.mjs +0 -2
- package/dist/artifacts-Cb3hwClm.mjs +0 -43
- package/dist/auth-BBlAI8HG.mjs +0 -2
- package/dist/auth-BIr56Mbx.mjs +0 -8
- package/dist/autoconfig-DPUztTL2.mjs +0 -511
- package/dist/basin-catalog-BLsQhJP4.mjs +0 -46
- package/dist/billing-CRwD7oQS.mjs +0 -23
- package/dist/bot-management-CyW8F8Wm.mjs +0 -9
- package/dist/botnet-feed-BBKsxf3Y.mjs +0 -11
- package/dist/brand-protection-DSeD8LXl.mjs +0 -27
- package/dist/browser-run-BAcUTwB4.mjs +0 -46
- package/dist/build-B5UYMEQH.mjs +0 -2
- package/dist/build-DLZ9gBNA.mjs +0 -2
- package/dist/builds-W1HEG7Bv.mjs +0 -71
- package/dist/cache-B7E_PXUp.mjs +0 -45
- package/dist/cf-Bh_fTFIj.mjs +0 -18
- package/dist/chunk-FT2NMTJB-1VFYM1Ro.mjs +0 -97
- package/dist/chunk-KKDV4JPS-DdzLLtnl.mjs +0 -2
- package/dist/chunk-U6NEESU5-BhF4rnpx.mjs +0 -2
- package/dist/chunk-WMOON6TZ-D_ToS88f.mjs +0 -2
- package/dist/cli-exit-Dqoo6Jgb.mjs +0 -2
- package/dist/cloud-connector-Czg1GdQi.mjs +0 -6
- package/dist/cloudflared-DGuau-lC.mjs +0 -2
- package/dist/cloudforce-one-B1IhIZcp.mjs +0 -447
- package/dist/command-CAtsHc1V.mjs +0 -2
- package/dist/command-DfffeX-k.mjs +0 -2
- package/dist/command-TCklVvOY.mjs +0 -2
- package/dist/connector-interrupts-D93KTMkw.mjs +0 -6
- package/dist/connector-telemetry-events-D6CmKR14.mjs +0 -6
- package/dist/connector-telemetry-snapshots-WO9IUk0e.mjs +0 -6
- package/dist/connectors-DNT6GTW3.mjs +0 -15
- package/dist/containers-Btx7vCDP.mjs +0 -78
- package/dist/containers-Ce7IO-Ia.mjs +0 -239
- package/dist/ct-alerting-CnTRE1Fb.mjs +0 -5
- package/dist/custom-nameservers-B0CpnUVg.mjs +0 -9
- package/dist/custom-pages-DcoSGN56.mjs +0 -21
- package/dist/d1-m7UfzBzl.mjs +0 -41
- package/dist/diagnostics-hOvnx5DT.mjs +0 -15
- package/dist/discover-C5aiI6u0.mjs +0 -2
- package/dist/discover-DwczTkRX.mjs +0 -2
- package/dist/dist-BuCJ_55d.mjs +0 -366
- package/dist/dist-C3s9SXTd.mjs +0 -48
- package/dist/dls-v6DyEWTd.mjs +0 -17
- package/dist/dot-prop-IITUZ2XW-BilKo4kO.mjs +0 -2
- package/dist/dotenv-CcQjGlV0.mjs +0 -4
- package/dist/dry-run-Bq0JAsbX.mjs +0 -2
- package/dist/durable-objects-C01phVwL.mjs +0 -6
- package/dist/email-sending-_dKCs2VF.mjs +0 -47
- package/dist/error-sanitization-CJ5OLJrh.mjs +0 -2
- package/dist/error-sanitization-hmi1CqE5.mjs +0 -2
- package/dist/fieldExtractors-Cm5QnkE0.mjs +0 -9
- package/dist/flagship-B_SAI_ZL.mjs +0 -28
- package/dist/generate-BPqoDbck.mjs +0 -2
- package/dist/gt-DmcMNPX6.mjs +0 -2
- package/dist/iam-DUW7neMx.mjs +0 -52
- package/dist/images-B9dnr1z0.mjs +0 -71
- package/dist/init-BGcAIvV7.mjs +0 -39
- package/dist/intel-BQpZMck3.mjs +0 -76
- package/dist/interactive-C-o16XQs.mjs +0 -32
- package/dist/interactive-SgAjen2z.mjs +0 -2
- package/dist/k2-nPYti7Y0.mjs +0 -13
- package/dist/keys-O5kAW9ox.mjs +0 -4
- package/dist/kv-BUP_ZLM_.mjs +0 -15
- package/dist/lifecycle-C7tAC1Mn.mjs +0 -2
- package/dist/local-Bj-l0TP6.mjs +0 -2
- package/dist/login-C5nSIS-T.mjs +0 -2
- package/dist/login-CUup7w0e.mjs +0 -5
- package/dist/logo-matches-BkQKdu4Z.mjs +0 -6
- package/dist/logos-C_sv-boo.mjs +0 -7
- package/dist/logpush-NUcyMKHi.mjs +0 -46
- package/dist/logs-BZT4PlqZ.mjs +0 -36
- package/dist/magic-cloud-networking-DQnSdmgA.mjs +0 -71
- package/dist/magic-network-monitoring-pHTU6aS8.mjs +0 -36
- package/dist/magic-transit-5302bQNh.mjs +0 -383
- package/dist/managed-defense-8OEfDzuO.mjs +0 -18
- package/dist/mesh-DKBGTlCD.mjs +0 -26
- package/dist/metadata-C33s4rc-.mjs +0 -2
- package/dist/mtls-certificates-DsF3NFNs.mjs +0 -13
- package/dist/network-Bm0qYRqY.mjs +0 -50
- package/dist/oauth-clients-CP6alY0_.mjs +0 -16
- package/dist/observability-Bp71PtlD.mjs +0 -80
- package/dist/open-PCXX3ZDZ-BKRik1gi.mjs +0 -4
- package/dist/output-CvQFJkvi.mjs +0 -2
- package/dist/pages-DZPdyuT4.mjs +0 -54
- package/dist/pay-per-crawl-CnveMVDi.mjs +0 -65
- package/dist/pay-per-use-Bpxe8PHv.mjs +0 -6
- package/dist/pipelines-CHev3o5G.mjs +0 -44
- package/dist/precursor-C9PK9Bue.mjs +0 -4
- package/dist/previews-BIMI1dTz.mjs +0 -4
- package/dist/queries-f-btyefs.mjs +0 -9
- package/dist/queues-kLNdeb3q.mjs +0 -57
- package/dist/r2-D_awYx2p.mjs +0 -125
- package/dist/raw-fetch-CvkmFO23.mjs +0 -2
- package/dist/realtime-C0dvcBBM.mjs +0 -172
- package/dist/registrar-CHc-4vcf.mjs +0 -43
- package/dist/registrar-sandbox-Dq8LV2AI.mjs +0 -56
- package/dist/reporting-4u21g6Dk.mjs +0 -14
- package/dist/request-headers-D31kdxrQ.mjs +0 -2
- package/dist/request-tracers-CupJ_83j.mjs +0 -4
- package/dist/resolve-BCTrtcx7.mjs +0 -2
- package/dist/resolve-PZuJ878-.mjs +0 -2
- package/dist/resource-sharing-CO-Lh-u7.mjs +0 -40
- package/dist/resource-tagging-D0R5SzR6.mjs +0 -4
- package/dist/rules-BsmKzB9H.mjs +0 -18
- package/dist/rum-wcLEvVJl.mjs +0 -30
- package/dist/run-CIJTelJL.mjs +0 -2
- package/dist/run-quhbAvQi.mjs +0 -2
- package/dist/schema-GdBsV4P7.mjs +0 -2
- package/dist/schema-flags-D8vL2oiF.mjs +0 -5
- package/dist/scim-BkdJmAS8.mjs +0 -18
- package/dist/sdk-BCzcRJCi.mjs +0 -3
- package/dist/secrets-store-CHs0oYA0.mjs +0 -24
- package/dist/security-insights-vsl-4xFa.mjs +0 -40
- package/dist/shared-BS30oCf8.mjs +0 -2
- package/dist/snippets-CFaF_NyG.mjs +0 -20
- package/dist/source-38bULAR8.mjs +0 -6
- package/dist/spawn-B0Sl8lUu.mjs +0 -10
- package/dist/src-CM3XaB4p.mjs +0 -109
- package/dist/startup-profile-CLmojOrn.mjs +0 -2
- package/dist/startup-profile-CR7GMuLx.mjs +0 -17
- package/dist/state-CpXhcMdX.mjs +0 -2
- package/dist/stream-cAdBvpS1.mjs +0 -102
- package/dist/submit-Bkd7l2rK.mjs +0 -4
- package/dist/telemetry-Q3_UmwHj.mjs +0 -2
- package/dist/tunnels-CgtuRpcD.mjs +0 -29
- package/dist/turnstile-Bmcnrzw7.mjs +0 -33
- package/dist/update-check-BqSpgzHk.mjs +0 -2
- package/dist/update-check-DC0qP_8z.mjs +0 -2
- package/dist/url-info-DhVehaT8.mjs +0 -4
- package/dist/url-scanner-DiLdqsQk.mjs +0 -16
- package/dist/values-Cxx4Lxrd.mjs +0 -4
- package/dist/vectorize-YyxVpql-.mjs +0 -32
- package/dist/version-C0pInAZ9.mjs +0 -2
- package/dist/waiting-rooms-BdahlCdD.mjs +0 -53
- package/dist/workers-5GgoGA2e.mjs +0 -38
- package/dist/workers-builds-h-1FJjE1.mjs +0 -14
- package/dist/workers-for-platforms-CV9iRrp9.mjs +0 -42
- package/dist/workflows-dtMlkj1-.mjs +0 -43
- package/dist/zaraz-838AbMEX.mjs +0 -22
- package/dist/zero-trust-CYt-eELJ.mjs +0 -821
- /package/dist/{Page-CjJht2qT.mjs → Page-BShsqCXr.mjs} +0 -0
- /package/dist/{alerts-DY_7Nknx.mjs → alerts-BSON-vFh.mjs} +0 -0
- /package/dist/{args-CXgkQKK7.mjs → args-CfbYkeXd.mjs} +0 -0
- /package/dist/{autorag-K396-M2S.mjs → autorag-kNrLiqDX.mjs} +0 -0
- /package/dist/{body-parser-hh2avzkz.mjs → body-parser-DkHKPkJ7.mjs} +0 -0
- /package/dist/{brands-DeLbFxSt.mjs → brands-bBJgbbOH.mjs} +0 -0
- /package/dist/{browser-extension-C1zmKFDG.mjs → browser-extension-C1_fcw7h.mjs} +0 -0
- /package/dist/{clear-CRfI7WS7.mjs → clear-BW9vLgI3.mjs} +0 -0
- /package/dist/{cli-types-DoVT5q_M.mjs → cli-types-9oYmRTHJ.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-D8p_dR8s.mjs → connector-telemetry-events-latest-BQdOvbWh.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-COFmzmlk.mjs → connector-telemetry-snapshots-latest-CtdN_dGu.mjs} +0 -0
- /package/dist/{delegate-B6LetRpZ.mjs → delegate-Tgfxa-MZ.mjs} +0 -0
- /package/dist/{domain-info-aiwP60Fo.mjs → domain-info-BkcBcyfF.mjs} +0 -0
- /package/dist/{health-Bz33n-_F.mjs → health-CTaCeVyC.mjs} +0 -0
- /package/dist/{input-validation-Dk52b0me.mjs → input-validation-D7z60HJH.mjs} +0 -0
- /package/dist/{internal-BHrJbbdA.mjs → internal-BYS7hO8c.mjs} +0 -0
- /package/dist/{live-MeJQXIei.mjs → live-BJE_YWE1.mjs} +0 -0
- /package/dist/{project-settings-DO6njFg_.mjs → project-settings-nBMEx1f-.mjs} +0 -0
- /package/dist/{r2-data-catalog-2jQrdAdo.mjs → r2-data-catalog-BRo-Rx2I.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CU55zqCU.mjs → rate-limit-analytics-BiRyU0Xd.mjs} +0 -0
- /package/dist/{rate-limits-CZ-qHDPK.mjs → rate-limits-Cr2zpncO.mjs} +0 -0
- /package/dist/{ready-BOpbZ1pN.mjs → ready-B3pLxnjc.mjs} +0 -0
- /package/dist/{recent-submissions-KDqD2HyS.mjs → recent-submissions-JLOvuZq-.mjs} +0 -0
- /package/dist/{refute-DkF4XIMw.mjs → refute-Dp3VodMn.mjs} +0 -0
- /package/dist/{scan-logo-DQkf6glG.mjs → scan-logo-3Zr6CDJB.mjs} +0 -0
- /package/dist/{scan-page-CMOJ_E0n.mjs → scan-page-CxeudOzj.mjs} +0 -0
- /package/dist/{search-Bre1Zwn3.mjs → search-B_P5ZTQj.mjs} +0 -0
- /package/dist/{signed-url-24ZbX4yV.mjs → signed-url-D5RwvrQq.mjs} +0 -0
- /package/dist/{submission-info-BmkbZVqM.mjs → submission-info-_t78q2OE.mjs} +0 -0
- /package/dist/{total-queries-j8OAF_cE.mjs → total-queries-CPrKEciQ.mjs} +0 -0
- /package/dist/{tracked-domains-fe3EWYmF.mjs → tracked-domains-CTRItgFT.mjs} +0 -0
- /package/dist/{verify-CKgZYvln.mjs → verify-5KcvRk-q.mjs} +0 -0
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,i as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as l,r as u,t as d}from"./body-parser-DkHKPkJ7.mjs";import{n as f}from"./input-validation-D7z60HJH.mjs";import{a as p,i as m,n as h}from"./prompt-F5wxc8zq.mjs";import{t as ee}from"./cli-types-9oYmRTHJ.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
|
+
|
|
4
|
+
Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:te,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:i}));a(r,{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:i}));a(u,{successLabel:`Created`})})};function _(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
|
+
|
|
6
|
+
Changes the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const v={command:`edit`,describe:`Changes pay-per-crawl config for a zone`,builder:_,handler:async e=>c({command:`pay-per-crawl config edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Updating`,async()=>n.payPerCrawl.config.edit({body:c,zone_id:i}));a(u,{successLabel:`Updated`})})};function y(e){return e.usage(`$0 pay-per-crawl config get
|
|
7
|
+
|
|
8
|
+
Gets the pay-per-crawl config for a zone including the bot configuration.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Get the pay-per-crawl config`,builder:y,handler:async e=>c({command:`pay-per-crawl config get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.config.get({zone_id:i}));a(c,{successLabel:`Loaded`})})},x={command:`config`,describe:`Operations for config`,builder:e=>e.command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.usage(`$0 pay-per-crawl crawler stripe create
|
|
9
|
+
|
|
10
|
+
Creates the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`create`,describe:`Creates the stripe config for a crawler`,builder:S,handler:async r=>c({command:`pay-per-crawl crawler stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.crawler.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function w(e){return e.usage(`$0 pay-per-crawl crawler stripe delete
|
|
11
|
+
|
|
12
|
+
Deletes the stripe config for a crawler.`).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 T={command:`delete`,describe:`Deletes the stripe config for a crawler`,builder:w,handler:async r=>c({command:`pay-per-crawl crawler stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
13
|
+
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.crawler.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function E(e){return e.usage(`$0 pay-per-crawl crawler stripe get
|
|
14
|
+
|
|
15
|
+
Gets the stripe config for a crawler.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get`,describe:`Gets the stripe config for a crawler`,builder:E,handler:async r=>c({command:`pay-per-crawl crawler stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawler stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawler/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawler.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},O={command:`stripe`,describe:`Operations for crawler.stripe`,builder:e=>e.command(C).command(T).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},k={command:`crawler`,describe:`Operations for crawler`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.usage(`$0 pay-per-crawl crawlers list
|
|
16
|
+
|
|
17
|
+
Lists the crawlers known to pay-per-crawl.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`List pay-per-crawl crawlers`,builder:A,handler:async r=>c({command:`pay-per-crawl crawlers list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl crawlers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/crawlers`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.crawlers.list({account_id:l}));a(u,{successLabel:`Loaded`})})},M={command:`crawlers`,describe:`Operations for crawlers`,builder:e=>e.command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.usage(`$0 pay-per-crawl pay-per-use operator get-configuration
|
|
18
|
+
|
|
19
|
+
Gets the pay-per-use operator configuration for an account, including its read-only non-billable classification timestamp.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const P={command:`get-configuration`,describe:`Get pay-per-use operator configuration`,builder:N,handler:async r=>c({command:`pay-per-crawl pay-per-use operator get-configuration`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use operator get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.payPerUse.operator.getConfiguration({account_id:l}));a(u,{successLabel:`Loaded`})})};function F(e){return e.usage(`$0 pay-per-crawl pay-per-use operator set-configuration
|
|
20
|
+
|
|
21
|
+
Creates or updates the pay-per-use operator configuration for an account. Creating an enabled configuration or re-enabling a disabled operator requires completed Stripe onboarding; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration`})}const I={command:`set-configuration`,describe:`Set pay-per-use operator configuration`,builder:F,handler:async r=>c({command:`pay-per-crawl pay-per-use operator set-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use operator set-configuration`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({default_price_usd_microcents:r[`default-price-usd-microcents`],enabled:r.enabled,name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.setConfiguration({body:e,account_id:u}));a(t,{successLabel:`Updated`});return}if(r[`default-price-usd-microcents`]===void 0)throw Error(`--default-price-usd-microcents is required (or pass --body with this field set).`);if(r.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);r.name===void 0&&(r.name=await p(`name`,`The name field`));let m=d({default_price_usd_microcents:r[`default-price-usd-microcents`],enabled:r.enabled,name:f(r.name,`name`,`text`)}),h=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.setConfiguration({body:m,account_id:u}));a(h,{successLabel:`Updated`})})};function L(e){return e.usage(`$0 pay-per-crawl pay-per-use operator update-configuration
|
|
22
|
+
|
|
23
|
+
Updates one or more fields of an existing pay-per-use operator configuration. Re-enabling a disabled operator requires completed Stripe onboarding; an already-enabled operator is not affected by later Stripe status changes. A Cloudflare-verified operator's name and default price cannot be changed.`).option(`default-price-usd-microcents`,{type:`number`,description:`Default price in microcents. 1 USD = 100,000,000 microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator configuration update`})}const R={command:`update-configuration`,describe:`Update pay-per-use operator configuration`,builder:L,handler:async r=>c({command:`pay-per-crawl pay-per-use operator update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use operator update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/operator/configuration`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({default_price_usd_microcents:r[`default-price-usd-microcents`],enabled:r.enabled,name:f(r.name,`name`,`text`)}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.updateConfiguration({...e,account_id:u}));a(t,{successLabel:`Updated`});return}let p=d({default_price_usd_microcents:r[`default-price-usd-microcents`],enabled:r.enabled,name:f(r.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.operator.updateConfiguration({...p,account_id:u}));a(m,{successLabel:`Updated`})})},z={command:`operator`,describe:`Operations for pay-per-use.operator`,builder:e=>e.command(P).command(I).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing list-operators
|
|
24
|
+
|
|
25
|
+
Lists a paginated set of enabled pay-per-use operators with verified names, matching billing classification, and their prices for a zone.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const V={command:`list-operators`,describe:`List pay-per-use operators`,builder:B,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing list-operators`,classification:{safeFlags:[`dry-run`]}},e,async()=>{let n={page:e.page,per_page:e[`per-page`]};if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing list-operators`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},query:n,bodyKind:`none`});return}let i=await t(e),c=await r({zone:e.zone},i,{quiet:e.quiet});e.zoneId=c;let l=await s(`Loading`,async()=>i.payPerCrawl.payPerUse.pricing.listOperators({zone_id:c,...n}));a(l,{successLabel:`Loaded`})})};function H(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing opt-out-operator-price <operator-id>
|
|
26
|
+
|
|
27
|
+
Opts a zone out by scheduling the current accepted pay-per-use operator price to expire at the start of the next UTC month. Use the withdraw action for a pending proposal.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const U={command:`opt-out-operator-price <operator-id>`,describe:`Opt out of a pay-per-use operator price`,builder:H,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing opt-out-operator-price`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing opt-out-operator-price`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
28
|
+
`);return}let c=await s(`Deleting`,async()=>n.payPerCrawl.payPerUse.pricing.optOutOperatorPrice({zone_id:i,operator_id:e[`operator-id`]}));a(c,{successLabel:`Deleted`})})};function W(e){return e.usage(`$0 pay-per-crawl pay-per-use pricing set-operator-price <operator-id>
|
|
29
|
+
|
|
30
|
+
Proposes a required price, withdraws a pending proposal, accepts an operator's default pay-per-use price, or resumes an accepted price before its scheduled expiry. Propose, accept_default, and resume require an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications.`).positional(`operator-id`,{type:`string`,description:`Stable pay-per-use operator identifier.`,demandOption:!0}).option(`action`,{type:`string`,description:`The action field`,choices:[`propose`,`withdraw`,`accept_default`,`resume`]}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents. Must be a multiple of 100,000 ($0.001) between $0.001 and $9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use publisher price action`})}const G={command:`set-operator-price <operator-id>`,describe:`Set a pay-per-use operator price`,builder:W,handler:async e=>c({command:`pay-per-crawl pay-per-use pricing set-operator-price`,classification:{safeFlags:[`action`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use pricing set-operator-price`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/operators/${e[`operator-id`]==null?`<operator-id>`:encodeURIComponent(String(e[`operator-id`]))}/price`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"operator-id":String(e[`operator-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({action:f(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Creating`,async()=>n.payPerCrawl.payPerUse.pricing.setOperatorPrice({body:t,zone_id:i,operator_id:e[`operator-id`]}));a(r,{successLabel:`Created`});return}if(e.action===void 0&&(e.action=await m(`action`,`The action field`,[`propose`,`withdraw`,`accept_default`,`resume`])),e.action===`propose`&&e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({action:f(e.action,`action`,`text`),price_usd_microcents:e[`price-usd-microcents`]}),u=await s(`Creating`,async()=>n.payPerCrawl.payPerUse.pricing.setOperatorPrice({body:c,zone_id:i,operator_id:e[`operator-id`]}));a(u,{successLabel:`Created`})})},K={command:`pricing`,describe:`Operations for pay-per-use.pricing`,builder:e=>e.command(V).command(U).command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 pay-per-crawl pay-per-use proposals decide
|
|
31
|
+
|
|
32
|
+
Accepts or rejects the pending pay-per-use price proposal identified by price_id in the request body. Acceptance requires an enabled operator with a verified name, an enabled publisher zone, and matching billing classifications; rejection remains available for cleanup.`).option(`action`,{type:`string`,description:`The action field`,choices:[`accept`,`reject`]}).option(`price-id`,{type:`number`,description:`Pending pay-per-use price id returned in the operator proposal queue.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use operator proposal decision`})}const J={command:`decide`,describe:`Decide a pay-per-use price proposal`,builder:q,handler:async r=>c({command:`pay-per-crawl pay-per-use proposals decide`,classification:{safeFlags:[`action`,`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use proposals decide`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({action:f(r.action,`action`,`text`),price_id:r[`price-id`]}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.payPerCrawl.payPerUse.proposals.decide({...e,account_id:u}));a(t,{successLabel:`Created`});return}if(r.action===void 0&&(r.action=await m(`action`,`The action field`,[`accept`,`reject`])),r[`price-id`]===void 0)throw Error(`--price-id is required (or pass --body with this field set).`);let p=d({action:f(r.action,`action`,`text`),price_id:r[`price-id`]}),h=await s(`Creating`,async()=>c.payPerCrawl.payPerUse.proposals.decide({...p,account_id:u}));a(h,{successLabel:`Created`})})};function Y(e){return e.usage(`$0 pay-per-crawl pay-per-use proposals list
|
|
33
|
+
|
|
34
|
+
Lists a paginated set of outstanding pay-per-use publisher price proposals for an operator. Listing remains available while the operator is disabled or its name is unverified so proposals can be rejected.`).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const X={command:`list`,describe:`List pay-per-use price proposals`,builder:Y,handler:async r=>c({command:`pay-per-crawl pay-per-use proposals list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`]};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use proposals list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/proposals`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.payPerCrawl.payPerUse.proposals.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},Z={command:`proposals`,describe:`Operations for pay-per-use.proposals`,builder:e=>e.command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 pay-per-crawl pay-per-use usage-stats get-account
|
|
35
|
+
|
|
36
|
+
Returns reported usage and the full gross value across all Pay Per Use zones in a publisher account or zone over an explicit UTC range of at most 31 days. Usage from every domain and snapshotted price is summed by buyer. Ranges up to and including 7 days use hourly data points; longer ranges use daily data points. Because source data is aggregated hourly, both requested bounds are rounded down to the selected UTC interval and the resolved bounds are returned in the response. The resolved range must contain at least one complete interval. Empty periods are omitted. Buyers and their data points are paginated, while totals cover every buyer in the range. Values are raw usage counts and USD microcents; total_price_usd_microcents is the full value before the publisher revenue share.`).option(`since`,{type:`string`,description:`Requested inclusive beginning of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval.`,demandOption:!0}).option(`until`,{type:`string`,description:`Requested exclusive end of the statistics range as an RFC3339 timestamp. Rounded down to the selected UTC interval. The requested duration from since cannot exceed 31 days.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number.`}).option(`per-page`,{type:`number`,description:`Results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`get-account`,describe:`Get pay-per-use usage statistics`,builder:Q,handler:async l=>c({command:`pay-per-crawl pay-per-use usage-stats get-account`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={since:l.since,until:l.until,page:l.page,per_page:l[`per-page`]};if(l.dryRun){let e=l.zone===void 0?await n():void 0,t=l.zone===void 0?`accounts`:`zones`,r=l.zone??e??`<account-id>`;o({command:`cf pay-per-crawl pay-per-use usage-stats get-account`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/pay-per-use/usage-stats`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:c,bodyKind:`none`});return}let u=await t(l),d=l.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:l.zone},u,{quiet:l.quiet}):l.local?e:await i();d===`zones`?l.zoneId=f:l.accountId=f;let p=await s(`Loading`,async()=>u.payPerCrawl.payPerUse.usageStats.getAccount({account_or_zone:d,account_or_zone_id:f,...c}));a(p,{successLabel:`Loaded`})})},re={command:`usage-stats`,describe:`Operations for pay-per-use.usage-stats`,builder:e=>e.command(ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ie(e){return e.usage(`$0 pay-per-crawl pay-per-use zones get-can-be-enabled
|
|
37
|
+
|
|
38
|
+
Gets whether pay-per-use can be enabled for a zone and the current zone-level grace period.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`get-can-be-enabled`,describe:`Get pay-per-use zone eligibility`,builder:ie,handler:async e=>c({command:`pay-per-crawl pay-per-use zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.payPerUse.zones.getCanBeEnabled({zone_id:i}));a(c,{successLabel:`Loaded`})})};function oe(e){return e.usage(`$0 pay-per-crawl pay-per-use zones get-configuration
|
|
39
|
+
|
|
40
|
+
Gets the pay-per-use configuration, zone-level grace period, and read-only non-billable classification timestamp for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get-configuration`,describe:`Get pay-per-use zone configuration`,builder:oe,handler:async e=>c({command:`pay-per-crawl pay-per-use zones get-configuration`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones get-configuration`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.payPerUse.zones.getConfiguration({zone_id:i}));a(c,{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 pay-per-crawl pay-per-use zones set-can-be-enabled
|
|
41
|
+
|
|
42
|
+
Sets pay-per-use eligibility for a list of account zones. An omitted can_be_enabled value leaves that zone unchanged. Revoking eligibility disables the zone immediately while existing accepted licenses remain active until the start of the next UTC month.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone eligibility updates`})}const le={command:`set-can-be-enabled`,describe:`Set pay-per-use zone eligibility`,builder:ce,handler:async r=>c({command:`pay-per-crawl pay-per-use zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl pay-per-use zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:u(r.zones,`zones`)}):l(r.body)});return}let c=await t(r),f=r.local?e:await i();if(r.accountId=f,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.zones.setCanBeEnabled({...e,account_id:f}));a(t,{successLabel:`Updated`});return}if(r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(r.zones,`zones`)}),m=await s(`Updating`,async()=>c.payPerCrawl.payPerUse.zones.setCanBeEnabled({...p,account_id:f}));a(m,{successLabel:`Updated`})})};function ue(e){return e.usage(`$0 pay-per-crawl pay-per-use zones update-configuration
|
|
43
|
+
|
|
44
|
+
Enables or disables an existing pay-per-use zone configuration. Omitting enabled leaves the zone unchanged. Enabling a disabled zone requires completed publisher Stripe onboarding; an already-enabled zone is not affected by later Stripe status changes. Disabling starts a disabled period immediately while existing accepted licenses remain active until the start of the next UTC month; re-enabling before expiry clears the schedule and restores those licenses.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Pay-per-use zone configuration update`})}const de={command:`update-configuration`,describe:`Update pay-per-use zone configuration`,builder:ue,handler:async e=>c({command:`pay-per-crawl pay-per-use zones update-configuration`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl pay-per-use zones update-configuration`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-use/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled}):l(e.body)});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=i,e.body){let t=l(e.body),r=await s(`Updating`,async()=>n.payPerCrawl.payPerUse.zones.updateConfiguration({...t,zone_id:i}));a(r,{successLabel:`Updated`});return}let c=d({enabled:e.enabled}),u=await s(`Updating`,async()=>n.payPerCrawl.payPerUse.zones.updateConfiguration({...c,zone_id:i}));a(u,{successLabel:`Updated`})})},fe={command:`zones`,describe:`Operations for pay-per-use.zones`,builder:e=>e.command(ae).command(se).command(le).command(de).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},pe={command:`pay-per-use`,describe:`Operations for pay-per-use`,builder:e=>e.command(z).command(K).command(Z).command(re).command(fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function me(e){return e.usage(`$0 pay-per-crawl publisher stripe create
|
|
45
|
+
|
|
46
|
+
Creates the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`create`,describe:`Creates the stripe config for a publisher`,builder:me,handler:async r=>c({command:`pay-per-crawl publisher stripe create`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Creating`,async()=>c.payPerCrawl.publisher.stripe.create({account_id:l}));a(u,{successLabel:`Created`})})};function ge(e){return e.usage(`$0 pay-per-crawl publisher stripe delete
|
|
47
|
+
|
|
48
|
+
Deletes the stripe config for a publisher.`).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 _e={command:`delete`,describe:`Deletes the stripe config for a publisher`,builder:ge,handler:async r=>c({command:`pay-per-crawl publisher stripe delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();if(r.accountId=l,!await h({force:!!r.force})){process.stderr.write(`Aborted.
|
|
49
|
+
`);return}let u=await s(`Deleting`,async()=>c.payPerCrawl.publisher.stripe.delete({account_id:l}));a(u,{successLabel:`Deleted`})})};function ve(e){return e.usage(`$0 pay-per-crawl publisher stripe get
|
|
50
|
+
|
|
51
|
+
Gets the stripe config for a publisher.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ye={command:`get`,describe:`Gets the stripe config for a publisher`,builder:ve,handler:async r=>c({command:`pay-per-crawl publisher stripe get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl publisher stripe get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/publisher/stripe`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.publisher.stripe.get({account_id:l}));a(u,{successLabel:`Loaded`})})},be={command:`stripe`,describe:`Operations for publisher.stripe`,builder:e=>e.command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xe={command:`publisher`,describe:`Operations for publisher`,builder:e=>e.command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Se(e){return e.usage(`$0 pay-per-crawl terms get-signature-link
|
|
52
|
+
|
|
53
|
+
Gets a download link for the account's signed pay-per-crawl terms.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ce={command:`get-signature-link`,describe:`Get signed pay-per-crawl terms link`,builder:Se,handler:async r=>c({command:`pay-per-crawl terms get-signature-link`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature-link`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/signature_link`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.getSignatureLink({account_id:l}));a(u,{successLabel:`Loaded`})})};function we(e){return e.usage(`$0 pay-per-crawl terms get-signature
|
|
54
|
+
|
|
55
|
+
Gets the account's pay-per-crawl terms signature status.`).option(`remote`,{type:`boolean`,description:`Refresh the signature status from Ironclad.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get-signature`,describe:`Get pay-per-crawl terms signature status`,builder:we,handler:async r=>c({command:`pay-per-crawl terms get-signature`,classification:{safeFlags:[`remote`,`dry-run`]}},r,async()=>{let c={remote:r.remote};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get-signature`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Loading`,async()=>l.payPerCrawl.terms.getSignature({account_id:u,...c}));a(d,{successLabel:`Loaded`})})};function Ee(e){return e.usage(`$0 pay-per-crawl terms get
|
|
56
|
+
|
|
57
|
+
Gets the pay-per-crawl terms and conditions contract.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get`,describe:`Get pay-per-crawl terms`,builder:Ee,handler:async r=>c({command:`pay-per-crawl terms get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms`,pathParams:{},bodyKind:`none`});return}let c=await t(r),l=r.local?e:await i();r.accountId=l;let u=await s(`Loading`,async()=>c.payPerCrawl.terms.get({account_id:l}));a(u,{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 pay-per-crawl terms send-signature-event
|
|
58
|
+
|
|
59
|
+
Records that an account displayed or agreed to the pay-per-crawl terms.`).option(`event-type`,{type:`string`,description:`The terms activity to record.`,choices:[`agreed`,`displayed`],demandOption:!0}).option(`vid`,{type:`string`,description:`Ironclad contract version ID.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Oe={command:`send-signature-event`,describe:`Record pay-per-crawl terms activity`,builder:ee($),handler:async r=>c({command:`pay-per-crawl terms send-signature-event`,classification:{safeFlags:[`event-type`,`dry-run`]}},r,async()=>{let c={event_type:r[`event-type`],vid:r.vid};if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl terms send-signature-event`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/terms/signature`,pathParams:{},query:c,bodyKind:`none`});return}let l=await t(r),u=r.local?e:await i();r.accountId=u;let d=await s(`Creating`,async()=>l.payPerCrawl.terms.sendSignatureEvent({account_id:u,...c}));a(d,{successLabel:`Created`})})},ke={command:`terms`,describe:`Operations for terms`,builder:e=>e.command(De).command(Te).command(Ce).command(Oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ae(e){return e.usage(`$0 pay-per-crawl zones get-can-be-enabled
|
|
60
|
+
|
|
61
|
+
Gets whether pay-per-crawl can be enabled for a zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const je={command:`get-can-be-enabled`,describe:`Get pay-per-crawl zone eligibility`,builder:Ae,handler:async e=>c({command:`pay-per-crawl zones get-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl zones get-can-be-enabled`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/can_be_enabled`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`none`});return}let n=await t(e),i=await r({zone:e.zone},n,{quiet:e.quiet});e.zoneId=i;let c=await s(`Loading`,async()=>n.payPerCrawl.zones.getCanBeEnabled({zone_id:i}));a(c,{successLabel:`Loaded`})})};function Me(e){return e.usage(`$0 pay-per-crawl zones query-can-be-enabled
|
|
62
|
+
|
|
63
|
+
Provided a list of pay-per-crawl configured zones this method will return whether they can enable PPC or not.`).option(`zones`,{type:`string`,array:!0,description:`The zones field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Zone IDs to check for pay-per-crawl eligibility`})}const Ne={command:`query-can-be-enabled`,describe:`Gets the can_be_enabled zone setting`,builder:Me,handler:async r=>c({command:`pay-per-crawl zones query-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones query-can-be-enabled`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled/query`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:r.zones}):l(r.body)});return}let c=await t(r),u=r.local?e:await i();if(r.accountId=u,r.body){let e=l(r.body),t=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...e,account_id:u}));a(t,{successLabel:`Created`});return}let f=d({zones:r.zones}),p=await s(`Creating`,async()=>c.payPerCrawl.zones.queryCanBeEnabled({...f,account_id:u}));a(p,{successLabel:`Created`})})};function Pe(e){return e.usage(`$0 pay-per-crawl zones set-can-be-enabled
|
|
64
|
+
|
|
65
|
+
Allows an account admin to set the can_be_enabled setting on a list of zones. An omitted can_be_enabled value leaves that zone unchanged.`).option(`zones`,{type:`string`,description:`The zones field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for setting flag on zones`})}const Fe={command:`set-can-be-enabled`,describe:`Set can_be_enabled setting on zones`,builder:Pe,handler:async r=>c({command:`pay-per-crawl zones set-can-be-enabled`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){let e=await n();o({command:`cf pay-per-crawl zones set-can-be-enabled`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-crawl/zones_can_be_enabled`,pathParams:{},bodyKind:`json`,body:r.body===void 0?d({zones:u(r.zones,`zones`)}):l(r.body)});return}let c=await t(r),f=r.local?e:await i();if(r.accountId=f,r.body){let e=l(r.body),t=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...e,account_id:f}));a(t,{successLabel:`Updated`});return}if(r.zones===void 0)throw Error(`--zones is required (or pass --body with this field set).`);let p=d({zones:u(r.zones,`zones`)}),m=await s(`Updating`,async()=>c.payPerCrawl.zones.setCanBeEnabled({...p,account_id:f}));a(m,{successLabel:`Updated`})})},Ie={command:`zones`,describe:`Operations for zones`,builder:e=>e.command(je).command(Ne).command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Le={command:`pay-per-crawl`,describe:`pay-per-crawl`,builder:e=>e.command(x).command(k).command(M).command(pe).command(xe).command(ke).command(Ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Le as default};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{i as t,n}from"./auth-AobvBmz4.mjs";import{a as r,t as i}from"./context-Bwkz4Lm_.mjs";import{t as a}from"./output-BGqhvqe2.mjs";import{t as o}from"./dry-run-DmsbOMF1.mjs";import{t as s}from"./progress-BYVZuEcG.mjs";import{t as c}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as l,t as u}from"./input-validation-D7z60HJH.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
|
+
|
|
4
|
+
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List enabled Pay Per Use domains`,builder:d,handler:async t=>c({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let c={cursor:t.cursor,per_page:t[`per-page`]};if(t.dryRun){let e=await r();o({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(t),u=t.local?e:await i();t.accountId=u;let d=await s(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...c}));a(d,{successLabel:`Loaded`})})},p={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 pay-per-use usage-reports submit
|
|
5
|
+
|
|
6
|
+
Validates and submits a usage report for an active Pay Per Use participant. The complete report is rejected if any item is invalid.`).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 h={command:`submit`,describe:`Submit a participant usage report`,builder:m,handler:async d=>c({command:`pay-per-use usage-reports submit`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await r();o({command:`cf pay-per-use usage-reports submit`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pay-per-use/usage-reports`,pathParams:{},bodyKind:`octet-stream`,body:d.body});return}let c=await n(d),f=d.local?e:await i();if(d.accountId=f,d.file){let e=u(d.file),n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${f}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));a(n,{successLabel:`Created`});return}if(d.body){let e=l(d.body,`body`,`binary`),n=await s(`Creating`,async()=>t(c,`POST`,`/accounts/${f}/pay-per-use/usage-reports`,{body:e,headers:{"Content-Type":`application/jsonl`}}));a(n,{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.`)})},g={command:`usage-reports`,describe:`Operations for usage-reports`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_={command:`pay-per-use`,describe:`pay-per-use`,builder:e=>e.command(p).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_ as default};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-F5wxc8zq.mjs";function h(e){return e.usage(`$0 pipelines create
|
|
3
|
+
|
|
4
|
+
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).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 g={command:`create`,describe:`Create Pipeline`,builder:h,handler:async l=>s({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Pipeline.`)),l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}),h=await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function _(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
|
+
|
|
6
|
+
Delete Pipeline in Account.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,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 v={command:`delete <pipeline-id>`,describe:`Delete Pipeline`,builder:_,handler:async c=>s({command:`pipelines delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines/${c[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(c[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(c[`pipeline-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.delete({account_id:l,pipeline_id:c[`pipeline-id`]}));i(u,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 pipelines get <pipeline-id>
|
|
8
|
+
|
|
9
|
+
Get Pipeline details.`).positional(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <pipeline-id>`,describe:`Get Pipeline Details`,builder:y,handler:async c=>s({command:`pipelines get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines/${c[`pipeline-id`]==null?`<pipeline-id>`:encodeURIComponent(String(c[`pipeline-id`]))}`,pathParams:{"pipeline-id":String(c[`pipeline-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.get({account_id:l,pipeline_id:c[`pipeline-id`]}));i(u,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 pipelines legacy-create
|
|
10
|
+
|
|
11
|
+
[DEPRECATED] Create a new pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`,default:1e8}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`,default:300}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`,default:1e7}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`],default:`gzip`}).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).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 S={command:`legacy-create`,describe:`[DEPRECATED] Create Pipeline`,builder:x,handler:async m=>s({command:`pipelines legacy-create`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=await n();a({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},bodyKind:`json`,body:m.body===void 0?u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}):c(m.body)});return}let s=await t(m),h=m.local?e:await r();if(m.accountId=h,m.body){let e=c(m.body),t=await o(`Creating`,async()=>s.pipelines.legacyCreate({...e,account_id:h}));i(t,{successLabel:`Created`});return}if(m[`destination-credentials-access-key-id`]===void 0&&(m[`destination-credentials-access-key-id`]=await f(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),m[`destination-credentials-endpoint`]===void 0&&(m[`destination-credentials-endpoint`]=await f(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),m[`destination-credentials-secret-access-key`]===void 0&&(m[`destination-credentials-secret-access-key`]=await f(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),m[`destination-format`]===void 0&&(m[`destination-format`]=await p(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),m[`destination-path-bucket`]===void 0&&(m[`destination-path-bucket`]=await f(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),m[`destination-type`]===void 0&&(m[`destination-type`]=await p(`destination-type`,`Specifies the type of destination.`,[`r2`])),m.name===void 0&&(m.name=await f(`name`,`Defines the name of the pipeline.`)),m.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}),_=await o(`Creating`,async()=>s.pipelines.legacyCreate({...g,account_id:h}));i(_,{successLabel:`Created`})})};function C(e){return e.usage(`$0 pipelines legacy-delete <pipeline-name>
|
|
12
|
+
|
|
13
|
+
[DEPRECATED] Delete a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,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 w={command:`legacy-delete <pipeline-name>`,describe:`[DEPRECATED] Delete Pipeline`,builder:C,handler:async c=>s({command:`pipelines legacy-delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${c[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(c[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(c[`pipeline-name`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
14
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.legacyDelete({account_id:l,pipeline_name:c[`pipeline-name`]}));i(u,{successLabel:`Deleted`})})};function T(e){return e.usage(`$0 pipelines legacy-get <pipeline-name>
|
|
15
|
+
|
|
16
|
+
[DEPRECATED] Get configuration of a pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`legacy-get <pipeline-name>`,describe:`[DEPRECATED] Get Pipeline`,builder:T,handler:async c=>s({command:`pipelines legacy-get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${c[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(c[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(c[`pipeline-name`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.legacyGet({account_id:l,pipeline_name:c[`pipeline-name`]}));i(u,{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 pipelines legacy-list
|
|
17
|
+
|
|
18
|
+
[DEPRECATED] List, filter, and paginate pipelines in an account. Use the new /pipelines/v1/pipelines endpoint instead.`).option(`search`,{type:`string`,description:`Specifies the prefix of pipeline name to search.`}).option(`page`,{type:`string`,description:`Specifies which page to retrieve.`}).option(`per-page`,{type:`string`,description:`Specifies the number of pipelines per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`legacy-list`,describe:`[DEPRECATED] List Pipelines`,builder:D,handler:async c=>s({command:`pipelines legacy-list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={search:c.search,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.legacyList({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 pipelines legacy-update <pipeline-name>
|
|
19
|
+
|
|
20
|
+
[DEPRECATED] Update an existing pipeline. Use the new /pipelines/v1/pipelines endpoint instead.`).positional(`pipeline-name`,{type:`string`,description:`Defines the name of the pipeline.`,demandOption:!0}).option(`destination-batch-max-bytes`,{type:`number`,description:`Specifies rough maximum size of files.`}).option(`destination-batch-max-duration-s`,{type:`number`,description:`Specifies duration to wait to aggregate batches files.`}).option(`destination-batch-max-rows`,{type:`number`,description:`Specifies rough maximum number of rows per file.`}).option(`destination-compression-type`,{type:`string`,description:`Specifies the desired compression algorithm and format.`,choices:[`none`,`gzip`,`deflate`]}).option(`destination-credentials-access-key-id`,{type:`string`,description:`Specifies the R2 Bucket Access Key Id.`}).option(`destination-credentials-endpoint`,{type:`string`,description:`Specifies the R2 Endpoint.`}).option(`destination-credentials-secret-access-key`,{type:`string`,description:`Specifies the R2 Bucket Secret Access Key.`}).option(`destination-format`,{type:`string`,description:`Specifies the format of data to deliver.`,choices:[`json`]}).option(`destination-path-bucket`,{type:`string`,description:`Specifies the R2 Bucket to store files.`}).option(`destination-path-filepath`,{type:`string`,description:`Specifies the name pattern for directory.`}).option(`destination-path-prefix`,{type:`string`,description:`Specifies the base directory within the bucket.`}).option(`destination-type`,{type:`string`,description:`Specifies the type of destination.`,choices:[`r2`]}).option(`name`,{type:`string`,description:`Defines the name of the pipeline.`}).option(`source`,{type:`string`,description:`The source field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const A={command:`legacy-update <pipeline-name>`,describe:`[DEPRECATED] Update Pipeline`,builder:k,handler:async m=>s({command:`pipelines legacy-update`,classification:{safeFlags:[`destination-compression-type`,`destination-format`,`destination-type`,`dry-run`]}},m,async()=>{if(m.dryRun){let e=await n();a({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/${m[`pipeline-name`]==null?`<pipeline-name>`:encodeURIComponent(String(m[`pipeline-name`]))}`,pathParams:{"pipeline-name":String(m[`pipeline-name`]??``)},bodyKind:`json`,body:m.body===void 0?u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}):c(m.body)});return}let s=await t(m),h=m.local?e:await r();if(m.accountId=h,m.body){let e=c(m.body),t=await o(`Updating`,async()=>s.pipelines.legacyUpdate({...e,account_id:h,pipeline_name:m[`pipeline-name`]}));i(t,{successLabel:`Updated`});return}if(m[`destination-credentials-access-key-id`]===void 0&&(m[`destination-credentials-access-key-id`]=await f(`destination-credentials-access-key-id`,`Specifies the R2 Bucket Access Key Id.`)),m[`destination-credentials-endpoint`]===void 0&&(m[`destination-credentials-endpoint`]=await f(`destination-credentials-endpoint`,`Specifies the R2 Endpoint.`)),m[`destination-credentials-secret-access-key`]===void 0&&(m[`destination-credentials-secret-access-key`]=await f(`destination-credentials-secret-access-key`,`Specifies the R2 Bucket Secret Access Key.`)),m[`destination-format`]===void 0&&(m[`destination-format`]=await p(`destination-format`,`Specifies the format of data to deliver.`,[`json`])),m[`destination-path-bucket`]===void 0&&(m[`destination-path-bucket`]=await f(`destination-path-bucket`,`Specifies the R2 Bucket to store files.`)),m[`destination-type`]===void 0&&(m[`destination-type`]=await p(`destination-type`,`Specifies the type of destination.`,[`r2`])),m.name===void 0&&(m.name=await f(`name`,`Defines the name of the pipeline.`)),m.source===void 0)throw Error(`--source is required (or pass --body with this field set).`);let g=u({destination:{batch:{max_bytes:m[`destination-batch-max-bytes`],max_duration_s:m[`destination-batch-max-duration-s`],max_rows:m[`destination-batch-max-rows`]},compression:{type:d(m[`destination-compression-type`],`destination-compression-type`,`text`)},credentials:{access_key_id:d(m[`destination-credentials-access-key-id`],`destination-credentials-access-key-id`,`text`),endpoint:d(m[`destination-credentials-endpoint`],`destination-credentials-endpoint`,`text`),secret_access_key:d(m[`destination-credentials-secret-access-key`],`destination-credentials-secret-access-key`,`text`)},format:d(m[`destination-format`],`destination-format`,`text`),path:{bucket:d(m[`destination-path-bucket`],`destination-path-bucket`,`text`),filepath:d(m[`destination-path-filepath`],`destination-path-filepath`,`text`),prefix:d(m[`destination-path-prefix`],`destination-path-prefix`,`text`)},type:d(m[`destination-type`],`destination-type`,`text`)},name:d(m.name,`name`,`text`),source:l(m.source,`source`)}),_=await o(`Updating`,async()=>s.pipelines.legacyUpdate({...g,account_id:h,pipeline_name:m[`pipeline-name`]}));i(_,{successLabel:`Updated`})})};function j(e){return e.usage(`$0 pipelines list
|
|
21
|
+
|
|
22
|
+
List/Filter Pipelines in Account.`).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`name`,{type:`string`,description:`Filters pipelines by name (case-insensitive substring).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`list`,describe:`List Pipelines`,builder:j,handler:async c=>s({command:`pipelines list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],name:c.name};if(c.dryRun){let e=await n();a({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function N(e){return e.usage(`$0 pipelines sinks create
|
|
23
|
+
|
|
24
|
+
Create a new Sink.`).option(`config-account-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-bucket`,{type:`string`,description:`R2 Bucket to write to`}).option(`config-credentials-access-key-id`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-credentials-secret-access-key`,{type:`string`,description:`Cloudflare Account ID for the bucket`}).option(`config-file-naming-prefix`,{type:`string`,description:`The prefix to use in file name. i.e prefix-<uuid>.parquet`}).option(`config-file-naming-strategy`,{type:`string`,description:`Filename generation strategy.`,choices:[`serial`,`uuid`,`uuid_v7`,`ulid`]}).option(`config-file-naming-suffix`,{type:`string`,description:`This will overwrite the default file suffix. i.e .parquet, use with caution`}).option(`config-jurisdiction`,{type:`string`,description:`Jurisdiction this bucket is hosted in`}).option(`config-partitioning-time-pattern`,{type:`string`,description:`The pattern of the date string`}).option(`config-path`,{type:`string`,description:`Subpath within the bucket to write to`}).option(`config-rolling-policy-file-size-bytes`,{type:`number`,description:`Files will be rolled after reaching this number of bytes`}).option(`config-rolling-policy-inactivity-seconds`,{type:`number`,description:`Number of seconds of inactivity to wait before rolling over to a new file`}).option(`config-rolling-policy-interval-seconds`,{type:`number`,description:`Number of seconds to wait before rolling over to a new file`}).option(`config-namespace`,{type:`string`,description:`Table namespace`}).option(`config-table-name`,{type:`string`,description:`Table name`}).option(`config-token`,{type:`string`,description:`Authentication token`}).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-compression`,{type:`string`,description:`Specifies the compression applied to JSON sink output.`,choices:[`uncompressed`,`gzip`,`snappy`,`zstd`,`lz4`]}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`name`,{type:`string`,description:`Defines the name of the Sink.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`type`,{type:`string`,description:`Specifies the type of sink.`,choices:[`r2`,`r2_data_catalog`,`basin_catalog`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`config-credentials-access-key-id`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-credentials-secret-access-key`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-prefix`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-strategy`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-file-naming-suffix`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-jurisdiction`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-partitioning-time-pattern`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-path`,[`config-namespace`,`config-table-name`,`config-token`]).conflicts(`config-namespace`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).conflicts(`config-table-name`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).implies(`config-table-name`,[`config-token`]).conflicts(`config-token`,[`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`]).implies(`config-token`,[`config-table-name`]).conflicts(`format-decimal-encoding`,[`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-row-group-bytes`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{if([`config-account-id`,`config-bucket`,`config-credentials-access-key-id`,`config-credentials-secret-access-key`,`config-file-naming-prefix`,`config-file-naming-strategy`,`config-file-naming-suffix`,`config-jurisdiction`,`config-partitioning-time-pattern`,`config-path`,`config-rolling-policy-file-size-bytes`,`config-rolling-policy-inactivity-seconds`,`config-rolling-policy-interval-seconds`,`config-namespace`,`config-table-name`,`config-token`].some(t=>e[t]!==void 0)){let t={"config-credentials-access-key-id":[`config-namespace`,`config-table-name`,`config-token`],"config-credentials-secret-access-key":[`config-namespace`,`config-table-name`,`config-token`]},n=[`config-account-id`,`config-bucket`,`config-credentials-access-key-id`,`config-credentials-secret-access-key`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --config-* flag is set`)}return!0}).check(e=>{if([`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`format-row-group-bytes`].some(t=>e[t]!==void 0)){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0})}const P={command:`create`,describe:`Create Sink`,builder:N,handler:async l=>s({command:`pipelines sinks create`,classification:{safeFlags:[`config-file-naming-strategy`,`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-compression`,`format-type`,`schema-inferred`,`type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({config:{account_id:d(l[`config-account-id`],`config-account-id`,`text`),bucket:d(l[`config-bucket`],`config-bucket`,`text`),credentials:{access_key_id:d(l[`config-credentials-access-key-id`],`config-credentials-access-key-id`,`text`),secret_access_key:d(l[`config-credentials-secret-access-key`],`config-credentials-secret-access-key`,`text`)},file_naming:{prefix:d(l[`config-file-naming-prefix`],`config-file-naming-prefix`,`text`),strategy:d(l[`config-file-naming-strategy`],`config-file-naming-strategy`,`text`),suffix:d(l[`config-file-naming-suffix`],`config-file-naming-suffix`,`text`)},jurisdiction:d(l[`config-jurisdiction`],`config-jurisdiction`,`text`),partitioning:{time_pattern:d(l[`config-partitioning-time-pattern`],`config-partitioning-time-pattern`,`text`)},path:d(l[`config-path`],`config-path`,`text`),rolling_policy:{file_size_bytes:l[`config-rolling-policy-file-size-bytes`],inactivity_seconds:l[`config-rolling-policy-inactivity-seconds`],interval_seconds:l[`config-rolling-policy-interval-seconds`]},namespace:d(l[`config-namespace`],`config-namespace`,`text`),table_name:d(l[`config-table-name`],`config-table-name`,`text`),token:d(l[`config-token`],`config-token`,`text`)},format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],compression:d(l[`format-compression`],`format-compression`,`text`),type:d(l[`format-type`],`format-type`,`text`),row_group_bytes:l[`format-row-group-bytes`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.sinks.create({...e,account_id:m}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Defines the name of the Sink.`)),l.type===void 0&&(l.type=await p(`type`,`Specifies the type of sink.`,[`r2`,`r2_data_catalog`,`basin_catalog`]));let h=u({config:{account_id:d(l[`config-account-id`],`config-account-id`,`text`),bucket:d(l[`config-bucket`],`config-bucket`,`text`),credentials:{access_key_id:d(l[`config-credentials-access-key-id`],`config-credentials-access-key-id`,`text`),secret_access_key:d(l[`config-credentials-secret-access-key`],`config-credentials-secret-access-key`,`text`)},file_naming:{prefix:d(l[`config-file-naming-prefix`],`config-file-naming-prefix`,`text`),strategy:d(l[`config-file-naming-strategy`],`config-file-naming-strategy`,`text`),suffix:d(l[`config-file-naming-suffix`],`config-file-naming-suffix`,`text`)},jurisdiction:d(l[`config-jurisdiction`],`config-jurisdiction`,`text`),partitioning:{time_pattern:d(l[`config-partitioning-time-pattern`],`config-partitioning-time-pattern`,`text`)},path:d(l[`config-path`],`config-path`,`text`),rolling_policy:{file_size_bytes:l[`config-rolling-policy-file-size-bytes`],inactivity_seconds:l[`config-rolling-policy-inactivity-seconds`],interval_seconds:l[`config-rolling-policy-interval-seconds`]},namespace:d(l[`config-namespace`],`config-namespace`,`text`),table_name:d(l[`config-table-name`],`config-table-name`,`text`),token:d(l[`config-token`],`config-token`,`text`)},format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],compression:d(l[`format-compression`],`format-compression`,`text`),type:d(l[`format-type`],`format-type`,`text`),row_group_bytes:l[`format-row-group-bytes`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},type:d(l.type,`type`,`text`)}),g=await o(`Creating`,async()=>s.pipelines.sinks.create({...h,account_id:m}));i(g,{successLabel:`Created`})})};function ee(e){return e.usage(`$0 pipelines sinks delete <sink-id>
|
|
25
|
+
|
|
26
|
+
Delete Sink in Account.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,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 F={command:`delete <sink-id>`,describe:`Delete Sink`,builder:ee,handler:async c=>s({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks/${c[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(c[`sink-id`]))}`,pathParams:{"sink-id":String(c[`sink-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
27
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.sinks.delete({account_id:l,sink_id:c[`sink-id`]}));i(u,{successLabel:`Deleted`})})};function I(e){return e.usage(`$0 pipelines sinks get <sink-id>
|
|
28
|
+
|
|
29
|
+
Get Sink Details.`).positional(`sink-id`,{type:`string`,description:`Specifies the publid ID of the sink.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`get <sink-id>`,describe:`Get Sink Details`,builder:I,handler:async c=>s({command:`pipelines sinks get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks/${c[`sink-id`]==null?`<sink-id>`:encodeURIComponent(String(c[`sink-id`]))}`,pathParams:{"sink-id":String(c[`sink-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.sinks.get({account_id:l,sink_id:c[`sink-id`]}));i(u,{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 pipelines sinks list
|
|
30
|
+
|
|
31
|
+
List/Filter Sinks in Account.`).option(`pipeline-id`,{type:`string`,description:`Pipeline ID`}).option(`name`,{type:`string`,description:`Filters sinks by name (case-insensitive substring).`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`List Sinks`,builder:R,handler:async c=>s({command:`pipelines sinks list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={pipeline_id:c[`pipeline-id`],name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.sinks.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})},B={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(P).command(F).command(L).command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 pipelines streams create
|
|
32
|
+
|
|
33
|
+
Create a new Stream.`).option(`format-decimal-encoding`,{type:`string`,description:`The format.decimal_encoding field`,choices:[`number`,`string`,`bytes`]}).option(`format-timestamp-format`,{type:`string`,description:`The format.timestamp_format field`,choices:[`rfc3339`,`unix_millis`]}).option(`format-unstructured`,{type:`boolean`,description:`The format.unstructured field`}).option(`format-type`,{type:`string`,description:`The format.type field`,choices:[`json`,`parquet`]}).option(`format-compression`,{type:`string`,description:`The format.compression field`,choices:[`uncompressed`,`snappy`,`gzip`,`zstd`,`lz4`]}).option(`format-row-group-bytes`,{type:`number`,description:`The format.row_group_bytes field`}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`name`,{type:`string`,description:`Specifies the name of the Stream.`}).option(`schema-inferred`,{type:`boolean`,description:`The schema.inferred field`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`format-decimal-encoding`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-timestamp-format`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-unstructured`,[`format-compression`,`format-row-group-bytes`]).conflicts(`format-compression`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).conflicts(`format-row-group-bytes`,[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`]).check(e=>{if([`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`format-row-group-bytes`].some(t=>e[t]!==void 0)){let t=[`format-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --format-* flag is set`)}return!0}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const H={command:`create`,describe:`Create Stream`,builder:V,handler:async l=>s({command:`pipelines streams create`,classification:{safeFlags:[`format-decimal-encoding`,`format-timestamp-format`,`format-unstructured`,`format-type`,`format-compression`,`http-authentication`,`http-enabled`,`schema-inferred`,`worker-binding-enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],type:d(l[`format-type`],`format-type`,`text`),compression:d(l[`format-compression`],`format-compression`,`text`),row_group_bytes:l[`format-row-group-bytes`]},http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.streams.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Stream.`));let m=u({format:{decimal_encoding:d(l[`format-decimal-encoding`],`format-decimal-encoding`,`text`),timestamp_format:d(l[`format-timestamp-format`],`format-timestamp-format`,`text`),unstructured:l[`format-unstructured`],type:d(l[`format-type`],`format-type`,`text`),compression:d(l[`format-compression`],`format-compression`,`text`),row_group_bytes:l[`format-row-group-bytes`]},http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},name:d(l.name,`name`,`text`),schema:{inferred:l[`schema-inferred`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}),h=await o(`Creating`,async()=>s.pipelines.streams.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function U(e){return e.usage(`$0 pipelines streams delete <stream-id>
|
|
34
|
+
|
|
35
|
+
Delete Stream in Account.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,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 W={command:`delete <stream-id>`,describe:`Delete Stream`,builder:U,handler:async c=>s({command:`pipelines streams delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
36
|
+
`);return}let u=await o(`Deleting`,async()=>s.pipelines.streams.delete({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Deleted`})})};function G(e){return e.usage(`$0 pipelines streams get <stream-id>
|
|
37
|
+
|
|
38
|
+
Get Stream Details.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`get <stream-id>`,describe:`Get Stream Details`,builder:G,handler:async c=>s({command:`pipelines streams get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${c[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(c[`stream-id`]))}`,pathParams:{"stream-id":String(c[`stream-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.pipelines.streams.get({account_id:l,stream_id:c[`stream-id`]}));i(u,{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 pipelines streams list
|
|
39
|
+
|
|
40
|
+
List/Filter Streams in Account.`).option(`pipeline-id`,{type:`string`,description:`Specifies the public ID of the pipeline.`}).option(`name`,{type:`string`,description:`Filters streams by name (case-insensitive substring).`}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`list`,describe:`List Streams`,builder:q,handler:async c=>s({command:`pipelines streams list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={pipeline_id:c[`pipeline-id`],name:c.name,page:c.page,per_page:c[`per-page`]};if(c.dryRun){let e=await n();a({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.pipelines.streams.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function Y(e){return e.usage(`$0 pipelines streams update <stream-id>
|
|
41
|
+
|
|
42
|
+
Update a Stream.`).positional(`stream-id`,{type:`string`,description:`Specifies the public ID of the stream.`,demandOption:!0}).option(`http-authentication`,{type:`boolean`,description:`Indicates that authentication is required for the HTTP endpoint.`}).option(`http-cors-origins`,{type:`string`,array:!0,description:`The http.cors.origins field`}).option(`http-enabled`,{type:`boolean`,description:`Indicates that the HTTP endpoint is enabled.`}).option(`worker-binding-enabled`,{type:`boolean`,description:`Indicates that the worker binding is enabled.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`http-authentication`,`http-cors-origins`,`http-enabled`].some(t=>e[t]!==void 0)){let t=[`http-authentication`,`http-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --http-* flag is set`)}return!0}).check(e=>{if([`worker-binding-enabled`].some(t=>e[t]!==void 0)){let t=[`worker-binding-enabled`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --worker_binding-* flag is set`)}return!0})}const X={command:`update <stream-id>`,describe:`Update Stream`,builder:Y,handler:async l=>s({command:`pipelines streams update`,classification:{safeFlags:[`http-authentication`,`http-enabled`,`worker-binding-enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/streams/${l[`stream-id`]==null?`<stream-id>`:encodeURIComponent(String(l[`stream-id`]))}`,pathParams:{"stream-id":String(l[`stream-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.pipelines.streams.update({...e,account_id:d,stream_id:l[`stream-id`]}));i(t,{successLabel:`Updated`});return}let f=u({http:{authentication:l[`http-authentication`],cors:{origins:l[`http-cors-origins`]},enabled:l[`http-enabled`]},worker_binding:{enabled:l[`worker-binding-enabled`]}}),p=await o(`Updating`,async()=>s.pipelines.streams.update({...f,account_id:d,stream_id:l[`stream-id`]}));i(p,{successLabel:`Updated`})})},Z={command:`streams`,describe:`Inbound data streams that feed events into a pipeline for processing`,builder:e=>e.command(H).command(W).command(K).command(J).command(X).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Q(e){return e.usage(`$0 pipelines validate-sql
|
|
43
|
+
|
|
44
|
+
Validates that the Pipelines SQL is correct.`).option(`sql`,{type:`string`,description:`Specifies SQL to validate.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $={command:`validate-sql`,describe:`Validate SQL`,builder:Q,handler:async l=>s({command:`pipelines validate-sql`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/pipelines/v1/validate_sql`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.pipelines.validateSql({...e,account_id:p}));i(t,{successLabel:`Created`});return}l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL to validate.`));let m=u({sql:d(l.sql,`sql`,`text`)}),h=await o(`Creating`,async()=>s.pipelines.validateSql({...m,account_id:p}));i(h,{successLabel:`Created`})})},te={command:`pipelines`,describe:`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,builder:e=>e.command(g).command(v).command(b).command(S).command(w).command(E).command(O).command(A).command(M).command($).command(B).command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{te as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e}from"./auth-AobvBmz4.mjs";import{i as t}from"./context-Bwkz4Lm_.mjs";import{t as n}from"./output-BGqhvqe2.mjs";import{t as r}from"./dry-run-DmsbOMF1.mjs";import{t as i}from"./progress-BYVZuEcG.mjs";import{t as a}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as o,r as s,t as c}from"./body-parser-DkHKPkJ7.mjs";import{n as l}from"./input-validation-D7z60HJH.mjs";function u(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Zone Precursor Config`,builder:u,handler:async o=>a({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await e(o),s=await t({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s;let c=await i(`Loading`,async()=>a.precursor.get({zone_id:s}));n(c,{successLabel:`Loaded`})})};function f(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
|
|
3
|
+
not match a more specific enforcement rule.
|
|
4
|
+
`,choices:[`off`,`min-friction`,`max-security`]}).option(`enforcement-rules`,{type:`string`,description:`The ordered list of enforcement rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`update`,describe:`Update Zone Precursor Config`,builder:f,handler:async u=>a({command:`precursor update`,classification:{safeFlags:[`default-mode`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}):o(u.body)});return}let a=await e(u),d=await t({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body),t=await i(`Updating`,async()=>a.precursor.update({body:e,zone_id:d}));n(t,{successLabel:`Updated`});return}let f=c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}),p=await i(`Updating`,async()=>a.precursor.update({body:f,zone_id:d}));n(p,{successLabel:`Updated`})})},m={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./dotenv-DpXaxfho.mjs";import{G as t,nt as n,q as r}from"./dist-CYFkGHYv.mjs";import{m as i,u as a}from"./interactive-Dqv0RWVU.mjs";import{t as o}from"./context-Bwkz4Lm_.mjs";import{C as s,_ as c,d as l,f as u,l as d,r as f,t as p,x as m,y as h}from"./deploy-context-Cfushp8j.mjs";import{t as g}from"./auth-token-CtguMdmF.mjs";import{t as _}from"./output-BGqhvqe2.mjs";import{n as v}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{a as y,l as b,n as x,o as S,r as C,t as w}from"./containers-DRzgE46U.mjs";import{a as T,i as E,n as D,o as O,r as k,s as A}from"./build-BKPVP5ip.mjs";import{t as j}from"./deploy-input-BAhS5LYx.mjs";import{readBuildOutput as M}from"@cloudflare/build-output-utils";function N(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(t,r,i,a,o)=>P(o.quiet,async()=>{let s=/* @__PURE__ */ new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let n of r){let r=s.get(n.class_name);if(r||=(c??=await h(t,a),c.find(e=>e.class===n.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${n.class_name}".`);let l=await F(n,e,i.id,a,t,o.localImageReferences?.get(n.class_name));await d({imageRef:l,durable_object_namespace_id:r},n,t,a)}await l(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),n())})}}async function P(e,t){if(!e)return t();let n=a();i(`error`);try{return await t()}finally{i(n)}}async function F(e,t,r,i,a,o){if(o!==void 0)return s({pathToDocker:n(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let c=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(c)return m(c,r,n(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function I(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1}).option(`worker`,k)}function L(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function R(t){let n=t[`preview-name`],r=n??y();if(!r||!n&&r===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
|
|
3
|
+
|
|
4
|
+
cf previews deploy PREVIEW_NAME`);return t.prebuilt||await D(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>z(t,r))}async function z(e,n){let i=await M(process.cwd());C(i.rootConfig),O(e.mode,i.rootConfig.buildContext.mode);let a=T(i.workers,e.worker),{wranglerConfig:s,builtConfig:l}=E(a,i.rootConfig),d=await g(),m=i.rootConfig.accountId??await o({isPreview:!0,skipProjectSettings:!0,complianceRegion:r(s)}),h=p(d);b({...h,logger:{...h.logger,log:()=>{},info:()=>{}}}),c({logger:{...h.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:h.fetchResult,fetchPagedListResult:h.fetchPagedListResult});let _=new Set(Object.values(l.exports??{}).filter(x).map(({container:e})=>e)),v=i.containers?.filter(({config:e})=>_.has(e.name))??[],y=w(v,s,{accountId:m}),D=y.source;if(D?.some(e=>e.scheduling_policy===`durable_object`))throw new A(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return D&&D.length>0&&u(m,d,t(s)),S(m,{name:n,json:!0},{workerConfig:l,rootConfig:i.rootConfig,containers:v.filter(({config:e})=>D?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:a.bundleDir?j(a,l):void 0,assets:a.assetsDir?{directory:a.assetsDir}:void 0},{...N(y),verifyContainersScope:async()=>{await f.listApplications()}})}const B={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:I,handler:async e=>{let t=await R(e);_(L(t),{quiet:e.quiet})}},V={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(v(B,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{V as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./theme-
|
|
2
|
+
import{t as e}from"./theme-CQ_TYifs.mjs";import{t}from"./args-CfbYkeXd.mjs";import{n}from"./version-BZNc7Y3t.mjs";import{t as r}from"./session-BWe9et4K.mjs";import{a as i}from"./dist-8rP3V95o.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!e()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(e,t){if(!c())return t();r(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(e);try{let n=await t();return o.clear(),a.stop(e),n}catch(t){throw o.clear(),a.error(e),t}}export{l as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./theme-
|
|
2
|
+
import{r as e}from"./theme-CQ_TYifs.mjs";import{t}from"./cli-exit-CstFZ1eJ.mjs";import{n}from"./version-BZNc7Y3t.mjs";import{t as r}from"./session-BWe9et4K.mjs";import{j as i,n as a}from"./interactive-Dqv0RWVU.mjs";import{i as o,o as s,r as c,t as l}from"./dist-8rP3V95o.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){r(n)}async function f(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
|
|
3
3
|
`)?t.slice(0,-1):t}async function p(e,n,r){let o=r?.kind??`text`;if(a()){if(o===`secret`){let t=await f();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let l=`Enter value for --${e}`,u=n||r?.question||l,p=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;d();let m=o===`secret`?await c({message:u,mask:`•`,validate:p}):await s({message:u,validate:p});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function m(e,n,r,s={}){let c=u(e),l=r.map(u);if(a())throw Error(`--${c} is required (one of: ${l.join(`, `)}). Pass --${c} <value> or run interactively.`);let f=`Select value for --${c}`,p=u(n||f);d();let m=await o({message:p,options:r.map(e=>({value:e,label:u((Object.hasOwn(s,e)?s[e]:void 0)??e)}))});if(i(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n){if(a())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);d();let r=await l({message:n||`Confirm --${e}`,initialValue:!1});if(i(r))throw new t(130,{cancelled:!0});return r===!0}async function g(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(a())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;d();let o=await l({message:e,initialValue:n});if(i(o))throw new t(130,{cancelled:!0});return o===!0}async function _(n={}){if(n.force===!0)return!0;let r=n.message?`${n.message} Continue?`:`This permanently deletes the resource. Continue?`;if(a())return process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\n`),!1;d();let o=await l({message:r,initialValue:!1});if(i(o))throw new t(130,{cancelled:!0});return o===!0}export{p as a,m as i,_ as n,u as o,h as r,g as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{n as f}from"./prompt-F5wxc8zq.mjs";function p(e){return e.usage(`$0 queries bulk create
|
|
3
|
+
|
|
4
|
+
Return a success message after creating new saved string queries in bulk`).option(`queries`,{type:`string`,description:`The queries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create`,describe:`Create new saved string queries in bulk`,builder:p,handler:async d=>s({command:`queries bulk create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/queries/bulk`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({queries:l(d.queries,`queries`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.queries.bulk.create({...e,account_id:f}));i(t,{successLabel:`Created`});return}let p=u({queries:l(d.queries,`queries`)}),m=await o(`Creating`,async()=>s.queries.bulk.create({...p,account_id:f}));i(m,{successLabel:`Created`})})},h={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 queries create
|
|
5
|
+
|
|
6
|
+
Return a success message after creating new saved string queries`).option(`id`,{type:`string`,description:`ID`}).option(`max-time`,{type:`string`,description:`The max_time field`}).option(`min-time`,{type:`string`,description:`The min_time field`}).option(`scan`,{type:`boolean`,description:`The scan field`}).option(`tag`,{type:`string`,description:`The tag field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _={command:`create`,describe:`Create new saved string queries`,builder:g,handler:async l=>s({command:`queries create`,classification:{safeFlags:[`scan`,`dry-run`]}},l,async()=>{let s={id:l.id};if(l.dryRun){let e=await n();a({command:`cf queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/queries`,pathParams:{},query:s,bodyKind:`json`,body:l.body===void 0?u({max_time:d(l[`max-time`],`max-time`,`text`),min_time:d(l[`min-time`],`min-time`,`text`),scan:l.scan,tag:d(l.tag,`tag`,`text`)}):c(l.body)});return}let f=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body);new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let t=await o(`Creating`,async()=>f.queries.create({...e,account_id:p,...s}));i(t,{successLabel:`Created`});return}let m=u({max_time:d(l[`max-time`],`max-time`,`text`),min_time:d(l[`min-time`],`min-time`,`text`),scan:l.scan,tag:d(l.tag,`tag`,`text`)});new URLSearchParams(Object.entries(s).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await o(`Creating`,async()=>f.queries.create({...m,account_id:p,...s}));i(h,{successLabel:`Created`})})};function v(e){return e.usage(`$0 queries delete
|
|
7
|
+
|
|
8
|
+
Return a success message after deleting saved string queries by ID`).option(`id`,{type:`string`,description:`ID`}).option(`tag`,{type:`string`,description:`Tag`}).option(`scan`,{type:`boolean`,description:`Scan`}).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 y={command:`delete`,describe:`Delete saved string queries by ID`,builder:v,handler:async c=>s({command:`queries delete`,classification:{safeFlags:[`scan`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{let s={id:c.id,tag:c.tag,scan:c.scan};if(c.dryRun){let e=await n();a({command:`cf queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/queries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();if(c.accountId=u,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}let d=await o(`Deleting`,async()=>l.queries.delete({account_id:u,...s}));i(d,{successLabel:`Deleted`})})},b={command:`queries`,describe:`queries`,builder:e=>e.command(_).command(y).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{b as default};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-C0lQ9sTg.mjs";import{n as t}from"./auth-AobvBmz4.mjs";import{a as n,t as r}from"./context-Bwkz4Lm_.mjs";import{t as i}from"./output-BGqhvqe2.mjs";import{t as a}from"./dry-run-DmsbOMF1.mjs";import{t as o}from"./progress-BYVZuEcG.mjs";import{t as s}from"./run-CrZgB8L_.mjs";import"./telemetry-DBXOMuLh.mjs";import{n as c,r as l,t as u}from"./body-parser-DkHKPkJ7.mjs";import{n as d}from"./input-validation-D7z60HJH.mjs";import{a as f,i as p,n as m}from"./prompt-F5wxc8zq.mjs";import{t as h}from"./cli-types-9oYmRTHJ.mjs";function g(e){return e.usage(`$0 queues consumers create <queue-id>
|
|
3
|
+
|
|
4
|
+
Creates a consumer for a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dead-letter-queue`,{type:`string`,description:`The dead_letter_queue field`}).option(`script-name`,{type:`string`,description:`Name of a Worker`}).option(`settings-batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`settings-max-concurrency`,{type:`number`,description:"Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended)."}).option(`settings-max-retries`,{type:`number`,description:`The maximum number of retries`}).option(`settings-max-wait-time-ms`,{type:`number`,description:`The number of milliseconds to wait for a batch to fill up before attempting to deliver it`}).option(`settings-retry-delay`,{type:`number`,description:`The number of seconds to delay before making the message available for another attempt.`}).option(`settings-visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`worker`,`http_pull`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a consumer`}).conflicts(`script-name`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-concurrency`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-wait-time-ms`,[`settings-visibility-timeout-ms`]).conflicts(`settings-visibility-timeout-ms`,[`script-name`,`settings-max-concurrency`,`settings-max-wait-time-ms`])}const ee={command:`create <queue-id>`,describe:`Create a Queue Consumer`,builder:g,handler:async l=>s({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.consumers.create({body:e,account_id:m,queue_id:l[`queue-id`]}));i(t,{successLabel:`Created`});return}l.type===void 0&&(l.type=await p(`type`,`The type field`,[`worker`,`http_pull`])),l.type===`worker`&&l[`script-name`]===void 0&&(l[`script-name`]=await f(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}),g=await o(`Creating`,async()=>s.queues.consumers.create({body:h,account_id:m,queue_id:l[`queue-id`]}));i(g,{successLabel:`Created`})})};function _(e){return e.usage(`$0 queues consumers delete <consumer-id>
|
|
5
|
+
|
|
6
|
+
Deletes a consumer from a Queue.`).positional(`consumer-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete <consumer-id>`,describe:`Delete Queue Consumer`,builder:_,handler:async c=>s({command:`queues consumers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues consumers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}/consumers/${c[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(c[`consumer-id`]))}`,pathParams:{"consumer-id":String(c[`consumer-id`]??``),"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await o(`Deleting`,async()=>s.queues.consumers.delete({account_id:l,queue_id:c[`queue-id`],consumer_id:c[`consumer-id`]}));i(u,{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 queues consumers get <consumer-id>
|
|
8
|
+
|
|
9
|
+
Returns a Queue consumer by identifier.`).positional(`consumer-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <consumer-id>`,describe:`Get Queue Consumer`,builder:y,handler:async c=>s({command:`queues consumers get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues consumers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}/consumers/${c[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(c[`consumer-id`]))}`,pathParams:{"consumer-id":String(c[`consumer-id`]??``),"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.consumers.get({account_id:l,queue_id:c[`queue-id`],consumer_id:c[`consumer-id`]}));i(u,{successLabel:`Loaded`})})};function x(e){return e.usage(`$0 queues consumers list
|
|
10
|
+
|
|
11
|
+
Returns the consumers configured for a Queue.`).option(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`list`,describe:`List Queue Consumers`,builder:x,handler:async c=>s({command:`queues consumers list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues consumers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.consumers.list({account_id:l,queue_id:c[`queue-id`]}));i(u,{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 queues consumers update <consumer-id>
|
|
12
|
+
|
|
13
|
+
Replaces a Queue consumer, or creates it if it does not exist.`).positional(`consumer-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dead-letter-queue`,{type:`string`,description:`The dead_letter_queue field`}).option(`script-name`,{type:`string`,description:`Name of a Worker`}).option(`settings-batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`settings-max-concurrency`,{type:`number`,description:"Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended)."}).option(`settings-max-retries`,{type:`number`,description:`The maximum number of retries`}).option(`settings-max-wait-time-ms`,{type:`number`,description:`The number of milliseconds to wait for a batch to fill up before attempting to deliver it`}).option(`settings-retry-delay`,{type:`number`,description:`The number of seconds to delay before making the message available for another attempt.`}).option(`settings-visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`worker`,`http_pull`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a consumer`}).conflicts(`script-name`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-concurrency`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-wait-time-ms`,[`settings-visibility-timeout-ms`]).conflicts(`settings-visibility-timeout-ms`,[`script-name`,`settings-max-concurrency`,`settings-max-wait-time-ms`])}const w={command:`update <consumer-id>`,describe:`Update Queue Consumer`,builder:C,handler:async l=>s({command:`queues consumers update`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues consumers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/consumers/${l[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(l[`consumer-id`]))}`,pathParams:{"consumer-id":String(l[`consumer-id`]??``),"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await t(l),m=l.local?e:await r();if(l.accountId=m,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.queues.consumers.update({body:e,account_id:m,queue_id:l[`queue-id`],consumer_id:l[`consumer-id`]}));i(t,{successLabel:`Updated`});return}l.type===void 0&&(l.type=await p(`type`,`The type field`,[`worker`,`http_pull`])),l.type===`worker`&&l[`script-name`]===void 0&&(l[`script-name`]=await f(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}),g=await o(`Updating`,async()=>s.queues.consumers.update({body:h,account_id:m,queue_id:l[`queue-id`],consumer_id:l[`consumer-id`]}));i(g,{successLabel:`Updated`})})},T={command:`consumers`,describe:`Workers that automatically receive and process messages from a queue`,builder:e=>e.command(ee).command(v).command(b).command(S).command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 queues create
|
|
14
|
+
|
|
15
|
+
Creates a Queue in the account.`).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`eu`,`us`,`fedramp`]}).option(`queue-name`,{type:`string`,description:`The queue_name field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`create`,describe:`Create Queue`,builder:E,handler:async l=>s({command:`queues create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({jurisdiction:d(l.jurisdiction,`jurisdiction`,`text`),queue_name:d(l[`queue-name`],`queue-name`,`text`)}):c(l.body)});return}let s=await t(l),p=l.local?e:await r();if(l.accountId=p,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.create({...e,account_id:p}));i(t,{successLabel:`Created`});return}l[`queue-name`]===void 0&&(l[`queue-name`]=await f(`queue-name`,`The queue_name field`));let m=u({jurisdiction:d(l.jurisdiction,`jurisdiction`,`text`),queue_name:d(l[`queue-name`],`queue-name`,`text`)}),h=await o(`Creating`,async()=>s.queues.create({...m,account_id:p}));i(h,{successLabel:`Created`})})};function O(e){return e.usage(`$0 queues delete <queue-id>
|
|
16
|
+
|
|
17
|
+
Deletes a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const k={command:`delete <queue-id>`,describe:`Delete Queue`,builder:O,handler:async c=>s({command:`queues delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}`,pathParams:{"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}let u=await o(`Deleting`,async()=>s.queues.delete({account_id:l,queue_id:c[`queue-id`]}));i(u,{successLabel:`Deleted`})})};function A(e){return e.usage(`$0 queues edit <queue-id>
|
|
19
|
+
|
|
20
|
+
Updates part of a Queue's configuration.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`jurisdiction`,{type:`string`,description:`The jurisdiction field`,choices:[`eu`,`us`,`fedramp`]}).option(`queue-name`,{type:`string`,description:`The queue_name field`}).option(`settings-delivery-delay`,{type:`number`,description:`Number of seconds to delay delivery of all messages to consumers.`}).option(`settings-delivery-paused`,{type:`boolean`,description:`Indicates if message delivery to consumers is currently paused.`}).option(`settings-message-retention-period`,{type:`number`,description:`Number of seconds after which an unconsumed message will be delayed.`}).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 j={command:`edit <queue-id>`,describe:`Update Queue`,builder:A,handler:async l=>s({command:`queues edit`,classification:{safeFlags:[`jurisdiction`,`settings-delivery-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({jurisdiction:d(l.jurisdiction,`jurisdiction`,`text`),queue_name:d(l[`queue-name`],`queue-name`,`text`),settings:{delivery_delay:l[`settings-delivery-delay`],delivery_paused:l[`settings-delivery-paused`],message_retention_period:l[`settings-message-retention-period`]}}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.queues.edit({body:e,account_id:f,queue_id:l[`queue-id`]}));i(t,{successLabel:`Updated`});return}let p=u({jurisdiction:d(l.jurisdiction,`jurisdiction`,`text`),queue_name:d(l[`queue-name`],`queue-name`,`text`),settings:{delivery_delay:l[`settings-delivery-delay`],delivery_paused:l[`settings-delivery-paused`],message_retention_period:l[`settings-message-retention-period`]}}),m=await o(`Updating`,async()=>s.queues.edit({body:p,account_id:f,queue_id:l[`queue-id`]}));i(m,{successLabel:`Updated`})})};function M(e){return e.usage(`$0 queues get <queue-id>
|
|
21
|
+
|
|
22
|
+
Returns details about a specific Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`get <queue-id>`,describe:`Get Queue`,builder:M,handler:async c=>s({command:`queues get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}`,pathParams:{"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.get({account_id:l,queue_id:c[`queue-id`]}));i(u,{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 queues list
|
|
23
|
+
|
|
24
|
+
Returns the queues owned by an account.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`list`,describe:`List Queues`,builder:P,handler:async c=>s({command:`queues list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues`,pathParams:{},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.list({account_id:l}));i(u,{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 queues messages ack <queue-id>
|
|
25
|
+
|
|
26
|
+
Acknowledges successfully processed Queue messages and retries messages that were not processed successfully.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`acks`,{type:`string`,description:`The acks field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`retries`,{type:`string`,description:`The retries field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const L={command:`ack <queue-id>`,describe:`Acknowledge + Retry Queue Messages`,builder:I,handler:async d=>s({command:`queues messages ack`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf queues messages ack`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${d[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(d[`queue-id`]))}/messages/ack`,pathParams:{"queue-id":String(d[`queue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({acks:l(d.acks,`acks`),retries:l(d.retries,`retries`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.queues.messages.ack({...e,account_id:f,queue_id:d[`queue-id`]}));i(t,{successLabel:`Created`});return}let p=u({acks:l(d.acks,`acks`),retries:l(d.retries,`retries`)}),m=await o(`Creating`,async()=>s.queues.messages.ack({...p,account_id:f,queue_id:d[`queue-id`]}));i(m,{successLabel:`Created`})})};function R(e){return e.usage(`$0 queues messages bulk-push
|
|
27
|
+
|
|
28
|
+
Pushes a batch of messages to a Queue.`).option(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`delay-seconds`,{type:`number`,description:`The number of seconds to wait for attempting to deliver this batch to consumers`}).option(`messages`,{type:`string`,description:`The messages field. Provide as a JSON array of objects or @path/to/file.json.`}).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 z={command:`bulk-push`,describe:`Push Message Batch`,builder:R,handler:async d=>s({command:`queues messages bulk-push`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf queues messages bulk-push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${d[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(d[`queue-id`]))}/messages/batch`,pathParams:{"queue-id":String(d[`queue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({delay_seconds:d[`delay-seconds`],messages:l(d.messages,`messages`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.queues.messages.bulkPush({...e,account_id:f,queue_id:d[`queue-id`]}));i(t,{successLabel:`Created`});return}let p=u({delay_seconds:d[`delay-seconds`],messages:l(d.messages,`messages`)}),m=await o(`Creating`,async()=>s.queues.messages.bulkPush({...p,account_id:f,queue_id:d[`queue-id`]}));i(m,{successLabel:`Created`})})};function B(e){return e.usage(`$0 queues messages extend-leases <queue-id>
|
|
29
|
+
|
|
30
|
+
Extends message leases without incrementing the messages' \`attempts\` counters. Each message receives a new lease identifier.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`extend`,{type:`string`,description:`The extend field. Provide as a JSON array of objects or @path/to/file.json.`}).option(`visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`extend-leases <queue-id>`,describe:`Extend Message Leases`,builder:B,handler:async d=>s({command:`queues messages extend-leases`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf queues messages extend-leases`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${d[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(d[`queue-id`]))}/messages/extend`,pathParams:{"queue-id":String(d[`queue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({extend:l(d.extend,`extend`),visibility_timeout_ms:d[`visibility-timeout-ms`]}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,d.body){let e=c(d.body),t=await o(`Creating`,async()=>s.queues.messages.extendLeases({...e,account_id:f,queue_id:d[`queue-id`]}));i(t,{successLabel:`Created`});return}let p=u({extend:l(d.extend,`extend`),visibility_timeout_ms:d[`visibility-timeout-ms`]}),m=await o(`Creating`,async()=>s.queues.messages.extendLeases({...p,account_id:f,queue_id:d[`queue-id`]}));i(m,{successLabel:`Created`})})};function V(e){return e.usage(`$0 queues messages peek <queue-id>
|
|
31
|
+
|
|
32
|
+
Peek messages from a Queue without leasing them. Each message includes a ref that can be passed to the purge endpoint, and remains available for subsequent peek or pull operations until it is purged.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).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:`peek <queue-id>`,describe:`Peek Queue Messages`,builder:V,handler:async l=>s({command:`queues messages peek`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues messages peek`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/messages/peek`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({batch_size:l[`batch-size`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.messages.peek({...e,account_id:d,queue_id:l[`queue-id`]}));i(t,{successLabel:`Created`});return}let f=u({batch_size:l[`batch-size`]}),p=await o(`Creating`,async()=>s.queues.messages.peek({...f,account_id:d,queue_id:l[`queue-id`]}));i(p,{successLabel:`Created`})})};function U(e){return e.usage(`$0 queues messages pull <queue-id>
|
|
33
|
+
|
|
34
|
+
Pulls a batch of messages from a Queue for an HTTP pull consumer.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const W={command:`pull <queue-id>`,describe:`Pull Queue Messages`,builder:U,handler:async l=>s({command:`queues messages pull`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues messages pull`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/messages/pull`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({batch_size:l[`batch-size`],visibility_timeout_ms:l[`visibility-timeout-ms`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.messages.pull({...e,account_id:d,queue_id:l[`queue-id`]}));i(t,{successLabel:`Created`});return}let f=u({batch_size:l[`batch-size`],visibility_timeout_ms:l[`visibility-timeout-ms`]}),p=await o(`Creating`,async()=>s.queues.messages.pull({...f,account_id:d,queue_id:l[`queue-id`]}));i(p,{successLabel:`Created`})})};function G(e){return e.usage(`$0 queues messages purge <queue-id>
|
|
35
|
+
|
|
36
|
+
Delete messages from a Queue by using refs returned by the peek endpoint. Purging messages does not count as delivery and does not affect metrics.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`refs`,{type:`string`,description:`The refs field. Provide as a JSON array of objects or @path/to/file.json.`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`purge <queue-id>`,describe:`Purge Peeked Queue Messages`,builder:G,handler:async d=>s({command:`queues messages purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){let e=await n();a({command:`cf queues messages purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${d[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(d[`queue-id`]))}/messages/purge`,pathParams:{"queue-id":String(d[`queue-id`]??``)},bodyKind:`json`,body:d.body===void 0?u({refs:l(d.refs,`refs`)}):c(d.body)});return}let s=await t(d),f=d.local?e:await r();if(d.accountId=f,!await m({force:!!d.force,message:`This operation permanently deletes the selected messages from the Queue.`})){process.stderr.write(`Aborted.
|
|
37
|
+
`);return}if(d.body){let e=c(d.body),t=await o(`Deleting`,async()=>s.queues.messages.purge({...e,account_id:f,queue_id:d[`queue-id`]}));i(t,{successLabel:`Deleted`});return}if(d.refs===void 0)throw Error(`--refs is required (or pass --body with this field set).`);let p=u({refs:l(d.refs,`refs`)}),h=await o(`Deleting`,async()=>s.queues.messages.purge({...p,account_id:f,queue_id:d[`queue-id`]}));i(h,{successLabel:`Deleted`})})};function q(e){return e.usage(`$0 queues messages push <queue-id>
|
|
38
|
+
|
|
39
|
+
Pushes a message to a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`delay-seconds`,{type:`number`,description:`The number of seconds to wait for attempting to deliver this message to consumers`}).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 J={command:`push <queue-id>`,describe:`Push Message`,builder:q,handler:async l=>s({command:`queues messages push`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues messages push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/messages`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({delay_seconds:l[`delay-seconds`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.messages.push({body:e,account_id:d,queue_id:l[`queue-id`]}));i(t,{successLabel:`Created`});return}let f=u({delay_seconds:l[`delay-seconds`]}),p=await o(`Creating`,async()=>s.queues.messages.push({body:f,account_id:d,queue_id:l[`queue-id`]}));i(p,{successLabel:`Created`})})},Y={command:`messages`,describe:`Push messages to a queue and pull or acknowledge them from consumers`,builder:e=>e.command(L).command(z).command(te).command(H).command(W).command(K).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 queues metrics get <queue-id>
|
|
40
|
+
|
|
41
|
+
Returns best-effort metrics for a Queue. Values may be approximate due to the distributed nature of Queues.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Z={command:`get <queue-id>`,describe:`Get Queue Metrics`,builder:X,handler:async c=>s({command:`queues metrics get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues metrics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}/metrics`,pathParams:{"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.metrics.get({account_id:l,queue_id:c[`queue-id`]}));i(u,{successLabel:`Loaded`})})},Q={command:`metrics`,describe:`Operations for metrics`,builder:e=>e.command(Z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ne(e){return e.usage(`$0 queues purge start <queue-id>
|
|
42
|
+
|
|
43
|
+
Starts a purge that deletes all messages from a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`delete-messages-permanently`,{type:`boolean`,description:`Confirms that all messages will be permanently deleted.`}).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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const re={command:`start <queue-id>`,describe:`Purge Queue`,builder:ne,handler:async l=>s({command:`queues purge start`,classification:{safeFlags:[`delete-messages-permanently`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues purge start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/purge`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({delete_messages_permanently:l[`delete-messages-permanently`]}):c(l.body)});return}let s=await t(l),d=l.local?e:await r();if(l.accountId=d,!await m({force:!!l.force,message:`This operation drops every message in the queue.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}if(l.body){let e=c(l.body),t=await o(`Deleting`,async()=>s.queues.purge.start({...e,account_id:d,queue_id:l[`queue-id`]}));i(t,{successLabel:`Deleted`});return}let f=u({delete_messages_permanently:l[`delete-messages-permanently`]}),p=await o(`Deleting`,async()=>s.queues.purge.start({...f,account_id:d,queue_id:l[`queue-id`]}));i(p,{successLabel:`Deleted`})})};function ie(e){return e.usage(`$0 queues purge status <queue-id>
|
|
45
|
+
|
|
46
|
+
Returns the status of a Queue purge operation.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ae={command:`status <queue-id>`,describe:`Get Queue Purge Status`,builder:ie,handler:async c=>s({command:`queues purge status`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues purge status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues/${c[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(c[`queue-id`]))}/purge`,pathParams:{"queue-id":String(c[`queue-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.purge.status({account_id:l,queue_id:c[`queue-id`]}));i(u,{successLabel:`Loaded`})})},oe={command:`purge`,describe:`Remove all pending messages from a queue`,builder:e=>e.command(re).command(ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function se(e){return e.usage(`$0 queues subscriptions create
|
|
47
|
+
|
|
48
|
+
Creates an event subscription for a Queue.`).option(`destination-queue-id`,{type:`string`,description:`ID of the target queue`}).option(`destination-type`,{type:`string`,description:`Type of destination`,choices:[`queues.queue`]}).option(`enabled`,{type:`boolean`,description:`Whether the subscription is active`}).option(`events`,{type:`string`,array:!0,description:`List of event types this subscription handles`}).option(`name`,{type:`string`,description:`Name of the subscription`}).option(`source-type`,{type:`string`,description:`Type of source`,choices:[`images`,`kv`,`r2`,`superSlurper`,`vectorize`,`workersAi.model`,`workersBuilds.worker`,`workers.script`,`workflows.workflow`]}).option(`source-model-name`,{type:`string`,description:`Name of the Workers AI model`}).option(`source-worker-name`,{type:`string`,description:`Name of the worker`}).option(`source-script-tag`,{type:`string`,description:`Tag of the Worker script`}).option(`source-workflow-name`,{type:`string`,description:`Name of the workflow`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`source-model-name`,[`source-worker-name`,`source-script-tag`,`source-workflow-name`]).conflicts(`source-worker-name`,[`source-model-name`,`source-script-tag`,`source-workflow-name`]).conflicts(`source-script-tag`,[`source-model-name`,`source-worker-name`,`source-workflow-name`]).conflicts(`source-workflow-name`,[`source-model-name`,`source-worker-name`,`source-script-tag`]).check(e=>{if([`destination-queue-id`,`destination-type`].some(t=>e[t]!==void 0)){let t=[`destination-queue-id`,`destination-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --destination-* flag is set`)}return!0})}const ce={command:`create`,describe:`Create Event Subscription`,builder:se,handler:async l=>s({command:`queues subscriptions create`,classification:{safeFlags:[`destination-type`,`enabled`,`source-type`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({destination:{queue_id:d(l[`destination-queue-id`],`destination-queue-id`,`text`),type:d(l[`destination-type`],`destination-type`,`text`)},enabled:l.enabled,events:l.events,name:d(l.name,`name`,`text`),source:{type:d(l[`source-type`],`source-type`,`text`),model_name:d(l[`source-model-name`],`source-model-name`,`text`),worker_name:d(l[`source-worker-name`],`source-worker-name`,`text`),script_tag:d(l[`source-script-tag`],`source-script-tag`,`text`),workflow_name:d(l[`source-workflow-name`],`source-workflow-name`,`text`)}}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Creating`,async()=>s.queues.subscriptions.create({...e,account_id:f}));i(t,{successLabel:`Created`});return}let p=u({destination:{queue_id:d(l[`destination-queue-id`],`destination-queue-id`,`text`),type:d(l[`destination-type`],`destination-type`,`text`)},enabled:l.enabled,events:l.events,name:d(l.name,`name`,`text`),source:{type:d(l[`source-type`],`source-type`,`text`),model_name:d(l[`source-model-name`],`source-model-name`,`text`),worker_name:d(l[`source-worker-name`],`source-worker-name`,`text`),script_tag:d(l[`source-script-tag`],`source-script-tag`,`text`),workflow_name:d(l[`source-workflow-name`],`source-workflow-name`,`text`)}}),m=await o(`Creating`,async()=>s.queues.subscriptions.create({...p,account_id:f}));i(m,{successLabel:`Created`})})};function le(e){return e.usage(`$0 queues subscriptions delete <subscription-id>
|
|
49
|
+
|
|
50
|
+
Deletes an existing Queue event subscription.`).positional(`subscription-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const ue={command:`delete <subscription-id>`,describe:`Delete Event Subscription`,builder:le,handler:async c=>s({command:`queues subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions/${c[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(c[`subscription-id`]))}`,pathParams:{"subscription-id":String(c[`subscription-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
51
|
+
`);return}let u=await o(`Deleting`,async()=>s.queues.subscriptions.delete({account_id:l,subscription_id:c[`subscription-id`]}));i(u,{successLabel:`Deleted`})})};function de(e){return e.usage(`$0 queues subscriptions get <subscription-id>
|
|
52
|
+
|
|
53
|
+
Returns an existing Queue event subscription.`).positional(`subscription-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const fe={command:`get <subscription-id>`,describe:`Get Event Subscription`,builder:de,handler:async c=>s({command:`queues subscriptions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){let e=await n();a({command:`cf queues subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions/${c[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(c[`subscription-id`]))}`,pathParams:{"subscription-id":String(c[`subscription-id`]??``)},bodyKind:`none`});return}let s=await t(c),l=c.local?e:await r();c.accountId=l;let u=await o(`Loading`,async()=>s.queues.subscriptions.get({account_id:l,subscription_id:c[`subscription-id`]}));i(u,{successLabel:`Loaded`})})};function pe(e){return e.usage(`$0 queues subscriptions list
|
|
54
|
+
|
|
55
|
+
Returns a paginated list of Queue event subscriptions with optional sorting and filtering.`).option(`page`,{type:`number`,description:`Page number for pagination`}).option(`per-page`,{type:`number`,description:`Number of items per page`}).option(`order`,{type:`string`,description:`Field to sort by`,choices:[`created_at`,`name`,`enabled`,`source`]}).option(`direction`,{type:`string`,description:`Sort direction`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const $={command:`list`,describe:`List Event Subscriptions`,builder:h(pe),handler:async c=>s({command:`queues subscriptions list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},c,async()=>{let s={page:c.page,per_page:c[`per-page`],order:c.order,direction:c.direction};if(c.dryRun){let e=await n();a({command:`cf queues subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await t(c),u=c.local?e:await r();c.accountId=u;let d=await o(`Loading`,async()=>l.queues.subscriptions.list({account_id:u,...s}));i(d,{successLabel:`Loaded`})})};function me(e){return e.usage(`$0 queues subscriptions update <subscription-id>
|
|
56
|
+
|
|
57
|
+
Updates an existing Queue event subscription.`).positional(`subscription-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`destination-queue-id`,{type:`string`,description:`ID of the target queue`}).option(`destination-type`,{type:`string`,description:`Type of destination`,choices:[`queues.queue`]}).option(`enabled`,{type:`boolean`,description:`Whether the subscription is active`}).option(`events`,{type:`string`,array:!0,description:`List of event types this subscription handles`}).option(`name`,{type:`string`,description:`Name of the subscription`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).check(e=>{if([`destination-queue-id`,`destination-type`].some(t=>e[t]!==void 0)){let t=[`destination-queue-id`,`destination-type`].filter(t=>e[t]===void 0);if(t.length>0)throw Error(`${t.map(e=>`--`+e).join(`, `)} ${t.length===1?`is`:`are`} required when any --destination-* flag is set`)}return!0})}const he={command:`update <subscription-id>`,describe:`Update Event Subscription`,builder:me,handler:async l=>s({command:`queues subscriptions update`,classification:{safeFlags:[`destination-type`,`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){let e=await n();a({command:`cf queues subscriptions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions/${l[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(l[`subscription-id`]))}`,pathParams:{"subscription-id":String(l[`subscription-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({destination:{queue_id:d(l[`destination-queue-id`],`destination-queue-id`,`text`),type:d(l[`destination-type`],`destination-type`,`text`)},enabled:l.enabled,events:l.events,name:d(l.name,`name`,`text`)}):c(l.body)});return}let s=await t(l),f=l.local?e:await r();if(l.accountId=f,l.body){let e=c(l.body),t=await o(`Updating`,async()=>s.queues.subscriptions.update({...e,account_id:f,subscription_id:l[`subscription-id`]}));i(t,{successLabel:`Updated`});return}let p=u({destination:{queue_id:d(l[`destination-queue-id`],`destination-queue-id`,`text`),type:d(l[`destination-type`],`destination-type`,`text`)},enabled:l.enabled,events:l.events,name:d(l.name,`name`,`text`)}),m=await o(`Updating`,async()=>s.queues.subscriptions.update({...p,account_id:f,subscription_id:l[`subscription-id`]}));i(m,{successLabel:`Updated`})})},ge={command:`subscriptions`,describe:`Manage queue subscriptions for event-driven message routing`,builder:e=>e.command(ce).command(ue).command(fe).command($).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},_e={command:`queues`,describe:`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).command(T).command(Y).command(Q).command(oe).command(ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{_e as default};
|