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,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-D4bkeMAw.mjs";import{a as i,r as a}from"./auth-Cp7gT-AF.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{t as s}from"./dry-run-CLX6Pbtq.mjs";import{t as c}from"./progress-Bi02B6v4.mjs";import{t as l}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,n as h}from"./prompt-Bx2PB-tt.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";import{n as ee,t as te}from"./raw-fetch-DNTQkXbg.mjs";function _(e){return e.usage(`$0 intel asn get <asn>
|
|
3
|
+
|
|
4
|
+
Gets an overview of the Autonomous System Number (ASN) and a list of subnets for it.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <asn>`,describe:`Get ASN Overview.`,builder:_,handler:async t=>l({command:`intel asn get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel asn get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.get({account_id:l,asn:t.asn})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 intel asn subnets get <asn>
|
|
5
|
+
|
|
6
|
+
Get ASN Subnets.`).positional(`asn`,{type:`string`,description:`Asn`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get <asn>`,describe:`Get ASN Subnets`,builder:y,handler:async t=>l({command:`intel asn subnets get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel asn subnets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/asn/${t.asn==null?`<asn>`:encodeURIComponent(String(t.asn))}/subnets`,pathParams:{asn:String(t.asn??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.asn.subnets.get({account_id:l,asn:t.asn})),{successLabel:`Loaded`})})},x={command:`subnets`,describe:`Operations for asn.subnets`,builder:e=>e.command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},S={command:`asn`,describe:`ASN intelligence — ownership, geolocation, and subnet details for autonomous systems`,builder:e=>e.command(v).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function C(e){return e.usage(`$0 intel attack-surface-report issue-types get
|
|
7
|
+
|
|
8
|
+
Lists all available issue types in Security Center, describing categories of security issues.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get`,describe:`Retrieves Security Center Issues Types`,builder:C,handler:async t=>l({command:`intel attack-surface-report issue-types get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel attack-surface-report issue-types get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issue-types`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.attackSurfaceReport.issueTypes.get({account_id:l})),{successLabel:`Loaded`})})},T={command:`issue-types`,describe:`Operations for attack-surface-report.issue-types`,builder:e=>e.command(w).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(e){return e.usage(`$0 intel attack-surface-report issues class
|
|
9
|
+
|
|
10
|
+
Retrieves Security Center issue counts aggregated by classification class.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`class`,describe:`Retrieves Security Center Issue Counts by Class`,builder:g(E),handler:async t=>l({command:`intel attack-surface-report issues class`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){s({command:`cf intel attack-surface-report issues class`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issues/class`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.class({account_id:u,...i})),{successLabel:`Loaded`})})};function O(e){return e.usage(`$0 intel attack-surface-report issues dismiss <issue-id>
|
|
11
|
+
|
|
12
|
+
Deprecated endpoint for archiving Security Center insights. Use the newer archive-security-center-insight endpoint instead.`).positional(`issue-id`,{type:`string`,description:`Issue ID`,demandOption:!0}).option(`dismiss`,{type:`boolean`,description:`The dismiss 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 k={command:`dismiss <issue-id>`,describe:`Archives Security Center Insight`,builder:O,handler:async t=>l({command:`intel attack-surface-report issues dismiss`,classification:{safeFlags:[`dismiss`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel attack-surface-report issues dismiss`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issues/${t[`issue-id`]==null?`<issue-id>`:encodeURIComponent(String(t[`issue-id`]))}/dismiss`,pathParams:{"issue-id":String(t[`issue-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({dismiss:t.dismiss}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...e,account_id:l,issue_id:t[`issue-id`]})),{successLabel:`Updated`});return}let f=d({dismiss:t.dismiss});o(await c(`Updating`,async()=>i.intel.attackSurfaceReport.issues.dismiss({...f,account_id:l,issue_id:t[`issue-id`]})),{successLabel:`Updated`})})};function A(e){return e.usage(`$0 intel attack-surface-report issues list
|
|
13
|
+
|
|
14
|
+
Lists all Security Center issues for the account, showing active security problems requiring attention.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`page`,{type:`number`,description:`Specifies the current page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Sets the number of results per page of results.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`list`,describe:`Retrieves Security Center Issues`,builder:g(A),handler:async t=>l({command:`intel attack-surface-report issues list`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject,page:t.page,per_page:t[`per-page`]};if(t.dryRun){s({command:`cf intel attack-surface-report issues list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issues`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.list({account_id:u,...i})),{successLabel:`Loaded`})})};function M(e){return e.usage(`$0 intel attack-surface-report issues severity
|
|
15
|
+
|
|
16
|
+
Retrieves Security Center issue counts aggregated by severity level.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`severity`,describe:`Retrieves Security Center Issue Counts by Severity`,builder:g(M),handler:async t=>l({command:`intel attack-surface-report issues severity`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){s({command:`cf intel attack-surface-report issues severity`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issues/severity`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.severity({account_id:u,...i})),{successLabel:`Loaded`})})};function P(e){return e.usage(`$0 intel attack-surface-report issues type
|
|
17
|
+
|
|
18
|
+
Retrieves Security Center issue counts aggregated by issue type.`).option(`dismissed`,{type:`boolean`,description:`Dismissed`}).option(`issue-class`,{type:`string`,description:`Issue class`}).option(`issue-type`,{type:`string`,description:`Issue type`}).option(`product`,{type:`string`,description:`Product`}).option(`source`,{type:`string`,description:`Source`}).option(`severity`,{type:`string`,description:`Severity`}).option(`subject`,{type:`string`,description:`Subject`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`type`,describe:`Retrieves Security Center Issue Counts by Type`,builder:g(P),handler:async t=>l({command:`intel attack-surface-report issues type`,classification:{safeFlags:[`dismissed`,`dry-run`]}},t,async()=>{let i={dismissed:t.dismissed,issue_class:t[`issue-class`],issue_type:t[`issue-type`],product:t.product,source:t.source,severity:t.severity,subject:t.subject};if(t.dryRun){s({command:`cf intel attack-surface-report issues type`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/attack-surface-report/issues/type`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.attackSurfaceReport.issues.type({account_id:u,...i})),{successLabel:`Loaded`})})},I={command:`issues`,describe:`Operations for attack-surface-report.issues`,builder:e=>e.command(D).command(k).command(j).command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`attack-surface-report`,describe:`Attack surface intelligence — exposed assets, vulnerabilities, and infrastructure mapping`,builder:e=>e.command(T).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.usage(`$0 intel dns list
|
|
19
|
+
|
|
20
|
+
Gets a list of all the domains that have resolved to a specific IP address.`).option(`start-end-params`,{type:`string`,description:`Start end params`}).option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`page`,{type:`number`,description:`Requested page within paginated list of results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results requested.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`list`,describe:`Get Passive DNS by IP`,builder:g(R),handler:async t=>l({command:`intel dns list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={start_end_params:t[`start-end-params`],ipv4:t.ipv4,page:t.page,per_page:t[`per-page`]};if(t.dryRun){s({command:`cf intel dns list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/dns`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.dns.list({account_id:u,...i})),{successLabel:`Loaded`})})},B={command:`dns`,describe:`Passive DNS data showing historical DNS resolution records for domains`,builder:e=>e.command(z).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function V(e){return e.usage(`$0 intel domain-history get
|
|
21
|
+
|
|
22
|
+
Gets historical security threat and content categories currently and previously assigned to a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get`,describe:`Get Domain History`,builder:V,handler:async t=>l({command:`intel domain-history get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={domain:t.domain};if(t.dryRun){s({command:`cf intel domain-history get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/domain-history`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.domainHistory.get({account_id:u,...i})),{successLabel:`Loaded`})})},U={command:`domain-history`,describe:`Historical domain registration and categorization changes over time`,builder:e=>e.command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.usage("$0 intel domains bulks get\n\nReturns security details and statistics about multiple domains in a single request. **Behavior change — domain ranking is becoming opt-in.** This endpoint previously included domain ranking data in every response and accepted a `skip_ranking=true` query parameter to opt out. That parameter is being deprecated and ranking will no longer be returned by default. Callers that want ranking data must pass `include_ranking=true`. The `skip_ranking` parameter will be silently ignored once the change ships.").option(`domain`,{type:`string`,description:"Accepts multiple values like `?domain=cloudflare.com&domain=example.com`."}).option(`include-ranking`,{type:`boolean`,description:"Whether to include domain ranking data in the response. Defaults to\n`false` — ranking lookups are expensive at bulk scale and most\ncallers do not need them. Set to `true` to opt in. This parameter\nreplaces the deprecated `skip_ranking` (see below)."}).option(`skip-ranking`,{type:`boolean`,description:"**Deprecated.** Previously controlled whether the ranking lookup\nwas skipped (defaulted to `false`, meaning ranking ran). The\nendpoint's default behavior is being flipped — ranking is now\nopt-in via `include_ranking=true` — and this parameter will be\nsilently ignored. Remove it from your callers and use\n`include_ranking` instead."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const G={command:`get`,describe:`Get Multiple Domain Details`,builder:W,handler:async t=>l({command:`intel domains bulks get`,classification:{safeFlags:[`include-ranking`,`skip-ranking`,`dry-run`]}},t,async()=>{let i={domain:t.domain,include_ranking:t[`include-ranking`],skip_ranking:t[`skip-ranking`]};if(t.dryRun){s({command:`cf intel domains bulks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/domain/bulk`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.bulks.get({account_id:u,...i})),{successLabel:`Loaded`})})},K={command:`bulks`,describe:`Operations for domains.bulks`,builder:e=>e.command(G).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function q(e){return e.usage(`$0 intel domains get
|
|
23
|
+
|
|
24
|
+
Gets security details and statistics about a domain.`).option(`domain`,{type:`string`,description:`Domain`}).option(`skip-dns`,{type:`boolean`,description:`Skip DNS resolution lookups for faster response.`}).option(`skip-ranking`,{type:`boolean`,description:"Skip the domain ranking lookup for faster responses. Defaults to\n`false` (ranking is included). Set to `true` to opt out — primarily\nused by callers like Cloudflare Radar that need to avoid a\ncircular dependency when building the domain details page.\nNote: the bulk endpoint (`/intel/domain/bulk`) uses opposite\ndefaults — see `include_ranking` there."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const J={command:`get`,describe:`Get Domain Details`,builder:q,handler:async t=>l({command:`intel domains get`,classification:{safeFlags:[`skip-dns`,`skip-ranking`,`dry-run`]}},t,async()=>{let i={domain:t.domain,skip_dns:t[`skip-dns`],skip_ranking:t[`skip-ranking`]};if(t.dryRun){s({command:`cf intel domains get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/domain`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.domains.get({account_id:u,...i})),{successLabel:`Loaded`})})},Y={command:`domains`,describe:`Domain intelligence — risk scores, categories, and associated infrastructure`,builder:e=>e.command(J).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function X(e){return e.usage(`$0 intel indicator-feeds create
|
|
25
|
+
|
|
26
|
+
Creates a new custom threat indicator feed for sharing threat intelligence data.`).option(`description`,{type:`string`,description:`The description of the example test`}).option(`name`,{type:`string`,description:`The name of the indicator feed`}).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:`create`,describe:`Create new indicator feed`,builder:X,handler:async t=>l({command:`intel indicator-feeds create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...e,account_id:l})),{successLabel:`Created`});return}let p=d({description:f(t.description,`description`,`text`),name:f(t.name,`name`,`text`)});o(await c(`Creating`,async()=>i.intel.indicatorFeeds.create({...p,account_id:l})),{successLabel:`Created`})})};function Q(e){return e.usage(`$0 intel indicator-feeds data <feed-id>
|
|
27
|
+
|
|
28
|
+
Retrieves the raw data entries in a custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ne={command:`data <feed-id>`,describe:`Get indicator feed data`,builder:Q,handler:async t=>l({command:`intel indicator-feeds data`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds data`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/data`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}await a(t);let i=t.local?e:await n();t.accountId=i,ee((await c(`Loading`,async()=>te(`/accounts/${i}/intel/indicator-feeds/${encodeURIComponent(String(t[`feed-id`]))}/data`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}))).toString(`utf-8`))})};function re(e){return e.usage(`$0 intel indicator-feeds downloads get <feed-id>
|
|
29
|
+
|
|
30
|
+
Downloads the content of a custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ie={command:`get <feed-id>`,describe:`Download indicator feed data`,builder:re,handler:async t=>l({command:`intel indicator-feeds downloads get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds downloads get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/download`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.downloads.get({account_id:l,feed_id:t[`feed-id`]})),{successLabel:`Loaded`})})},ae={command:`downloads`,describe:`Operations for indicator-feeds.downloads`,builder:e=>e.command(ie).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function oe(e){return e.usage(`$0 intel indicator-feeds get <feed-id>
|
|
31
|
+
|
|
32
|
+
Retrieves details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <feed-id>`,describe:`Get indicator feed metadata`,builder:oe,handler:async t=>l({command:`intel indicator-feeds get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.get({account_id:l,feed_id:t[`feed-id`]})),{successLabel:`Loaded`})})};function ce(e){return e.usage(`$0 intel indicator-feeds list
|
|
33
|
+
|
|
34
|
+
Retrieves details for all accessible custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`Get indicator feeds owned by this account`,builder:ce,handler:async t=>l({command:`intel indicator-feeds list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.list({account_id:l})),{successLabel:`Loaded`})})};function ue(e){return e.usage(`$0 intel indicator-feeds permissions create
|
|
35
|
+
|
|
36
|
+
Grants access permissions for a custom threat indicator feed to other accounts.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const de={command:`create`,describe:`Grant permission to indicator feed`,builder:ue,handler:async t=>l({command:`intel indicator-feeds permissions create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds permissions create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/permissions/add`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:e,account_id:l})),{successLabel:`Updated`});return}let p=d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]});o(await c(`Updating`,async()=>i.intel.indicatorFeeds.permissions.create({body:p,account_id:l})),{successLabel:`Updated`})})};function fe(e){return e.usage(`$0 intel indicator-feeds permissions delete
|
|
37
|
+
|
|
38
|
+
Revokes access permissions for a custom threat indicator feed.`).option(`account-tag`,{type:`string`,description:`The Cloudflare account tag of the account to change permissions on`}).option(`feed-id`,{type:`number`,description:`The ID of the feed to add/remove permissions on`}).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 pe={command:`delete`,describe:`Revoke permission to indicator feed`,builder:fe,handler:async t=>l({command:`intel indicator-feeds permissions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds permissions delete`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/permissions/remove`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await h({force:!!t.force,message:`This operation destructively removes a permission entry.`})){process.stderr.write(`Aborted.
|
|
39
|
+
`);return}if(t.body){let e=u(t.body);o(await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:e,account_id:l})),{successLabel:`Deleted`});return}let p=d({account_tag:f(t[`account-tag`],`account-tag`,`text`),feed_id:t[`feed-id`]});o(await c(`Deleting`,async()=>i.intel.indicatorFeeds.permissions.delete({body:p,account_id:l})),{successLabel:`Deleted`})})};function me(e){return e.usage(`$0 intel indicator-feeds permissions list
|
|
40
|
+
|
|
41
|
+
Lists current access permissions for custom threat indicator feeds.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const he={command:`list`,describe:`List indicator feed permissions`,builder:me,handler:async t=>l({command:`intel indicator-feeds permissions list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds permissions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/permissions/view`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.indicatorFeeds.permissions.list({account_id:l})),{successLabel:`Loaded`})})},ge={command:`permissions`,describe:`Operations for indicator-feeds.permissions`,builder:e=>e.command(de).command(pe).command(he).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _e(e){return e.usage(`$0 intel indicator-feeds providers create <account-id-path>
|
|
42
|
+
|
|
43
|
+
Creates a new indicator feed provider for an account. Only available to Intel accounts.`).positional(`account-id-path`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`account-id`,{type:`number`,description:`The numeric account ID to create the provider for. Distinct from the
|
|
44
|
+
path \`account_id\` parameter, which carries the account identifier
|
|
45
|
+
string used for routing.
|
|
46
|
+
`}).option(`name`,{type:`string`,description:`The name of the provider`}).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 ve={command:`create <account-id-path>`,describe:`Create indicator feed provider`,builder:_e,handler:async e=>l({command:`intel indicator-feeds providers create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf intel indicator-feeds providers create`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/intel/indicator-feeds/permissions/createProvider`,pathParams:{"account-id-path":String(e[`account-id-path`]??``)},bodyKind:`json`,body:e.body===void 0?d({account_id:e[`account-id`],name:f(e.name,`name`,`text`)}):u(e.body)});return}let t=await a(e);if(e.body){let n=u(e.body);o(await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Updated`});return}if(e[`account-id`]===void 0)throw Error(`--account-id is required (or pass --body with this field set).`);e.name===void 0&&(e.name=await m(`name`,`The name of the provider`));let n=d({account_id:e[`account-id`],name:f(e.name,`name`,`text`)});o(await c(`Updating`,async()=>t.intel.indicatorFeeds.providers.create({...n,account_id_path:e[`account-id-path`]})),{successLabel:`Updated`})})},ye={command:`providers`,describe:`Operations for indicator-feeds.providers`,builder:e=>e.command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.usage("$0 intel indicator-feeds snapshots update <feed-id>\n\nRevises the raw data entries in a custom threat indicator feed. Accepts both plain and gzipped STIX2/CRDF bodies. Gzip is detected by RFC 1952 magic bytes (`0x1f 0x8b`) and/or a `.gz` filename suffix (case-insensitive) — either signal alone is sufficient to trigger the gzip path; if the body is not valid gzip, the upload fails fast. Customers are encouraged to gzip larger uploads — the api-gateway 500 MB body cap applies to the on-the-wire (compressed) size, so gzip lets a single upload carry several GiB of decompressed STIX.").positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`cf-async-upload`,{type:`string`,description:"Set to the literal value `1` to enqueue the upload and receive a\n`202` response with a polling URL. Any other value uses the legacy\nsynchronous response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`source`,{type:`string`,description:"The file to upload. Either a plain STIX2/CRDF body or a gzipped one (recognised by `0x1f 0x8b` magic bytes or a `.gz` filename suffix). "})}const xe={command:`update <feed-id>`,describe:`Update indicator feed data`,builder:be,handler:async t=>l({command:`intel indicator-feeds snapshots update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let l={};if(t[`cf-async-upload`]!==void 0&&(l[`Cf-Async-Upload`]=String(t[`cf-async-upload`])),t.dryRun){s({command:`cf intel indicator-feeds snapshots update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}/snapshot`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`multipart`,body:{body:t.body,file:t.file,source:t.source}});return}let u=await a(t),d=t.local?e:await n();if(t.accountId=d,t.file!==void 0||t.body!==void 0||t.source!==void 0){let e=new FormData;if(t.file){let n=p(t.file);e.append(`file`,new Blob([n]),t.file.split(/[\\/]/).filter(Boolean).pop())}else t.body!==void 0&&e.append(`file`,t.body);t.source!==void 0&&e.append(`source`,String(f(t.source,`source`,`text`)??``)),o(await c(`Updating`,async()=>i(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(t[`feed-id`]))}/snapshot`,{body:e,headers:Object.keys(l).length>0?l:void 0})),{successLabel:`Updated`});return}if(t.body){let e=f(t.body,`body`,`binary`);o(await c(`Updating`,async()=>i(u,`PUT`,`/accounts/${d}/intel/indicator-feeds/${encodeURIComponent(String(t[`feed-id`]))}/snapshot`,{body:e,headers:{"Content-Type":`multipart/form-data`,...l}})),{successLabel:`Updated`});return}if(t.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},Se={command:`snapshots`,describe:`Operations for indicator-feeds.snapshots`,builder:e=>e.command(xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ce(e){return e.usage(`$0 intel indicator-feeds update <feed-id>
|
|
47
|
+
|
|
48
|
+
Revises details for a specific custom threat indicator feed.`).positional(`feed-id`,{type:`string`,description:`Indicator feed ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The new description of the feed`}).option(`is-attributable`,{type:`boolean`,description:`The new is_attributable value of the feed`}).option(`is-downloadable`,{type:`boolean`,description:`The new is_downloadable value of the feed`}).option(`is-public`,{type:`boolean`,description:`The new is_public value of the feed`}).option(`name`,{type:`string`,description:`The new name of the feed`}).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 we={command:`update <feed-id>`,describe:`Update indicator feed metadata`,builder:Ce,handler:async t=>l({command:`intel indicator-feeds update`,classification:{safeFlags:[`is-attributable`,`is-downloadable`,`is-public`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel indicator-feeds update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/indicator-feeds/${t[`feed-id`]==null?`<feed-id>`:encodeURIComponent(String(t[`feed-id`]))}`,pathParams:{"feed-id":String(t[`feed-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({description:f(t.description,`description`,`text`),is_attributable:t[`is-attributable`],is_downloadable:t[`is-downloadable`],is_public:t[`is-public`],name:f(t.name,`name`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...e,account_id:l,feed_id:t[`feed-id`]})),{successLabel:`Updated`});return}let p=d({description:f(t.description,`description`,`text`),is_attributable:t[`is-attributable`],is_downloadable:t[`is-downloadable`],is_public:t[`is-public`],name:f(t.name,`name`,`text`)});o(await c(`Updating`,async()=>i.intel.indicatorFeeds.update({...p,account_id:l,feed_id:t[`feed-id`]})),{successLabel:`Updated`})})},Te={command:`indicator-feeds`,describe:`Threat indicator feeds — subscribe to and manage curated lists of malicious IPs, domains, and URLs`,builder:e=>e.command(Z).command(ne).command(se).command(le).command(we).command(ae).command(ge).command(ye).command(Se).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ee(e){return e.usage(`$0 intel ip-lists get
|
|
49
|
+
|
|
50
|
+
Returns a list of available IP list categories (e.g., anonymizer, botnetcc, malware, tor, vpn, open_proxies). This endpoint provides metadata about which IP lists are available in the system.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const De={command:`get`,describe:`Get Available IP Lists`,builder:Ee,handler:async t=>l({command:`intel ip-lists get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel ip-lists get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/ip-lists`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.ipLists.get({account_id:l})),{successLabel:`Loaded`})})},Oe={command:`ip-lists`,describe:`Curated IP lists used for threat detection and policy enforcement`,builder:e=>e.command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.usage("$0 intel ips get\n\nGets the geolocation, ASN, infrastructure type of the ASN, and any security threat categories of an IP address. **Must provide ip query parameters.** For example, `/intel/ip?ipv4=1.1.1.1` or `/intel/ip?ipv6=2001:db8::1`.").option(`ipv4`,{type:`string`,description:`Ipv4`}).option(`ipv6`,{type:`string`,description:`Ipv6`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`get`,describe:`Get IP Overview`,builder:ke,handler:async t=>l({command:`intel ips get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={ipv4:t.ipv4,ipv6:t.ipv6};if(t.dryRun){s({command:`cf intel ips get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/ip`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.ips.get({account_id:u,...i})),{successLabel:`Loaded`})})},je={command:`ips`,describe:`IP address intelligence — geolocation, risk assessment, and hosting provider details`,builder:e=>e.command(Ae).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Me(e){return e.usage("$0 intel miscategorizations create\n\nAllows you to submit requests to change a domain’s category. Requests that include category `169` (New Domains) or category `177` (Newly Seen) in any of `content_adds`, `content_removes`, `security_adds`, or `security_removes` will be rejected with a `400 Bad Request`. These categories are automatically managed and fall off 30 days after they are applied.").option(`content-adds`,{type:`string`,array:!0,description:`Content category IDs to add.`}).option(`content-removes`,{type:`string`,array:!0,description:`Content category IDs to remove.`}).option(`indicator-type`,{type:`string`,description:`The indicator_type field`,choices:[`domain`,`ipv4`,`ipv6`,`url`]}).option(`ip`,{type:`string`,description:"Provide only if indicator_type is `ipv4` or `ipv6`."}).option(`security-adds`,{type:`string`,array:!0,description:`Security category IDs to add.`}).option(`security-removes`,{type:`string`,array:!0,description:`Security category IDs to remove.`}).option(`url`,{type:`string`,description:"Provide only if indicator_type is `domain` or `url`. Example if indicator_type is `domain`: `example.com`. Example if indicator_type is `url`: `https://example.com/news/`."}).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 Ne={command:`create`,describe:`Create Miscategorization`,builder:Me,handler:async t=>l({command:`intel miscategorizations create`,classification:{safeFlags:[`indicator-type`,`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel miscategorizations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/miscategorization`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({content_adds:t[`content-adds`],content_removes:t[`content-removes`],indicator_type:f(t[`indicator-type`],`indicator-type`,`text`),ip:f(t.ip,`ip`,`text`),security_adds:t[`security-adds`],security_removes:t[`security-removes`],url:f(t.url,`url`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.intel.miscategorizations.create({...e,account_id:l})),{successLabel:`Created`});return}let p=d({content_adds:t[`content-adds`],content_removes:t[`content-removes`],indicator_type:f(t[`indicator-type`],`indicator-type`,`text`),ip:f(t.ip,`ip`,`text`),security_adds:t[`security-adds`],security_removes:t[`security-removes`],url:f(t.url,`url`,`text`)});o(await c(`Creating`,async()=>i.intel.miscategorizations.create({...p,account_id:l})),{successLabel:`Created`})})},Pe={command:`miscategorizations`,describe:`Report and track domain miscategorization corrections`,builder:e=>e.command(Ne).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Fe(e){return e.usage(`$0 intel sinkholes create
|
|
51
|
+
|
|
52
|
+
Create a new sinkhole. Logs of large request bodies will be truncated, but the full request body can be recorded in R2. If you wish to record large request bodies in R2, include the R2 key ID, key secret, and bucket name in the request body.`).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 Ie={command:`create`,describe:`Create a new sinkhole for your account`,builder:Fe,handler:async t=>l({command:`intel sinkholes create`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel sinkholes create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Creating`,async()=>i.intel.sinkholes.create({body:e,account_id:l})),{successLabel:`Created`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the sinkhole.`));let p=d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)});o(await c(`Creating`,async()=>i.intel.sinkholes.create({body:p,account_id:l})),{successLabel:`Created`})})};function Le(e){return e.usage(`$0 intel sinkholes delete <sinkhole-id>
|
|
53
|
+
|
|
54
|
+
Delete the specified sinkhole. The sinkhole must not have any active ingress rules defined. A 409 response code indicates that this condition is not met.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 Re={command:`delete <sinkhole-id>`,describe:`Delete a sinkhole`,builder:Le,handler:async t=>l({command:`intel sinkholes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},t,async()=>{if(t.dryRun){s({command:`cf intel sinkholes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,!await h({force:!!t.force})){process.stderr.write(`Aborted.
|
|
55
|
+
`);return}o(await c(`Deleting`,async()=>i.intel.sinkholes.delete({account_id:l,sinkhole_id:t[`sinkhole-id`]})),{successLabel:`Deleted`})})};function ze(e){return e.usage(`$0 intel sinkholes get <sinkhole-id>
|
|
56
|
+
|
|
57
|
+
Get the specified sinkhole by its unique identifier.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get <sinkhole-id>`,describe:`Get a sinkhole`,builder:ze,handler:async t=>l({command:`intel sinkholes get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel sinkholes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.get({account_id:l,sinkhole_id:t[`sinkhole-id`]})),{successLabel:`Loaded`})})};function Ve(e){return e.usage(`$0 intel sinkholes ingresses create <sinkhole-id>
|
|
58
|
+
|
|
59
|
+
Create a new ingress rule for the specified sinkhole. The CIDR block must be a Cloudflare BYOIP associated with your account. The zone_id must be a zone with the ability to create Spectrum Apps. The sinkhole must belong to the same account as the zone.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 He={command:`create <sinkhole-id>`,describe:`Create an ingress rule`,builder:Ve,handler:async e=>l({command:`intel sinkholes ingresses create`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({cidr:f(e.cidr,`cidr`,`text`)}):u(e.body)});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=u(e.body);o(await c(`Creating`,async()=>n.intel.sinkholes.ingresses.create({body:t,zone_id:r,sinkhole_id:e[`sinkhole-id`]})),{successLabel:`Created`});return}e.cidr===void 0&&(e.cidr=await m(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=d({cidr:f(e.cidr,`cidr`,`text`)});o(await c(`Creating`,async()=>n.intel.sinkholes.ingresses.create({body:i,zone_id:r,sinkhole_id:e[`sinkhole-id`]})),{successLabel:`Created`})})};function Ue(e){return e.usage(`$0 intel sinkholes ingresses delete <ingress-id>
|
|
60
|
+
|
|
61
|
+
Delete the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,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 We={command:`delete <ingress-id>`,describe:`Delete an ingress rule`,builder:Ue,handler:async e=>l({command:`intel sinkholes ingresses delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},e,async()=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,!await h({force:!!e.force})){process.stderr.write(`Aborted.
|
|
62
|
+
`);return}o(await c(`Deleting`,async()=>n.intel.sinkholes.ingresses.delete({zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Deleted`})})};function Ge(e){return e.usage(`$0 intel sinkholes ingresses get <ingress-id>
|
|
63
|
+
|
|
64
|
+
Get the specified ingress rule associated with a sinkhole. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ke={command:`get <ingress-id>`,describe:`Get an ingress rule`,builder:Ge,handler:async e=>l({command:`intel sinkholes ingresses get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`none`});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});e.zoneId=r,o(await c(`Loading`,async()=>n.intel.sinkholes.ingresses.get({zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Loaded`})})};function qe(e){return e.usage(`$0 intel sinkholes ingresses list
|
|
65
|
+
|
|
66
|
+
Returns all ingress rules associated with the specified sinkhole.`).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Je={command:`list`,describe:`List ingresses for a sinkhole`,builder:qe,handler:async i=>l({command:`intel sinkholes ingresses list`,classification:{safeFlags:[`dry-run`]}},i,async()=>{if(i.dryRun){let e=i.zone===void 0?await r():void 0,t=i.zone===void 0?`accounts`:`zones`,n=i.zone??e??`<account-id>`;s({command:`cf intel sinkholes ingresses list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${n}/intel/sinkholes/${i[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(i[`sinkhole-id`]))}/ingresses`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(n),"sinkhole-id":String(i[`sinkhole-id`]??``)},bodyKind:`none`});return}let l=await a(i),u=i.zone===void 0?`accounts`:`zones`,d=u===`zones`?await t({zone:i.zone},l,{quiet:i.quiet}):i.local?e:await n();u===`zones`?i.zoneId=d:i.accountId=d,o(await c(`Loading`,async()=>l.intel.sinkholes.ingresses.list({account_or_zone:u,account_or_zone_id:d,sinkhole_id:i[`sinkhole-id`]})),{successLabel:`Loaded`})})};function $(e){return e.usage(`$0 intel sinkholes ingresses update <ingress-id>
|
|
67
|
+
|
|
68
|
+
Replaces the specified ingress rule. The sinkhole must belong to the same account as the zone.`).positional(`ingress-id`,{type:`string`,description:`The unique identifier for the ingress rule.`,demandOption:!0}).option(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`cidr`,{type:`string`,description:`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`}).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 Ye={command:`update <ingress-id>`,describe:`Update an ingress rule`,builder:$,handler:async e=>l({command:`intel sinkholes ingresses update`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){s({command:`cf intel sinkholes ingresses update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/intel/sinkholes/${e[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(e[`sinkhole-id`]))}/ingresses/${e[`ingress-id`]==null?`<ingress-id>`:encodeURIComponent(String(e[`ingress-id`]))}`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``),"sinkhole-id":String(e[`sinkhole-id`]??``),"ingress-id":String(e[`ingress-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({cidr:f(e.cidr,`cidr`,`text`)}):u(e.body)});return}let n=await a(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=u(e.body);o(await c(`Updating`,async()=>n.intel.sinkholes.ingresses.update({body:t,zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`});return}e.cidr===void 0&&(e.cidr=await m(`cidr`,`The CIDR block for the ingress rule in IPv4 or IPv6 notation (e.g., 192.0.2.0/24). Provide a Cloudflare BYOIP CIDR that your account owns.`));let i=d({cidr:f(e.cidr,`cidr`,`text`)});o(await c(`Updating`,async()=>n.intel.sinkholes.ingresses.update({body:i,zone_id:r,sinkhole_id:e[`sinkhole-id`],ingress_id:e[`ingress-id`]})),{successLabel:`Updated`})})},Xe={command:`ingresses`,describe:`Operations for sinkholes.ingresses`,builder:e=>e.command(He).command(We).command(Ke).command(Je).command(Ye).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Ze(e){return e.usage(`$0 intel sinkholes list
|
|
69
|
+
|
|
70
|
+
Lists sinkholes owned by the account for redirecting malicious traffic.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Qe={command:`list`,describe:`List sinkholes owned by this account`,builder:Ze,handler:async t=>l({command:`intel sinkholes list`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel sinkholes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/sinkholes`,pathParams:{},bodyKind:`none`});return}let i=await a(t),l=t.local?e:await n();t.accountId=l,o(await c(`Loading`,async()=>i.intel.sinkholes.list({account_id:l})),{successLabel:`Loaded`})})};function $e(e){return e.usage(`$0 intel sinkholes update <sinkhole-id>
|
|
71
|
+
|
|
72
|
+
Replaces the name or R2 configuration of the specified sinkhole. This is a full replacement. All fields, including r2_secret, must be re-supplied. Omitting r2_secret overwrites the stored value with an empty string.`).positional(`sinkhole-id`,{type:`string`,description:`The unique identifier for the sinkhole.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the sinkhole.`}).option(`r2-bucket`,{type:`string`,description:`The name of the R2 bucket to store results. Required if you want to store large request bodies in R2.`}).option(`r2-id`,{type:`string`,description:`The id of the R2 instance. Required if you want to store large request bodies in R2.`}).option(`r2-secret`,{type:`string`,description:`The secret key for the R2 API token. Required if you want to store large request bodies in R2.`}).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 et={command:`update <sinkhole-id>`,describe:`Update a sinkhole`,builder:$e,handler:async t=>l({command:`intel sinkholes update`,classification:{safeFlags:[`dry-run`]}},t,async()=>{if(t.dryRun){s({command:`cf intel sinkholes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/sinkholes/${t[`sinkhole-id`]==null?`<sinkhole-id>`:encodeURIComponent(String(t[`sinkhole-id`]))}`,pathParams:{"sinkhole-id":String(t[`sinkhole-id`]??``)},bodyKind:`json`,body:t.body===void 0?d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)}):u(t.body)});return}let i=await a(t),l=t.local?e:await n();if(t.accountId=l,t.body){let e=u(t.body);o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:e,account_id:l,sinkhole_id:t[`sinkhole-id`]})),{successLabel:`Updated`});return}t.name===void 0&&(t.name=await m(`name`,`The name of the sinkhole.`));let p=d({name:f(t.name,`name`,`text`),r2_bucket:f(t[`r2-bucket`],`r2-bucket`,`text`),r2_id:f(t[`r2-id`],`r2-id`,`text`),r2_secret:f(t[`r2-secret`],`r2-secret`,`text`)});o(await c(`Updating`,async()=>i.intel.sinkholes.update({body:p,account_id:l,sinkhole_id:t[`sinkhole-id`]})),{successLabel:`Updated`})})},tt={command:`sinkholes`,describe:`Operations for sinkholes`,builder:e=>e.command(Ie).command(Re).command(Be).command(Qe).command(et).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function nt(e){return e.usage(`$0 intel urls get
|
|
73
|
+
|
|
74
|
+
Gets security information about a URL, including content categories and risk types. The URL must be provided as a query parameter.`).option(`url`,{type:`string`,description:`The URL to look up.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`get`,describe:`Get URL Intelligence`,builder:nt,handler:async t=>l({command:`intel urls get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={url:t.url};if(t.dryRun){s({command:`cf intel urls get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/url`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.urls.get({account_id:u,...i})),{successLabel:`Loaded`})})},it={command:`urls`,describe:`URL intelligence operations`,builder:e=>e.command(rt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function at(e){return e.usage(`$0 intel whois get
|
|
75
|
+
|
|
76
|
+
Retrieves WHOIS registration data for a domain, including registrant and nameserver information.`).option(`domain`,{type:`string`,description:`Domain`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ot={command:`get`,describe:`Get WHOIS Record`,builder:at,handler:async t=>l({command:`intel whois get`,classification:{safeFlags:[`dry-run`]}},t,async()=>{let i={domain:t.domain};if(t.dryRun){s({command:`cf intel whois get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/intel/whois`,pathParams:{},query:i,bodyKind:`none`});return}let l=await a(t),u=t.local?e:await n();t.accountId=u,o(await c(`Loading`,async()=>l.intel.whois.get({account_id:u,...i})),{successLabel:`Loaded`})})},st={command:`whois`,describe:`WHOIS registration data for domains including registrant, registrar, and nameservers`,builder:e=>e.command(ot).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},ct={command:`intel`,describe:`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,builder:e=>e.command(S).command(L).command(B).command(U).command(Y).command(Te).command(Oe).command(je).command(Pe).command(tt).command(it).command(st).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{ct as default};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{n as e,r as t,t as n}from"./chunk-DL5FNmn1.mjs";import{n as r,t as i}from"./ansi-styles-eKEZXVwN.mjs";import{t as a}from"./source-BR4_k2ad.mjs";import"node:os";import{styleText as o}from"node:util";import s,{exit as c,stdin as l,stdout as u}from"node:process";import"node:tty";import d from"node:readline";const f=e=>e===161||e===164||e===167||e===168||e===170||e===173||e===174||e>=176&&e<=180||e>=182&&e<=186||e>=188&&e<=191||e===198||e===208||e===215||e===216||e>=222&&e<=225||e===230||e>=232&&e<=234||e===236||e===237||e===240||e===242||e===243||e>=247&&e<=250||e===252||e===254||e===257||e===273||e===275||e===283||e===294||e===295||e===299||e>=305&&e<=307||e===312||e>=319&&e<=322||e===324||e>=328&&e<=331||e===333||e===338||e===339||e===358||e===359||e===363||e===462||e===464||e===466||e===468||e===470||e===472||e===474||e===476||e===593||e===609||e===708||e===711||e>=713&&e<=715||e===717||e===720||e>=728&&e<=731||e===733||e===735||e>=768&&e<=879||e>=913&&e<=929||e>=931&&e<=937||e>=945&&e<=961||e>=963&&e<=969||e===1025||e>=1040&&e<=1103||e===1105||e===8208||e>=8211&&e<=8214||e===8216||e===8217||e===8220||e===8221||e>=8224&&e<=8226||e>=8228&&e<=8231||e===8240||e===8242||e===8243||e===8245||e===8251||e===8254||e===8308||e===8319||e>=8321&&e<=8324||e===8364||e===8451||e===8453||e===8457||e===8467||e===8470||e===8481||e===8482||e===8486||e===8491||e===8531||e===8532||e>=8539&&e<=8542||e>=8544&&e<=8555||e>=8560&&e<=8569||e===8585||e>=8592&&e<=8601||e===8632||e===8633||e===8658||e===8660||e===8679||e===8704||e===8706||e===8707||e===8711||e===8712||e===8715||e===8719||e===8721||e===8725||e===8730||e>=8733&&e<=8736||e===8739||e===8741||e>=8743&&e<=8748||e===8750||e>=8756&&e<=8759||e===8764||e===8765||e===8776||e===8780||e===8786||e===8800||e===8801||e>=8804&&e<=8807||e===8810||e===8811||e===8814||e===8815||e===8834||e===8835||e===8838||e===8839||e===8853||e===8857||e===8869||e===8895||e===8978||e>=9312&&e<=9449||e>=9451&&e<=9547||e>=9552&&e<=9587||e>=9600&&e<=9615||e>=9618&&e<=9621||e===9632||e===9633||e>=9635&&e<=9641||e===9650||e===9651||e===9654||e===9655||e===9660||e===9661||e===9664||e===9665||e>=9670&&e<=9672||e===9675||e>=9678&&e<=9681||e>=9698&&e<=9701||e===9711||e===9733||e===9734||e===9737||e===9742||e===9743||e===9756||e===9758||e===9792||e===9794||e===9824||e===9825||e>=9827&&e<=9829||e>=9831&&e<=9834||e===9836||e===9837||e===9839||e===9886||e===9887||e===9919||e>=9926&&e<=9933||e>=9935&&e<=9939||e>=9941&&e<=9953||e===9955||e===9960||e===9961||e>=9963&&e<=9969||e===9972||e>=9974&&e<=9977||e===9979||e===9980||e===9982||e===9983||e===10045||e>=10102&&e<=10111||e>=11094&&e<=11097||e>=12872&&e<=12879||e>=57344&&e<=63743||e>=65024&&e<=65039||e===65533||e>=127232&&e<=127242||e>=127248&&e<=127277||e>=127280&&e<=127337||e>=127344&&e<=127373||e===127375||e===127376||e>=127387&&e<=127404||e>=917760&&e<=917999||e>=983040&&e<=1048573||e>=1048576&&e<=1114109,p=e=>e===12288||e>=65281&&e<=65376||e>=65504&&e<=65510,m=e=>e>=4352&&e<=4447||e===8986||e===8987||e===9001||e===9002||e>=9193&&e<=9196||e===9200||e===9203||e===9725||e===9726||e===9748||e===9749||e>=9800&&e<=9811||e===9855||e===9875||e===9889||e===9898||e===9899||e===9917||e===9918||e===9924||e===9925||e===9934||e===9940||e===9962||e===9970||e===9971||e===9973||e===9978||e===9981||e===9989||e===9994||e===9995||e===10024||e===10060||e===10062||e>=10067&&e<=10069||e===10071||e>=10133&&e<=10135||e===10160||e===10175||e===11035||e===11036||e===11088||e===11093||e>=11904&&e<=11929||e>=11931&&e<=12019||e>=12032&&e<=12245||e>=12272&&e<=12287||e>=12289&&e<=12350||e>=12353&&e<=12438||e>=12441&&e<=12543||e>=12549&&e<=12591||e>=12593&&e<=12686||e>=12688&&e<=12771||e>=12783&&e<=12830||e>=12832&&e<=12871||e>=12880&&e<=19903||e>=19968&&e<=42124||e>=42128&&e<=42182||e>=43360&&e<=43388||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65106||e>=65108&&e<=65126||e>=65128&&e<=65131||e>=94176&&e<=94180||e===94192||e===94193||e>=94208&&e<=100343||e>=100352&&e<=101589||e>=101632&&e<=101640||e>=110576&&e<=110579||e>=110581&&e<=110587||e===110589||e===110590||e>=110592&&e<=110882||e===110898||e>=110928&&e<=110930||e===110933||e>=110948&&e<=110951||e>=110960&&e<=111355||e===126980||e===127183||e===127374||e>=127377&&e<=127386||e>=127488&&e<=127490||e>=127504&&e<=127547||e>=127552&&e<=127560||e===127568||e===127569||e>=127584&&e<=127589||e>=127744&&e<=127776||e>=127789&&e<=127797||e>=127799&&e<=127868||e>=127870&&e<=127891||e>=127904&&e<=127946||e>=127951&&e<=127955||e>=127968&&e<=127984||e===127988||e>=127992&&e<=128062||e===128064||e>=128066&&e<=128252||e>=128255&&e<=128317||e>=128331&&e<=128334||e>=128336&&e<=128359||e===128378||e===128405||e===128406||e===128420||e>=128507&&e<=128591||e>=128640&&e<=128709||e===128716||e>=128720&&e<=128722||e>=128725&&e<=128727||e>=128732&&e<=128735||e===128747||e===128748||e>=128756&&e<=128764||e>=128992&&e<=129003||e===129008||e>=129292&&e<=129338||e>=129340&&e<=129349||e>=129351&&e<=129535||e>=129648&&e<=129660||e>=129664&&e<=129672||e>=129680&&e<=129725||e>=129727&&e<=129733||e>=129742&&e<=129755||e>=129760&&e<=129768||e>=129776&&e<=129784||e>=131072&&e<=196605||e>=196608&&e<=262141,h=/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/y,g=/[\x00-\x08\x0A-\x1F\x7F-\x9F]{1,1000}/y,_=/\t{1,1000}/y,ee=/[\u{1F1E6}-\u{1F1FF}]{2}|\u{1F3F4}[\u{E0061}-\u{E007A}]{2}[\u{E0030}-\u{E0039}\u{E0061}-\u{E007A}]{1,3}\u{E007F}|(?:\p{Emoji}\uFE0F\u20E3?|\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation})(?:\u200D(?:\p{Emoji_Modifier_Base}\p{Emoji_Modifier}?|\p{Emoji_Presentation}|\p{Emoji}\uFE0F\u20E3?))*/uy,te=/(?:[\x20-\x7E\xA0-\xFF](?!\uFE0F)){1,1000}/y,ne=/\p{M}+/gu,re={limit:1/0,ellipsis:``},ie=(e,t={},n={})=>{let r=t.limit??1/0,i=t.ellipsis??``,a=t?.ellipsisWidth??(i?ie(i,re,n).width:0),o=n.ansiWidth??0,s=n.controlWidth??0,c=n.tabWidth??8,l=n.ambiguousWidth??1,u=n.emojiWidth??2,d=n.fullWidthWidth??2,v=n.regularWidth??1,y=n.wideWidth??2,b=0,x=0,S=e.length,C=0,w=!1,T=S,E=Math.max(0,r-a),D=0,O=0,k=0,A=0;outer:for(;;){if(O>D||x>=S&&x>b){let t=e.slice(D,O)||e.slice(b,x);C=0;for(let e of t.replaceAll(ne,``)){let t=e.codePointAt(0)||0;if(A=p(t)?d:m(t)?y:l!==v&&f(t)?l:v,k+A>E&&(T=Math.min(T,Math.max(D,b)+C)),k+A>r){w=!0;break outer}C+=e.length,k+=A}D=O=0}if(x>=S)break;if(te.lastIndex=x,te.test(e)){if(C=te.lastIndex-x,A=C*v,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/v))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=te.lastIndex;continue}if(h.lastIndex=x,h.test(e)){if(k+o>E&&(T=Math.min(T,x)),k+o>r){w=!0;break}k+=o,D=b,O=x,x=b=h.lastIndex;continue}if(g.lastIndex=x,g.test(e)){if(C=g.lastIndex-x,A=C*s,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/s))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=g.lastIndex;continue}if(_.lastIndex=x,_.test(e)){if(C=_.lastIndex-x,A=C*c,k+A>E&&(T=Math.min(T,x+Math.floor((E-k)/c))),k+A>r){w=!0;break}k+=A,D=b,O=x,x=b=_.lastIndex;continue}if(ee.lastIndex=x,ee.test(e)){if(k+u>E&&(T=Math.min(T,x)),k+u>r){w=!0;break}k+=u,D=b,O=x,x=b=ee.lastIndex;continue}x+=1}return{width:w?E:k,index:w?T:S,truncated:w,ellipsed:w&&r>=a}},v={limit:1/0,ellipsis:``,ellipsisWidth:0},y=(e,t={})=>ie(e,v,t).width,b=`]8;;`,x=RegExp(`(?:\\[(?<code>\\d+)m|\\${b}(?<uri>.*))`,`y`),S=e=>{if(e>=30&&e<=37||e>=90&&e<=97)return 39;if(e>=40&&e<=47||e>=100&&e<=107)return 49;if(e===1||e===2)return 22;if(e===3)return 23;if(e===4)return 24;if(e===7)return 27;if(e===8)return 28;if(e===9)return 29;if(e===0)return 0},C=e=>`[${e}m`,w=e=>`${b}${e}`,T=(e,t,n)=>{let r=t[Symbol.iterator](),i=!1,a=!1,o=e.at(-1),s=o===void 0?0:y(o),c=r.next(),l=r.next(),u=0;for(;!c.done;){let o=c.value,d=y(o);s+d<=n?e[e.length-1]+=o:(e.push(o),s=0),(o===`\x1B`||o===``)&&(i=!0,a=t.startsWith(b,u+1)),i?a?o===`\x07`&&(i=!1,a=!1):o===`m`&&(i=!1):(s+=d,s===n&&!l.done&&(e.push(``),s=0)),c=l,l=r.next(),u+=o.length}o=e.at(-1),!s&&o!==void 0&&o.length&&e.length>1&&(e[e.length-2]+=e.pop())},E=e=>{let t=e.split(` `),n=t.length;for(;n&&!y(t[n-1]);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},D=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,i,a,o=e.split(` `),s=[``],c=0;for(let e=0;e<o.length;e++){let r=o[e];if(n.trim!==!1){let e=s.at(-1)??``,t=e.trimStart();e.length!==t.length&&(s[s.length-1]=t,c=y(t))}e!==0&&(c>=t&&(n.wordWrap===!1||n.trim===!1)&&(s.push(``),c=0),(c||n.trim===!1)&&(s[s.length-1]+=` `,c++));let i=y(r);if(n.hard&&i>t){let e=t-c,n=1+Math.floor((i-e-1)/t);Math.floor((i-1)/t)<n&&s.push(``),T(s,r,t),c=y(s.at(-1)??``);continue}if(c+i>t&&c&&i){if(n.wordWrap===!1&&c<t){T(s,r,t),c=y(s.at(-1)??``);continue}s.push(``),c=0}if(c+i>t&&n.wordWrap===!1){T(s,r,t),c=y(s.at(-1)??``);continue}s[s.length-1]+=r,c+=i}n.trim!==!1&&(s=s.map(e=>E(e)));let l=s.join(`
|
|
3
|
+
`),u=!1;for(let e=0;e<l.length;e++){let t=l[e];if(r+=t,!u)u=t>=`\ud800`&&t<=`\udbff`;else continue;if(t===`\x1B`||t===``){x.lastIndex=e+1;let t=x.exec(l)?.groups;if(t?.code!==void 0){let e=Number.parseFloat(t.code);i=e===39?void 0:e}else t?.uri!==void 0&&(a=t.uri.length===0?void 0:t.uri)}if(l[e+1]===`
|
|
4
|
+
`){a&&(r+=w(``));let e=i?S(i):void 0;i&&e&&(r+=C(e))}else t===`
|
|
5
|
+
`&&(i&&S(i)&&(r+=C(i)),a&&(r+=w(a)))}return r},O=/\r?\n/;function k(e,t,n){return String(e).normalize().split(O).map(e=>D(e,t,n)).join(`
|
|
6
|
+
`)}var A=n(((e,t)=>{let n={to(e,t){return t?`[${t+1};${e+1}H`:`[${e+1}G`},move(e,t){let n=``;return e<0?n+=`[${-e}D`:e>0&&(n+=`[${e}C`),t<0?n+=`[${-t}A`:t>0&&(n+=`[${t}B`),n},up:(e=1)=>`[${e}A`,down:(e=1)=>`[${e}B`,forward:(e=1)=>`[${e}C`,backward:(e=1)=>`[${e}D`,nextLine:(e=1)=>`\x1B[E`.repeat(e),prevLine:(e=1)=>`\x1B[F`.repeat(e),left:`\x1B[G`,hide:`\x1B[?25l`,show:`\x1B[?25h`,save:`\x1B7`,restore:`\x1B8`};t.exports={cursor:n,scroll:{up:(e=1)=>`\x1B[S`.repeat(e),down:(e=1)=>`\x1B[T`.repeat(e)},erase:{screen:`\x1B[2J`,up:(e=1)=>`\x1B[1J`.repeat(e),down:(e=1)=>`\x1B[J`.repeat(e),line:`\x1B[2K`,lineEnd:`\x1B[K`,lineStart:`\x1B[1K`,lines(e){let t=``;for(let r=0;r<e;r++)t+=this.line+(r<e-1?n.up():``);return e&&(t+=n.left),t}},beep:`\x07`}})),j=A();function M(e,t,n){if(!n.some(e=>!e.disabled))return e;let r=e+t,i=Math.max(n.length-1,0),a=r<0?i:r>i?0:r;return n[a].disabled?M(a,t<0?-1:1,n):a}const ae={actions:new Set([`up`,`down`,`left`,`right`,`space`,`enter`,`cancel`]),aliases:new Map([[`k`,`up`],[`j`,`down`],[`h`,`left`],[`l`,`right`],[``,`cancel`],[`escape`,`cancel`]]),messages:{cancel:`Canceled`,error:`Something went wrong`},withGuide:!0,date:{monthNames:[...[`January`,`February`,`March`,`April`,`May`,`June`,`July`,`August`,`September`,`October`,`November`,`December`]],messages:{required:`Please enter a valid date`,invalidMonth:`There are only 12 months in a year`,invalidDay:(e,t)=>`There are only ${e} days in ${t}`,afterMin:e=>`Date must be on or after ${e.toISOString().slice(0,10)}`,beforeMax:e=>`Date must be on or before ${e.toISOString().slice(0,10)}`}}};function oe(e,t){if(typeof e==`string`)return ae.aliases.get(e)===t;for(let n of e)if(n!==void 0&&oe(n,t))return!0;return!1}function se(e,t){if(e===t)return;let n=e.split(`
|
|
7
|
+
`),r=t.split(`
|
|
8
|
+
`),i=Math.max(n.length,r.length),a=[];for(let e=0;e<i;e++)n[e]!==r[e]&&a.push(e);return{lines:a,numLinesBefore:n.length,numLinesAfter:r.length,numLines:i}}globalThis.process.platform.startsWith(`win`);const ce=Symbol(`clack:cancel`);function le(e){return e===ce}function ue(e,t){let n=e;n.isTTY&&n.setRawMode(t)}const de=e=>`rows`in e&&typeof e.rows==`number`?e.rows:20;let N=class{input;output;_abortSignal;rl;opts;_render;_track=!1;_prevFrame=``;_subscribers=new Map;_cursor=0;state=`initial`;error=``;value;userInput=``;constructor(e,t=!0){let{input:n=l,output:r=u,render:i,signal:a,...o}=e;this.opts=o,this.onKeypress=this.onKeypress.bind(this),this.close=this.close.bind(this),this.render=this.render.bind(this),this._render=i.bind(this),this._track=t,this._abortSignal=a,this.input=n,this.output=r}unsubscribe(){this._subscribers.clear()}setSubscriber(e,t){let n=this._subscribers.get(e)??[];n.push(t),this._subscribers.set(e,n)}on(e,t){this.setSubscriber(e,{cb:t})}once(e,t){this.setSubscriber(e,{cb:t,once:!0})}emit(e,...t){let n=this._subscribers.get(e)??[],r=[];for(let e of n)e.cb(...t),e.once&&r.push(()=>n.splice(n.indexOf(e),1));for(let e of r)e()}prompt(){return new Promise(e=>{if(this._abortSignal){if(this._abortSignal.aborted)return this.state=`cancel`,this.close(),e(ce);this._abortSignal.addEventListener(`abort`,()=>{this.state=`cancel`,this.close()},{once:!0})}this.rl=d.createInterface({input:this.input,tabSize:2,prompt:``,escapeCodeTimeout:50,terminal:!0}),this.rl.prompt(),this.opts.initialUserInput!==void 0&&this._setUserInput(this.opts.initialUserInput,!0),this.input.on(`keypress`,this.onKeypress),ue(this.input,!0),this.output.on(`resize`,this.render),this.render(),this.once(`submit`,()=>{this.output.write(j.cursor.show),this.output.off(`resize`,this.render),ue(this.input,!1),e(this.value)}),this.once(`cancel`,()=>{this.output.write(j.cursor.show),this.output.off(`resize`,this.render),ue(this.input,!1),e(ce)})})}_isActionKey(e,t){return e===` `}_setValue(e){this.value=e,this.emit(`value`,this.value)}_setUserInput(e,t){this.userInput=e??``,this.emit(`userInput`,this.userInput),t&&this._track&&this.rl&&(this.rl.write(this.userInput),this._cursor=this.rl.cursor)}_clearUserInput(){this.rl?.write(null,{ctrl:!0,name:`u`}),this._setUserInput(``)}onKeypress(e,t){if(this._track&&t.name!==`return`&&(t.name&&this._isActionKey(e,t)&&this.rl?.write(null,{ctrl:!0,name:`h`}),this._cursor=this.rl?.cursor??0,this._setUserInput(this.rl?.line)),this.state===`error`&&(this.state=`active`),t?.name&&(!this._track&&ae.aliases.has(t.name)&&this.emit(`cursor`,ae.aliases.get(t.name)),ae.actions.has(t.name)&&this.emit(`cursor`,t.name)),e&&(e.toLowerCase()===`y`||e.toLowerCase()===`n`)&&this.emit(`confirm`,e.toLowerCase()===`y`),this.emit(`key`,e?.toLowerCase(),t),t?.name===`return`){if(this.opts.validate){let e=this.opts.validate(this.value);e&&(this.error=e instanceof Error?e.message:e,this.state=`error`,this.rl?.write(this.userInput))}this.state!==`error`&&(this.state=`submit`)}oe([e,t?.name,t?.sequence],`cancel`)&&(this.state=`cancel`),(this.state===`submit`||this.state===`cancel`)&&this.emit(`finalize`),this.render(),(this.state===`submit`||this.state===`cancel`)&&this.close()}close(){this.input.unpipe(),this.input.removeListener(`keypress`,this.onKeypress),this.output.write(`
|
|
9
|
+
`),ue(this.input,!1),this.rl?.close(),this.rl=void 0,this.emit(`${this.state}`,this.value),this.unsubscribe()}restoreCursor(){let e=k(this._prevFrame,process.stdout.columns,{hard:!0,trim:!1}).split(`
|
|
10
|
+
`).length-1;this.output.write(j.cursor.move(-999,e*-1))}render(){let e=k(this._render(this)??``,process.stdout.columns,{hard:!0,trim:!1});if(e!==this._prevFrame){if(this.state===`initial`)this.output.write(j.cursor.hide);else{let t=se(this._prevFrame,e),n=de(this.output);if(this.restoreCursor(),t){let r=Math.max(0,t.numLinesAfter-n),i=Math.max(0,t.numLinesBefore-n),a=t.lines.find(e=>e>=r);if(a===void 0){this._prevFrame=e;return}if(t.lines.length===1){this.output.write(j.cursor.move(0,a-i)),this.output.write(j.erase.lines(1));let t=e.split(`
|
|
11
|
+
`);this.output.write(t[a]),this._prevFrame=e,this.output.write(j.cursor.move(0,t.length-a-1));return}else if(t.lines.length>1){if(r<i)a=r;else{let e=a-i;e>0&&this.output.write(j.cursor.move(0,e))}this.output.write(j.erase.down());let t=e.split(`
|
|
12
|
+
`).slice(a);this.output.write(t.join(`
|
|
13
|
+
`)),this._prevFrame=e;return}}this.output.write(j.erase.down())}this.output.write(e),this.state===`initial`&&(this.state=`active`),this._prevFrame=e}}};var fe=class extends N{get cursor(){return+!this.value}get _value(){return this.cursor===0}constructor(e){super(e,!1),this.value=!!e.initialValue,this.on(`userInput`,()=>{this.value=this._value}),this.on(`confirm`,e=>{this.output.write(j.cursor.move(0,-1)),this.value=e,this.state=`submit`,this.close()}),this.on(`cursor`,()=>{this.value=!this.value})}};let pe=class extends N{options;cursor=0;get _value(){return this.options[this.cursor].value}get _enabledOptions(){return this.options.filter(e=>e.disabled!==!0)}toggleAll(){let e=this._enabledOptions,t=this.value!==void 0&&this.value.length===e.length;this.value=t?[]:e.map(e=>e.value)}toggleInvert(){let e=this.value;if(!e)return;let t=this._enabledOptions.filter(t=>!e.includes(t.value));this.value=t.map(e=>e.value)}toggleValue(){this.value===void 0&&(this.value=[]);let e=this.value.includes(this._value);this.value=e?this.value.filter(e=>e!==this._value):[...this.value,this._value]}constructor(e){super(e,!1),this.options=e.options,this.value=[...e.initialValues??[]];let t=Math.max(this.options.findIndex(({value:t})=>t===e.cursorAt),0);this.cursor=this.options[t].disabled?M(t,1,this.options):t,this.on(`key`,e=>{e===`a`&&this.toggleAll(),e===`i`&&this.toggleInvert()}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=M(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=M(this.cursor,1,this.options);break;case`space`:this.toggleValue();break}})}};var me=class extends N{options;cursor=0;get _selectedValue(){return this.options[this.cursor]}changeValue(){this.value=this._selectedValue.value}constructor(e){super(e,!1),this.options=e.options;let t=this.options.findIndex(({value:t})=>t===e.initialValue),n=t===-1?0:t;this.cursor=this.options[n].disabled?M(n,1,this.options):n,this.changeValue(),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=M(this.cursor,-1,this.options);break;case`down`:case`right`:this.cursor=M(this.cursor,1,this.options);break}this.changeValue()})}},he=class extends N{get userInputWithCursor(){if(this.state===`submit`)return this.userInput;let e=this.userInput;if(this.cursor>=e.length)return`${this.userInput}\u2588`;let t=e.slice(0,this.cursor),[n,...r]=e.slice(this.cursor);return`${t}${o(`inverse`,n)}${r.join(``)}`}get cursor(){return this._cursor}constructor(e){super({...e,initialUserInput:e.initialUserInput??e.initialValue}),this.on(`userInput`,e=>{this._setValue(e)}),this.on(`finalize`,()=>{this.value||=e.defaultValue,this.value===void 0&&(this.value=``)})}};const{white:P,gray:F,dim:I,hidden:ge,bold:L,cyanBright:_e,bgCyan:ve}=a,R=a.hex(`#BD5B08`),z=a.hex(`#111`),B=a.hex(`#0E838F`),ye=z.bgHex(`#0E838F`),be=a.hex(`#AB2526`),xe=z.bgHex(`#AB2526`),Se=a.hex(`#218529`),Ce=z.bgHex(`#218529`),we=a.hex(`#7F7322`),Te=z.bgHex(`#7F7322`);var Ee=class extends Error{constructor(e,t){super(e),this.signal=t}},De=class extends N{options;cursor=0;get _value(){return this.options[this.cursor]}changeValue(){this.value=this._value.value}constructor(e){super(e,!1),this.options=e.options,this.cursor=this.options.findIndex(({value:t})=>t===e.initialValue),this.cursor===-1&&(this.cursor=0),this.changeValue(),this.on(`key`,t=>{t===`r`&&e.onRefresh().then(e=>{this.options=[...e],this.cursor=0,this.changeValue();let t=this;`render`in t&&typeof t.render==`function`&&t.render()}).catch(()=>{})}),this.on(`cursor`,e=>{switch(e){case`left`:case`up`:this.cursor=this.cursor===0?this.options.length-1:this.cursor-1;break;case`down`:case`right`:this.cursor=this.cursor===this.options.length-1?0:this.cursor+1;break}this.changeValue()})}};const Oe=process.stdout,ke=process.stderr;var Ae=n(((e,t)=>{t.exports=[{name:`Agola CI`,constant:`AGOLA`,env:`AGOLA_GIT_REF`,pr:`AGOLA_PULL_REQUEST_ID`},{name:`Alpic`,constant:`ALPIC`,env:`ALPIC_HOST`},{name:`Appcircle`,constant:`APPCIRCLE`,env:`AC_APPCIRCLE`,pr:{env:`AC_GIT_PR`,ne:`false`}},{name:`AppVeyor`,constant:`APPVEYOR`,env:`APPVEYOR`,pr:`APPVEYOR_PULL_REQUEST_NUMBER`},{name:`AWS CodeBuild`,constant:`CODEBUILD`,env:`CODEBUILD_BUILD_ARN`,pr:{env:`CODEBUILD_WEBHOOK_EVENT`,any:[`PULL_REQUEST_CREATED`,`PULL_REQUEST_UPDATED`,`PULL_REQUEST_REOPENED`]}},{name:`Azure Pipelines`,constant:`AZURE_PIPELINES`,env:`TF_BUILD`,pr:{BUILD_REASON:`PullRequest`}},{name:`Bamboo`,constant:`BAMBOO`,env:`bamboo_planKey`},{name:`Bitbucket Pipelines`,constant:`BITBUCKET`,env:`BITBUCKET_COMMIT`,pr:`BITBUCKET_PR_ID`},{name:`Bitrise`,constant:`BITRISE`,env:`BITRISE_IO`,pr:`BITRISE_PULL_REQUEST`},{name:`Buddy`,constant:`BUDDY`,env:`BUDDY_WORKSPACE_ID`,pr:`BUDDY_EXECUTION_PULL_REQUEST_ID`},{name:`Buildkite`,constant:`BUILDKITE`,env:`BUILDKITE`,pr:{env:`BUILDKITE_PULL_REQUEST`,ne:`false`}},{name:`CircleCI`,constant:`CIRCLE`,env:`CIRCLECI`,pr:`CIRCLE_PULL_REQUEST`},{name:`Cirrus CI`,constant:`CIRRUS`,env:`CIRRUS_CI`,pr:`CIRRUS_PR`},{name:`Cloudflare Pages`,constant:`CLOUDFLARE_PAGES`,env:`CF_PAGES`},{name:`Cloudflare Workers`,constant:`CLOUDFLARE_WORKERS`,env:`WORKERS_CI`},{name:`Codefresh`,constant:`CODEFRESH`,env:`CF_BUILD_ID`,pr:{any:[`CF_PULL_REQUEST_NUMBER`,`CF_PULL_REQUEST_ID`]}},{name:`Codemagic`,constant:`CODEMAGIC`,env:`CM_BUILD_ID`,pr:`CM_PULL_REQUEST`},{name:`Codeship`,constant:`CODESHIP`,env:{CI_NAME:`codeship`}},{name:`Drone`,constant:`DRONE`,env:`DRONE`,pr:{DRONE_BUILD_EVENT:`pull_request`}},{name:`dsari`,constant:`DSARI`,env:`DSARI`},{name:`Earthly`,constant:`EARTHLY`,env:`EARTHLY_CI`},{name:`Expo Application Services`,constant:`EAS`,env:`EAS_BUILD`},{name:`Gerrit`,constant:`GERRIT`,env:`GERRIT_PROJECT`},{name:`Gitea Actions`,constant:`GITEA_ACTIONS`,env:`GITEA_ACTIONS`},{name:`GitHub Actions`,constant:`GITHUB_ACTIONS`,env:`GITHUB_ACTIONS`,pr:{GITHUB_EVENT_NAME:`pull_request`}},{name:`GitLab CI`,constant:`GITLAB`,env:`GITLAB_CI`,pr:`CI_MERGE_REQUEST_ID`},{name:`GoCD`,constant:`GOCD`,env:`GO_PIPELINE_LABEL`},{name:`Google Cloud Build`,constant:`GOOGLE_CLOUD_BUILD`,env:`BUILDER_OUTPUT`},{name:`Harness CI`,constant:`HARNESS`,env:`HARNESS_BUILD_ID`},{name:`Heroku`,constant:`HEROKU`,env:{env:`NODE`,includes:`/app/.heroku/node/bin/node`}},{name:`Hudson`,constant:`HUDSON`,env:`HUDSON_URL`},{name:`Jenkins`,constant:`JENKINS`,env:[`JENKINS_URL`,`BUILD_ID`],pr:{any:[`ghprbPullId`,`CHANGE_ID`]}},{name:`LayerCI`,constant:`LAYERCI`,env:`LAYERCI`,pr:`LAYERCI_PULL_REQUEST`},{name:`Magnum CI`,constant:`MAGNUM`,env:`MAGNUM`},{name:`Netlify CI`,constant:`NETLIFY`,env:`NETLIFY`,pr:{env:`PULL_REQUEST`,ne:`false`}},{name:`Nevercode`,constant:`NEVERCODE`,env:`NEVERCODE`,pr:{env:`NEVERCODE_PULL_REQUEST`,ne:`false`}},{name:`Prow`,constant:`PROW`,env:`PROW_JOB_ID`},{name:`ReleaseHub`,constant:`RELEASEHUB`,env:`RELEASE_BUILD_ID`},{name:`Render`,constant:`RENDER`,env:`RENDER`,pr:{IS_PULL_REQUEST:`true`}},{name:`Sail CI`,constant:`SAIL`,env:`SAILCI`,pr:`SAIL_PULL_REQUEST_NUMBER`},{name:`Screwdriver`,constant:`SCREWDRIVER`,env:`SCREWDRIVER`,pr:{env:`SD_PULL_REQUEST`,ne:`false`}},{name:`Semaphore`,constant:`SEMAPHORE`,env:`SEMAPHORE`,pr:`PULL_REQUEST_NUMBER`},{name:`Sourcehut`,constant:`SOURCEHUT`,env:{CI_NAME:`sourcehut`}},{name:`Strider CD`,constant:`STRIDER`,env:`STRIDER`},{name:`TaskCluster`,constant:`TASKCLUSTER`,env:[`TASK_ID`,`RUN_ID`]},{name:`TeamCity`,constant:`TEAMCITY`,env:`TEAMCITY_VERSION`},{name:`Travis CI`,constant:`TRAVIS`,env:`TRAVIS`,pr:{env:`TRAVIS_PULL_REQUEST`,ne:`false`}},{name:`Vela`,constant:`VELA`,env:`VELA`,pr:{VELA_PULL_REQUEST:`1`}},{name:`Vercel`,constant:`VERCEL`,env:{any:[`NOW_BUILDER`,`VERCEL`]},pr:`VERCEL_GIT_PULL_REQUEST_ID`},{name:`Visual Studio App Center`,constant:`APPCENTER`,env:`APPCENTER_BUILD_ID`},{name:`Woodpecker`,constant:`WOODPECKER`,env:{CI:`woodpecker`},pr:{CI_BUILD_EVENT:`pull_request`}},{name:`Xcode Cloud`,constant:`XCODE_CLOUD`,env:`CI_XCODE_PROJECT`,pr:`CI_PULL_REQUEST_NUMBER`},{name:`Xcode Server`,constant:`XCODE_SERVER`,env:`XCS`}]})),je=n((e=>{let t=Ae(),n=process.env;Object.defineProperty(e,`_vendors`,{value:t.map(function(e){return e.constant})}),e.name=null,e.isPR=null,e.id=null,n.CI!==`false`&&t.forEach(function(t){let n=(Array.isArray(t.env)?t.env:[t.env]).every(function(e){return r(e)});e[t.constant]=n,n&&(e.name=t.name,e.isPR=i(t),e.id=t.constant)}),e.isCI=!!(n.CI!==`false`&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||e.name));function r(e){return typeof e==`string`?!!n[e]:`env`in e?n[e.env]&&n[e.env].includes(e.includes):`any`in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}function i(e){switch(typeof e.pr){case`string`:return!!n[e.pr];case`object`:return`env`in e.pr?`any`in e.pr?e.pr.any.some(function(t){return n[e.pr.env]===t}):e.pr.env in n&&n[e.pr.env]!==e.pr.ne:`any`in e.pr?e.pr.any.some(function(e){return!!n[e]}):r(e.pr);default:return null}}})),Me=t(je(),1);function Ne(e,t=s.stderr){t.isTTY&&(e?t.write(`\x1B[?25h`):t.write(`\x1B[?25l`))}const V={diamond:`◇`,dash:`─`,radioInactive:`○`,radioActive:`●`,backActive:`◀`,backInactive:`◁`,bar:`│`,leftT:`├`,rigthT:`┤`,arrows:{left:`‹`,right:`›`},corners:{tl:`╭`,bl:`╰`,tr:`╮`,br:`╯`}},H={error:xe(` ERROR `),warning:Te(` WARNING `),info:ye(` INFO `),success:Ce(` SUCCESS `),cancel:P.bgRed(` X `)},U=(e=1)=>ge(` `.repeat(e)),Pe={none:-1,error:0,warn:1,info:2,log:3,debug:4};let Fe=`log`;function Ie(e){Fe=e}function Le(){return Fe}const W=e=>{Pe[Le()]>=Pe.log&&Oe.write(`${e}\n`)},Re=e=>{W(e.split(`
|
|
14
|
+
`).map(e=>`${F(V.bar)}${e.length>0?` `+P(e):``}`).join(`
|
|
15
|
+
`))},ze=()=>{Re(``)},Be=(e,{linePrefix:t=F(V.bar),firstLinePrefix:n=t,newlineBefore:r=!1,newlineAfter:i=!1,formatLine:a=e=>P(e),multiline:o=!0}={})=>{let s=(o?e.split(`
|
|
16
|
+
`):[e]).map((e,r)=>(r===0?n:t)+U()+a(e));return r&&s.unshift(t),i&&s.push(t),s.join(`
|
|
17
|
+
`)},Ve=(e,t=!0)=>{W(Be(e,{firstLinePrefix:F(V.leftT),linePrefix:F(V.bar),newlineAfter:t}))},He=(e,t,n=!0)=>{W(`${F(V.corners.tl)} ${R(e)} ${t?I(t):``}`),n&&ze()},Ue=(e,t)=>{W(`${F(V.corners.bl)} ${R(e)} ${t?I(t):``}\n`)},We=(e,{shape:t=V.corners.bl,multiline:n=!1}={})=>{W(Be(e,{firstLinePrefix:`${F(t)} ${H.cancel}`,linePrefix:F(V.bar),newlineBefore:!0,formatLine:e=>I(e),multiline:n}))},Ge=(e,{shape:t=V.corners.bl,multiline:n=!1,newlineBefore:r=!0}={})=>{W(Be(e,{firstLinePrefix:F(t)+U()+H.warning,linePrefix:F(V.bar),formatLine:e=>I(e),multiline:n,newlineBefore:r}))},Ke=(e,{shape:t=V.corners.bl,multiline:n=!1}={})=>{W(Be(e,{firstLinePrefix:F(t)+U()+H.success,linePrefix:F(V.bar),newlineBefore:!0,formatLine:e=>I(e),multiline:n}))},qe=e=>{let t=[`[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)`,`(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-nq-uy=><~]))`].join(`|`),n=RegExp(t,`g`);return e.replace(Je,`$2`).replace(n,``)},Je=/\u001B\]8;;(?<url>.+)\u001B\\(?<label>.+)\u001B\]8;;\u001B\\/g,Ye=(e,t)=>{Xe(e,t),c(1)},Xe=(e,t,n=V.corners.bl)=>{let r=Le();e&&Pe[r]>=Pe.error&&ke.write(`${F(n)} ${H.error} ${I(e)}\n${t?U()+t+`
|
|
18
|
+
`:``}`)},Ze=process.env.TERM_PROGRAM===`Apple_Terminal`,G={};G.cursorTo=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");return typeof t==`number`?`\x1B[`+(t+1)+`;`+(e+1)+`H`:`\x1B[`+(e+1)+`G`},G.cursorMove=(e,t)=>{if(typeof e!=`number`)throw TypeError("The `x` argument is required");let n=``;return e<0?n+=`\x1B[`+-e+`D`:e>0&&(n+=`\x1B[`+e+`C`),t<0?n+=`\x1B[`+-t+`A`:t>0&&(n+=`\x1B[`+t+`B`),n},G.cursorUp=(e=1)=>`\x1B[`+e+`A`,G.cursorDown=(e=1)=>`\x1B[`+e+`B`,G.cursorForward=(e=1)=>`\x1B[`+e+`C`,G.cursorBackward=(e=1)=>`\x1B[`+e+`D`,G.cursorLeft=`\x1B[G`,G.cursorSavePosition=Ze?`\x1B7`:`\x1B[s`,G.cursorRestorePosition=Ze?`\x1B8`:`\x1B[u`,G.cursorGetPosition=`\x1B[6n`,G.cursorNextLine=`\x1B[E`,G.cursorPrevLine=`\x1B[F`,G.cursorHide=`\x1B[?25l`,G.cursorShow=`\x1B[?25h`,G.eraseLines=e=>{let t=``;for(let n=0;n<e;n++)t+=G.eraseLine+(n<e-1?G.cursorUp():``);return e&&(t+=G.cursorLeft),t},G.eraseEndLine=`\x1B[K`,G.eraseStartLine=`\x1B[1K`,G.eraseLine=`\x1B[2K`,G.eraseDown=`\x1B[J`,G.eraseUp=`\x1B[1J`,G.eraseScreen=`\x1B[2J`,G.scrollUp=`\x1B[S`,G.scrollDown=`\x1B[T`,G.clearScreen=`\x1Bc`,G.clearTerminal=process.platform===`win32`?`${G.eraseScreen}[0f`:`${G.eraseScreen}[3J[H`,G.beep=`\x07`,G.link=(e,t)=>[`\x1B]`,`8`,`;`,`;`,t,`\x07`,e,`\x1B]`,`8`,`;`,`;`,`\x07`].join(``),G.image=(e,t={})=>{let n=`\x1B]1337;File=inline=1`;return t.width&&(n+=`;width=${t.width}`),t.height&&(n+=`;height=${t.height}`),t.preserveAspectRatio===!1&&(n+=`;preserveAspectRatio=0`),n+`:`+e.toString(`base64`)+`\x07`},G.iTerm={setCwd:(e=process.cwd())=>`]50;CurrentDir=${e}`,annotation:(e,t={})=>{let n=`\x1B]1337;`,r=t.x!==void 0,i=t.y!==void 0;if((r||i)&&!(r&&i&&t.length!==void 0))throw Error("`x`, `y` and `length` must be defined when `x` or `y` is defined");return e=e.replace(/\|/g,``),n+=t.isHidden?`AddHiddenAnnotation=`:`AddAnnotation=`,t.length>0?n+=(r?[e,t.length,t.x,t.y]:[t.length,e]).join(`|`):n+=e,n+`\x07`}};var Qe=n(((e,t)=>{let n=(e,t)=>{for(let n of Reflect.ownKeys(t))Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n));return e};t.exports=n,t.exports.default=n})),$e=n(((e,t)=>{let n=Qe(),r=new WeakMap,i=(e,t={})=>{if(typeof e!=`function`)throw TypeError(`Expected a function`);let i,a=0,o=e.displayName||e.name||`<anonymous>`,s=function(...n){if(r.set(s,++a),a===1)i=e.apply(this,n),e=null;else if(t.throw===!0)throw Error(`Function \`${o}\` can only be called once`);return i};return n(s,e),r.set(s,a),s};t.exports=i,t.exports.default=i,t.exports.callCount=e=>{if(!r.has(e))throw Error(`The given function \`${e.name}\` is not wrapped by the \`onetime\` package`);return r.get(e)}})),et=n(((e,t)=>{t.exports=[`SIGABRT`,`SIGALRM`,`SIGHUP`,`SIGINT`,`SIGTERM`],process.platform!==`win32`&&t.exports.push(`SIGVTALRM`,`SIGXCPU`,`SIGXFSZ`,`SIGUSR2`,`SIGTRAP`,`SIGSYS`,`SIGQUIT`,`SIGIOT`),process.platform===`linux`&&t.exports.push(`SIGIO`,`SIGPOLL`,`SIGPWR`,`SIGSTKFLT`,`SIGUNUSED`)})),tt=n(((t,n)=>{var r=global.process;let i=function(e){return e&&typeof e==`object`&&typeof e.removeListener==`function`&&typeof e.emit==`function`&&typeof e.reallyExit==`function`&&typeof e.listeners==`function`&&typeof e.kill==`function`&&typeof e.pid==`number`&&typeof e.on==`function`};if(!i(r))n.exports=function(){return function(){}};else{var a=e(`assert`),o=et(),s=/^win/i.test(r.platform),c=e(`events`);typeof c!=`function`&&(c=c.EventEmitter);var l;r.__signal_exit_emitter__?l=r.__signal_exit_emitter__:(l=r.__signal_exit_emitter__=new c,l.count=0,l.emitted={}),l.infinite||(l.setMaxListeners(1/0),l.infinite=!0),n.exports=function(e,t){if(!i(global.process))return function(){};a.equal(typeof e,`function`,`a callback must be provided for exit handler`),p===!1&&m();var n=`exit`;return t&&t.alwaysLast&&(n=`afterexit`),l.on(n,e),function(){l.removeListener(n,e),l.listeners(`exit`).length===0&&l.listeners(`afterexit`).length===0&&u()}};var u=function(){!p||!i(global.process)||(p=!1,o.forEach(function(e){try{r.removeListener(e,f[e])}catch{}}),r.emit=_,r.reallyExit=h,--l.count)};n.exports.unload=u;var d=function(e,t,n){l.emitted[e]||(l.emitted[e]=!0,l.emit(e,t,n))},f={};o.forEach(function(e){f[e]=function(){i(global.process)&&r.listeners(e).length===l.count&&(u(),d(`exit`,null,e),d(`afterexit`,null,e),s&&e===`SIGHUP`&&(e=`SIGINT`),r.kill(r.pid,e))}}),n.exports.signals=function(){return o};var p=!1,m=function(){p||!i(global.process)||(p=!0,l.count+=1,o=o.filter(function(e){try{return r.on(e,f[e]),!0}catch{return!1}}),r.emit=ee,r.reallyExit=g)};n.exports.load=m;var h=r.reallyExit,g=function(e){i(global.process)&&(r.exitCode=e||0,d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),h.call(r,r.exitCode))},_=r.emit,ee=function(e,t){if(e===`exit`&&i(global.process)){t!==void 0&&(r.exitCode=t);var n=_.apply(this,arguments);return d(`exit`,r.exitCode,null),d(`afterexit`,r.exitCode,null),n}else return _.apply(this,arguments)}}})),nt=t($e(),1),rt=t(tt(),1);const it=(0,nt.default)(()=>{(0,rt.default)(()=>{s.stderr.write(`\x1B[?25h`)},{alwaysLast:!0})});let at=!1;const K={};K.show=(e=s.stderr)=>{e.isTTY&&(at=!1,e.write(`\x1B[?25h`))},K.hide=(e=s.stderr)=>{e.isTTY&&(it(),at=!0,e.write(`\x1B[?25l`))},K.toggle=(e,t)=>{e!==void 0&&(at=e),at?K.show(t):K.hide(t)};var ot=n(((e,t)=>{var n={};t===void 0?window.eastasianwidth=n:t.exports=n,n.eastAsianWidth=function(e){var t=e.charCodeAt(0),n=e.length==2?e.charCodeAt(1):0,r=t;return 55296<=t&&t<=56319&&56320<=n&&n<=57343&&(t&=1023,n&=1023,r=t<<10|n,r+=65536),r==12288||65281<=r&&r<=65376||65504<=r&&r<=65510?`F`:r==8361||65377<=r&&r<=65470||65474<=r&&r<=65479||65482<=r&&r<=65487||65490<=r&&r<=65495||65498<=r&&r<=65500||65512<=r&&r<=65518?`H`:4352<=r&&r<=4447||4515<=r&&r<=4519||4602<=r&&r<=4607||9001<=r&&r<=9002||11904<=r&&r<=11929||11931<=r&&r<=12019||12032<=r&&r<=12245||12272<=r&&r<=12283||12289<=r&&r<=12350||12353<=r&&r<=12438||12441<=r&&r<=12543||12549<=r&&r<=12589||12593<=r&&r<=12686||12688<=r&&r<=12730||12736<=r&&r<=12771||12784<=r&&r<=12830||12832<=r&&r<=12871||12880<=r&&r<=13054||13056<=r&&r<=19903||19968<=r&&r<=42124||42128<=r&&r<=42182||43360<=r&&r<=43388||44032<=r&&r<=55203||55216<=r&&r<=55238||55243<=r&&r<=55291||63744<=r&&r<=64255||65040<=r&&r<=65049||65072<=r&&r<=65106||65108<=r&&r<=65126||65128<=r&&r<=65131||110592<=r&&r<=110593||127488<=r&&r<=127490||127504<=r&&r<=127546||127552<=r&&r<=127560||127568<=r&&r<=127569||131072<=r&&r<=194367||177984<=r&&r<=196605||196608<=r&&r<=262141?`W`:32<=r&&r<=126||162<=r&&r<=163||165<=r&&r<=166||r==172||r==175||10214<=r&&r<=10221||10629<=r&&r<=10630?`Na`:r==161||r==164||167<=r&&r<=168||r==170||173<=r&&r<=174||176<=r&&r<=180||182<=r&&r<=186||188<=r&&r<=191||r==198||r==208||215<=r&&r<=216||222<=r&&r<=225||r==230||232<=r&&r<=234||236<=r&&r<=237||r==240||242<=r&&r<=243||247<=r&&r<=250||r==252||r==254||r==257||r==273||r==275||r==283||294<=r&&r<=295||r==299||305<=r&&r<=307||r==312||319<=r&&r<=322||r==324||328<=r&&r<=331||r==333||338<=r&&r<=339||358<=r&&r<=359||r==363||r==462||r==464||r==466||r==468||r==470||r==472||r==474||r==476||r==593||r==609||r==708||r==711||713<=r&&r<=715||r==717||r==720||728<=r&&r<=731||r==733||r==735||768<=r&&r<=879||913<=r&&r<=929||931<=r&&r<=937||945<=r&&r<=961||963<=r&&r<=969||r==1025||1040<=r&&r<=1103||r==1105||r==8208||8211<=r&&r<=8214||8216<=r&&r<=8217||8220<=r&&r<=8221||8224<=r&&r<=8226||8228<=r&&r<=8231||r==8240||8242<=r&&r<=8243||r==8245||r==8251||r==8254||r==8308||r==8319||8321<=r&&r<=8324||r==8364||r==8451||r==8453||r==8457||r==8467||r==8470||8481<=r&&r<=8482||r==8486||r==8491||8531<=r&&r<=8532||8539<=r&&r<=8542||8544<=r&&r<=8555||8560<=r&&r<=8569||r==8585||8592<=r&&r<=8601||8632<=r&&r<=8633||r==8658||r==8660||r==8679||r==8704||8706<=r&&r<=8707||8711<=r&&r<=8712||r==8715||r==8719||r==8721||r==8725||r==8730||8733<=r&&r<=8736||r==8739||r==8741||8743<=r&&r<=8748||r==8750||8756<=r&&r<=8759||8764<=r&&r<=8765||r==8776||r==8780||r==8786||8800<=r&&r<=8801||8804<=r&&r<=8807||8810<=r&&r<=8811||8814<=r&&r<=8815||8834<=r&&r<=8835||8838<=r&&r<=8839||r==8853||r==8857||r==8869||r==8895||r==8978||9312<=r&&r<=9449||9451<=r&&r<=9547||9552<=r&&r<=9587||9600<=r&&r<=9615||9618<=r&&r<=9621||9632<=r&&r<=9633||9635<=r&&r<=9641||9650<=r&&r<=9651||9654<=r&&r<=9655||9660<=r&&r<=9661||9664<=r&&r<=9665||9670<=r&&r<=9672||r==9675||9678<=r&&r<=9681||9698<=r&&r<=9701||r==9711||9733<=r&&r<=9734||r==9737||9742<=r&&r<=9743||9748<=r&&r<=9749||r==9756||r==9758||r==9792||r==9794||9824<=r&&r<=9825||9827<=r&&r<=9829||9831<=r&&r<=9834||9836<=r&&r<=9837||r==9839||9886<=r&&r<=9887||9918<=r&&r<=9919||9924<=r&&r<=9933||9935<=r&&r<=9953||r==9955||9960<=r&&r<=9983||r==10045||r==10071||10102<=r&&r<=10111||11093<=r&&r<=11097||12872<=r&&r<=12879||57344<=r&&r<=63743||65024<=r&&r<=65039||r==65533||127232<=r&&r<=127242||127248<=r&&r<=127277||127280<=r&&r<=127337||127344<=r&&r<=127386||917760<=r&&r<=917999||983040<=r&&r<=1048573||1048576<=r&&r<=1114109?`A`:`N`},n.characterLength=function(e){var t=this.eastAsianWidth(e);return t==`F`||t==`W`||t==`A`?2:1};function r(e){return e.match(/[\uD800-\uDBFF][\uDC00-\uDFFF]|[^\uD800-\uDFFF]/g)||[]}n.length=function(e){for(var t=r(e),n=0,i=0;i<t.length;i++)n+=this.characterLength(t[i]);return n},n.slice=function(e,t,i){textLen=n.length(e),t||=0,i||=1,t<0&&(t=textLen+t),i<0&&(i=textLen+i);for(var a=``,o=0,s=r(e),c=0;c<s.length;c++){var l=s[c],u=n.length(l);if(o>=t-+(u==2))if(o+u<=i)a+=l;else break;o+=u}return a}})),st=n(((e,t)=>{t.exports=function(){return/\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g}})),ct=t(ot(),1),lt=t(st(),1);function q(e,t={}){if(typeof e!=`string`||e.length===0||(t={ambiguousIsNarrow:!0,...t},e=r(e),e.length===0))return 0;e=e.replace((0,lt.default)(),` `);let n=t.ambiguousIsNarrow?1:2,i=0;for(let t of e){let e=t.codePointAt(0);if(!(e<=31||e>=127&&e<=159)&&!(e>=768&&e<=879))switch(ct.default.eastAsianWidth(t)){case`F`:case`W`:i+=2;break;case`A`:i+=n;break;default:i+=1}}return i}const ut=new Set([`\x1B`,``]),dt=`]8;;`,ft=e=>`${ut.values().next().value}[${e}m`,pt=e=>`${ut.values().next().value}${dt}${e}`,mt=e=>e.split(` `).map(e=>q(e)),ht=(e,t,n)=>{let i=[...t],a=!1,o=!1,s=q(r(e[e.length-1]));for(let[t,r]of i.entries()){let c=q(r);if(s+c<=n?e[e.length-1]+=r:(e.push(r),s=0),ut.has(r)&&(a=!0,o=i.slice(t+1).join(``).startsWith(dt)),a){o?r===`\x07`&&(a=!1,o=!1):r===`m`&&(a=!1);continue}s+=c,s===n&&t<i.length-1&&(e.push(``),s=0)}!s&&e[e.length-1].length>0&&e.length>1&&(e[e.length-2]+=e.pop())},gt=e=>{let t=e.split(` `),n=t.length;for(;n>0&&!(q(t[n-1])>0);)n--;return n===t.length?e:t.slice(0,n).join(` `)+t.slice(n).join(``)},_t=(e,t,n={})=>{if(n.trim!==!1&&e.trim()===``)return``;let r=``,a,o,s=mt(e),c=[``];for(let[r,i]of e.split(` `).entries()){n.trim!==!1&&(c[c.length-1]=c[c.length-1].trimStart());let e=q(c[c.length-1]);if(r!==0&&(e>=t&&(n.wordWrap===!1||n.trim===!1)&&(c.push(``),e=0),(e>0||n.trim===!1)&&(c[c.length-1]+=` `,e++)),n.hard&&s[r]>t){let n=t-e,a=1+Math.floor((s[r]-n-1)/t);Math.floor((s[r]-1)/t)<a&&c.push(``),ht(c,i,t);continue}if(e+s[r]>t&&e>0&&s[r]>0){if(n.wordWrap===!1&&e<t){ht(c,i,t);continue}c.push(``)}if(e+s[r]>t&&n.wordWrap===!1){ht(c,i,t);continue}c[c.length-1]+=i}n.trim!==!1&&(c=c.map(e=>gt(e)));let l=[...c.join(`
|
|
19
|
+
`)];for(let[e,t]of l.entries()){if(r+=t,ut.has(t)){let{groups:t}=RegExp(`(?:\\[(?<code>\\d+)m|\\${dt}(?<uri>.*))`).exec(l.slice(e).join(``))||{groups:{}};if(t.code!==void 0){let e=Number.parseFloat(t.code);a=e===39?void 0:e}else t.uri!==void 0&&(o=t.uri.length===0?void 0:t.uri)}let n=i.codes.get(Number(a));l[e+1]===`
|
|
20
|
+
`?(o&&(r+=pt(``)),a&&n&&(r+=ft(n))):t===`
|
|
21
|
+
`&&(a&&n&&(r+=ft(a)),o&&(r+=pt(o)))}return r};function vt(e,t,n){return String(e).normalize().replace(/\r\n/g,`
|
|
22
|
+
`).split(`
|
|
23
|
+
`).map(e=>_t(e,t,n)).join(`
|
|
24
|
+
`)}function yt(e){return Number.isInteger(e)?e>=4352&&(e<=4447||e===9001||e===9002||11904<=e&&e<=12871&&e!==12351||12880<=e&&e<=19903||19968<=e&&e<=42182||43360<=e&&e<=43388||44032<=e&&e<=55203||63744<=e&&e<=64255||65040<=e&&e<=65049||65072<=e&&e<=65131||65281<=e&&e<=65376||65504<=e&&e<=65510||110592<=e&&e<=110593||127488<=e&&e<=127569||131072<=e&&e<=262141):!1}const bt=/^[\uD800-\uDBFF][\uDC00-\uDFFF]$/,xt=[`\x1B`,``],St=e=>`${xt[0]}[${e}m`,Ct=(e,t,n)=>{let r=[];e=[...e];for(let n of e){let a=n;n.includes(`;`)&&(n=n.split(`;`)[0][0]+`0`);let o=i.codes.get(Number.parseInt(n,10));if(o){let n=e.indexOf(o.toString());n===-1?r.push(St(t?o:a)):e.splice(n,1)}else if(t){r.push(St(0));break}else r.push(St(a))}if(t&&(r=r.filter((e,t)=>r.indexOf(e)===t),n!==void 0)){let e=St(i.codes.get(Number.parseInt(n,10)));r=r.reduce((t,n)=>n===e?[n,...t]:[...t,n],[])}return r.join(``)};function wt(e,t,n){let r=[...e],i=[],a=typeof n==`number`?n:r.length,o=!1,s,c=0,l=``;for(let[u,d]of r.entries()){let r=!1;if(xt.includes(d)){let t=/\d[^m]*/.exec(e.slice(u,u+18));s=t&&t.length>0?t[0]:void 0,c<a&&(o=!0,s!==void 0&&i.push(s))}else o&&d===`m`&&(o=!1,r=!0);if(!o&&!r&&c++,!bt.test(d)&&yt(d.codePointAt())&&(c++,typeof n!=`number`&&a++),c>t&&c<=a)l+=d;else if(c===t&&!o&&s!==void 0)l=Ct(i);else if(c>=a){l+=Ct(i,!0,s);break}}return l}const Tt=e=>{let{columns:t}=e;return t||80},Et=(e,t)=>{let n=e.rows||24,i=t.split(`
|
|
25
|
+
`),a=i.length-n;return a<=0?t:wt(t,r(i.slice(0,a).join(`
|
|
26
|
+
`)).length+1)};function Dt(e,{showCursor:t=!1}={}){let n=0,r=Tt(e),i=``,a=(...a)=>{t||K.hide();let o=a.join(` `)+`
|
|
27
|
+
`;o=Et(e,o);let s=Tt(e);o===i&&r===s||(i=o,r=s,o=vt(o,s,{trim:!1,hard:!0,wordWrap:!1}),e.write(G.eraseLines(n)+o),n=o.split(`
|
|
28
|
+
`).length)};return a.clear=()=>{e.write(G.eraseLines(n)),i=``,r=Tt(e),n=0},a.done=()=>{i=``,r=Tt(e),n=0,t||K.show()},a}Dt(s.stdout),Dt(s.stderr);const Ot=Dt(Oe),J=F(V.bar),Y=F(V.corners.bl),X=F(V.leftT);function Z(e,t,n){let r=e.validate?.(n);if(r){let t=r instanceof Error?r.message:r;if(e.throwOnError)throw Error(t);Ye(t)}return W(t.submit({value:n}).join(`
|
|
29
|
+
`)),n}const kt=async e=>{let t={...At(e),...e.renderers},n,r=(n,r)=>{let i=n.state;return i===`initial`&&e.initialErrorMessage&&(i=`error`,n.error=e.initialErrorMessage),t[i](n,r).join(`
|
|
30
|
+
`)};if(e.type===`select`){let i=String(e.defaultValue);if(e.acceptDefault)return Z(e,t,i);n=new me({...e,options:e.options.filter(e=>!e.hidden),initialValue:i,render(){return r(this,n)}})}else if(e.type===`confirm`){let i=!!e.defaultValue;if(e.acceptDefault)return Z(e,t,i);n=new fe({...e,initialValue:i,active:e.activeText||``,inactive:e.inactiveText||``,render(){return r(this,n)}})}else if(e.type==`multiselect`){let i;if(Array.isArray(e.defaultValue)?i=e.defaultValue:e.defaultValue!==void 0&&(i=[String(e.defaultValue)]),e.acceptDefault)return Z(e,t,i);n=new pe({...e,options:e.options,initialValues:i,render(){return r(this,n)}})}else if(e.type===`list`){let i=String(e.defaultValue);if(e.acceptDefault)return Z(e,t,i);n=new De({...e,onRefresh:e.onRefresh??(()=>Promise.resolve(e.options)),initialValue:i,render(){return r(this,n)}})}else{let i=e.initialValue??String(e.defaultValue??``);if(e.acceptDefault)return Z(e,t,i);n=new he({...e,initialValue:e.initialValue,defaultValue:String(e.defaultValue??``),render(){return r(this,n)}})}let i=await n.prompt();if(le(i)){if(e.throwOnError)throw new Ee(`Operation cancelled`);We(`Operation cancelled`),process.exit(0)}return i},Q=(e,t)=>{let{question:n,label:r}=e;if(e.type!==`confirm`&&!t)return[`${X} ${n} ${I(`(skipped)`)}`,`${J}`];let i=e.type===`confirm`?`${J} ${R(t)} ${I(r)}`:`${J} ${R(r)} ${I(t)}`;return[`${X} ${n}`,i,`${J}`]},At=e=>{switch(e.type){case`select`:return Mt(e);case`confirm`:return Pt(e);case`text`:return jt(e);case`multiselect`:return Mt(e);case`list`:return Nt(e)}},jt=e=>{let{question:t}=e,n=e.helpText??``,r=e.format??(e=>String(e)),i=e.defaultValue?.toString()??``,a=e=>{let{userInputWithCursor:a}=e;return[`${Y} ${L(t)} ${I(n)}`,`${U(2)}${r(a||I(i))}`,``]};return{initial:()=>[`${Y} ${L(t)} ${I(n)}`,`${U(2)}${F(r(i))}`,``],active:a,error:({value:e,error:i})=>[`${X} ${H.error} ${I(i)}`,`${J}`,`${Y} ${t} ${I(n)}`,`${U(2)}${r(e)}`,``],submit:({value:t})=>Q(e,r(t??``)),cancel:a}},Mt=e=>{let{options:t,question:n,helpText:r}=e,i=r??``,a=e.maxItemsPerPage??32,o=({cursor:e=0,value:r})=>{let o=(t,n)=>{let{label:i,value:a}=t,o=n===e,s=Array.isArray(r)&&r.includes(a),c=s||o?B:P,l=o?c.underline(i):c(i),u=t.sublabel?c.grey(t.sublabel):``,d=c(s||o&&!Array.isArray(r)?t.activeIcon??V.radioActive:t.inactiveIcon??V.radioInactive);return`${U(2)}${d} ${l} ${u}`},s=(n,r)=>t.length<=a?!0:r<e?t.length-r<=a:e+a>r,c=t.filter(e=>!e.hidden),l=c.at(e),u=[`${Y} ${L(n)} ${I(i)}`,`${e>0&&t.length>a?`${U(2)}${I(`...`)}\n`:``}${c.map(o).filter(s).join(`
|
|
31
|
+
`)}${e+a<t.length&&t.length>a?`\n${U(2)}${I(`...`)}`:``}`,``];if(l?.description){let e=new Intl.Segmenter(`en`,{granularity:`word`}),t=U(2),n=process.stdout.columns-qe(t).length*2,r=qe(l.description),i=[],a=0;for(let t of e.segment(r)){let e=i[a]??``;e.length+t.segment.length>n&&(a++,e=``,t.segment.match(/^\s+$/))||(i[a]=e+t.segment)}u.push(I(i.map(e=>t+e+t).join(`
|
|
32
|
+
`)),``)}return u};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${X} ${H.error} ${I(e.error)}`,`${J}`,...o(e,t)],submit:({value:n})=>Array.isArray(n)?Q(e,t.filter(e=>n.includes(e.value)).map(e=>e.label).join(`, `)):Q(e,t.find(e=>e.value===n)?.label),cancel:o}},Nt=e=>{let{question:t,helpText:n}=e,r=e.options,i=n??``,{rows:a}=Oe,o=({cursor:e,value:n},o)=>{o instanceof De&&(r=o.options),e??=0;let s=0,c=(e,t)=>{let{label:r,value:i}=e,a=i.toString(),o=t===s,c=Array.isArray(n)&&n.includes(a),l=c||o?B:P,u=o?l.underline(r):l(r),d=l(c||o&&!Array.isArray(n)?V.radioActive:V.radioInactive);return[`${U(2)}${d} ${u}`,...e.details.map((t,n)=>`${U(6)}${n===e.details.length-1?F(V.corners.bl):J} ${t}`)]},l=[],u={size:0,options:[]};for(let e of r){let t=e.details.length+1;if(u.size+t>a-6){l.push(u.options),u={size:t,options:[e]};continue}u.size+=t,u.options.push(e)}u.size!==0&&l.push(u.options);let d=!0,f=!1,p=[],m=0;for(let t=0;t<l.length;t++){let n=l[t];if(e>=m&&n.length+m>e){d=t===0,f=t===l.length-1,p=n,s=e-m;break}m+=n.length}return[`${Y} ${L(t)} ${I(i)}`,...d?[]:[`${U(2)}${I(`...`)}`],...p.map(c).reduce((e,t)=>[...e,...t],[]),...f?[]:[`${U(2)}${I(`...`)}`]]};return{initial:o,active:o,confirm:o,error:(e,t)=>[`${X} ${H.error} ${I(e.error)}`,`${J}`,...o(e,t)],submit:({value:t})=>Array.isArray(t)?Q(e,r.filter(e=>t.includes(e.value)).map(e=>e.value).join(`, `)):Q(e,r.find(e=>e.value===t)?.value),cancel:o}},Pt=e=>{let{activeText:t,inactiveText:n,question:r,helpText:i}=e,a=i??``,o=t||`Yes`,s=n||`No`,c=({value:e})=>{let t=e?B.underline:I,n=e?I:B.underline;return[`${Y} ${L(r)} ${I(a)}`,`${U(2)}${t(o)} / ${n(s)}`]};return{initial:c,active:c,confirm:c,error:c,submit:({value:t})=>Q(e,t?`yes`:`no`),cancel:c}},Ft={clockwise:[`┤`,`┘`,`┴`,`└`,`├`,`┌`,`┬`,`┐`],vertical:[`▁`,`▃`,`▄`,`▅`,`▆`,`▇`,`▆`,`▅`,`▄`,`▃`]},It=[``,`.`,`..`,`...`,` ..`,` .`,``],Lt=(e=Ft.clockwise,t=R)=>{let n=null,r,i;function a(){n&&clearTimeout(n),n=null}return{start(o,s){if(s||=``,i=o,r=i,s!==void 0&&s.length>0&&(r+=` ${I(s)}`),$()){let r=0;a(),n=setInterval(()=>{r++;let n=e[r%e.length],a=It[r%It.length];o&&Ot(`${t(n)} ${i} ${a}`)},120)}else W(`${X} ${r}`)},update(e){i=e},stop(e){$()?(Ot.clear(),e&&(Ot(`${X} ${r}\n${J} ${e}`),Ot.done(),ze()),a()):(e!==void 0&&W(`${J} ${e}`),ze())}}};function $(){try{return!!(process.stdin.isTTY&&process.stdout.isTTY)}catch{return!1}}function Rt(){return!$()||Me.isCI}const zt=Me.isCI;export{P as A,B as C,F as D,I as E,le as M,A as N,Se as O,je as S,R as T,He as _,X as a,Ge as b,tt as c,Le as d,Re as f,V as g,Ie as h,$ as i,we as j,be as k,We as l,ze as m,Rt as n,Lt as o,W as p,kt as r,Dt as s,zt as t,Ue as u,Ke as v,L as w,Ne as x,Ve as y};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{r as e}from"./auth-Cp7gT-AF.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bi02B6v4.mjs";import{t as i}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";function a(e){return e.usage(`$0 ips list
|
|
3
|
+
|
|
4
|
+
Get IPs used on the Cloudflare/JD Cloud network, see https://www.cloudflare.com/ips for Cloudflare IPs or https://developers.cloudflare.com/china-network/reference/infrastructure/ for JD Cloud IPs.`).option(`networks`,{type:`string`,description:"Specified as `jdcloud` to list IPs used by JD Cloud data centers."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`Cloudflare/JD Cloud IP Details`,builder:a,handler:async a=>i({command:`ips list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={networks:a.networks};if(a.dryRun){n({command:`cf ips list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/ips`,pathParams:{},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.ips.list(i)),{successLabel:`Loaded`})})},s={command:`ips`,describe:`ips`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
|
@@ -0,0 +1,13 @@
|
|
|
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,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,n as u}from"./prompt-Bx2PB-tt.mjs";function d(e){return e.usage(`$0 keyless-certificates create
|
|
3
|
+
|
|
4
|
+
Creates a Keyless SSL configuration that allows SSL/TLS termination without exposing private keys to Cloudflare. Keys remain on your infrastructure.`).option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or SSL certificate and intermediate(s).`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`,default:24008}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const f={command:`create`,describe:`Create Keyless SSL Configuration`,builder:d,handler:async u=>a({command:`keyless-certificates create`,classification:{safeFlags:[`bundle-method`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf keyless-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/keyless_certificates`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):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(`Creating`,async()=>a.keylessCertificates.create({...e,zone_id:d})),{successLabel:`Created`});return}if(u.certificate===void 0&&(u.certificate=await l(`certificate`,`The zone's SSL certificate or SSL certificate and intermediate(s).`)),u.host===void 0&&(u.host=await l(`host`,`The keyless SSL name.`)),u.port===void 0)throw Error(`--port is required (or pass --body with this field set).`);let f=s({bundle_method:c(u[`bundle-method`],`bundle-method`,`text`),certificate:c(u.certificate,`certificate`,`text`),host:c(u.host,`host`,`text`),name:c(u.name,`name`,`text`),port:u.port,tunnel:{private_ip:c(u[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(u[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Creating`,async()=>a.keylessCertificates.create({...f,zone_id:d})),{successLabel:`Created`})})};function p(e){return e.usage(`$0 keyless-certificates delete <keyless-certificate-id>
|
|
5
|
+
|
|
6
|
+
Removes a Keyless SSL configuration. SSL connections will no longer use the keyless server for cryptographic operations.`).positional(`keyless-certificate-id`,{type:`string`,description:`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 m={command:`delete <keyless-certificate-id>`,describe:`Delete Keyless SSL Configuration`,builder:p,handler:async o=>a({command:`keyless-certificates delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"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});if(o.zoneId=s,!await u({force:!!o.force})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}n(await i(`Deleting`,async()=>a.keylessCertificates.delete({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]})),{successLabel:`Deleted`})})};function h(e){return e.usage(`$0 keyless-certificates edit <keyless-certificate-id>
|
|
8
|
+
|
|
9
|
+
This will update attributes of a Keyless SSL. Consists of one or more of the following: host,name,port.`).positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`Whether or not the Keyless SSL is on or off.`}).option(`host`,{type:`string`,description:`The keyless SSL name.`}).option(`name`,{type:`string`,description:`The keyless SSL name.`}).option(`port`,{type:`number`,description:`The keyless SSL port used to communicate between Cloudflare and the client's Keyless SSL server.`}).option(`tunnel-private-ip`,{type:`string`,description:`Private IP of the Key Server Host.`}).option(`tunnel-vnet-id`,{type:`string`,description:`Cloudflare Tunnel Virtual Network ID.`}).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([`tunnel-private-ip`,`tunnel-vnet-id`].some(t=>e[t]!==void 0)){let t=[`tunnel-private-ip`,`tunnel-vnet-id`].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 --tunnel-* flag is set`)}return!0})}const g={command:`edit <keyless-certificate-id>`,describe:`Edit Keyless SSL Configuration`,builder:h,handler:async l=>a({command:`keyless-certificates edit`,classification:{safeFlags:[`enabled`,`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf keyless-certificates edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/keyless_certificates/${l[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(l[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(l[`keyless-certificate-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.keylessCertificates.edit({...e,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]})),{successLabel:`Updated`});return}let d=s({enabled:l.enabled,host:c(l.host,`host`,`text`),name:c(l.name,`name`,`text`),port:l.port,tunnel:{private_ip:c(l[`tunnel-private-ip`],`tunnel-private-ip`,`text`),vnet_id:c(l[`tunnel-vnet-id`],`tunnel-vnet-id`,`text`)}});n(await i(`Updating`,async()=>a.keylessCertificates.edit({...d,zone_id:u,keyless_certificate_id:l[`keyless-certificate-id`]})),{successLabel:`Updated`})})};function _(e){return e.usage(`$0 keyless-certificates get <keyless-certificate-id>
|
|
10
|
+
|
|
11
|
+
Get details for one Keyless SSL configuration.`).positional(`keyless-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <keyless-certificate-id>`,describe:`Get Keyless SSL Configuration`,builder:_,handler:async o=>a({command:`keyless-certificates get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates/${o[`keyless-certificate-id`]==null?`<keyless-certificate-id>`:encodeURIComponent(String(o[`keyless-certificate-id`]))}`,pathParams:{"keyless-certificate-id":String(o[`keyless-certificate-id`]??``),"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.keylessCertificates.get({zone_id:s,keyless_certificate_id:o[`keyless-certificate-id`]})),{successLabel:`Loaded`})})};function y(e){return e.usage(`$0 keyless-certificates list
|
|
12
|
+
|
|
13
|
+
List all Keyless SSL configurations for a given zone.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List Keyless SSL Configurations`,builder:y,handler:async o=>a({command:`keyless-certificates list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf keyless-certificates list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/keyless_certificates`,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.keylessCertificates.list({zone_id:s})),{successLabel:`Loaded`})})},x={command:`keyless-certificates`,describe:`keyless-certificates`,builder:e=>e.command(f).command(m).command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{x as default};
|
|
@@ -0,0 +1,4 @@
|
|
|
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";function c(e){return e.usage(`$0 keys list
|
|
3
|
+
|
|
4
|
+
Lists all distinct tag keys used across resources in an account.`).option(`cursor`,{type:`string`,description:`Cursor for pagination.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`List tag keys`,builder:c,handler:async c=>s({command:`keys list`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={cursor:c.cursor};if(c.dryRun){a({command:`cf keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/tags/keys`,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.keys.list({account_id:u,...s})),{successLabel:`Loaded`})})},u={command:`keys`,describe:`keys`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{u as default};
|
|
@@ -0,0 +1,21 @@
|
|
|
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{a as r,r as i}from"./auth-Cp7gT-AF.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bi02B6v4.mjs";import{t as c}from"./run-BBBMrSrs.mjs";import"./telemetry-mKEb8lYB.mjs";import{n as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d,t as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,n as m}from"./prompt-Bx2PB-tt.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";import{n as g,t as _}from"./raw-fetch-DNTQkXbg.mjs";function v(e){return e.usage(`$0 kv bulk delete <namespace-id>
|
|
3
|
+
|
|
4
|
+
Remove multiple KV pairs from the namespace. Body should be an array of up to 10,000 keys to be removed.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const y={command:`delete <namespace-id>`,describe:`Delete multiple key-value pairs`,builder:v,handler:async u=>c({command:`kv bulk delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await t();if(u.accountId=d,!await m({force:!!u.force,message:`This operation deletes the specified keys from the namespace.`})){process.stderr.write(`Aborted.
|
|
5
|
+
`);return}if(u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Deleting: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:a}))}a(n,{successLabel:`Deleted`});return}a(await s(`Deleting`,async()=>r(c,`POST`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk/delete`,{body:e})),{successLabel:`Deleted`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function b(e){return e.usage(`$0 kv bulk get <namespace-id>
|
|
6
|
+
|
|
7
|
+
Retrieve up to 100 KV pairs from the namespace. Keys must contain text-based values. JSON values can optionally be parsed instead of being returned as a string value. Metadata can be included if \`withMetadata\` is true.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`keys`,{type:`string`,array:!0,description:`Array of keys to retrieve (maximum of 100).`}).option(`type`,{type:`string`,description:`Whether to parse JSON values in the response.`,choices:[`text`,`json`],default:`text`}).option(`with-metadata`,{type:`boolean`,description:`Whether to include metadata in the response.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const x={command:`get <namespace-id>`,describe:`Get multiple key-value pairs`,builder:b,handler:async r=>c({command:`kv bulk get`,classification:{safeFlags:[`type`,`with-metadata`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv bulk get`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/bulk/get`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.bulk.get({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`});return}if(r.keys===void 0)throw Error(`--keys is required (or pass --body with this field set).`);let p=u({keys:r.keys,type:d(r.type,`type`,`text`),withMetadata:r[`with-metadata`]});a(await s(`Creating`,async()=>c.kv.bulk.get({...p,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Created`})})};function S(e){return e.usage("$0 kv bulk update <namespace-id>\n\nWrite multiple keys and values at once. Body should be an array of up to 10,000 key-value pairs to be stored, along with optional expiration information. Existing values and expirations will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored. The entire request size must be 100 megabytes or less.").positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).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 C={command:`update <namespace-id>`,describe:`Write multiple key-value pairs`,builder:S,handler:async u=>c({command:`kv bulk update`,classification:{safeFlags:[`dry-run`]}},u,async()=>{if(u.dryRun){o({command:`cf kv bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${u[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(u[`namespace-id`]))}/bulk`,pathParams:{"namespace-id":String(u[`namespace-id`]??``)},bodyKind:`json`,body:u.body===void 0?void 0:l(u.body)});return}let c=await i(u),d=u.local?e:await t();if(u.accountId=d,u.body){let e=l(u.body);if(Array.isArray(e)&&e.length>1e4){let t=Math.ceil(e.length/1e4),n=null;for(let i=0;i<e.length;i+=1e4){let a=e.slice(i,i+1e4);n=await s(`Updating: batch ${Math.floor(i/1e4)+1}/${t}`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:a}))}a(n,{successLabel:`Updated`});return}a(await s(`Updating`,async()=>r(c,`PUT`,`/accounts/${d}/storage/kv/namespaces/${encodeURIComponent(String(u[`namespace-id`]))}/bulk`,{body:e})),{successLabel:`Updated`});return}if(u.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},w={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.usage("$0 kv keys delete <key-name>\n\nRemove a KV pair from the namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,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 E={command:`delete <key-name>`,describe:`Delete key-value pair`,builder:T,handler:async r=>c({command:`kv keys delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv keys delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
8
|
+
`);return}a(await s(`Deleting`,async()=>c.kv.keys.delete({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Deleted`})})};function D(e){return e.usage("$0 kv keys get <key-name>\n\nReturns the value associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. If the KV-pair is set to expire at some point, the expiration time as measured in seconds since the UNIX epoch will be returned in the `expiration` response header.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const O={command:`get <key-name>`,describe:`Read key-value pair`,builder:D,handler:async r=>c({command:`kv keys get`,classification:{safeFlags:[`dry-run`,`text`]}},r,async()=>{if(r.dryRun){o({command:`cf kv keys get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/values/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}await i(r);let a=r.local?e:await t();r.accountId=a;let c=await s(`Loading`,async()=>_(`/accounts/${a}/storage/kv/namespaces/${encodeURIComponent(String(r[`namespace-id`]))}/values/${encodeURIComponent(String(r[`key-name`]))}`,{method:`GET`,local:r.local===!0,persistTo:r.persistTo}));g(r.text===!0?c.toString(`utf-8`):c)})};function k(e){return e.usage(`$0 kv keys list
|
|
9
|
+
|
|
10
|
+
Lists a namespace's keys.`).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`limit`,{type:`number`,description:`Limits the number of keys returned in the response. The cursor attribute may be used to iterate over the next batch of keys if there are more than the limit.`}).option(`prefix`,{type:`string`,description:`Filters returned keys by a name prefix. Exact matches and any key names that begin with the prefix will be returned.`}).option(`cursor`,{type:`string`,description:"Opaque token indicating the position from which to continue when requesting the next set of records if the amount of list results was limited by the limit parameter. A valid value for the cursor can be obtained from the `cursors` object in the `result_info` structure."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`list`,describe:`List a Namespace's Keys`,builder:k,handler:async r=>c({command:`kv keys list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={limit:r.limit,prefix:r.prefix,cursor:r.cursor};if(r.dryRun){o({command:`cf kv keys list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/keys`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.keys.list({account_id:u,namespace_id:r[`namespace-id`],...c})),{successLabel:`Loaded`})})};function j(e){return e.usage("$0 kv keys update <key-name>\n\nWrite a value identified by a key. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name. Body should be the value to be stored. If JSON metadata to be associated with the key/value pair is needed, use `multipart/form-data` content type for your PUT request (see dropdown below in `REQUEST BODY SCHEMA`). Existing values, expirations, and metadata will be overwritten. If neither `expiration` nor `expiration_ttl` is specified, the key-value pair will never expire. If both are set, `expiration_ttl` is used and `expiration` is ignored.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`expiration`,{type:`number`,description:`Expires the key at a certain time, measured in number of seconds since the UNIX epoch.`}).option(`expiration-ttl`,{type:`number`,description:`Expires the key after a number of seconds. Must be at least 60.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`A byte sequence to be stored, up to 25 MiB in length.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`The metadata`})}const M={command:`update <key-name>`,describe:`Write key-value pair with optional metadata`,builder:j,handler:async l=>c({command:`kv keys update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{let c={expiration:l.expiration,expiration_ttl:l[`expiration-ttl`]};if(l.dryRun){o({command:`cf kv keys update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${l[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(l[`namespace-id`]))}/values/${l[`key-name`]==null?`<key-name>`:encodeURIComponent(String(l[`key-name`]))}`,pathParams:{"key-name":String(l[`key-name`]??``),"namespace-id":String(l[`namespace-id`]??``)},query:c,bodyKind:l.metadata===void 0?`octet-stream`:`multipart`,body:l.metadata===void 0?l.body:{body:l.body,file:l.file,metadata:l.metadata}});return}let u=await i(l),p=l.local?e:await t();if(l.accountId=p,l.metadata!==void 0){let e=new FormData;if(l.file){let t=f(l.file);e.append(`value`,new Blob([t]),l.file.split(/[\\/]/).filter(Boolean).pop())}else l.body!==void 0&&e.append(`value`,l.body);l.metadata!==void 0&&e.append(`metadata`,String(d(l.metadata,`metadata`,`text`)??``)),a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(l.file){let e=f(l.file);a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(l.body){let e=d(l.body,`body`,`binary`),t=new URLSearchParams(Object.entries(c).filter(([,e])=>e!==void 0).map(([e,t])=>[e,String(t)])).toString();a(await s(`Updating`,async()=>r(u,`PUT`,`/accounts/${p}/storage/kv/namespaces/${encodeURIComponent(String(l[`namespace-id`]))}/values/${encodeURIComponent(String(l[`key-name`]))}${t?`?`+t:``}`,{body:e,headers:{"Content-Type":`application/octet-stream`}})),{successLabel:`Updated`});return}if(l.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})},N={command:`keys`,describe:`Operations for keys`,builder:e=>e.command(E).command(O).command(A).command(M).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function P(e){return e.usage("$0 kv metadata get <key-name>\n\nReturns the metadata associated with the given key in the given namespace. Use URL-encoding to use special characters (for example, `:`, `!`, `%`) in the key name.").positional(`key-name`,{type:`string`,description:`A key's name. The name may be at most 512 bytes. All printable, non-whitespace characters are valid. Use percent-encoding to define key names as part of a URL.`,demandOption:!0}).option(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const F={command:`get <key-name>`,describe:`Read the metadata for a key`,builder:P,handler:async r=>c({command:`kv metadata get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv metadata get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}/metadata/${r[`key-name`]==null?`<key-name>`:encodeURIComponent(String(r[`key-name`]))}`,pathParams:{"key-name":String(r[`key-name`]??``),"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.metadata.get({account_id:l,namespace_id:r[`namespace-id`],key_name:r[`key-name`]})),{successLabel:`Loaded`})})},I={command:`metadata`,describe:`Operations for metadata`,builder:e=>e.command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function L(e){return e.usage(`$0 kv namespaces create
|
|
11
|
+
|
|
12
|
+
Creates a namespace under the given title. A \`400\` is returned if the account already owns a namespace with this title. A namespace must be explicitly deleted to be replaced.`).option(`jurisdiction`,{type:`string`,description:`Specify the jurisdiction to restrict the KV namespace to durably store data within. Can only be set at namespace creation time.`,choices:[`eu`,`fedramp`,`us`]}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const R={command:`create`,describe:`Create a Namespace`,builder:L,handler:async r=>c({command:`kv namespaces create`,classification:{safeFlags:[`jurisdiction`,`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},bodyKind:`json`,body:r.body===void 0?u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Creating`,async()=>c.kv.namespaces.create({...e,account_id:f})),{successLabel:`Created`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({jurisdiction:d(r.jurisdiction,`jurisdiction`,`text`),title:d(r.title,`title`,`text`)});a(await s(`Creating`,async()=>c.kv.namespaces.create({...m,account_id:f})),{successLabel:`Created`})})};function z(e){return e.usage(`$0 kv namespaces delete <namespace-id>
|
|
13
|
+
|
|
14
|
+
Deletes the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const B={command:`delete <namespace-id>`,describe:`Remove a Namespace`,builder:z,handler:async r=>c({command:`kv namespaces delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,!await m({force:!!r.force})){process.stderr.write(`Aborted.
|
|
15
|
+
`);return}a(await s(`Deleting`,async()=>c.kv.namespaces.delete({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Deleted`})})};function V(e){return e.usage(`$0 kv namespaces get <namespace-id>
|
|
16
|
+
|
|
17
|
+
Get the namespace corresponding to the given ID.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const H={command:`get <namespace-id>`,describe:`Get a Namespace`,builder:V,handler:async r=>c({command:`kv namespaces get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.kv.namespaces.get({account_id:l,namespace_id:r[`namespace-id`]})),{successLabel:`Loaded`})})};function U(e){return e.usage(`$0 kv namespaces list
|
|
18
|
+
|
|
19
|
+
Returns the namespaces owned by an account.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`order`,{type:`string`,description:`Field to order results by.`,choices:[`id`,`title`]}).option(`direction`,{type:`string`,description:`Direction to order namespaces.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const W={command:`list`,describe:`List Namespaces`,builder:h(U),handler:async r=>c({command:`kv namespaces list`,classification:{safeFlags:[`order`,`direction`,`dry-run`]}},r,async()=>{let c={page:r.page,per_page:r[`per-page`],order:r.order,direction:r.direction};if(r.dryRun){o({command:`cf kv namespaces list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.kv.namespaces.list({account_id:u,...c})),{successLabel:`Loaded`})})};function G(e){return e.usage(`$0 kv namespaces update <namespace-id>
|
|
20
|
+
|
|
21
|
+
Modifies a namespace's title.`).positional(`namespace-id`,{type:`string`,description:`Namespace identifier tag.`,demandOption:!0}).option(`title`,{type:`string`,description:`A human-readable string name for a Namespace.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const K={command:`update <namespace-id>`,describe:`Rename a Namespace`,builder:G,handler:async r=>c({command:`kv namespaces update`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf kv namespaces update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/storage/kv/namespaces/${r[`namespace-id`]==null?`<namespace-id>`:encodeURIComponent(String(r[`namespace-id`]))}`,pathParams:{"namespace-id":String(r[`namespace-id`]??``)},bodyKind:`json`,body:r.body===void 0?u({title:d(r.title,`title`,`text`)}):l(r.body)});return}let c=await i(r),f=r.local?e:await t();if(r.accountId=f,r.body){let e=l(r.body);a(await s(`Updating`,async()=>c.kv.namespaces.update({...e,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`});return}r.title===void 0&&(r.title=await p(`title`,`A human-readable string name for a Namespace.`));let m=u({title:d(r.title,`title`,`text`)});a(await s(`Updating`,async()=>c.kv.namespaces.update({...m,account_id:f,namespace_id:r[`namespace-id`]})),{successLabel:`Updated`})})},q={command:`namespaces`,describe:`Operations for namespaces`,builder:e=>e.command(R).command(B).command(H).command(W).command(K).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},J={command:`kv`,describe:`kv`,builder:e=>e.command(w).command(N).command(I).command(q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{J as default};
|
|
@@ -0,0 +1,18 @@
|
|
|
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,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{n as l}from"./prompt-Bx2PB-tt.mjs";function u(e){return e.usage(`$0 leaked-credential-checks detections create
|
|
3
|
+
|
|
4
|
+
Create a detection location for credentials that the default scan locations do not cover, using Rules language expressions such as \`lookup_json_string(http.request.body.raw, "user")\`. Only the username expression is required, and Leaked Credential Checks must be enabled on the zone.`).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const d={command:`create`,describe:`Create a custom detection location for a zone.`,builder:u,handler:async l=>a({command:`leaked-credential-checks detections create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:e,zone_id:u})),{successLabel:`Created`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)});n(await i(`Creating`,async()=>a.leakedCredentialChecks.detections.create({body:d,zone_id:u})),{successLabel:`Created`})})};function f(e){return e.usage(`$0 leaked-credential-checks detections delete <detection-id>
|
|
5
|
+
|
|
6
|
+
Delete a user-defined detection location, identified by its detection ID. Incoming requests are then scanned using only the default scan locations and the detection locations that remain.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,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 p={command:`delete <detection-id>`,describe:`Delete a custom detection location from a zone.`,builder:f,handler:async o=>a({command:`leaked-credential-checks detections delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections/${o[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(o[`detection-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"detection-id":String(o[`detection-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});if(o.zoneId=s,!await l({force:!!o.force,message:`This operation deletes a Leaked Credential Checks custom detection location.`})){process.stderr.write(`Aborted.
|
|
7
|
+
`);return}n(await i(`Deleting`,async()=>a.leakedCredentialChecks.detections.delete({zone_id:s,detection_id:o[`detection-id`]})),{successLabel:`Deleted`})})};function m(e){return e.usage(`$0 leaked-credential-checks detections get <detection-id>
|
|
8
|
+
|
|
9
|
+
Get the username and password expressions of a single user-defined detection location, identified by its detection ID.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <detection-id>`,describe:`Get a custom detection location of a zone.`,builder:m,handler:async o=>a({command:`leaked-credential-checks detections get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections/${o[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(o[`detection-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"detection-id":String(o[`detection-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.leakedCredentialChecks.detections.get({zone_id:s,detection_id:o[`detection-id`]})),{successLabel:`Loaded`})})};function g(e){return e.usage(`$0 leaked-credential-checks detections list
|
|
10
|
+
|
|
11
|
+
List the user-defined detection locations configured for Leaked Credential Checks, each with its own identifier. A custom detection location tells the WAF where to find the username and password in requests to your application.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`List the custom detection locations of a zone.`,builder:g,handler:async o=>a({command:`leaked-credential-checks detections list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks detections list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks/detections`,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.leakedCredentialChecks.detections.list({zone_id:s})),{successLabel:`Loaded`})})};function v(e){return e.usage(`$0 leaked-credential-checks detections update <detection-id>
|
|
12
|
+
|
|
13
|
+
Update the username and password expressions of an existing detection location, identified by its detection ID. Both expressions are overwritten, so omitting the password expression clears it.`).positional(`detection-id`,{type:`string`,description:`Defines the unique ID for this custom detection.`,demandOption:!0}).option(`password`,{type:`string`,description:`Defines ehe ruleset expression to use in matching the password in a request.`}).option(`username`,{type:`string`,description:`Defines the ruleset expression to use in matching the username in a request.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Defines a custom set of username/password expressions to match Leaked Credential Checks on.`})}const y={command:`update <detection-id>`,describe:`Update a custom detection location of a zone.`,builder:v,handler:async l=>a({command:`leaked-credential-checks detections update`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){r({command:`cf leaked-credential-checks detections update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/leaked-credential-checks/detections/${l[`detection-id`]==null?`<detection-id>`:encodeURIComponent(String(l[`detection-id`]))}`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``),"detection-id":String(l[`detection-id`]??``)},bodyKind:`json`,body:l.body===void 0?s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)}):o(l.body)});return}let a=await t(l),u=await e({zone:l.zone},a,{quiet:l.quiet});if(l.zoneId=u,l.body){let e=o(l.body);n(await i(`Updating`,async()=>a.leakedCredentialChecks.detections.update({body:e,zone_id:u,detection_id:l[`detection-id`]})),{successLabel:`Updated`});return}let d=s({password:c(l.password,`password`,`text`),username:c(l.username,`username`,`text`)});n(await i(`Updating`,async()=>a.leakedCredentialChecks.detections.update({body:d,zone_id:u,detection_id:l[`detection-id`]})),{successLabel:`Updated`})})},b={command:`detections`,describe:`Custom detection locations that tell the WAF where to find usernames and passwords in requests`,builder:e=>e.command(d).command(p).command(h).command(_).command(y).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function x(e){return e.usage(`$0 leaked-credential-checks get
|
|
14
|
+
|
|
15
|
+
Get the current Leaked Credential Checks status for the zone. While enabled, Cloudflare scans incoming requests for usernames and passwords that were exposed in known data breaches.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get`,describe:`Get the Leaked Credential Checks status for a zone.`,builder:x,handler:async o=>a({command:`leaked-credential-checks get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf leaked-credential-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/leaked-credential-checks`,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.leakedCredentialChecks.get({zone_id:s})),{successLabel:`Loaded`})})};function C(e){return e.usage(`$0 leaked-credential-checks update
|
|
16
|
+
|
|
17
|
+
Update the Leaked Credential Checks status for the zone, enabling or disabling the detection. While enabled, the detection populates the \`cf.waf.credential_check.*\` fields, which you can reference in custom rules and rate limiting rules to challenge or block requests carrying compromised credentials.`).option(`enabled`,{type:`boolean`,description:`Determines whether or not Leaked Credential Checks are enabled.`}).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:`Defines the overall status for Leaked Credential Checks.`})}const w={command:`update`,describe:`Update the Leaked Credential Checks status for a zone.`,builder:C,handler:async c=>a({command:`leaked-credential-checks update`,classification:{safeFlags:[`enabled`,`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},c,async()=>{if(c.dryRun){r({command:`cf leaked-credential-checks update`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/leaked-credential-checks`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?s({enabled:c.enabled}):o(c.body)});return}let a=await t(c),u=await e({zone:c.zone},a,{quiet:c.quiet});if(c.zoneId=u,!await l({force:!!c.force,message:`This operation toggles Leaked Credential Checks for a zone.`})){process.stderr.write(`Aborted.
|
|
18
|
+
`);return}if(c.body){let e=o(c.body);n(await i(`Deleting`,async()=>a.leakedCredentialChecks.update({body:e,zone_id:u})),{successLabel:`Deleted`});return}let d=s({enabled:c.enabled});n(await i(`Deleting`,async()=>a.leakedCredentialChecks.update({body:d,zone_id:u})),{successLabel:`Deleted`})})},T={command:`leaked-credential-checks`,describe:`Detect compromised credentials in login requests by checking against known breach databases`,builder:e=>e.command(S).command(w).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{T as default};
|