cf 0.13.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_meta/commands.json +6724 -3970
- package/dist/_meta/hand-written-commands.json +150 -32
- package/dist/_meta/schemas.json +2083 -2159
- package/dist/abuse-reports-BAQR1w79.mjs +26 -0
- package/dist/access-C8KMplzp.mjs +27 -0
- package/dist/account-B-KQSR0L.mjs +12 -0
- package/dist/account-tags-EncLJpLc.mjs +15 -0
- package/dist/accounts-BA4Mp3A_.mjs +132 -0
- package/dist/acm-ByxUJcqF.mjs +15 -0
- package/dist/addressing-C-ym0h0G.mjs +93 -0
- package/dist/agent-memory-CkPSiZDI.mjs +34 -0
- package/dist/ai-DkE_Q64s.mjs +31 -0
- package/dist/ai-audit-pPcjYWI5.mjs +6 -0
- package/dist/ai-gateway-DtrwF1lQ.mjs +147 -0
- package/dist/ai-search-DLD_kDS1.mjs +79 -0
- package/dist/ai-security-jyZcBl9g.mjs +10 -0
- package/dist/alerting-DOROjm8E.mjs +56 -0
- package/dist/analytics-rQ-h-plT.mjs +21 -0
- package/dist/analytics_engine-Cg9gCAMt.mjs +4 -0
- package/dist/{lifecycle-XswDq0ZB.mjs → ansi-styles-eKEZXVwN.mjs} +1 -1
- package/dist/api-security-B8p8vp8u.mjs +154 -0
- package/dist/argo-g8SjUb_t.mjs +10 -0
- package/dist/artifacts-B1PaeF5h.mjs +43 -0
- package/dist/audit-logs-DmU_PHy_.mjs +4 -0
- package/dist/auth-CZqics6E.mjs +2 -0
- package/dist/auth-Cp7gT-AF.mjs +8 -0
- package/dist/billing-CvTbUg-H.mjs +23 -0
- package/dist/bot-management-z53tbcbH.mjs +9 -0
- package/dist/botnet-feed-CSBbJdr_.mjs +11 -0
- package/dist/brand-protection-DzV211IQ.mjs +27 -0
- package/dist/browser-extension-C0Hi9CHX.mjs +15 -0
- package/dist/browser-run-DYQvMAyo.mjs +46 -0
- package/dist/build-BPIp8J5F.mjs +2 -0
- package/dist/build-OC77a1zq.mjs +2 -0
- package/dist/builds-CwKRqjQ5.mjs +71 -0
- package/dist/cache-CugNPPsJ.mjs +45 -0
- package/dist/certificate-authorities-DaEnJYge.mjs +6 -0
- package/dist/cf-oadujOtC.mjs +18 -0
- package/dist/{chunk-6EUZQHAF-B7bSMYLe.mjs → chunk-6EUZQHAF-QVTL_mC-.mjs} +1 -1
- package/dist/chunk-DL5FNmn1.mjs +2 -0
- package/dist/{chunk-Q72B4Q5Z-CPy_WJKU.mjs → chunk-Q72B4Q5Z-Cr1H_iK6.mjs} +1 -1
- package/dist/chunk-Q72B4Q5Z-DKhx_4ok.mjs +2 -0
- package/dist/chunk-QBZBEHZB-Byagrlop.mjs +2 -0
- package/dist/chunk-XLADBZ7F-BXKOjWbx.mjs +374 -0
- package/dist/client-certificates-DZUIqBTB.mjs +13 -0
- package/dist/client-side-security-Dk6F1ENG.mjs +63 -0
- package/dist/cloud-connector-avpf86kG.mjs +6 -0
- package/dist/cloudflared-DhItYrCq.mjs +2 -0
- package/dist/cloudforce-one-DNRhUD8z.mjs +456 -0
- package/dist/command-B2Qe-WUa.mjs +2 -0
- package/dist/command-CF0giIIc.mjs +3 -0
- package/dist/command-D45NW-R3.mjs +2 -0
- package/dist/command-DIvPLK8x.mjs +2 -0
- package/dist/{completions-nPO9PdSu.mjs → completions-xPLd1cvL.mjs} +3 -3
- package/dist/{config-B8lwPpVl.mjs → config-B4vIa0zp.mjs} +1 -1
- package/dist/config.d.mts +1 -1729
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-BSztJ-Ko.mjs +6 -0
- package/dist/connector-telemetry-events-_M8CCK6_.mjs +6 -0
- package/dist/connector-telemetry-snapshots-DySvmR9a.mjs +6 -0
- package/dist/connectors-BSmhzNB7.mjs +15 -0
- package/dist/containers-B5vDcFzo.mjs +78 -0
- package/dist/{shared-YJtB5KZB.mjs → containers-CFzvhmyz.mjs} +85 -84
- package/dist/content-scan-CeLZAcbT.mjs +14 -0
- package/dist/cps-BlI_Od72.mjs +6 -0
- package/dist/csamScanner-Cn7d0HWS.mjs +10 -0
- package/dist/ct-alerting-lhgFPu-y.mjs +5 -0
- package/dist/custom-certificates-Ba4Do5qt.mjs +17 -0
- package/dist/custom-csrs-MNUIx8yX.mjs +11 -0
- package/dist/custom-hostnames-Dj1SBd0J.mjs +27 -0
- package/dist/custom-nameservers-C7nzhNzV.mjs +9 -0
- package/dist/custom-pages-BgfhGksj.mjs +21 -0
- package/dist/d1-P2kWbdID.mjs +45 -0
- package/dist/data-security-pBIozmRL.mjs +71 -0
- package/dist/dcv-delegation-Bpy9WnKZ.mjs +4 -0
- package/dist/delegate-GctF_lrq.mjs +2 -0
- package/dist/delegate.mjs +1 -1
- package/dist/{deploy-QTGENpOM.mjs → deploy-CVYdt3NK.mjs} +1 -1
- package/dist/{deploy-input-C7W1Bsji.mjs → deploy-input-DpOgndz4.mjs} +1 -1
- package/dist/dev-PPUBjWcm.mjs +4 -0
- package/dist/diagnostics-C62habGQ.mjs +15 -0
- package/dist/dialog-C_ccBiZp.mjs +2 -0
- package/dist/dist-B4pQ4CXK.mjs +48 -0
- package/dist/{dist-DW5BPGFs.mjs → dist-BpadEMNY.mjs} +1 -1
- package/dist/dist-dc4E1u01.mjs +272 -0
- package/dist/dls-CpkcyQ8C.mjs +17 -0
- package/dist/dns-DG1X4Wap.mjs +135 -0
- package/dist/dns-firewall-B1gGHEDo.mjs +71 -0
- package/dist/{dot-prop-6SRZBKHT-wIVDg_fl.mjs → dot-prop-6SRZBKHT-Dj7YOlwR.mjs} +1 -1
- package/dist/dry-run-CLX6Pbtq.mjs +2 -0
- package/dist/durable-objects-D214VhxH.mjs +8 -0
- package/dist/email-auth-Ba4ONan2.mjs +6 -0
- package/dist/email-routing-BlqKnqNM.mjs +45 -0
- package/dist/email-security-Dl1E1Dko.mjs +160 -0
- package/dist/email-sending-DIRSSRIz.mjs +47 -0
- package/dist/error-sanitization-BkgUhGVc.mjs +2 -0
- package/dist/error-sanitization-DOlqWkNu.mjs +2 -0
- package/dist/fieldExtractors-zqYKMCEn.mjs +9 -0
- package/dist/firewall-DdsDh8GD.mjs +56 -0
- package/dist/flagship-CkUIVW7c.mjs +28 -0
- package/dist/fraud-BUpZgvQT.mjs +22 -0
- package/dist/google-tag-gateway-Bi1uLnEU.mjs +6 -0
- package/dist/healthchecks-DjQWb3EM.mjs +22 -0
- package/dist/hostnames-ClBLPbct.mjs +11 -0
- package/dist/hyperdrive-U54xZsWU.mjs +37 -0
- package/dist/iam-T-wWmOep.mjs +52 -0
- package/dist/images-ia5UG1GW.mjs +71 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-BhswZLMI.mjs +76 -0
- package/dist/interactive-B6woOLo-.mjs +32 -0
- package/dist/interactive-DnUvQHjc.mjs +2 -0
- package/dist/ips-Dad_EvhM.mjs +4 -0
- package/dist/keyless-certificates-BhHaxLjM.mjs +13 -0
- package/dist/keys-DjIPvqj4.mjs +4 -0
- package/dist/kv-DzXVnK94.mjs +21 -0
- package/dist/leaked-credential-checks-B9G_ZTNH.mjs +18 -0
- package/dist/lifecycle-Ichnb2x1.mjs +2 -0
- package/dist/load-balancers-3wGHPsYz.mjs +76 -0
- package/dist/local-B6b2OIBW.mjs +2 -0
- package/dist/local-BrfySqnx.mjs +2 -0
- package/dist/{local-runtime-BUGCbx8r.mjs → local-runtime-DD8DAIlm.mjs} +1 -1
- package/dist/login-CEQbOgBM.mjs +5 -0
- package/dist/login-DEWvGuaU.mjs +2 -0
- package/dist/logo-matches-YGRPstPi.mjs +6 -0
- package/dist/logos-BirufUgo.mjs +7 -0
- package/dist/logpush-BlNbUHyV.mjs +46 -0
- package/dist/logs-DmFlVF9q.mjs +48 -0
- package/dist/magic-cloud-networking-B3Wj2dhJ.mjs +71 -0
- package/dist/magic-network-monitoring-ry63w2Rw.mjs +36 -0
- package/dist/magic-transit-CBVOK2aa.mjs +387 -0
- package/dist/managed-defense-BdW6s483.mjs +18 -0
- package/dist/managed-transforms-BIeiofIS.mjs +9 -0
- package/dist/matches-CAnwci0P.mjs +6 -0
- package/dist/mcp-BfhOMGFE.mjs +32 -0
- package/dist/mesh-CxUL2Wf-.mjs +26 -0
- package/dist/mtls-certificates-CzmTw4zs.mjs +13 -0
- package/dist/network-C68psMbz.mjs +50 -0
- package/dist/network-interconnects-CLsMrTuk.mjs +73 -0
- package/dist/oauth-D4bkeMAw.mjs +14 -0
- package/dist/oauth-DouM-qz0.mjs +2 -0
- package/dist/oauth-clients-DbUmVE_5.mjs +16 -0
- package/dist/oauth-scopes-CQ18rwBg.mjs +4 -0
- package/dist/observability-DpYxkFeZ.mjs +80 -0
- package/dist/{open-PBXRGS4R-DARSUDEI.mjs → open-PBXRGS4R-C4CKEADM.mjs} +3 -3
- package/dist/open-PBXRGS4R-C_-G_4DC.mjs +4 -0
- package/dist/organization-Dg55Xfz7.mjs +75 -0
- package/dist/organizations-QnyzGjB2.mjs +4 -0
- package/dist/origin-ca-certificates-Co5lqIGL.mjs +11 -0
- package/dist/origin-post-quantum-encryption-Cz8JZamC.mjs +6 -0
- package/dist/origin-tls-client-auth-Dd0T1Kfv.mjs +30 -0
- package/dist/{output-COcSQsfn.mjs → output-Bia1u2k5.mjs} +1 -1
- package/dist/page-rules--D3eXrCf.mjs +39 -0
- package/dist/pages-Ce8DDgNr.mjs +60 -0
- package/dist/pay-per-crawl-CpkEbasz.mjs +65 -0
- package/dist/pay-per-use-fyM1DWgY.mjs +6 -0
- package/dist/pipelines-CAqCgBLh.mjs +44 -0
- package/dist/precursor-DBnn4Q35.mjs +4 -0
- package/dist/previews-y_nSqWK5.mjs +4 -0
- package/dist/progress-Bi02B6v4.mjs +2 -0
- package/dist/project-settings-DSXevRvj.mjs +3 -0
- package/dist/prompt-Bx2PB-tt.mjs +3 -0
- package/dist/queries-dg-CVXjf.mjs +9 -0
- package/dist/queues-C_ilLbRI.mjs +63 -0
- package/dist/r2-data-catalog-DGv6aROr.mjs +44 -0
- package/dist/r2-hZAkra-l.mjs +127 -0
- package/dist/radar-BO9b0aZy.mjs +300 -0
- package/dist/{raw-fetch-BVYQR6C5.mjs → raw-fetch-DNTQkXbg.mjs} +1 -1
- package/dist/realtime-eSavuSeE.mjs +172 -0
- package/dist/registrar-Ct30kOXZ.mjs +43 -0
- package/dist/registrar-sandbox-Dmn9zGUk.mjs +56 -0
- package/dist/{registry-CWUfXloz.mjs → registry-vreNkX6u.mjs} +1 -1
- package/dist/reporting-B-F5aWUJ.mjs +14 -0
- package/dist/request-headers-Dnbzv6RZ.mjs +2 -0
- package/dist/request-tracers-CaubpUFV.mjs +4 -0
- package/dist/resolve-BXemCSyA.mjs +2 -0
- package/dist/resolve-CUDKxUrW.mjs +2 -0
- package/dist/resource-sharing-6Snv-b69.mjs +40 -0
- package/dist/resource-tagging-W_LFiX2J.mjs +4 -0
- package/dist/rules-C26eyeA5.mjs +18 -0
- package/dist/rulesets-BKzIwVtJ.mjs +37 -0
- package/dist/rum-Xdw5hyWY.mjs +30 -0
- package/dist/run-BBBMrSrs.mjs +2 -0
- package/dist/run-BRucX7Rz.mjs +2 -0
- package/dist/{schema-C8hU6G9R.mjs → schema-DqtYndhB.mjs} +1 -1
- package/dist/{schema-flags-DC4c6dka.mjs → schema-flags-CebDI0f1.mjs} +4 -4
- package/dist/scim-odJTXiIe.mjs +18 -0
- package/dist/{sdk-C12y5qCN.mjs → sdk-CvIO3tWS.mjs} +1 -1
- package/dist/secrets-store-RYpWWzaw.mjs +24 -0
- package/dist/security-center-B3D95vCa.mjs +30 -0
- package/dist/security-txt-BSytVv-9.mjs +9 -0
- package/dist/shared-D67owd9x.mjs +2 -0
- package/dist/smart-shield-C83Sfnf4.mjs +24 -0
- package/dist/snippets-B6oE9WIa.mjs +20 -0
- package/dist/source-BR4_k2ad.mjs +6 -0
- package/dist/spawn-CKqJ9J4_.mjs +523 -0
- package/dist/spectrum-CfxY--X_.mjs +83 -0
- package/dist/speed-DzK-kiWt.mjs +24 -0
- package/dist/src-B3h6tKMt.mjs +108 -0
- package/dist/ssl-dnjzPcSB.mjs +45 -0
- package/dist/startup-profile-CYEokTVe.mjs +2 -0
- package/dist/startup-profile-CgWHy4rE.mjs +17 -0
- package/dist/state-BxCejn42.mjs +2 -0
- package/dist/state-DSzkxXML.mjs +2 -0
- package/dist/stream-oFyhS4Wi.mjs +102 -0
- package/dist/submit-4f-ravmC.mjs +4 -0
- package/dist/tags-DrIP6Uiq.mjs +4 -0
- package/dist/{telemetry-DjGNSlkU.mjs → telemetry-Dk1GcQ0u.mjs} +1 -1
- package/dist/telemetry-Ds4epd3D.mjs +2 -0
- package/dist/telemetry-mKEb8lYB.mjs +2 -0
- package/dist/tenant-C-gc3NWv.mjs +12 -0
- package/dist/tenant-custom-nameservers-DduTQIwh.mjs +9 -0
- package/dist/{tools-D9RZkZRc.mjs → tools-BMKpYraQ.mjs} +1 -1
- package/dist/tunnels-D0QYsskp.mjs +29 -0
- package/dist/turnstile-C6Q3spRB.mjs +33 -0
- package/dist/ui-DH95w1Qk.mjs +5 -0
- package/dist/undici-DTSBJHNS.mjs +96 -0
- package/dist/update-check-BBS1K1jt.mjs +2 -0
- package/dist/update-check-CTLoakFV.mjs +2 -0
- package/dist/update-check-worker.mjs +2 -0
- package/dist/url-info-Cs0V89qq.mjs +4 -0
- package/dist/url-normalization-DaEQYy5h.mjs +9 -0
- package/dist/url-scanner-C4YVeQ4v.mjs +16 -0
- package/dist/user-BV1VY3Kl.mjs +112 -0
- package/dist/values-qDS63E43.mjs +4 -0
- package/dist/vectorize-NFzD3mP5.mjs +32 -0
- package/dist/version-W6_TN_kN.mjs +2 -0
- package/dist/waiting-rooms-Y9YGj3ih.mjs +53 -0
- package/dist/web-assets-Gd6z8dbt.mjs +64 -0
- package/dist/web3-DCJx4NRp.mjs +28 -0
- package/dist/workers-B-j-1ygi.mjs +36 -0
- package/dist/workers-builds-DPrNKjZW.mjs +14 -0
- package/dist/workers-for-platforms-BjKAhMLA.mjs +25 -0
- package/dist/workers-vpc-C5YoCnQK.mjs +13 -0
- package/dist/workflows-C2KKIJjl.mjs +43 -0
- package/dist/zaraz-CVLCs1IX.mjs +22 -0
- package/dist/zero-trust-BtJi4OXF.mjs +795 -0
- package/dist/zone-hKgt0WzO.mjs +4 -0
- package/dist/zones-CCNyaD3J.mjs +124 -0
- package/package.json +15 -12
- package/dist/_meta/agent-context.json +0 -193
- package/dist/abuse-reports-BbaHw4ST.mjs +0 -8
- package/dist/access-D6Xz892p.mjs +0 -11
- package/dist/account-DvxcqeaK.mjs +0 -2
- package/dist/account-tags-CeqfEWpz.mjs +0 -9
- package/dist/accounts-Bx-8BMH9.mjs +0 -30
- package/dist/acm--0opdSGE.mjs +0 -3
- package/dist/addressing-BS1ynzLA.mjs +0 -13
- package/dist/agent-context-BPhyrSns.mjs +0 -8
- package/dist/agent-memory-DczzpEw5.mjs +0 -6
- package/dist/ai-CDdCTcQl.mjs +0 -5
- package/dist/ai-audit-Bx9KMQYh.mjs +0 -2
- package/dist/ai-gateway-BSXJEaYS.mjs +0 -13
- package/dist/ai-search-DRQj1aMu.mjs +0 -7
- package/dist/ai-security-C_Rb0lGT.mjs +0 -4
- package/dist/alerting-BAR9eFs2.mjs +0 -6
- package/dist/analytics-BaUZwNc5.mjs +0 -4
- package/dist/analytics_engine-DkEzlhfT.mjs +0 -2
- package/dist/api-security-jA0lOk6a.mjs +0 -50
- package/dist/argo-Cz4pDagx.mjs +0 -2
- package/dist/artifacts-BcLTGfAv.mjs +0 -5
- package/dist/audit-logs-DbIv4n6u.mjs +0 -2
- package/dist/auth-rW5d3jtr.mjs +0 -5
- package/dist/auth-tvDdC1J-.mjs +0 -8
- package/dist/billing-Md87QjqW.mjs +0 -3
- package/dist/bot-management-VHMo4hpU.mjs +0 -5
- package/dist/botnet-feed-BHqfo3sa.mjs +0 -3
- package/dist/brand-protection-HUeR6Pof.mjs +0 -3
- package/dist/browser-extension-199oZg3X.mjs +0 -3
- package/dist/browser-run-DDasyux-.mjs +0 -4
- package/dist/build-0QlYUfFS.mjs +0 -2
- package/dist/builds-B-lXn6JR.mjs +0 -9
- package/dist/cache-CevKpiTM.mjs +0 -9
- package/dist/certificate-authorities-DAg-aO1B.mjs +0 -2
- package/dist/cf-C11NGkjx.mjs +0 -18
- package/dist/chunk-LQW53VED-CoECHA3R.mjs +0 -119
- package/dist/chunk-QBZBEHZB-BuiXJn8j.mjs +0 -2
- package/dist/chunk-vbHwaUoU.mjs +0 -2
- package/dist/client-certificates-Bay7oPLE.mjs +0 -3
- package/dist/client-side-security-CbU9xn0k.mjs +0 -37
- package/dist/cloud-connector-AH2ClcSL.mjs +0 -2
- package/dist/cloudforce-one-DwOfS75V.mjs +0 -32
- package/dist/command-CMzMsll4.mjs +0 -2
- package/dist/connector-interrupts-DcLrqM2V.mjs +0 -2
- package/dist/connector-telemetry-events-PrJWgNs9.mjs +0 -2
- package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +0 -2
- package/dist/connectors-CEAy30E-.mjs +0 -3
- package/dist/containers-BsbDqbSn.mjs +0 -58
- package/dist/content-scan-BdK936iO.mjs +0 -4
- package/dist/cps-oP97-qkm.mjs +0 -2
- package/dist/csamScanner-DUNN4INg.mjs +0 -6
- package/dist/ct-alerting-dV_gsV2w.mjs +0 -3
- package/dist/custom-certificates-DYspvjo4.mjs +0 -5
- package/dist/custom-csrs-DjSWLQRu.mjs +0 -3
- package/dist/custom-hostnames-df1lH6IY.mjs +0 -5
- package/dist/custom-nameservers-CLTbN-9R.mjs +0 -3
- package/dist/custom-pages-DzKnSgL3.mjs +0 -3
- package/dist/d1-JBEqjJoj.mjs +0 -20
- package/dist/data-security-CIktWnXt.mjs +0 -7
- package/dist/dcv-delegation-_r6Vc6VL.mjs +0 -2
- package/dist/dev-CAubuxCc.mjs +0 -4
- package/dist/diagnostics-B0DRh714.mjs +0 -3
- package/dist/dist-12KzRsBM.mjs +0 -387
- package/dist/dist-BCVqQpg2.mjs +0 -2
- package/dist/dist-Cp3uJN1x.mjs +0 -48
- package/dist/dist-S9K_8gq9.mjs +0 -9
- package/dist/dls-CFzTHcZM.mjs +0 -3
- package/dist/dns-Dw6u-NV1.mjs +0 -29
- package/dist/dns-firewall-CIPptslp.mjs +0 -57
- package/dist/dry-run-DiVy1lVo.mjs +0 -2
- package/dist/durable-objects-CCkeqqBq.mjs +0 -2
- package/dist/email-auth-kdxO51Oz.mjs +0 -2
- package/dist/email-routing-BLggZdQq.mjs +0 -6
- package/dist/email-security-DjADlgdM.mjs +0 -18
- package/dist/email-sending-Cz7E7GoP.mjs +0 -7
- package/dist/error-sanitization-DfLijlBJ.mjs +0 -2
- package/dist/fieldExtractors-BWaMi6lD.mjs +0 -3
- package/dist/firewall-5t6OBIOl.mjs +0 -8
- package/dist/flagship-CzG_VoNR.mjs +0 -4
- package/dist/fraud-UOg_69Ob.mjs +0 -20
- package/dist/google-tag-gateway-DirkD-Q2.mjs +0 -2
- package/dist/healthchecks-BkHZGTp1.mjs +0 -4
- package/dist/hostnames-EUYOZm21.mjs +0 -3
- package/dist/hyperdrive-ZoLJlJCL.mjs +0 -21
- package/dist/iam-BQ2xSgYN.mjs +0 -6
- package/dist/images-CkEq6ScP.mjs +0 -8
- package/dist/intel-DDWEdGyl.mjs +0 -8
- package/dist/interactive-B2E03Fs-.mjs +0 -11
- package/dist/interactive-_B-EqD0Y.mjs +0 -23
- package/dist/ips-54Qmy-Uw.mjs +0 -2
- package/dist/keyless-certificates-CXHLc3Qz.mjs +0 -3
- package/dist/keys-rvI4TC3Z.mjs +0 -2
- package/dist/kv-CAeN1zBy.mjs +0 -5
- package/dist/leaked-credential-checks-CbbwtG-p.mjs +0 -4
- package/dist/load-balancers-BFwdwAIU.mjs +0 -6
- package/dist/local-C6XsFD_W.mjs +0 -2
- package/dist/logexplorer-D8rOPB5I.mjs +0 -17
- package/dist/logo-matches-Y3PxVn7t.mjs +0 -2
- package/dist/logos-BN8SvJhS.mjs +0 -3
- package/dist/logpush-BnLA4WVm.mjs +0 -4
- package/dist/logs-CDo7Y5sA.mjs +0 -3
- package/dist/magic-cloud-networking-wPuLwu-F.mjs +0 -5
- package/dist/magic-network-monitoring-BNERUpxS.mjs +0 -4
- package/dist/magic-transit-6tvVOECW.mjs +0 -111
- package/dist/managed-defense-AYwBOYIH.mjs +0 -2
- package/dist/managed-transforms-HZZNrkC7.mjs +0 -3
- package/dist/matches-Dp91L3dL.mjs +0 -2
- package/dist/mcp-P7pcieiT.mjs +0 -4
- package/dist/mesh-DjFrk6PL.mjs +0 -4
- package/dist/mtls-certificates-DZMoef2H.mjs +0 -3
- package/dist/network-7cd1U6-I.mjs +0 -6
- package/dist/network-interconnects-CQ7cPZjK.mjs +0 -41
- package/dist/oauth-DH3kMXSs.mjs +0 -14
- package/dist/oauth-clients-P9t-eMnx.mjs +0 -4
- package/dist/oauth-scopes-C3r9Qh_y.mjs +0 -2
- package/dist/observability-M1DnLhMR.mjs +0 -10
- package/dist/organization-cUE7GDCt.mjs +0 -45
- package/dist/organizations-C-Hcpd0w.mjs +0 -2
- package/dist/origin-ca-certificates-C8cJMyQH.mjs +0 -3
- package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +0 -2
- package/dist/origin-tls-client-auth-BsjR5EAV.mjs +0 -4
- package/dist/page-rules-B-zq1EUb.mjs +0 -27
- package/dist/pages-B6YpkPos.mjs +0 -14
- package/dist/pay-per-crawl-B4wx0lUb.mjs +0 -4
- package/dist/pipelines-BJc_RylD.mjs +0 -6
- package/dist/precursor-CLQu7suY.mjs +0 -4
- package/dist/progress-V6SZV3Ux.mjs +0 -2
- package/dist/prompt-DjRTpML4.mjs +0 -3
- package/dist/public-BMg6-Hxh-BfUOZTDP.mjs +0 -2
- package/dist/queries-DSrrket-.mjs +0 -3
- package/dist/queues-Tf7kPBpn.mjs +0 -7
- package/dist/r2-DmKNnxtC.mjs +0 -25
- package/dist/r2-data-catalog-DBxoifOq.mjs +0 -16
- package/dist/radar-Csk7Ab-b.mjs +0 -2
- package/dist/realtime-CDehZVhV.mjs +0 -20
- package/dist/registrar-sandbox-BxVdfnam.mjs +0 -56
- package/dist/registrar-vflzeNQ9.mjs +0 -43
- package/dist/reporting-BaPZ1PHN.mjs +0 -2
- package/dist/request-headers-CC4eHmI2.mjs +0 -3
- package/dist/request-tracers-C_UVBexV.mjs +0 -2
- package/dist/resolve-B8CyM1mi.mjs +0 -2
- package/dist/resource-sharing-CoB4S9j1.mjs +0 -6
- package/dist/resource-tagging-CUiUC5g4.mjs +0 -2
- package/dist/rules-4O8076_s.mjs +0 -4
- package/dist/rulesets-C84MxTYo.mjs +0 -5
- package/dist/rum-Bvwkrntx.mjs +0 -4
- package/dist/run-CRfinkSe.mjs +0 -2
- package/dist/schemas-O_ZNaF8R.mjs +0 -65
- package/dist/scim-BvxQmde6.mjs +0 -4
- package/dist/secrets-store-DOKWiC-j.mjs +0 -7
- package/dist/security-center-Bhy_aC-w.mjs +0 -2
- package/dist/security-txt-L7HJ9tq5.mjs +0 -3
- package/dist/smart-shield-COMXuQ1S.mjs +0 -4
- package/dist/snippets-DffQhlKt.mjs +0 -4
- package/dist/spawn-C1AISA2V.mjs +0 -526
- package/dist/spectrum-Cmf7SqQE.mjs +0 -63
- package/dist/speed-m8cdhLFS.mjs +0 -4
- package/dist/src-C8phrg-8.mjs +0 -109
- package/dist/ssl-D4ffsdSw.mjs +0 -15
- package/dist/startup-profile-Dx95Y5cl.mjs +0 -17
- package/dist/state-CHif8Y5I.mjs +0 -2
- package/dist/stream-DPF5fojV.mjs +0 -16
- package/dist/submit-Br8hfP0_.mjs +0 -2
- package/dist/tags-Bnt4JuxQ.mjs +0 -2
- package/dist/telemetry-Ch1vCICm.mjs +0 -2
- package/dist/tenant-D8u0CxoC.mjs +0 -2
- package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +0 -3
- package/dist/tunnels-BkNPpTHa.mjs +0 -5
- package/dist/turnstile-MgwRECJv.mjs +0 -23
- package/dist/ui-DQSZeaG5.mjs +0 -5
- package/dist/url-info-Ddp7MgcI.mjs +0 -2
- package/dist/url-normalization-3ptK9ntV.mjs +0 -3
- package/dist/url-scanner-Psb9ollR.mjs +0 -2
- package/dist/user-DWdshcIu.mjs +0 -12
- package/dist/values-CDKQL1z2.mjs +0 -2
- package/dist/vectorize-CTYYUyQj.mjs +0 -4
- package/dist/waiting-rooms-BUdmwXDY.mjs +0 -11
- package/dist/web-assets-CpDwDEx8.mjs +0 -8
- package/dist/web3-YsjDyAzH.mjs +0 -4
- package/dist/workers-BKKxaZcz.mjs +0 -6
- package/dist/workers-builds-BWo5vUA9.mjs +0 -2
- package/dist/workers-for-platforms-ASJsxYdM.mjs +0 -5
- package/dist/workers-vpc-RkTnRvA2.mjs +0 -3
- package/dist/workflows-KrIFI9ns.mjs +0 -5
- package/dist/zaraz-DglXbVzZ.mjs +0 -2
- package/dist/zero-trust-RilTdSjX.mjs +0 -91
- package/dist/zone-DsBtVkvT.mjs +0 -2
- package/dist/zones-BFxvWFQW.mjs +0 -44
- /package/dist/{alerts-B2SJO4nd.mjs → alerts-CstOk8n0.mjs} +0 -0
- /package/dist/{autorag-iNjZXw1n.mjs → autorag-PRTwXGgn.mjs} +0 -0
- /package/dist/{body-parser-DIlfApuJ.mjs → body-parser-CUWbw_Tq.mjs} +0 -0
- /package/dist/{brands-BrVnNrT3.mjs → brands-BHRXlWDm.mjs} +0 -0
- /package/dist/{clear-an9o3dJ3.mjs → clear-UvKESVx3.mjs} +0 -0
- /package/dist/{cli-types-CrSoSMPF.mjs → cli-types-tt_LZMbn.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-BqWfopFc.mjs → connector-telemetry-events-latest-DwnFeZg0.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-C1m9U1En.mjs → connector-telemetry-snapshots-latest-Dv6rZlxs.mjs} +0 -0
- /package/dist/{domain-info-B0Ykqv5l.mjs → domain-info-BqTDXNBo.mjs} +0 -0
- /package/dist/{health-CIUg1C5o.mjs → health-CwPzzrV6.mjs} +0 -0
- /package/dist/{input-validation-BxchZ9jE.mjs → input-validation-Ch4Vllrm.mjs} +0 -0
- /package/dist/{internal-DmpATljO.mjs → internal-WLHfxX64.mjs} +0 -0
- /package/dist/{live-B66u3_0g.mjs → live-D_k7eHdv.mjs} +0 -0
- /package/dist/{metadata-D062SVyy.mjs → metadata-APBiectA.mjs} +0 -0
- /package/dist/{rate-limit-analytics-BknoecoM.mjs → rate-limit-analytics-CDTPxSET.mjs} +0 -0
- /package/dist/{rate-limits-cdChIg_S.mjs → rate-limits-C3K9smdl.mjs} +0 -0
- /package/dist/{ready-C-H2cwp_.mjs → ready-CvwvbdTX.mjs} +0 -0
- /package/dist/{recent-submissions-DyuH_n5u.mjs → recent-submissions-CjzcT-iH.mjs} +0 -0
- /package/dist/{refute-uSlzkQKq.mjs → refute-CIAFMj00.mjs} +0 -0
- /package/dist/{scan-logo-DMk--WT7.mjs → scan-logo-zFkphtQ3.mjs} +0 -0
- /package/dist/{scan-page-DEHnAOJo.mjs → scan-page-CLl2MAkZ.mjs} +0 -0
- /package/dist/{search-BlKeSfVD.mjs → search-12jA1b4l.mjs} +0 -0
- /package/dist/{signed-url-CiGmGkLQ.mjs → signed-url-U0T_PEMR.mjs} +0 -0
- /package/dist/{submission-info-DHlTHDrs.mjs → submission-info-CZ84a3Nb.mjs} +0 -0
- /package/dist/{theme-CeVf-5qG.mjs → theme-BiIYWOed.mjs} +0 -0
- /package/dist/{total-queries-D5WvVfYi.mjs → total-queries-CJTc9Pde.mjs} +0 -0
- /package/dist/{tracked-domains-9deBK9bp.mjs → tracked-domains-BKLxnnSv.mjs} +0 -0
- /package/dist/{verify-S-TmhUDr.mjs → verify-CZW5Fo1q.mjs} +0 -0
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-Bx2PB-tt.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){a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p})),{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`)});i(await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p})),{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){a({command:`cf pipelines delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>s.pipelines.delete({account_id:l,pipeline_id:c[`pipeline-id`]})),{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){a({command:`cf pipelines get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.pipelines.get({account_id:l,pipeline_id:c[`pipeline-id`]})),{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){a({command:`cf pipelines legacy-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(m),h=m.local?e:await t();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Creating`,async()=>s.pipelines.legacyCreate({...e,account_id:h})),{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`)});i(await o(`Creating`,async()=>s.pipelines.legacyCreate({...g,account_id:h})),{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){a({command:`cf pipelines legacy-delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
14
|
+
`);return}i(await o(`Deleting`,async()=>s.pipelines.legacyDelete({account_id:l,pipeline_name:c[`pipeline-name`]})),{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){a({command:`cf pipelines legacy-get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.pipelines.legacyGet({account_id:l,pipeline_name:c[`pipeline-name`]})),{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){a({command:`cf pipelines legacy-list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.pipelines.legacyList({account_id:u,...s})),{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){a({command:`cf pipelines legacy-update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(m),h=m.local?e:await t();if(m.accountId=h,m.body){let e=c(m.body);i(await o(`Updating`,async()=>s.pipelines.legacyUpdate({...e,account_id:h,pipeline_name:m[`pipeline-name`]})),{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`)});i(await o(`Updating`,async()=>s.pipelines.legacyUpdate({...g,account_id:h,pipeline_name:m[`pipeline-name`]})),{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){a({command:`cf pipelines list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.pipelines.list({account_id:u,...s})),{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`]}).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 ee={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){a({command:`cf pipelines sinks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.sinks.create({...e,account_id:m})),{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`]));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`)});i(await o(`Creating`,async()=>s.pipelines.sinks.create({...h,account_id:m})),{successLabel:`Created`})})};function P(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:P,handler:async c=>s({command:`pipelines sinks delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf pipelines sinks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
27
|
+
`);return}i(await o(`Deleting`,async()=>s.pipelines.sinks.delete({account_id:l,sink_id:c[`sink-id`]})),{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){a({command:`cf pipelines sinks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.pipelines.sinks.get({account_id:l,sink_id:c[`sink-id`]})),{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){a({command:`cf pipelines sinks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pipelines/v1/sinks`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.pipelines.sinks.list({account_id:u,...s})),{successLabel:`Loaded`})})},B={command:`sinks`,describe:`Destinations where pipeline data is written — R2 buckets, HTTP endpoints, or other storage`,builder:e=>e.command(ee).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){a({command:`cf pipelines streams create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.streams.create({...e,account_id:p})),{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`]}});i(await o(`Creating`,async()=>s.pipelines.streams.create({...m,account_id:p})),{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){a({command:`cf pipelines streams delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
36
|
+
`);return}i(await o(`Deleting`,async()=>s.pipelines.streams.delete({account_id:l,stream_id:c[`stream-id`]})),{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){a({command:`cf pipelines streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.pipelines.streams.get({account_id:l,stream_id:c[`stream-id`]})),{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){a({command:`cf pipelines streams list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pipelines/v1/streams`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.pipelines.streams.list({account_id:u,...s})),{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){a({command:`cf pipelines streams update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.pipelines.streams.update({...e,account_id:d,stream_id:l[`stream-id`]})),{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`]}});i(await o(`Updating`,async()=>s.pipelines.streams.update({...f,account_id:d,stream_id:l[`stream-id`]})),{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){a({command:`cf pipelines validate-sql`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.validateSql({...e,account_id:p})),{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`)});i(await o(`Creating`,async()=>s.pipelines.validateSql({...m,account_id:p})),{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{_ as e}from"./oauth-D4bkeMAw.mjs";import{r as t}from"./auth-Cp7gT-AF.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bi02B6v4.mjs";import{t as a}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.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 t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.precursor.get({zone_id:s})),{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 t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.precursor.update({body:e,zone_id:d})),{successLabel:`Updated`});return}let f=c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)});n(await i(`Updating`,async()=>a.precursor.update({body:f,zone_id:d})),{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{E as e,M as t}from"./dist-dc4E1u01.mjs";import{m as n}from"./oauth-D4bkeMAw.mjs";import{d as r,h as i}from"./interactive-B6woOLo-.mjs";import{i as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{n as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{D as c,S as l,b as u,c as d,d as f,g as p,n as m,u as h,v as g}from"./dist-B4pQ4CXK.mjs";import{a as _,l as v,n as y,o as b,r as x,t as S}from"./containers-CFzvhmyz.mjs";import{a as C,i as w,n as T,r as E}from"./build-BPIp8J5F.mjs";import{t as D}from"./deploy-input-DpOgndz4.mjs";import{readBuildOutput as O}from"@cloudflare/build-output-utils";function k(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(n,r,i,a,o)=>A(o.quiet,async()=>{let s=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 t of r){let r=s.get(t.class_name);if(r||=(c??=await g(n,a),c.find(e=>e.class===t.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${t.class_name}".`);await d({imageRef:await j(t,e,i.id,a,n,o.localImageReferences?.get(t.class_name)),durable_object_namespace_id:r},t,n,a)}await h(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),t())})}}async function A(e,t){if(!e)return t();let n=r();i(`error`);try{return await t()}finally{i(n)}}async function j(e,n,r,i,a,o){if(o!==void 0)return l({pathToDocker:t(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=n.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return u(s,r,t(),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 M(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})}function N(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 P(t){let r=t[`preview-name`],i=r??_();if(!i||!r&&i===`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`);t.prebuilt||await T(t.mode,{output:t.quiet?`silent`:`stderr`},{isPreview:!0});let o=await O(process.cwd());x(o.rootConfig),w(t.mode,o.rootConfig.buildContext.mode,{requireRequestedMode:t.prebuilt});let s=o.workers.default,{wranglerConfig:l,builtConfig:u}=E(s,o.rootConfig),d=await a(),h=await n({isPreview:!0}),g=c(d);v({...g,logger:{...g.logger,log:()=>{},info:()=>{}}}),p({logger:{...g.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:g.fetchResult,fetchPagedListResult:g.fetchPagedListResult});let A=new Set(Object.values(u.exports??{}).filter(y).map(({container:e})=>e)),j=o.containers?.filter(({config:e})=>A.has(e.name))??[],M=S(j,l,{accountId:h}),N=M.source;if(N?.some(e=>e.scheduling_policy===`durable_object`))throw new C(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return N&&N.length>0&&f(h,d,e(l)),b(h,{name:i,json:!0},{workerConfig:u,rootConfig:o.rootConfig,containers:j.filter(({config:e})=>N?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:s.bundleDir?D(s,u):void 0,assets:s.assetsDir?{directory:s.assetsDir}:void 0},{...k(M),verifyContainersScope:async()=>{await m.listApplications()}})}const F={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:M,handler:async e=>{o(N(await P(e)),{quiet:e.quiet})}},I={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(s(F,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e,o as t}from"./src-B3h6tKMt.mjs";import{n}from"./version-W6_TN_kN.mjs";import{r}from"./theme-BiIYWOed.mjs";import{a as i}from"./dist-BpadEMNY.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!(!r()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(t,r){if(!c())return r();e(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(t);try{let e=await r();return o.clear(),a.stop(t),e}catch(e){throw o.clear(),a.error(t),e}}export{l as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{statSync as e}from"node:fs";import{dirname as t,join as n,resolve as r}from"node:path";const i=`cloudflare.config.ts`;let a,o;function s(e){o=e,a=void 0}function c(a=process.cwd()){let o=r(a);for(;;){let r=n(o,i);try{if(e(r).isFile())return r}catch{}let a=t(o);if(a===o)return null;o=a}}async function l(e=process.cwd(),t={}){let n=r(e),s=t.isPreview??!1;a=void 0;let l=c(n);if(!l)return a={startDir:n,isPreview:s,result:null},null;let{loadAndParseConfigSettings:u}=await import(`@cloudflare/config`),d=await u(l,{isPreview:s,mode:o});if(!d.result.success){let e=d.result.error.issues.map(e=>{let t=e.path.filter(e=>typeof e!=`symbol`).join(`.`);return` - ${t?`${t}: `:``}${e.message}`}).join(`
|
|
3
|
+
`);throw Error(`Invalid ${i}:\n${e}`)}let f={path:l,settings:d.result.data};return a={startDir:n,isPreview:s,result:f},f}function u(e=process.cwd(),t={}){let n=r(e),i=t.isPreview??!1;return a?.startDir===n&&a.isPreview===i?a.result:void 0}export{s as a,l as i,c as n,u as r,i as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e,t}from"./src-B3h6tKMt.mjs";import{n}from"./version-W6_TN_kN.mjs";import{n as r,t as i}from"./theme-BiIYWOed.mjs";import{M as a,n as o}from"./interactive-B6woOLo-.mjs";import{i as s,o as c,r as l,t as u}from"./dist-BpadEMNY.mjs";function d(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function f(){e(n)}async function p(){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 m(e,n,r){let i=r?.kind??`text`;if(o()){if(i===`secret`){let t=await p();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 s=`Enter value for --${e}`,u=n||r?.question||s,d=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;f();let m=i===`secret`?await l({message:u,mask:`•`,validate:d}):await c({message:u,validate:d});if(a(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n,r,i={}){let c=d(e),l=r.map(d);if(o())throw Error(`--${c} is required (one of: ${l.join(`, `)}). Pass --${c} <value> or run interactively.`);let u=`Select value for --${c}`,p=d(n||u);f();let m=await s({message:p,options:r.map(e=>({value:e,label:d((Object.hasOwn(i,e)?i[e]:void 0)??e)}))});if(a(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function g(e,n){if(o())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);f();let r=await u({message:n||`Confirm --${e}`,initialValue:!1});if(a(r))throw new t(130,{cancelled:!0});return r===!0}async function _(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(o())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;f();let i=await u({message:e,initialValue:n});if(a(i))throw new t(130,{cancelled:!0});return i===!0}async function v(e={}){if(e.force===!0)return!0;let n=e.message?`${e.message} Continue?`:`This permanently deletes the resource. Continue?`;if(o()){let e=r();return process.stderr.write(`${e.hex(i.warning)(`?`)} ${n}\n ${e.dim(`(non-interactive; pass --force to confirm)`)}\n`),!1}f();let s=await u({message:n,initialValue:!1});if(a(s))throw new t(130,{cancelled:!0});return s===!0}export{m as a,h as i,v as n,d as o,g as r,_ as t};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{n as f}from"./prompt-Bx2PB-tt.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){a({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queries.bulk.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({queries:l(d.queries,`queries`)});i(await o(`Creating`,async()=>s.queries.bulk.create({...p,account_id:f})),{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){a({command:`cf queries create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),p=l.local?e:await t();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(),i(await o(`Creating`,async()=>f.queries.create({...e,account_id:p,...s})),{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(),i(await o(`Creating`,async()=>f.queries.create({...m,account_id:p,...s})),{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){a({command:`cf queries delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/queries`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,!await f({force:!!c.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}i(await o(`Deleting`,async()=>l.queries.delete({account_id:u,...s})),{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,63 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function ee(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 g={command:`create <queue-id>`,describe:`Create a Queue Consumer`,builder:ee,handler:async l=>s({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.consumers.create({body:e,account_id:m,queue_id:l[`queue-id`]})),{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`)});i(await o(`Creating`,async()=>s.queues.consumers.create({body:h,account_id:m,queue_id:l[`queue-id`]})),{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){a({command:`cf queues consumers delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>s.queues.consumers.delete({account_id:l,queue_id:c[`queue-id`],consumer_id:c[`consumer-id`]})),{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){a({command:`cf queues consumers get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.consumers.get({account_id:l,queue_id:c[`queue-id`],consumer_id:c[`consumer-id`]})),{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){a({command:`cf queues consumers list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.consumers.list({account_id:l,queue_id:c[`queue-id`]})),{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){a({command:`cf queues consumers update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.queues.consumers.update({body:e,account_id:m,queue_id:l[`queue-id`],consumer_id:l[`consumer-id`]})),{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`)});i(await o(`Updating`,async()=>s.queues.consumers.update({body:h,account_id:m,queue_id:l[`queue-id`],consumer_id:l[`consumer-id`]})),{successLabel:`Updated`})})},T={command:`consumers`,describe:`Workers that automatically receive and process messages from a queue`,builder:e=>e.command(g).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){a({command:`cf queues create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.create({...e,account_id:p})),{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`)});i(await o(`Creating`,async()=>s.queues.create({...m,account_id:p})),{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){a({command:`cf queues delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}i(await o(`Deleting`,async()=>s.queues.delete({account_id:l,queue_id:c[`queue-id`]})),{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){a({command:`cf queues edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.queues.edit({body:e,account_id:f,queue_id:l[`queue-id`]})),{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`]}});i(await o(`Updating`,async()=>s.queues.edit({body:p,account_id:f,queue_id:l[`queue-id`]})),{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){a({command:`cf queues get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.get({account_id:l,queue_id:c[`queue-id`]})),{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){a({command:`cf queues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/queues`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.list({account_id:l})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 queues messages ack-preview <queue-id>
|
|
25
|
+
|
|
26
|
+
Delete messages returned by the legacy preview endpoint. This deprecated route is retained for compatibility; use the peek and purge endpoints for new integrations. Deleting messages this way does not count as delivery and does not affect metrics.`).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-preview <queue-id>`,describe:`Delete Previewed Queue Messages`,builder:I,handler:async d=>s({command:`queues messages ack-preview`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queues messages ack-preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/queues/${d[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(d[`queue-id`]))}/messages/preview/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 r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queues.messages.ackPreview({...e,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`});return}let p=u({acks:l(d.acks,`acks`),retries:l(d.retries,`retries`)});i(await o(`Creating`,async()=>s.queues.messages.ackPreview({...p,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`})})};function R(e){return e.usage(`$0 queues messages ack <queue-id>
|
|
27
|
+
|
|
28
|
+
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 z={command:`ack <queue-id>`,describe:`Acknowledge + Retry Queue Messages`,builder:R,handler:async d=>s({command:`queues messages ack`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queues messages ack`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queues.messages.ack({...e,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`});return}let p=u({acks:l(d.acks,`acks`),retries:l(d.retries,`retries`)});i(await o(`Creating`,async()=>s.queues.messages.ack({...p,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`})})};function B(e){return e.usage(`$0 queues messages bulk-push
|
|
29
|
+
|
|
30
|
+
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 V={command:`bulk-push`,describe:`Push Message Batch`,builder:B,handler:async d=>s({command:`queues messages bulk-push`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queues messages bulk-push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queues.messages.bulkPush({...e,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`});return}let p=u({delay_seconds:d[`delay-seconds`],messages:l(d.messages,`messages`)});i(await o(`Creating`,async()=>s.queues.messages.bulkPush({...p,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`})})};function H(e){return e.usage(`$0 queues messages extend-leases <queue-id>
|
|
31
|
+
|
|
32
|
+
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 U={command:`extend-leases <queue-id>`,describe:`Extend Message Leases`,builder:H,handler:async d=>s({command:`queues messages extend-leases`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queues messages extend-leases`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queues.messages.extendLeases({...e,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`});return}let p=u({extend:l(d.extend,`extend`),visibility_timeout_ms:d[`visibility-timeout-ms`]});i(await o(`Creating`,async()=>s.queues.messages.extendLeases({...p,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Created`})})};function te(e){return e.usage(`$0 queues messages peek <queue-id>
|
|
33
|
+
|
|
34
|
+
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 W={command:`peek <queue-id>`,describe:`Peek Queue Messages`,builder:te,handler:async l=>s({command:`queues messages peek`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues messages peek`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.messages.peek({...e,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}let f=u({batch_size:l[`batch-size`]});i(await o(`Creating`,async()=>s.queues.messages.peek({...f,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`})})};function G(e){return e.usage(`$0 queues messages preview <queue-id>
|
|
35
|
+
|
|
36
|
+
Preview messages from a Queue without leasing them. This deprecated route is retained for compatibility; use the peek endpoint for new integrations.`).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 K={command:`preview <queue-id>`,describe:`Preview Queue Messages`,builder:G,handler:async l=>s({command:`queues messages preview`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues messages preview`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/messages/preview`,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 r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Loading`,async()=>s.queues.messages.preview({...e,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Loaded`});return}let f=u({batch_size:l[`batch-size`]});i(await o(`Loading`,async()=>s.queues.messages.preview({...f,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Loaded`})})};function q(e){return e.usage(`$0 queues messages pull <queue-id>
|
|
37
|
+
|
|
38
|
+
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 J={command:`pull <queue-id>`,describe:`Pull Queue Messages`,builder:q,handler:async l=>s({command:`queues messages pull`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues messages pull`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.messages.pull({...e,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}let f=u({batch_size:l[`batch-size`],visibility_timeout_ms:l[`visibility-timeout-ms`]});i(await o(`Creating`,async()=>s.queues.messages.pull({...f,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`})})};function Y(e){return e.usage(`$0 queues messages purge <queue-id>
|
|
39
|
+
|
|
40
|
+
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 X={command:`purge <queue-id>`,describe:`Purge Peeked Queue Messages`,builder:Y,handler:async d=>s({command:`queues messages purge`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},d,async()=>{if(d.dryRun){a({command:`cf queues messages purge`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(d),f=d.local?e:await t();if(d.accountId=f,!await m({force:!!d.force,message:`This operation permanently deletes the selected messages from the Queue.`})){process.stderr.write(`Aborted.
|
|
41
|
+
`);return}if(d.body){let e=c(d.body);i(await o(`Deleting`,async()=>s.queues.messages.purge({...e,account_id:f,queue_id:d[`queue-id`]})),{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`)});i(await o(`Deleting`,async()=>s.queues.messages.purge({...p,account_id:f,queue_id:d[`queue-id`]})),{successLabel:`Deleted`})})};function Z(e){return e.usage(`$0 queues messages push <queue-id>
|
|
42
|
+
|
|
43
|
+
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 Q={command:`push <queue-id>`,describe:`Push Message`,builder:Z,handler:async l=>s({command:`queues messages push`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues messages push`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.messages.push({body:e,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}let f=u({delay_seconds:l[`delay-seconds`]});i(await o(`Creating`,async()=>s.queues.messages.push({body:f,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Created`})})},ne={command:`messages`,describe:`Push messages to a queue and pull or acknowledge them from consumers`,builder:e=>e.command(z).command(L).command(V).command(U).command(W).command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.usage(`$0 queues metrics get <queue-id>
|
|
44
|
+
|
|
45
|
+
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 ie={command:`get <queue-id>`,describe:`Get Queue Metrics`,builder:re,handler:async c=>s({command:`queues metrics get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf queues metrics get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.metrics.get({account_id:l,queue_id:c[`queue-id`]})),{successLabel:`Loaded`})})},ae={command:`metrics`,describe:`Operations for metrics`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 queues purge start <queue-id>
|
|
46
|
+
|
|
47
|
+
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 se={command:`start <queue-id>`,describe:`Purge Queue`,builder:oe,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){a({command:`cf queues purge start`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),d=l.local?e:await t();if(l.accountId=d,!await m({force:!!l.force,message:`This operation drops every message in the queue.`})){process.stderr.write(`Aborted.
|
|
48
|
+
`);return}if(l.body){let e=c(l.body);i(await o(`Deleting`,async()=>s.queues.purge.start({...e,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Deleted`});return}let f=u({delete_messages_permanently:l[`delete-messages-permanently`]});i(await o(`Deleting`,async()=>s.queues.purge.start({...f,account_id:d,queue_id:l[`queue-id`]})),{successLabel:`Deleted`})})};function ce(e){return e.usage(`$0 queues purge status <queue-id>
|
|
49
|
+
|
|
50
|
+
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 le={command:`status <queue-id>`,describe:`Get Queue Purge Status`,builder:ce,handler:async c=>s({command:`queues purge status`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf queues purge status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.purge.status({account_id:l,queue_id:c[`queue-id`]})),{successLabel:`Loaded`})})},ue={command:`purge`,describe:`Remove all pending messages from a queue`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function de(e){return e.usage(`$0 queues subscriptions create
|
|
51
|
+
|
|
52
|
+
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 fe={command:`create`,describe:`Create Event Subscription`,builder:de,handler:async l=>s({command:`queues subscriptions create`,classification:{safeFlags:[`destination-type`,`enabled`,`source-type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.subscriptions.create({...e,account_id:f})),{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`)}});i(await o(`Creating`,async()=>s.queues.subscriptions.create({...p,account_id:f})),{successLabel:`Created`})})};function pe(e){return e.usage(`$0 queues subscriptions delete <subscription-id>
|
|
53
|
+
|
|
54
|
+
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 $={command:`delete <subscription-id>`,describe:`Delete Event Subscription`,builder:pe,handler:async c=>s({command:`queues subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf queues subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();if(c.accountId=l,!await m({force:!!c.force})){process.stderr.write(`Aborted.
|
|
55
|
+
`);return}i(await o(`Deleting`,async()=>s.queues.subscriptions.delete({account_id:l,subscription_id:c[`subscription-id`]})),{successLabel:`Deleted`})})};function me(e){return e.usage(`$0 queues subscriptions get <subscription-id>
|
|
56
|
+
|
|
57
|
+
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 he={command:`get <subscription-id>`,describe:`Get Event Subscription`,builder:me,handler:async c=>s({command:`queues subscriptions get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf queues subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.queues.subscriptions.get({account_id:l,subscription_id:c[`subscription-id`]})),{successLabel:`Loaded`})})};function ge(e){return e.usage(`$0 queues subscriptions list
|
|
58
|
+
|
|
59
|
+
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 _e={command:`list`,describe:`List Event Subscriptions`,builder:h(ge),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){a({command:`cf queues subscriptions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/event_subscriptions/subscriptions`,pathParams:{},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.queues.subscriptions.list({account_id:u,...s})),{successLabel:`Loaded`})})};function ve(e){return e.usage(`$0 queues subscriptions update <subscription-id>
|
|
60
|
+
|
|
61
|
+
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 ye={command:`update <subscription-id>`,describe:`Update Event Subscription`,builder:ve,handler:async l=>s({command:`queues subscriptions update`,classification:{safeFlags:[`destination-type`,`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues subscriptions update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.queues.subscriptions.update({...e,account_id:f,subscription_id:l[`subscription-id`]})),{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`)});i(await o(`Updating`,async()=>s.queues.subscriptions.update({...p,account_id:f,subscription_id:l[`subscription-id`]})),{successLabel:`Updated`})})},be={command:`subscriptions`,describe:`Manage queue subscriptions for event-driven message routing`,builder:e=>e.command(fe).command($).command(he).command(_e).command(ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function xe(e){return e.usage(`$0 queues update <queue-id>
|
|
62
|
+
|
|
63
|
+
Replaces a Queue's configuration with the supplied configuration. This endpoint does not support partial updates.`).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 Se={command:`update <queue-id>`,describe:`Update Queue`,builder:xe,handler:async l=>s({command:`queues update`,classification:{safeFlags:[`jurisdiction`,`settings-delivery-paused`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<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 r(l),f=l.local?e:await t();if(l.accountId=f,l.body){let e=c(l.body);i(await o(`Updating`,async()=>s.queues.update({body:e,account_id:f,queue_id:l[`queue-id`]})),{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`]}});i(await o(`Updating`,async()=>s.queues.update({body:p,account_id:f,queue_id:l[`queue-id`]})),{successLabel:`Updated`})})},Ce={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(Se).command(T).command(ne).command(ae).command(ue).command(be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{Ce as default};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-D4bkeMAw.mjs";import{r}from"./auth-Cp7gT-AF.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bi02B6v4.mjs";import{t as s}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-Bx2PB-tt.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 r2-data-catalog credentials create <bucket-name>
|
|
3
|
+
|
|
4
|
+
Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const h={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:m,handler:async f=>s({command:`r2-data-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf r2-data-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${f[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(f[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(f[`bucket-name`]??``)},bodyKind:`json`,body:f.body===void 0?l({token:u(f.token,`token`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...e,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`});return}f.token===void 0&&(f.token=await d(`token`,`Provides the Cloudflare API token for accessing R2.`));let m=l({token:u(f.token,`token`,`text`)});i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...m,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`})})},g={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 r2-data-catalog delete <bucket-name>
|
|
5
|
+
|
|
6
|
+
Removes the catalog from the control plane without deleting R2 bucket objects. Set force=true to remove catalog namespaces, tables, views, and maintenance metadata. Force deletion is limited to a configured catalog object count.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`cascade`,{type:`boolean`,description:`Remove child metadata before deleting the catalog.`}).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 <bucket-name>`,describe:`Delete R2 catalog metadata`,builder:_,handler:async c=>s({command:`r2-data-catalog delete`,classification:{safeFlags:[`cascade`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{let s={force:c.cascade};if(c.dryRun){a({command:`cf r2-data-catalog delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/delete`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,!await f({force:!!c.force,message:`This removes catalog metadata. R2 bucket objects are retained.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}i(await o(`Deleting`,async()=>l.r2DataCatalog.delete({account_id:u,bucket_name:c[`bucket-name`],...s})),{successLabel:`Deleted`})})};function y(e){return e.usage(`$0 r2-data-catalog disable <bucket-name>
|
|
8
|
+
|
|
9
|
+
Disable an R2 bucket as a catalog. This operation deactivates the catalog but preserves existing metadata and data files. The catalog can be re-enabled later.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to disable as catalog.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const b={command:`disable <bucket-name>`,describe:`Disable R2 catalog`,builder:y,handler:async c=>s({command:`r2-data-catalog disable`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog disable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/disable`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();if(c.accountId=l,!await f({force:!!c.force,message:`This operation turns off the data catalog for the bucket. Existing namespace or table state remains, but writes stop.`})){process.stderr.write(`Aborted.
|
|
10
|
+
`);return}i(await o(`Deleting`,async()=>s.r2DataCatalog.disable({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Deleted`})})};function x(e){return e.usage(`$0 r2-data-catalog enable <bucket-name>
|
|
11
|
+
|
|
12
|
+
Enable an R2 bucket as an Apache Iceberg catalog. This operation creates the necessary catalog infrastructure and activates the bucket for storing Iceberg metadata and data files.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name to enable as catalog.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`enable <bucket-name>`,describe:`Enable R2 bucket as a catalog`,builder:x,handler:async c=>s({command:`r2-data-catalog enable`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog enable`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/enable`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Creating`,async()=>s.r2DataCatalog.enable({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Created`})})};function C(e){return e.usage(`$0 r2-data-catalog get <bucket-name>
|
|
13
|
+
|
|
14
|
+
Retrieve detailed information about a specific R2 catalog by bucket name. Returns catalog status, maintenance configuration, and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <bucket-name>`,describe:`Get R2 catalog details`,builder:C,handler:async c=>s({command:`r2-data-catalog get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.get({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Loaded`})})};function T(e){return e.usage(`$0 r2-data-catalog list
|
|
15
|
+
|
|
16
|
+
Returns a list of R2 buckets that have been enabled as Apache Iceberg catalogs for the specified account. Each catalog represents an R2 bucket configured to store Iceberg metadata and data files.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List R2 catalogs`,builder:T,handler:async c=>s({command:`r2-data-catalog list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog`,pathParams:{},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.list({account_id:l})),{successLabel:`Loaded`})})};function D(e){return e.usage(`$0 r2-data-catalog maintenance-configs get <bucket-name>
|
|
17
|
+
|
|
18
|
+
Retrieve the maintenance configuration for a specific catalog, including compaction settings and credential status.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`get <bucket-name>`,describe:`Get catalog maintenance configuration`,builder:D,handler:async c=>s({command:`r2-data-catalog maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.maintenanceConfigs.get({account_id:l,bucket_name:c[`bucket-name`]})),{successLabel:`Loaded`})})};function k(e){return e.usage(`$0 r2-data-catalog maintenance-configs update <bucket-name>
|
|
19
|
+
|
|
20
|
+
Update the maintenance configuration for a catalog. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update catalog maintenance configuration.`})}const A={command:`update <bucket-name>`,describe:`Update catalog maintenance configuration`,builder:k,handler:async d=>s({command:`r2-data-catalog maintenance-configs update`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``)},bodyKind:`json`,body:d.body===void 0?l({snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.maintenanceConfigs.update({...e,account_id:f,bucket_name:d[`bucket-name`]})),{successLabel:`Created`});return}let p=l({snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}});i(await o(`Creating`,async()=>s.r2DataCatalog.maintenanceConfigs.update({...p,account_id:f,bucket_name:d[`bucket-name`]})),{successLabel:`Created`})})},j={command:`maintenance-configs`,describe:`Table maintenance settings — compaction schedules and snapshot expiration policies`,builder:e=>e.command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function M(e){return e.usage(`$0 r2-data-catalog namespaces list
|
|
21
|
+
|
|
22
|
+
Returns a list of namespaces in the specified R2 catalog. Supports hierarchical filtering and pagination for efficient traversal of large namespace hierarchies.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
|
|
23
|
+
Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of namespaces to return per page.
|
|
24
|
+
Defaults to 100, maximum 1000.`}).option(`parent`,{type:`string`,description:`Parent namespace to filter by. Only returns direct children of this namespace.
|
|
25
|
+
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").
|
|
26
|
+
Omit this parameter to list top-level namespaces.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include namespace UUIDs in the response.
|
|
27
|
+
Set to true to receive the namespace_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps).
|
|
28
|
+
When true, response includes created_at and updated_at arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List namespaces in catalog`,builder:M,handler:async c=>s({command:`r2-data-catalog namespaces list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},c,async()=>{let s={page_token:c[`page-token`],page_size:c[`page-size`],parent:c.parent,return_uuids:c[`return-uuids`],return_details:c[`return-details`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces`,pathParams:{"bucket-name":String(c[`bucket-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.list({account_id:u,bucket_name:c[`bucket-name`],...s})),{successLabel:`Loaded`})})};function P(e){return e.usage("$0 r2-data-catalog namespaces tables get <table-name>\n\nReturns full Apache Iceberg metadata for a single table: schema, partition specs, sort orders, properties, and recent snapshot history. Designed for catalog introspection UIs that need per-table details without holding R2 credentials. The `metadata.snapshots`, `metadata.snapshot-log`, and `metadata.metadata-log` arrays are pruned to the most recent 10 entries by `timestamp-ms`. Use `total_snapshots` and `returned_snapshots` to surface the truncation to end users.").positional(`table-name`,{type:`string`,description:`The table name within the given namespace.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
|
|
29
|
+
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <table-name>`,describe:`Get table details`,builder:P,handler:async c=>s({command:`r2-data-catalog namespaces tables get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.namespaces.tables.get({account_id:l,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`]})),{successLabel:`Loaded`})})};function I(e){return e.usage(`$0 r2-data-catalog namespaces tables list
|
|
30
|
+
|
|
31
|
+
Returns a list of tables in the specified namespace within an R2 catalog. Supports pagination for efficient traversal of large table collections.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier.
|
|
32
|
+
For nested namespaces, use %1F as separator (e.g., "bronze%1Fanalytics").`,demandOption:!0}).option(`page-token`,{type:`string`,description:`Opaque pagination token from a previous response.
|
|
33
|
+
Use this to fetch the next page of results.`}).option(`page-size`,{type:`number`,description:`Maximum number of tables to return per page.
|
|
34
|
+
Defaults to 100, maximum 1000.`}).option(`return-uuids`,{type:`boolean`,description:`Whether to include table UUIDs in the response.
|
|
35
|
+
Set to true to receive the table_uuids array.`}).option(`return-details`,{type:`boolean`,description:`Whether to include additional metadata (timestamps, locations).
|
|
36
|
+
When true, response includes created_at, updated_at, metadata_locations, and locations arrays.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const L={command:`list`,describe:`List tables in namespace`,builder:I,handler:async c=>s({command:`r2-data-catalog namespaces tables list`,classification:{safeFlags:[`return-uuids`,`return-details`,`dry-run`]}},c,async()=>{let s={page_token:c[`page-token`],page_size:c[`page-size`],return_uuids:c[`return-uuids`],return_details:c[`return-details`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.tables.list({account_id:u,bucket_name:c[`bucket-name`],namespace:c.namespace,...s})),{successLabel:`Loaded`})})};function R(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs get <table-name>
|
|
37
|
+
|
|
38
|
+
Retrieve the maintenance configuration for a specific table, including compaction settings.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get <table-name>`,describe:`Get table maintenance configuration`,builder:R,handler:async c=>s({command:`r2-data-catalog namespaces tables maintenance-configs get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.get({account_id:l,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`]})),{successLabel:`Loaded`})})};function B(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs queue <configuration-type>
|
|
39
|
+
|
|
40
|
+
Queue maintenance for normal polling. This request does not start a run.`).positional(`configuration-type`,{type:`string`,description:`Configuration type`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`request-id`,{type:`string`,description:`The request_id 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 V={command:`queue <configuration-type>`,describe:`Queue table maintenance`,builder:p(B),handler:async d=>s({command:`r2-data-catalog namespaces tables maintenance-configs queue`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs queue`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/namespaces/${d.namespace==null?`<namespace>`:encodeURIComponent(String(d.namespace))}/tables/${d[`table-name`]==null?`<table-name>`:encodeURIComponent(String(d[`table-name`]))}/maintenance-configs/${d[`configuration-type`]==null?`<configuration-type>`:encodeURIComponent(String(d[`configuration-type`]))}/queue`,pathParams:{"bucket-name":String(d[`bucket-name`]??``),namespace:String(d.namespace??``),"table-name":String(d[`table-name`]??``),"configuration-type":String(d[`configuration-type`]??``)},bodyKind:`json`,body:d.body===void 0?l({request_id:u(d[`request-id`],`request-id`,`text`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.queue({...e,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`],configuration_type:d[`configuration-type`]})),{successLabel:`Created`});return}let p=l({request_id:u(d[`request-id`],`request-id`,`text`)});i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.queue({...p,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`],configuration_type:d[`configuration-type`]})),{successLabel:`Created`})})};function H(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-configs update <table-name>
|
|
41
|
+
|
|
42
|
+
Update the maintenance configuration for a specific table. This allows you to enable or disable compaction and adjust target file sizes for optimization.`).positional(`table-name`,{type:`string`,description:`The table name.`,demandOption:!0}).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`The namespace identifier (use %1F as separator for nested namespaces).`,demandOption:!0}).option(`compaction-state`,{type:`string`,description:`Specifies the state of maintenance operations.`,choices:[`enabled`,`disabled`]}).option(`compaction-target-size-mb`,{type:`string`,description:`Sets the target file size for compaction in megabytes. Defaults to "128".`,choices:[`64`,`128`,`256`,`512`]}).option(`snapshot-expiration-max-snapshot-age`,{type:`string`,description:`Updates the maximum age for snapshots optionally.`}).option(`snapshot-expiration-min-snapshots-to-keep`,{type:`number`,description:`Updates the minimum number of snapshots to retain optionally.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to update table maintenance configuration.`})}const U={command:`update <table-name>`,describe:`Update table maintenance configuration`,builder:H,handler:async d=>s({command:`r2-data-catalog namespaces tables maintenance-configs update`,classification:{safeFlags:[`compaction-state`,`compaction-target-size-mb`,`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-configs update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${d[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(d[`bucket-name`]))}/namespaces/${d.namespace==null?`<namespace>`:encodeURIComponent(String(d.namespace))}/tables/${d[`table-name`]==null?`<table-name>`:encodeURIComponent(String(d[`table-name`]))}/maintenance-configs`,pathParams:{"bucket-name":String(d[`bucket-name`]??``),namespace:String(d.namespace??``),"table-name":String(d[`table-name`]??``)},bodyKind:`json`,body:d.body===void 0?l({compaction:{state:u(d[`compaction-state`],`compaction-state`,`text`),target_size_mb:u(d[`compaction-target-size-mb`],`compaction-target-size-mb`,`text`)},snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.update({...e,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`]})),{successLabel:`Created`});return}let p=l({compaction:{state:u(d[`compaction-state`],`compaction-state`,`text`),target_size_mb:u(d[`compaction-target-size-mb`],`compaction-target-size-mb`,`text`)},snapshot_expiration:{max_snapshot_age:u(d[`snapshot-expiration-max-snapshot-age`],`snapshot-expiration-max-snapshot-age`,`text`),min_snapshots_to_keep:d[`snapshot-expiration-min-snapshots-to-keep`]}});i(await o(`Creating`,async()=>s.r2DataCatalog.namespaces.tables.maintenanceConfigs.update({...p,account_id:f,bucket_name:d[`bucket-name`],namespace:d.namespace,table_name:d[`table-name`]})),{successLabel:`Created`})})},W={command:`maintenance-configs`,describe:`Operations for namespaces.tables.maintenance-configs`,builder:e=>e.command(z).command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.usage(`$0 r2-data-catalog namespaces tables maintenance-runs list
|
|
43
|
+
|
|
44
|
+
Retrieves recent table maintenance runs for the current table.`).option(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`namespace`,{type:`string`,description:`Namespace`,demandOption:!0}).option(`table-name`,{type:`string`,description:`Table name`,demandOption:!0}).option(`page-size`,{type:`number`,description:`Page size`}).option(`page-token`,{type:`string`,description:`Page token`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`list`,describe:`List table maintenance runs`,builder:G,handler:async c=>s({command:`r2-data-catalog namespaces tables maintenance-runs list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={page_size:c[`page-size`],page_token:c[`page-token`]};if(c.dryRun){a({command:`cf r2-data-catalog namespaces tables maintenance-runs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${c[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(c[`bucket-name`]))}/namespaces/${c.namespace==null?`<namespace>`:encodeURIComponent(String(c.namespace))}/tables/${c[`table-name`]==null?`<table-name>`:encodeURIComponent(String(c[`table-name`]))}/maintenance-runs`,pathParams:{"bucket-name":String(c[`bucket-name`]??``),namespace:String(c.namespace??``),"table-name":String(c[`table-name`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.r2DataCatalog.namespaces.tables.maintenanceRuns.list({account_id:u,bucket_name:c[`bucket-name`],namespace:c.namespace,table_name:c[`table-name`],...s})),{successLabel:`Loaded`})})},q={command:`maintenance-runs`,describe:`Operations for namespaces.tables.maintenance-runs`,builder:e=>e.command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`tables`,describe:`Operations for namespaces.tables`,builder:e=>e.command(F).command(L).command(W).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},Y={command:`namespaces`,describe:`Logical namespaces that group related tables within the data catalog`,builder:e=>e.command(N).command(J).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},X={command:`r2-data-catalog`,describe:`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(g).command(j).command(Y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{X as default};
|