cf 1.0.0-beta.13 → 1.0.0-beta.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -0
- package/dist/_meta/commands.json +5039 -2465
- package/dist/_meta/hand-written-commands.json +375 -22
- package/dist/_meta/schemas.json +2607 -1038
- package/dist/abuse-reports-CnQBtN1G.mjs +24 -0
- package/dist/access-BzmXSwzj.mjs +2 -0
- package/dist/account-tags-2qPWbW17.mjs +15 -0
- package/dist/accounts-B0Byg-AV.mjs +132 -0
- package/dist/acm-DgAu0cnk.mjs +15 -0
- package/dist/addressing-J1oa0ML2.mjs +105 -0
- package/dist/agent-memory-4KGou-tm.mjs +34 -0
- package/dist/ai-WY7wVQfA.mjs +31 -0
- package/dist/ai-audit-D38HaEoZ.mjs +6 -0
- package/dist/ai-gateway-C0gIipT8.mjs +80 -0
- package/dist/ai-search-ClwnPU-9.mjs +79 -0
- package/dist/ai-security-BIsvFPYV.mjs +10 -0
- package/dist/alerting-MHhv28oO.mjs +56 -0
- package/dist/analytics-BfBz7bqB.mjs +17 -0
- package/dist/analytics_engine-CXVdBF1n.mjs +4 -0
- package/dist/api-eMuS5GI1.mjs +3 -0
- package/dist/api-security-DUCfcdC1.mjs +154 -0
- package/dist/argo-CUlzI4v3.mjs +14 -0
- package/dist/artifacts-BLfWGzBg.mjs +43 -0
- package/dist/audit-logs-CsfIm2QS.mjs +4 -0
- package/dist/auth-8Sm4uLGM.mjs +2 -0
- package/dist/auth-C6u9qIGO.mjs +2 -0
- package/dist/auth-CGRemu5W.mjs +2 -0
- package/dist/{auth-token-pNQrX_9O.mjs → auth-token-DkkYg4DP.mjs} +1 -1
- package/dist/{autoconfig-sD7Frryg.mjs → autoconfig-B0ESZ8DJ.mjs} +2 -2
- package/dist/basin-catalog-CrKRYJ0b.mjs +46 -0
- package/dist/billing-NxehgXrR.mjs +23 -0
- package/dist/blocks-Bat9A8V_.mjs +5 -0
- package/dist/bot-management-C993iQKL.mjs +9 -0
- package/dist/botnet-feed-CZ4vYk5y.mjs +11 -0
- package/dist/brand-protection-ADVgIi0l.mjs +27 -0
- package/dist/browser-run-CEptKZYl.mjs +42 -0
- package/dist/build-Bm6kGyzo.mjs +2 -0
- package/dist/{build-HmSXqjGn.mjs → build-sBpqm9ga.mjs} +1 -1
- package/dist/builds-DqtiTH7p.mjs +71 -0
- package/dist/cache-hX5QxmI0.mjs +45 -0
- package/dist/certificate-authorities-BOcybjc1.mjs +6 -0
- package/dist/cf-Bq4pA4n6.mjs +18 -0
- package/dist/{chunk-TAK63GWY-DdMktrgc.mjs → chunk-2HLTAS5V-D7COzUOd.mjs} +2 -2
- package/dist/chunk-2K52M2W5-CYxfQXUq.mjs +363 -0
- package/dist/{chunk-DSGVRFIS-C1_SEtRK.mjs → chunk-DSGVRFIS-C5SqiTOz.mjs} +1 -1
- package/dist/{cli-DeJc9U8z.mjs → cli-R8h3OKZI.mjs} +1 -1
- package/dist/client-certificates-Bez_ArKE.mjs +13 -0
- package/dist/client-side-security-CSmA50Bv.mjs +63 -0
- package/dist/cloud-connector-0Wivqi7S.mjs +6 -0
- package/dist/{cloudflared--1Ws1RJy.mjs → cloudflared-By8BzYXc.mjs} +1 -1
- package/dist/cloudforce-one-J-rU6k1U.mjs +405 -0
- package/dist/{command-Dh7RmjFu.mjs → command-0BOb1pgV.mjs} +1 -1
- package/dist/{command-DUhX8Dcr.mjs → command-BCJN-ZM2.mjs} +1 -1
- package/dist/{command-BvfKhMl7.mjs → command-BG-kLOnS.mjs} +1 -1
- package/dist/{command-Cu7dcaHT.mjs → command-BIsI-mMX.mjs} +1 -1
- package/dist/{command-83uVfXh9.mjs → command-BKDbbA-L.mjs} +1 -1
- package/dist/command-BWQIKu6I.mjs +2 -0
- package/dist/{command-D3fyhdy-.mjs → command-Bdy69UFU.mjs} +1 -1
- package/dist/{command-BDe67N_n.mjs → command-Bgb-3yPg.mjs} +1 -1
- package/dist/{command-_rqD0hXF.mjs → command-C6w1OdoC.mjs} +1 -1
- package/dist/{command-oNVwyjGB.mjs → command-CKW6UhTh.mjs} +1 -1
- package/dist/{command-Bpzp8Mz2.mjs → command-DCQgsd2U.mjs} +1 -1
- package/dist/{command-CcuLC6CJ.mjs → command-DIs-Nqtl.mjs} +1 -1
- package/dist/command-DPn5ANHs.mjs +2 -0
- package/dist/{command-CG6RvZs0.mjs → command-DZfKHiru.mjs} +1 -1
- package/dist/{command-BlIb6RR2.mjs → command-DppVezAB.mjs} +1 -1
- package/dist/{completions-D06AO7A8.mjs → completions-CpNGTlUX.mjs} +1 -1
- package/dist/config.mjs +0 -0
- package/dist/connector-interrupts-CH-DaLuo.mjs +6 -0
- package/dist/connector-telemetry-events-X3Fod9nl.mjs +6 -0
- package/dist/connector-telemetry-snapshots-D-WR4npQ.mjs +6 -0
- package/dist/connectors-CORKD31m.mjs +15 -0
- package/dist/containers-BboUbx3k.mjs +78 -0
- package/dist/containers-Di3_Vopq.mjs +376 -0
- package/dist/content-scan-DXGREAXa.mjs +14 -0
- package/dist/{context-q7UaYK69.mjs → context-A6T-NKPI.mjs} +2 -2
- package/dist/cps-1BoOLtTq.mjs +6 -0
- package/dist/create-OXylMu6m.mjs +2 -0
- package/dist/csamScanner-CHfbfeup.mjs +10 -0
- package/dist/ct-alerting-DlH4ILQo.mjs +5 -0
- package/dist/custom-certificates-zJqJZ2Th.mjs +17 -0
- package/dist/custom-csrs-DoLIGqYL.mjs +11 -0
- package/dist/custom-hostnames-YfV-aoAK.mjs +27 -0
- package/dist/custom-nameservers-BV43gmgt.mjs +9 -0
- package/dist/custom-pages-CoOU1Cdx.mjs +21 -0
- package/dist/d1-DujBmzLa.mjs +94 -0
- package/dist/dcv-delegation-CPLsVYOl.mjs +4 -0
- package/dist/delegate.mjs +0 -0
- package/dist/deploy-context-tEhwEXnA.mjs +56 -0
- package/dist/{deploy-input-Cc0_2QlW.mjs → deploy-input-BqJ7GVZ-.mjs} +1 -1
- package/dist/{deploy-CWNm1-5v.mjs → deploy-wNujfGUJ.mjs} +1 -1
- package/dist/{dev-ZA8itQE7.mjs → dev-EtnMYA7K.mjs} +1 -1
- package/dist/diagnostics-B3TYPVRi.mjs +15 -0
- package/dist/dist-DZRTPMMA.mjs +449 -0
- package/dist/dls-CWm1HRF0.mjs +17 -0
- package/dist/dns-CjAFU7Z9.mjs +144 -0
- package/dist/dns-firewall-BooBP9ap.mjs +71 -0
- package/dist/docs-C5XB7HdG.mjs +3 -0
- package/dist/{dotenv-DpXaxfho.mjs → dotenv-usOKkeW7.mjs} +3 -3
- package/dist/{dry-run-DRj2_uV3.mjs → dry-run-C2KjGX10.mjs} +1 -1
- package/dist/durable-objects-CSrMQDCE.mjs +6 -0
- package/dist/email-auth-Bp1Mui-n.mjs +6 -0
- package/dist/email-routing-CVF6SwQt.mjs +45 -0
- package/dist/email-security-mYZtazae.mjs +158 -0
- package/dist/email-sending-BqaKU_Xu.mjs +47 -0
- package/dist/error-sanitization-CIQOep3I.mjs +2 -0
- package/dist/error-sanitization-pOyzm2F1.mjs +2 -0
- package/dist/fieldExtractors-CAGZVmYg.mjs +9 -0
- package/dist/firewall-DgTDsYOt.mjs +36 -0
- package/dist/flagship-Db3PxxyZ.mjs +28 -0
- package/dist/fraud-BEOQczy8.mjs +22 -0
- package/dist/get-By1q8YlI.mjs +2 -0
- package/dist/get-CRKvqCu6.mjs +2 -0
- package/dist/get-iPUHxD1r.mjs +2 -0
- package/dist/google-tag-gateway-DjLQ9wo0.mjs +6 -0
- package/dist/hand-written-dry-run-B82fRl2N.mjs +2 -0
- package/dist/healthchecks-C3ScnKss.mjs +22 -0
- package/dist/{hostnames-sF999-6H.mjs → hostnames-DU0k-xO9.mjs} +6 -6
- package/dist/hyperdrive-IpCCLCRd.mjs +37 -0
- package/dist/iam-96CYM8Vw.mjs +52 -0
- package/dist/images-AB9EgZgT.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-1w_mcgk3.mjs → init-D2nPoW4f.mjs} +2 -2
- package/dist/intel-BKb4RLvS.mjs +76 -0
- package/dist/ips-z9APCV_b.mjs +4 -0
- package/dist/k2-Bv-HiJ29.mjs +11 -0
- package/dist/keyless-certificates-ChgSGHq4.mjs +13 -0
- package/dist/keys-BhngDsDa.mjs +4 -0
- package/dist/kv-CB5MQVGP.mjs +15 -0
- package/dist/{lazy-command-BDiIwpss.mjs → lazy-command-CaZ1kdlW.mjs} +1 -1
- package/dist/leaked-credential-checks-Bsi2WpSU.mjs +18 -0
- package/dist/load-balancers-0gXZNCeI.mjs +76 -0
- package/dist/{local-DlT72Xpn.mjs → local-Dil4fTWX.mjs} +1 -1
- package/dist/local-DxWDQDnG.mjs +2 -0
- package/dist/{local-runtime-CokO6qaX.mjs → local-runtime-B7TKFu6E.mjs} +1 -1
- package/dist/login-CiQGR8ha.mjs +5 -0
- package/dist/login-Ik98G4K6.mjs +2 -0
- package/dist/logo-matches-DmoF5Otu.mjs +6 -0
- package/dist/logos-BL6ohIMH.mjs +7 -0
- package/dist/logpush-UVopW68t.mjs +46 -0
- package/dist/logs-BVfxiEiM.mjs +36 -0
- package/dist/magic-cloud-networking-B5S3aM6f.mjs +71 -0
- package/dist/magic-network-monitoring-CDSJPP47.mjs +36 -0
- package/dist/magic-transit-TcDTKM43.mjs +386 -0
- package/dist/managed-defense-C88HL0pg.mjs +18 -0
- package/dist/managed-transforms-Ja41Tahl.mjs +9 -0
- package/dist/matches-BL_Y-9Yq.mjs +6 -0
- package/dist/mcp-BWp5Q09R.mjs +32 -0
- package/dist/mesh-lFPLRWhV.mjs +26 -0
- package/dist/{migrate-CZNq63Uj.mjs → migrate-6e5mJ79R.mjs} +1 -1
- package/dist/monetization-BIc4Bwo2.mjs +20 -0
- package/dist/mtls-certificates-CVBw-Jli.mjs +13 -0
- package/dist/network-Wig0qbaC.mjs +50 -0
- package/dist/network-interconnects-C16z1HuQ.mjs +72 -0
- package/dist/o11y-Bhy4qDRm.mjs +93 -0
- package/dist/oauth-CfEedDZi.mjs +4 -0
- package/dist/oauth-clients-eXjmK5yf.mjs +16 -0
- package/dist/{oauth-mspHHU5U.mjs → oauth-oWaW7ICv.mjs} +1 -1
- package/dist/oauth-scopes-DZWn50EA.mjs +4 -0
- package/dist/organization-QdAQTrKa.mjs +71 -0
- package/dist/organizations-CgAQYdK5.mjs +4 -0
- package/dist/origin-ca-certificates-BklXqp8X.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Dg16ueT4.mjs +6 -0
- package/dist/origin-tls-client-auth-d8bDU5zU.mjs +30 -0
- package/dist/output-Co4xdFf6.mjs +2 -0
- package/dist/page-rules-CgMkC6YR.mjs +39 -0
- package/dist/pages-CkBtOOf8.mjs +54 -0
- package/dist/path-DRw6Y-nd.mjs +2 -0
- package/dist/pay-per-crawl-CnGXOWyz.mjs +38 -0
- package/dist/pay-per-use-HbfxpATr.mjs +33 -0
- package/dist/pipelines-CnO9CCs0.mjs +44 -0
- package/dist/precursor-Bc55XJdQ.mjs +4 -0
- package/dist/previews-C7vZrajd.mjs +7 -0
- package/dist/progress-D5po7ScB.mjs +2 -0
- package/dist/prompt-BAJpE3jV.mjs +4 -0
- package/dist/queries-BJAH4B74.mjs +9 -0
- package/dist/queues-D4G8vvwi.mjs +57 -0
- package/dist/r2-CJ8rD6Jb.mjs +128 -0
- package/dist/{radar-DrQLcbkq.mjs → radar-DgaxOdcd.mjs} +150 -150
- package/dist/raw-fetch-yY-wX5Xx.mjs +2 -0
- package/dist/realtime-DU09m7L7.mjs +172 -0
- package/dist/registrar-Cj7OfvGs.mjs +43 -0
- package/dist/registrar-sandbox-CA0Mua-j.mjs +56 -0
- package/dist/{registry-CHowrQsZ.mjs → registry-CRnk93ur.mjs} +1 -1
- package/dist/reporting-3kDVF5c8.mjs +14 -0
- package/dist/{request-headers-DiJeDAn1.mjs → request-headers-D_eQn93b.mjs} +1 -1
- package/dist/request-tracers-VBD4R3s3.mjs +4 -0
- package/dist/resolve-BpgXeklt.mjs +2 -0
- package/dist/resolve-C3FmNlSO.mjs +2 -0
- package/dist/resource-sharing-BtUF3psS.mjs +40 -0
- package/dist/resource-tagging--90INP8_.mjs +4 -0
- package/dist/rules-CcwPngVo.mjs +18 -0
- package/dist/rulesets-CfdruY82.mjs +37 -0
- package/dist/rum-RLkdfSL7.mjs +30 -0
- package/dist/run-CUNhH5CQ.mjs +2 -0
- package/dist/{run-BvHwWWUX.mjs → run-DASYqJsY.mjs} +1 -1
- package/dist/{schema-elj12WOx.mjs → schema-S3pUZwpI.mjs} +1 -1
- package/dist/{schema-flags-BzoBGPWk.mjs → schema-flags-CShtn7ya.mjs} +1 -1
- package/dist/scim-BZYsTPIL.mjs +18 -0
- package/dist/secrets-store-C_-FkSH_.mjs +24 -0
- package/dist/security-insights-BVBEaZmD.mjs +40 -0
- package/dist/security-txt--IoHrHee.mjs +9 -0
- package/dist/session-Cq3YNLoI.mjs +2 -0
- package/dist/shared-zNQNv1im.mjs +2 -0
- package/dist/smart-shield-CByC4_60.mjs +24 -0
- package/dist/snippets-DB-jiZAV.mjs +20 -0
- package/dist/{spawn-IysxuTNW.mjs → spawn-DQttFH05.mjs} +1 -1
- package/dist/spectrum-Bs2g1BmK.mjs +83 -0
- package/dist/speed-Bq4evEnJ.mjs +24 -0
- package/dist/sql-XGci7hZC.mjs +4 -0
- package/dist/src-GiuwAT55.mjs +125 -0
- package/dist/ssl-KJTLW1NR.mjs +45 -0
- package/dist/{startup-profile-CdJWgNjd.mjs → startup-profile-BOaseXnO.mjs} +1 -1
- package/dist/startup-profile-BwEZFVGS.mjs +2 -0
- package/dist/{state-BDSvdSdP.mjs → state-Boubf1X6.mjs} +1 -1
- package/dist/state-CODDG9Nx.mjs +2 -0
- package/dist/stream-BotgYspF.mjs +102 -0
- package/dist/submit-C5VytaHP.mjs +4 -0
- package/dist/{tags-CA1xMM96.mjs → tags-3Hq-B9qp.mjs} +2 -2
- package/dist/{telemetry-Cm39QJ-M.mjs → telemetry-3FJOXl_C.mjs} +1 -1
- package/dist/telemetry-BhKfwxyh.mjs +2 -0
- package/dist/tenant-BgX5onPc.mjs +10 -0
- package/dist/tenant-custom-nameservers-BVG8v1Xo.mjs +9 -0
- package/dist/theme-BGHWSKCw.mjs +6 -0
- package/dist/{tools-CSc5DmFi.mjs → tools-BCCRUENY.mjs} +1 -1
- package/dist/tunnels-CThOI3qH.mjs +29 -0
- package/dist/turnstile-BgZaUx-g.mjs +33 -0
- package/dist/ui-BtIBQeaG.mjs +2 -0
- package/dist/update-check-Yy7Ivq2V.mjs +2 -0
- package/dist/{update-check-CMXSdres.mjs → update-check-jb89ih_g.mjs} +1 -1
- package/dist/update-check-worker.mjs +1 -1
- package/dist/url-info-DQERN0Xq.mjs +4 -0
- package/dist/url-normalization-Cb1hofqv.mjs +9 -0
- package/dist/url-scanner-gHgx1bW7.mjs +16 -0
- package/dist/user-CdKzIuSi.mjs +112 -0
- package/dist/values-EwA8Sx0w.mjs +4 -0
- package/dist/vectorize-DejgIJIv.mjs +32 -0
- package/dist/version-B6MnUIqV.mjs +2 -0
- package/dist/waiting-rooms-BNR1HvAP.mjs +53 -0
- package/dist/web-assets-iglnzkTV.mjs +64 -0
- package/dist/web3-JBUU6IVt.mjs +28 -0
- package/dist/workers-CDp4kLTJ.mjs +40 -0
- package/dist/workers-builds-CSb9Dglt.mjs +14 -0
- package/dist/workers-for-platforms-D4srNZvt.mjs +40 -0
- package/dist/workers-vpc-LPC8TadH.mjs +13 -0
- package/dist/workflows-DN_VqWJC.mjs +52 -0
- package/dist/{wrangler-migration-C6FKHER1.mjs → wrangler-migration-DxTB5yPT.mjs} +1 -1
- package/dist/zaraz-DDErl5yc.mjs +22 -0
- package/dist/zero-trust-M88XX3uD.mjs +957 -0
- package/dist/zone-BsGvedmN.mjs +4 -0
- package/dist/zones-l_sRKrVl.mjs +124 -0
- package/package.json +17 -20
- package/dist/Page-BShsqCXr.mjs +0 -2
- package/dist/abuse-reports-BjU1s8cf.mjs +0 -24
- package/dist/access-C_G2MZnA.mjs +0 -2
- package/dist/account-tags-CaXDDeZ4.mjs +0 -15
- package/dist/accounts-BALwxDQY.mjs +0 -131
- package/dist/acm-CP9EaXQN.mjs +0 -15
- package/dist/addressing-DRlaxqrI.mjs +0 -93
- package/dist/agent-memory-vGhlfZBx.mjs +0 -34
- package/dist/ai-CJtbWfB9.mjs +0 -31
- package/dist/ai-audit-C0BJNqZZ.mjs +0 -6
- package/dist/ai-gateway-BQtv3U3x.mjs +0 -80
- package/dist/ai-search-DGU1Y5By.mjs +0 -79
- package/dist/ai-security-CFTaYk_X.mjs +0 -10
- package/dist/alerting-1hun27JC.mjs +0 -56
- package/dist/analytics-DXUSjvzT.mjs +0 -17
- package/dist/analytics_engine-CQsnL09C.mjs +0 -4
- package/dist/api-security-BXhrfR6-.mjs +0 -154
- package/dist/argo-LPUCTnee.mjs +0 -14
- package/dist/args-CfbYkeXd.mjs +0 -2
- package/dist/artifacts-Dt6easua.mjs +0 -43
- package/dist/audit-logs-CVznAM2Z.mjs +0 -4
- package/dist/auth-CGLsxbc6.mjs +0 -2
- package/dist/auth-CrmVwfpJ.mjs +0 -2
- package/dist/auth-eQr-kQCH.mjs +0 -2
- package/dist/banner-D03JEqRs.mjs +0 -2
- package/dist/basin-catalog-ZQICw-zF.mjs +0 -46
- package/dist/billing-Dy1-dV_B.mjs +0 -23
- package/dist/bot-management-DTgPwL7O.mjs +0 -9
- package/dist/botnet-feed-xb98Cj3Y.mjs +0 -11
- package/dist/brand-protection-Ck3okE2k.mjs +0 -27
- package/dist/browser-run-DJGJSzFX.mjs +0 -42
- package/dist/build-B1L6xrgC.mjs +0 -2
- package/dist/builds-CYxcZtkG.mjs +0 -71
- package/dist/cache-D9tSfovH.mjs +0 -45
- package/dist/certificate-authorities-CpiveTFC.mjs +0 -6
- package/dist/cf-BxsXrVeh.mjs +0 -18
- package/dist/chunk-NDZDTP46-Bjx_wtJe.mjs +0 -361
- package/dist/cli-types-9oYmRTHJ.mjs +0 -2
- package/dist/client-certificates-CF6YZyvP.mjs +0 -13
- package/dist/client-side-security-BLoe9kS5.mjs +0 -63
- package/dist/cloud-connector-DXRUHsjt.mjs +0 -6
- package/dist/cloudforce-one-CBLxXi6v.mjs +0 -447
- package/dist/command-DwXiDOeH.mjs +0 -2
- package/dist/command-UiHLJ8Ji.mjs +0 -2
- package/dist/connector-interrupts-DelTmNyw.mjs +0 -6
- package/dist/connector-telemetry-events-BwxR3G8d.mjs +0 -6
- package/dist/connector-telemetry-snapshots-Bqq-hrpJ.mjs +0 -6
- package/dist/connectors-D-m3rEpk.mjs +0 -15
- package/dist/containers-CVNfEjJs.mjs +0 -78
- package/dist/containers-DeoZyeQe.mjs +0 -375
- package/dist/content-scan-W0BNzbQp.mjs +0 -14
- package/dist/cps-BZ6hqRb5.mjs +0 -6
- package/dist/csamScanner-Bo1t3CLh.mjs +0 -10
- package/dist/ct-alerting-E03faC7p.mjs +0 -5
- package/dist/custom-certificates-CUySSPzi.mjs +0 -17
- package/dist/custom-csrs-gNpWkJPQ.mjs +0 -11
- package/dist/custom-hostnames-abGBAbx7.mjs +0 -27
- package/dist/custom-nameservers-BgNXol1P.mjs +0 -9
- package/dist/custom-pages-DMKX3aoD.mjs +0 -21
- package/dist/d1-CE08YqYk.mjs +0 -93
- package/dist/dcv-delegation-B5YUEWu0.mjs +0 -4
- package/dist/deploy-context-Dr6bxNcB.mjs +0 -56
- package/dist/diagnostics-UMbG6m4n.mjs +0 -15
- package/dist/dist-BHEmAAHr.mjs +0 -487
- package/dist/dls-DIl16mLp.mjs +0 -17
- package/dist/dns-QUpgljRG.mjs +0 -144
- package/dist/dns-firewall-BZwJXHLj.mjs +0 -71
- package/dist/durable-objects-BCj4ykpU.mjs +0 -6
- package/dist/email-auth-DlHIYhCk.mjs +0 -6
- package/dist/email-routing-UKVS4DYy.mjs +0 -45
- package/dist/email-security-CZjfRIg0.mjs +0 -158
- package/dist/email-sending-Dquc880C.mjs +0 -47
- package/dist/error-sanitization-DE_zSrXw.mjs +0 -2
- package/dist/error-sanitization-DOCQ9Ykh.mjs +0 -2
- package/dist/errors-_sob7Ihu.mjs +0 -3
- package/dist/fieldExtractors-BbwDRquU.mjs +0 -9
- package/dist/firewall--mTfDnCJ.mjs +0 -36
- package/dist/flagship-cfoSwwM9.mjs +0 -28
- package/dist/fraud-Dcsq3EYK.mjs +0 -22
- package/dist/google-tag-gateway-DPKSkZQi.mjs +0 -6
- package/dist/healthchecks-D78hIIBC.mjs +0 -22
- package/dist/hyperdrive-qWACKfA4.mjs +0 -37
- package/dist/iam-Bvg_PayW.mjs +0 -52
- package/dist/images-DI_lEZ4L.mjs +0 -71
- package/dist/intel-BxElBUMP.mjs +0 -76
- package/dist/ips-DWoaKxi7.mjs +0 -4
- package/dist/k2-tFjaftl-.mjs +0 -11
- package/dist/keyless-certificates-BrvxHU4J.mjs +0 -13
- package/dist/keys-DcwTYKRf.mjs +0 -4
- package/dist/kv-htXS-7uP.mjs +0 -15
- package/dist/leaked-credential-checks-bvGrLOmQ.mjs +0 -18
- package/dist/load-balancers-BNTUt4yG.mjs +0 -76
- package/dist/local-DlDumOSC.mjs +0 -2
- package/dist/login-BGF_I_LT.mjs +0 -5
- package/dist/login-Ccw-mYwT.mjs +0 -2
- package/dist/logo-matches-tE8LTKgg.mjs +0 -6
- package/dist/logos-Bj845Mcw.mjs +0 -7
- package/dist/logpush-Cs8JdvKi.mjs +0 -46
- package/dist/logs-C92XZvNu.mjs +0 -36
- package/dist/magic-cloud-networking-hNp5MMw-.mjs +0 -71
- package/dist/magic-network-monitoring-68GuWAnv.mjs +0 -36
- package/dist/magic-transit-DNd7gu4j.mjs +0 -383
- package/dist/managed-defense-B_wCAuFD.mjs +0 -18
- package/dist/managed-transforms-DZdxHPOh.mjs +0 -9
- package/dist/matches-B65CkflD.mjs +0 -6
- package/dist/mcp-DrJW5ayK.mjs +0 -32
- package/dist/mesh-DfVzYTn1.mjs +0 -26
- package/dist/monetization-BGaI8CMO.mjs +0 -20
- package/dist/mtls-certificates-BsU2emDD.mjs +0 -13
- package/dist/network-BEMD8P0U.mjs +0 -50
- package/dist/network-interconnects-DMu_fcbo.mjs +0 -68
- package/dist/o11y-C1a4gDGF.mjs +0 -93
- package/dist/oauth-Bj5Ne1o8.mjs +0 -9
- package/dist/oauth-clients-p4Etdqy_.mjs +0 -16
- package/dist/oauth-scopes-B2IabFza.mjs +0 -4
- package/dist/organization-CdXt7AVZ.mjs +0 -75
- package/dist/organizations-5S6xEp7T.mjs +0 -4
- package/dist/origin-ca-certificates-_VJAoK1D.mjs +0 -11
- package/dist/origin-post-quantum-encryption-GcldDsT2.mjs +0 -6
- package/dist/origin-tls-client-auth-DZHld9fA.mjs +0 -30
- package/dist/output-BOe-3AQG.mjs +0 -2
- package/dist/page-rules-o1tAMMsD.mjs +0 -39
- package/dist/pages-CmiOhjSl.mjs +0 -54
- package/dist/pay-per-crawl-BsnOxGYU.mjs +0 -38
- package/dist/pay-per-use-BXWMCSyE.mjs +0 -33
- package/dist/pipelines-DWLQC0F6.mjs +0 -44
- package/dist/precursor-B6DjBib6.mjs +0 -4
- package/dist/previews-dUKEBGSM.mjs +0 -4
- package/dist/progress-BtkTVcHI.mjs +0 -2
- package/dist/prompt-RlgRrmbm.mjs +0 -3
- package/dist/queries-yLwoJRHV.mjs +0 -9
- package/dist/queues-CnJRaE1o.mjs +0 -57
- package/dist/r2-CuC6-zQX.mjs +0 -128
- package/dist/raw-fetch-B4NvWuZD.mjs +0 -2
- package/dist/realtime-CjsnzHxD.mjs +0 -172
- package/dist/registrar-BgOsxTnX.mjs +0 -43
- package/dist/registrar-sandbox-3ikBD9fB.mjs +0 -56
- package/dist/reporting-hE127s5r.mjs +0 -14
- package/dist/request-tracers-BCwLxmPN.mjs +0 -4
- package/dist/resolve-CaTBV-c6.mjs +0 -2
- package/dist/resolve-DCGSzUDQ.mjs +0 -2
- package/dist/resource-sharing-2qvWUuMa.mjs +0 -40
- package/dist/resource-tagging-Dwx7iL3v.mjs +0 -4
- package/dist/rules-DxVQ6jIg.mjs +0 -18
- package/dist/rulesets-Cdh8YjI9.mjs +0 -37
- package/dist/rum-a4CMq4Qu.mjs +0 -30
- package/dist/run-CkbrPJPx.mjs +0 -2
- package/dist/scim-B8XlXl8v.mjs +0 -18
- package/dist/secrets-store-Cqhedh_i.mjs +0 -24
- package/dist/security-insights-le2-DteL.mjs +0 -40
- package/dist/security-txt-cCArWXur.mjs +0 -9
- package/dist/session-C1BhT1ZJ.mjs +0 -2
- package/dist/shared-BPjcpXuA.mjs +0 -2
- package/dist/smart-shield-Csyh8hwB.mjs +0 -24
- package/dist/snippets-DUWx25q6.mjs +0 -20
- package/dist/spectrum-Da3UYSOR.mjs +0 -83
- package/dist/speed-NxlMnB2e.mjs +0 -24
- package/dist/sql-CNdHAlQ8.mjs +0 -4
- package/dist/src-JfLDUxFr.mjs +0 -125
- package/dist/ssl-BtaX2WEJ.mjs +0 -45
- package/dist/startup-profile-B2l0ChVu.mjs +0 -2
- package/dist/state-JB4_BU1o.mjs +0 -2
- package/dist/stream-C1Ijjzn4.mjs +0 -102
- package/dist/submit-MdkuU_Pt.mjs +0 -4
- package/dist/telemetry-BsYO3nxG.mjs +0 -2
- package/dist/tenant-BB6Oszcl.mjs +0 -10
- package/dist/tenant-custom-nameservers-BsbgYAEo.mjs +0 -9
- package/dist/theme-CQ_TYifs.mjs +0 -6
- package/dist/tunnels-CRFtyHWz.mjs +0 -29
- package/dist/turnstile-DBXWo_Xe.mjs +0 -33
- package/dist/ui-YmjF66Ct.mjs +0 -5
- package/dist/update-check-C2oVEbXx.mjs +0 -2
- package/dist/url-info-t-XAs0Mk.mjs +0 -4
- package/dist/url-normalization-Cs4F8e0a.mjs +0 -9
- package/dist/url-scanner-CBIoDbTx.mjs +0 -16
- package/dist/user-CevdOMoa.mjs +0 -112
- package/dist/values-CjNlkbIh.mjs +0 -4
- package/dist/vectorize-9d9tPmg5.mjs +0 -32
- package/dist/version-BdVUXLnK.mjs +0 -2
- package/dist/waiting-rooms--5WmrWb3.mjs +0 -53
- package/dist/web-assets-BHot_MU8.mjs +0 -64
- package/dist/web3-CYfWAF6b.mjs +0 -28
- package/dist/workers-S17M0n3h.mjs +0 -40
- package/dist/workers-builds-Dw7ho3So.mjs +0 -14
- package/dist/workers-for-platforms-A3yjyLh3.mjs +0 -40
- package/dist/workers-vpc-BZ2xXtC3.mjs +0 -13
- package/dist/workflows-BgGrVpSR.mjs +0 -43
- package/dist/zaraz-BsD2dMI3.mjs +0 -22
- package/dist/zero-trust-CA3iGQbG.mjs +0 -837
- package/dist/zone-D2M4EZD0.mjs +0 -4
- package/dist/zones-BoOC_JzC.mjs +0 -124
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./dotenv-usOKkeW7.mjs";import{J as t,K as n,rt as r}from"./dist-DZRTPMMA.mjs";import{t as i}from"./hand-written-dry-run-B82fRl2N.mjs";import{t as a}from"./local-Dil4fTWX.mjs";import{i as o,n as s}from"./auth-C6u9qIGO.mjs";import{l as c,p as l}from"./interactive-BW9T1D1q.mjs";import{a as u,t as d}from"./context-A6T-NKPI.mjs";import{C as f,_ as p,d as m,f as h,l as g,r as _,t as v,x as y,y as b}from"./deploy-context-tEhwEXnA.mjs";import{t as x}from"./auth-token-DkkYg4DP.mjs";import{t as S}from"./output-Co4xdFf6.mjs";import{t as C}from"./dry-run-C2KjGX10.mjs";import{t as w}from"./progress-D5po7ScB.mjs";import{n as T,t as E}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.mjs";import{n as D}from"./prompt-BAJpE3jV.mjs";import{a as O,l as k,n as A,o as j,r as M,t as N}from"./containers-Di3_Vopq.mjs";import{a as P,i as F,n as I,o as L,r as R,s as z}from"./build-sBpqm9ga.mjs";import{t as B}from"./deploy-input-BqJ7GVZ-.mjs";import{readBuildOutput as V}from"@cloudflare/build-output-utils";function H(e){return e.usage(`$0 previews delete <name>
|
|
3
|
+
|
|
4
|
+
Delete a Preview.`).positional(`name`,{type:`string`,description:`Identifier for the Preview, which can be ID, slug, or URL-encoded name.`,demandOption:!0}).option(`worker`,{type:`string`,description:`Identifier for the Worker, which can be ID or name.`,demandOption:!0}).option(`delete-with-references`,{type:`boolean`,description:`If true, delete the Preview even when other Workers still reference it. Service bindings in those Workers may be left broken. Durable Object namespaces implemented by the deleted Preview are deleted even if other Workers reference them.`}).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:`delete <name>`,describe:`Delete Preview`,builder:H,handler:async e=>E({command:`previews delete`,classification:{safeFlags:[`delete-with-references`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let t={force:e[`delete-with-references`]};if(e.dryRun){let n=await u();C({command:`cf previews delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${n??`<account-id>`}/workers/workers/${e.worker==null?`<worker>`:encodeURIComponent(String(e.worker))}/previews/${e.name==null?`<name>`:encodeURIComponent(String(e.name))}`,pathParams:{worker:String(e.worker??``),name:String(e.name??``)},query:t,bodyKind:`none`});return}let n=await s(e),r=e.local?a:await d();if(e.accountId=r,!await D({force:!!e.force,message:`This operation permanently deletes the Preview.`})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}let i=await w(`Deleting`,async()=>o(n,`DELETE`,`/accounts/${r}/workers/workers/${encodeURIComponent(String(e.worker))}/previews/${encodeURIComponent(String(e.name))}`,{query:t}));S(i,{successLabel:`Deleted`})})};function W(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,n,i,a,o)=>G(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 r of n){let n=s.get(r.class_name);if(n||=(c??=await b(t,a),c.find(e=>e.class===r.class_name&&e.preview?.id===i.preview_id)?.id),!n)throw Error(`Could not find a Preview Durable Object namespace for Container class "${r.class_name}".`);let l=await K(r,e,i.id,a,t,o.localImageReferences?.get(r.class_name));await g({imageRef:l,durable_object_namespace_id:n},r,t,a)}await m(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),r())})}}async function G(e,t){if(!e)return t();let n=c();l(`error`);try{return await t()}finally{l(n)}}async function K(e,t,n,i,a,o){if(o!==void 0)return f({pathToDocker:r(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=t.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return y(s,n,r(),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 q(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`,R)}function J(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 Y(t){let n=t[`preview-name`],r=n??O();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:
|
|
6
|
+
|
|
7
|
+
cf previews deploy PREVIEW_NAME`);return t.prebuilt||await I(t.mode,{output:t.quiet?`silent`:`stderr`,worker:t.worker},{isPreview:!0}),e(t,()=>X(t,r))}async function X(e,r){let i=await V(process.cwd());M(i.rootConfig),L(e.mode,i.rootConfig.buildContext.mode);let a=P(i.workers,e.worker),{wranglerConfig:o,builtConfig:s}=F(a,i.rootConfig),c=await x(),l=i.rootConfig.accountId??await d({isPreview:!0,skipProjectSettings:!0,complianceRegion:t(o)}),u=v(c);k({...u,logger:{...u.logger,log:()=>{},info:()=>{}}}),p({logger:{...u.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:u.fetchResult,fetchPagedListResult:u.fetchPagedListResult});let f=new Set(Object.values(s.exports??{}).filter(A).map(({container:e})=>e)),m=i.containers?.filter(({config:e})=>f.has(e.name))??[],g=N(m,o,{accountId:l}),y=g.source;if(y?.some(e=>e.scheduling_policy===`durable_object`))throw new z(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return y&&y.length>0&&h(l,c,n(o)),j(l,{name:r,json:!0},{workerConfig:s,rootConfig:i.rootConfig,containers:m.filter(({config:e})=>y?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:a.bundleDir?B(a,s):void 0,assets:a.assetsDir?{directory:a.assetsDir}:void 0},{...W(g),verifyContainersScope:async()=>{await _.listApplications()}})}var Z=T({command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:q,handler:async e=>{if(e.local)throw Error(`--local is not supported by cf previews deploy.`);let t=await Y(e);S(J(t),{quiet:e.quiet})}},{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}});const Q={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(U).command(i(Z,`preview`)).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Q as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./theme-BGHWSKCw.mjs";import{r as t,t as n}from"./session-Cq3YNLoI.mjs";import{n as r}from"./version-B6MnUIqV.mjs";import{a as i}from"./dist-uRuGmkMB.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();n(r);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};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./theme-BGHWSKCw.mjs";import{t}from"./session-Cq3YNLoI.mjs";import{t as n}from"./cli-exit-CstFZ1eJ.mjs";import{n as r}from"./version-B6MnUIqV.mjs";import{i,o as a,r as o,s,t as c}from"./dist-uRuGmkMB.mjs";import{n as l}from"./interactive-BW9T1D1q.mjs";function u(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function d(){t(r)}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
|
+
`)?t.slice(0,-1):t}async function p(e,t,r){let i=r?.kind??`text`;if(l()){if(i===`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 c=`Enter value for --${e}`,u=t||r?.question||c,p=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;d();let m=i===`secret`?await o({message:u,mask:`•`,validate:p}):await a({message:u,validate:p});if(s(m)||typeof m!=`string`)throw new n(130,{cancelled:!0});return m}async function m(e,t,r,a={}){let o=u(e),c=r.map(u);if(l())throw Error(`--${o} is required (one of: ${c.join(`, `)}). Pass --${o} <value> or run interactively.`);let f=`Select value for --${o}`,p=u(t||f);d();let m=await i({message:p,options:r.map(e=>({value:e,label:u((Object.hasOwn(a,e)?a[e]:void 0)??e)}))});if(s(m)||typeof m!=`string`)throw new n(130,{cancelled:!0});return m}async function h(e,t){if(l())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);d();let r=await c({message:t||`Confirm --${e}`,initialValue:!1});if(s(r))throw new n(130,{cancelled:!0});return r===!0}async function g(e,{defaultValue:t=!0,fallbackValue:r=!0}={}){if(l())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;d();let i=await c({message:e,initialValue:t});if(s(i))throw new n(130,{cancelled:!0});return i===!0}async function _(t={}){if(t.force===!0)return!0;let r=t.message?`${t.message} Continue?`:`This permanently deletes the resource. Continue?`;if(l())throw process.stderr.write(`${e.warning(`?`)} ${r}\n ${e.muted(`(non-interactive; pass --force to confirm)`)}\nAborted.
|
|
4
|
+
`),new n(1);d();let i=await c({message:r,initialValue:!1});if(s(i))throw new n(130,{cancelled:!0});return i===!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"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.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{n as p}from"./prompt-BAJpE3jV.mjs";var m={method:`POST`,path:t=>e`/accounts/${t.account_id}/brand-protection/queries/bulk`,body:`json`,response:!1,errors:{422:`UnprocessableEntityError`}};function h(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 g={command:`create`,describe:`Create new saved string queries in bulk`,builder:h,handler:async e=>c({command:`queries bulk create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/brand-protection/queries/bulk`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({queries:u(e.queries,`queries`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(m,{body:t,account_id:f}));a(n,{successLabel:`Created`});return}let p=d({queries:u(e.queries,`queries`)}),h=await s(`Creating`,async()=>c.send(m,{body:p,account_id:f}));a(h,{successLabel:`Created`})})},_={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var v={method:`POST`,path:t=>e`/accounts/${t.account_id}/brand-protection/queries`,query:[`id`],body:`json`,response:!1,errors:{422:`UnprocessableEntityError`}};function y(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 b={command:`create`,describe:`Create new saved string queries`,builder:y,handler:async e=>c({command:`queries create`,classification:{safeFlags:[`scan`,`dry-run`]}},e,async()=>{let c={id:e.id};if(e.dryRun){let t=await r();o({command:`cf queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/brand-protection/queries`,pathParams:{},query:c,bodyKind:`json`,body:e.body===void 0?d({max_time:f(e[`max-time`],`max-time`,`text`),min_time:f(e[`min-time`],`min-time`,`text`),scan:e.scan,tag:f(e.tag,`tag`,`text`)}):l(e.body)});return}let u=await n(e),p=e.local?t:await i();if(e.accountId=p,e.body){let t=l(e.body);new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let n=await s(`Creating`,async()=>u.send(v,{body:t,account_id:p,...c}));a(n,{successLabel:`Created`});return}let m=d({max_time:f(e[`max-time`],`max-time`,`text`),min_time:f(e[`min-time`],`min-time`,`text`),scan:e.scan,tag:f(e.tag,`tag`,`text`)});new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();let h=await s(`Creating`,async()=>u.send(v,{body:m,account_id:p,...c}));a(h,{successLabel:`Created`})})};var x={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/brand-protection/queries`,query:[`id`,`tag`,`scan`],response:!1,errors:{422:`UnprocessableEntityError`}};function S(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 C={command:`delete`,describe:`Delete saved string queries by ID`,builder:S,handler:async e=>c({command:`queries delete`,classification:{safeFlags:[`scan`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{let c={id:e.id,tag:e.tag,scan:e.scan};if(e.dryRun){let e=await r();o({command:`cf queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/brand-protection/queries`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();if(e.accountId=u,!await p({force:!!e.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}let d=await s(`Deleting`,async()=>l.send(x,{account_id:u,...c}));a(d,{successLabel:`Deleted`})})},w={command:`queries`,describe:`queries`,builder:e=>e.command(b).command(C).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import"./api-eMuS5GI1.mjs";import{t as e}from"./path-DRw6Y-nd.mjs";import{t}from"./local-Dil4fTWX.mjs";import{n}from"./auth-C6u9qIGO.mjs";import{a as r,t as i}from"./context-A6T-NKPI.mjs";import{t as a}from"./output-Co4xdFf6.mjs";import{t as o}from"./dry-run-C2KjGX10.mjs";import{t as s}from"./progress-D5po7ScB.mjs";import{t as c}from"./run-DASYqJsY.mjs";import"./telemetry-BhKfwxyh.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-BAJpE3jV.mjs";var g={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/consumers`,body:`json`};function _(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`]}).coerce(`type`,e=>f(e,`type`,`text`)).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:_,handler:async e=>c({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({dead_letter_queue:f(e[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:f(e[`script-name`],`script-name`,`text`),settings:{batch_size:e[`settings-batch-size`],max_concurrency:e[`settings-max-concurrency`],max_retries:e[`settings-max-retries`],max_wait_time_ms:e[`settings-max-wait-time-ms`],retry_delay:e[`settings-retry-delay`],visibility_timeout_ms:e[`settings-visibility-timeout-ms`]},type:e.type}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(g,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}e.type===void 0&&(e.type=await m(`type`,`The type field`,[`worker`,`http_pull`])),e.type===`worker`&&e[`script-name`]===void 0&&(e[`script-name`]=await p(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=d({dead_letter_queue:f(e[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:f(e[`script-name`],`script-name`,`text`),settings:{batch_size:e[`settings-batch-size`],max_concurrency:e[`settings-max-concurrency`],max_retries:e[`settings-max-retries`],max_wait_time_ms:e[`settings-max-wait-time-ms`],retry_delay:e[`settings-retry-delay`],visibility_timeout_ms:e[`settings-visibility-timeout-ms`]},type:e.type}),_=await s(`Creating`,async()=>c.send(g,{body:h,account_id:u,queue_id:e[`queue-id`]}));a(_,{successLabel:`Created`})})};var te={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/consumers/${t.consumer_id}`};function v(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 y={command:`delete <consumer-id>`,describe:`Delete Queue Consumer`,builder:v,handler:async e=>c({command:`queues consumers delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues consumers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/consumers/${e[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(e[`consumer-id`]))}`,pathParams:{"consumer-id":String(e[`consumer-id`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(te,{account_id:l,queue_id:e[`queue-id`],consumer_id:e[`consumer-id`]}));a(u,{successLabel:`Deleted`})})};var b={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/consumers/${t.consumer_id}`};function x(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 ne={command:`get <consumer-id>`,describe:`Get Queue Consumer`,builder:x,handler:async e=>c({command:`queues consumers get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues consumers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/consumers/${e[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(e[`consumer-id`]))}`,pathParams:{"consumer-id":String(e[`consumer-id`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(b,{account_id:l,queue_id:e[`queue-id`],consumer_id:e[`consumer-id`]}));a(u,{successLabel:`Loaded`})})};var re={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/consumers`};function ie(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 ae={command:`list`,describe:`List Queue Consumers`,builder:ie,handler:async e=>c({command:`queues consumers list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues consumers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(re,{account_id:l,queue_id:e[`queue-id`]}));a(u,{successLabel:`Loaded`})})};var S={method:`PUT`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/consumers/${t.consumer_id}`,body:`json`};function oe(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`]}).coerce(`type`,e=>f(e,`type`,`text`)).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 se={command:`update <consumer-id>`,describe:`Update Queue Consumer`,builder:oe,handler:async e=>c({command:`queues consumers update`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues consumers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/consumers/${e[`consumer-id`]==null?`<consumer-id>`:encodeURIComponent(String(e[`consumer-id`]))}`,pathParams:{"consumer-id":String(e[`consumer-id`]??``),"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({dead_letter_queue:f(e[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:f(e[`script-name`],`script-name`,`text`),settings:{batch_size:e[`settings-batch-size`],max_concurrency:e[`settings-max-concurrency`],max_retries:e[`settings-max-retries`],max_wait_time_ms:e[`settings-max-wait-time-ms`],retry_delay:e[`settings-retry-delay`],visibility_timeout_ms:e[`settings-visibility-timeout-ms`]},type:e.type}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(S,{body:t,account_id:u,queue_id:e[`queue-id`],consumer_id:e[`consumer-id`]}));a(n,{successLabel:`Updated`});return}e.type===void 0&&(e.type=await m(`type`,`The type field`,[`worker`,`http_pull`])),e.type===`worker`&&e[`script-name`]===void 0&&(e[`script-name`]=await p(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=d({dead_letter_queue:f(e[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:f(e[`script-name`],`script-name`,`text`),settings:{batch_size:e[`settings-batch-size`],max_concurrency:e[`settings-max-concurrency`],max_retries:e[`settings-max-retries`],max_wait_time_ms:e[`settings-max-wait-time-ms`],retry_delay:e[`settings-retry-delay`],visibility_timeout_ms:e[`settings-visibility-timeout-ms`]},type:e.type}),g=await s(`Updating`,async()=>c.send(S,{body:h,account_id:u,queue_id:e[`queue-id`],consumer_id:e[`consumer-id`]}));a(g,{successLabel:`Updated`})})},ce={command:`consumers`,describe:`Workers that automatically receive and process messages from a queue`,builder:e=>e.command(ee).command(y).command(ne).command(ae).command(se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var C={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues`,body:`json`};function w(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`]}).coerce(`jurisdiction`,e=>f(e,`jurisdiction`,`text`)).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 T={command:`create`,describe:`Create Queue`,builder:w,handler:async e=>c({command:`queues create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({jurisdiction:e.jurisdiction,queue_name:f(e[`queue-name`],`queue-name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(C,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}e[`queue-name`]===void 0&&(e[`queue-name`]=await p(`queue-name`,`The queue_name field`));let m=d({jurisdiction:e.jurisdiction,queue_name:f(e[`queue-name`],`queue-name`,`text`)}),h=await s(`Creating`,async()=>c.send(C,{body:m,account_id:u}));a(h,{successLabel:`Created`})})};var E={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}`};function D(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 O={command:`delete <queue-id>`,describe:`Delete Queue`,builder:D,handler:async e=>c({command:`queues delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(E,{account_id:l,queue_id:e[`queue-id`]}));a(u,{successLabel:`Deleted`})})};var k={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}`,body:`json`};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`]}).coerce(`jurisdiction`,e=>f(e,`jurisdiction`,`text`)).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 e=>c({command:`queues edit`,classification:{safeFlags:[`jurisdiction`,`settings-delivery-paused`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({jurisdiction:e.jurisdiction,queue_name:f(e[`queue-name`],`queue-name`,`text`),settings:{delivery_delay:e[`settings-delivery-delay`],delivery_paused:e[`settings-delivery-paused`],message_retention_period:e[`settings-message-retention-period`]}}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send(k,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Updated`});return}let p=d({jurisdiction:e.jurisdiction,queue_name:f(e[`queue-name`],`queue-name`,`text`),settings:{delivery_delay:e[`settings-delivery-delay`],delivery_paused:e[`settings-delivery-paused`],message_retention_period:e[`settings-message-retention-period`]}}),m=await s(`Updating`,async()=>c.send(k,{body:p,account_id:u,queue_id:e[`queue-id`]}));a(m,{successLabel:`Updated`})})};var M={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}`};function N(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 P={command:`get <queue-id>`,describe:`Get Queue`,builder:N,handler:async e=>c({command:`queues get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(M,{account_id:l,queue_id:e[`queue-id`]}));a(u,{successLabel:`Loaded`})})};var F={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues`};function I(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 L={command:`list`,describe:`List Queues`,builder:I,handler:async e=>c({command:`queues list`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let e=await r();o({command:`cf queues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/queues`,pathParams:{},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(F,{account_id:l}));a(u,{successLabel:`Loaded`})})};var R={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/ack`,body:`json`};function z(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 B={command:`ack <queue-id>`,describe:`Acknowledge + Retry Queue Messages`,builder:z,handler:async e=>c({command:`queues messages ack`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages ack`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/ack`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({acks:u(e.acks,`acks`),retries:u(e.retries,`retries`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(R,{body:t,account_id:f,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let p=d({acks:u(e.acks,`acks`),retries:u(e.retries,`retries`)}),m=await s(`Creating`,async()=>c.send(R,{body:p,account_id:f,queue_id:e[`queue-id`]}));a(m,{successLabel:`Created`})})};var V={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/batch`,body:`json`};function H(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 U={command:`bulk-push`,describe:`Push Message Batch`,builder:H,handler:async e=>c({command:`queues messages bulk-push`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages bulk-push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/batch`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({delay_seconds:e[`delay-seconds`],messages:u(e.messages,`messages`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(V,{body:t,account_id:f,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let p=d({delay_seconds:e[`delay-seconds`],messages:u(e.messages,`messages`)}),m=await s(`Creating`,async()=>c.send(V,{body:p,account_id:f,queue_id:e[`queue-id`]}));a(m,{successLabel:`Created`})})};var W={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/extend`,body:`json`};function G(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 le={command:`extend-leases <queue-id>`,describe:`Extend Message Leases`,builder:G,handler:async e=>c({command:`queues messages extend-leases`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages extend-leases`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/extend`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({extend:u(e.extend,`extend`),visibility_timeout_ms:e[`visibility-timeout-ms`]}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(W,{body:t,account_id:f,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let p=d({extend:u(e.extend,`extend`),visibility_timeout_ms:e[`visibility-timeout-ms`]}),m=await s(`Creating`,async()=>c.send(W,{body:p,account_id:f,queue_id:e[`queue-id`]}));a(m,{successLabel:`Created`})})};var K={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/peek`,body:`json`};function ue(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 de={command:`peek <queue-id>`,describe:`Peek Queue Messages`,builder:ue,handler:async e=>c({command:`queues messages peek`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages peek`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/peek`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({batch_size:e[`batch-size`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(K,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let f=d({batch_size:e[`batch-size`]}),p=await s(`Creating`,async()=>c.send(K,{body:f,account_id:u,queue_id:e[`queue-id`]}));a(p,{successLabel:`Created`})})};var q={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/pull`,body:`json`};function fe(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 pe={command:`pull <queue-id>`,describe:`Pull Queue Messages`,builder:fe,handler:async e=>c({command:`queues messages pull`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages pull`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/pull`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({batch_size:e[`batch-size`],visibility_timeout_ms:e[`visibility-timeout-ms`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(q,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let f=d({batch_size:e[`batch-size`],visibility_timeout_ms:e[`visibility-timeout-ms`]}),p=await s(`Creating`,async()=>c.send(q,{body:f,account_id:u,queue_id:e[`queue-id`]}));a(p,{successLabel:`Created`})})};var J={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages/purge`,body:`json`};function me(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 he={command:`purge <queue-id>`,describe:`Purge Peeked Queue Messages`,builder:me,handler:async e=>c({command:`queues messages purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages/purge`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({refs:u(e.refs,`refs`)}):l(e.body)});return}let c=await n(e),f=e.local?t:await i();if(e.accountId=f,!await h({force:!!e.force,message:`This operation permanently deletes the selected messages from the Queue.`})){process.stderr.write(`Aborted.
|
|
37
|
+
`);return}if(e.body){let t=l(e.body),n=await s(`Deleting`,async()=>c.send(J,{body:t,account_id:f,queue_id:e[`queue-id`]}));a(n,{successLabel:`Deleted`});return}if(e.refs===void 0)throw Error(`--refs is required (or pass --body with this field set).`);let p=d({refs:u(e.refs,`refs`)}),m=await s(`Deleting`,async()=>c.send(J,{body:p,account_id:f,queue_id:e[`queue-id`]}));a(m,{successLabel:`Deleted`})})};var Y={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/messages`,body:`json`};function ge(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 _e={command:`push <queue-id>`,describe:`Push Message`,builder:ge,handler:async e=>c({command:`queues messages push`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues messages push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/messages`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({delay_seconds:e[`delay-seconds`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Y,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Created`});return}let f=d({delay_seconds:e[`delay-seconds`]}),p=await s(`Creating`,async()=>c.send(Y,{body:f,account_id:u,queue_id:e[`queue-id`]}));a(p,{successLabel:`Created`})})},ve={command:`messages`,describe:`Push messages to a queue and pull or acknowledge them from consumers`,builder:e=>e.command(B).command(U).command(le).command(de).command(pe).command(he).command(_e).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var ye={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/metrics`};function be(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 xe={command:`get <queue-id>`,describe:`Get Queue Metrics`,builder:be,handler:async e=>c({command:`queues metrics get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues metrics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/metrics`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(ye,{account_id:l,queue_id:e[`queue-id`]}));a(u,{successLabel:`Loaded`})})},Se={command:`metrics`,describe:`Operations for metrics`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var X={method:`POST`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/purge`,body:`json`};function Ce(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 we={command:`start <queue-id>`,describe:`Purge Queue`,builder:Ce,handler:async e=>c({command:`queues purge start`,classification:{safeFlags:[`delete-messages-permanently`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues purge start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/purge`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({delete_messages_permanently:e[`delete-messages-permanently`]}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,!await h({force:!!e.force,message:`This operation drops every message in the queue.`})){process.stderr.write(`Aborted.
|
|
44
|
+
`);return}if(e.body){let t=l(e.body),n=await s(`Deleting`,async()=>c.send(X,{body:t,account_id:u,queue_id:e[`queue-id`]}));a(n,{successLabel:`Deleted`});return}let f=d({delete_messages_permanently:e[`delete-messages-permanently`]}),p=await s(`Deleting`,async()=>c.send(X,{body:f,account_id:u,queue_id:e[`queue-id`]}));a(p,{successLabel:`Deleted`})})};var Te={method:`GET`,path:t=>e`/accounts/${t.account_id}/queues/${t.queue_id}/purge`};function Ee(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 De={command:`status <queue-id>`,describe:`Get Queue Purge Status`,builder:Ee,handler:async e=>c({command:`queues purge status`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues purge status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/queues/${e[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(e[`queue-id`]))}/purge`,pathParams:{"queue-id":String(e[`queue-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Te,{account_id:l,queue_id:e[`queue-id`]}));a(u,{successLabel:`Loaded`})})},Oe={command:`purge`,describe:`Remove all pending messages from a queue`,builder:e=>e.command(we).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};var Z={method:`POST`,path:t=>e`/accounts/${t.account_id}/event_subscriptions/subscriptions`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`,405:`MethodNotAllowedError`}};function ke(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`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).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`]}).coerce(`source-type`,e=>f(e,`source-type`,`text`)).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 Ae={command:`create`,describe:`Create Event Subscription`,builder:ke,handler:async e=>c({command:`queues subscriptions create`,classification:{safeFlags:[`destination-type`,`enabled`,`source-type`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_subscriptions/subscriptions`,pathParams:{},bodyKind:`json`,body:e.body===void 0?d({destination:{queue_id:f(e[`destination-queue-id`],`destination-queue-id`,`text`),type:e[`destination-type`]},enabled:e.enabled,events:e.events,name:f(e.name,`name`,`text`),source:{type:e[`source-type`],model_name:f(e[`source-model-name`],`source-model-name`,`text`),worker_name:f(e[`source-worker-name`],`source-worker-name`,`text`),script_tag:f(e[`source-script-tag`],`source-script-tag`,`text`),workflow_name:f(e[`source-workflow-name`],`source-workflow-name`,`text`)}}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Creating`,async()=>c.send(Z,{body:t,account_id:u}));a(n,{successLabel:`Created`});return}let p=d({destination:{queue_id:f(e[`destination-queue-id`],`destination-queue-id`,`text`),type:e[`destination-type`]},enabled:e.enabled,events:e.events,name:f(e.name,`name`,`text`),source:{type:e[`source-type`],model_name:f(e[`source-model-name`],`source-model-name`,`text`),worker_name:f(e[`source-worker-name`],`source-worker-name`,`text`),script_tag:f(e[`source-script-tag`],`source-script-tag`,`text`),workflow_name:f(e[`source-workflow-name`],`source-workflow-name`,`text`)}}),m=await s(`Creating`,async()=>c.send(Z,{body:p,account_id:u}));a(m,{successLabel:`Created`})})};var je={method:`DELETE`,path:t=>e`/accounts/${t.account_id}/event_subscriptions/subscriptions/${t.subscription_id}`};function Me(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 Ne={command:`delete <subscription-id>`,describe:`Delete Event Subscription`,builder:Me,handler:async e=>c({command:`queues subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_subscriptions/subscriptions/${e[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(e[`subscription-id`]))}`,pathParams:{"subscription-id":String(e[`subscription-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();if(e.accountId=l,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
51
|
+
`);return}let u=await s(`Deleting`,async()=>c.send(je,{account_id:l,subscription_id:e[`subscription-id`]}));a(u,{successLabel:`Deleted`})})};var Pe={method:`GET`,path:t=>e`/accounts/${t.account_id}/event_subscriptions/subscriptions/${t.subscription_id}`,errors:{404:`NotFoundError`}};function Fe(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 Q={command:`get <subscription-id>`,describe:`Get Event Subscription`,builder:Fe,handler:async e=>c({command:`queues subscriptions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_subscriptions/subscriptions/${e[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(e[`subscription-id`]))}`,pathParams:{"subscription-id":String(e[`subscription-id`]??``)},bodyKind:`none`});return}let c=await n(e),l=e.local?t:await i();e.accountId=l;let u=await s(`Loading`,async()=>c.send(Pe,{account_id:l,subscription_id:e[`subscription-id`]}));a(u,{successLabel:`Loaded`})})};var Ie={method:`GET`,path:t=>e`/accounts/${t.account_id}/event_subscriptions/subscriptions`,query:[`page`,`per_page`,`order`,`direction`]};function Le(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 Re={command:`list`,describe:`List Event Subscriptions`,builder:Le,handler:async e=>c({command:`queues subscriptions list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},e,async()=>{let c={page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction};if(e.dryRun){let e=await r();o({command:`cf queues subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e??`<account-id>`}/event_subscriptions/subscriptions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await n(e),u=e.local?t:await i();e.accountId=u;let d=await s(`Loading`,async()=>l.send(Ie,{account_id:u,...c}));a(d,{successLabel:`Loaded`})})};var $={method:`PATCH`,path:t=>e`/accounts/${t.account_id}/event_subscriptions/subscriptions/${t.subscription_id}`,body:`json`,errors:{400:`BadRequestError`,404:`NotFoundError`}};function ze(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`]}).coerce(`destination-type`,e=>f(e,`destination-type`,`text`)).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 Be={command:`update <subscription-id>`,describe:`Update Event Subscription`,builder:ze,handler:async e=>c({command:`queues subscriptions update`,classification:{safeFlags:[`destination-type`,`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){let t=await r();o({command:`cf queues subscriptions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${t??`<account-id>`}/event_subscriptions/subscriptions/${e[`subscription-id`]==null?`<subscription-id>`:encodeURIComponent(String(e[`subscription-id`]))}`,pathParams:{"subscription-id":String(e[`subscription-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({destination:{queue_id:f(e[`destination-queue-id`],`destination-queue-id`,`text`),type:e[`destination-type`]},enabled:e.enabled,events:e.events,name:f(e.name,`name`,`text`)}):l(e.body)});return}let c=await n(e),u=e.local?t:await i();if(e.accountId=u,e.body){let t=l(e.body),n=await s(`Updating`,async()=>c.send($,{body:t,account_id:u,subscription_id:e[`subscription-id`]}));a(n,{successLabel:`Updated`});return}let p=d({destination:{queue_id:f(e[`destination-queue-id`],`destination-queue-id`,`text`),type:e[`destination-type`]},enabled:e.enabled,events:e.events,name:f(e.name,`name`,`text`)}),m=await s(`Updating`,async()=>c.send($,{body:p,account_id:u,subscription_id:e[`subscription-id`]}));a(m,{successLabel:`Updated`})})},Ve={command:`subscriptions`,describe:`Manage queue subscriptions for event-driven message routing`,builder:e=>e.command(Ae).command(Ne).command(Q).command(Re).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},He={command:`queues`,describe:`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,builder:e=>e.command(T).command(O).command(j).command(P).command(L).command(ce).command(ve).command(Se).command(Oe).command(Ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{He as default};
|