cf 0.12.0 → 0.13.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/agent-context.json +55 -55
- package/dist/_meta/commands.json +24282 -24542
- package/dist/_meta/hand-written-commands.json +53 -12
- package/dist/_meta/schemas.json +27680 -28212
- package/dist/abuse-reports-BbaHw4ST.mjs +8 -0
- package/dist/access-D6Xz892p.mjs +11 -0
- package/dist/account-DvxcqeaK.mjs +2 -0
- package/dist/account-tags-CeqfEWpz.mjs +9 -0
- package/dist/accounts-Bx-8BMH9.mjs +30 -0
- package/dist/acm--0opdSGE.mjs +3 -0
- package/dist/addressing-BS1ynzLA.mjs +13 -0
- package/dist/agent-context-BPhyrSns.mjs +8 -0
- package/dist/agent-memory-DczzpEw5.mjs +6 -0
- package/dist/ai-CDdCTcQl.mjs +5 -0
- package/dist/ai-audit-Bx9KMQYh.mjs +2 -0
- package/dist/ai-gateway-BSXJEaYS.mjs +13 -0
- package/dist/ai-search-DRQj1aMu.mjs +7 -0
- package/dist/ai-security-C_Rb0lGT.mjs +4 -0
- package/dist/alerting-BAR9eFs2.mjs +6 -0
- package/dist/analytics-BaUZwNc5.mjs +4 -0
- package/dist/analytics_engine-DkEzlhfT.mjs +2 -0
- package/dist/api-security-jA0lOk6a.mjs +50 -0
- package/dist/argo-Cz4pDagx.mjs +2 -0
- package/dist/artifacts-BcLTGfAv.mjs +5 -0
- package/dist/audit-logs-DbIv4n6u.mjs +2 -0
- package/dist/auth-rW5d3jtr.mjs +5 -0
- package/dist/auth-tvDdC1J-.mjs +8 -0
- package/dist/billing-Md87QjqW.mjs +3 -0
- package/dist/bot-management-VHMo4hpU.mjs +5 -0
- package/dist/botnet-feed-BHqfo3sa.mjs +3 -0
- package/dist/brand-protection-HUeR6Pof.mjs +3 -0
- package/dist/browser-extension-199oZg3X.mjs +3 -0
- package/dist/browser-run-DDasyux-.mjs +4 -0
- package/dist/build-0QlYUfFS.mjs +2 -0
- package/dist/builds-B-lXn6JR.mjs +9 -0
- package/dist/cache-CevKpiTM.mjs +9 -0
- package/dist/certificate-authorities-DAg-aO1B.mjs +2 -0
- package/dist/{cf-yPz_IqW6.mjs → cf-C11NGkjx.mjs} +1 -1
- package/dist/{chunk-LQW53VED-9MACsvSG.mjs → chunk-LQW53VED-CoECHA3R.mjs} +1 -1
- package/dist/{chunk-QBZBEHZB-yeyhVUeD.mjs → chunk-QBZBEHZB-BuiXJn8j.mjs} +1 -1
- package/dist/client-certificates-Bay7oPLE.mjs +3 -0
- package/dist/client-side-security-CbU9xn0k.mjs +37 -0
- package/dist/cloud-connector-AH2ClcSL.mjs +2 -0
- package/dist/cloudforce-one-DwOfS75V.mjs +32 -0
- package/dist/{command-BV87D4tR.mjs → command-CMzMsll4.mjs} +1 -1
- package/dist/{completions-BnD46cXe.mjs → completions-nPO9PdSu.mjs} +1 -1
- package/dist/config-B8lwPpVl.mjs +2 -0
- package/dist/config.mjs +1 -1
- package/dist/connector-interrupts-DcLrqM2V.mjs +2 -0
- package/dist/connector-telemetry-events-PrJWgNs9.mjs +2 -0
- package/dist/connector-telemetry-snapshots-CIjJm5yu.mjs +2 -0
- package/dist/connectors-CEAy30E-.mjs +3 -0
- package/dist/containers-BsbDqbSn.mjs +58 -0
- package/dist/content-scan-BdK936iO.mjs +4 -0
- package/dist/cps-oP97-qkm.mjs +2 -0
- package/dist/csamScanner-DUNN4INg.mjs +6 -0
- package/dist/ct-alerting-dV_gsV2w.mjs +3 -0
- package/dist/custom-certificates-DYspvjo4.mjs +5 -0
- package/dist/custom-csrs-DjSWLQRu.mjs +3 -0
- package/dist/custom-hostnames-df1lH6IY.mjs +5 -0
- package/dist/custom-nameservers-CLTbN-9R.mjs +3 -0
- package/dist/custom-pages-DzKnSgL3.mjs +3 -0
- package/dist/d1-JBEqjJoj.mjs +20 -0
- package/dist/data-security-CIktWnXt.mjs +7 -0
- package/dist/dcv-delegation-_r6Vc6VL.mjs +2 -0
- package/dist/{deploy-BUSz35vq.mjs → deploy-QTGENpOM.mjs} +1 -1
- package/dist/{deploy-input-BvD9aRP1.mjs → deploy-input-C7W1Bsji.mjs} +1 -1
- package/dist/{dev-DY_DquQx.mjs → dev-CAubuxCc.mjs} +1 -1
- package/dist/diagnostics-B0DRh714.mjs +3 -0
- package/dist/{dist-DV7LR38l.mjs → dist-12KzRsBM.mjs} +36 -36
- package/dist/{dist-BBx1io2f.mjs → dist-BCVqQpg2.mjs} +1 -1
- package/dist/dist-Cp3uJN1x.mjs +48 -0
- package/dist/dist-DW5BPGFs.mjs +57 -0
- package/dist/{dist-Cb9TJ2VV.mjs → dist-S9K_8gq9.mjs} +1 -1
- package/dist/dls-CFzTHcZM.mjs +3 -0
- package/dist/dns-Dw6u-NV1.mjs +29 -0
- package/dist/dns-firewall-CIPptslp.mjs +57 -0
- package/dist/{dot-prop-6SRZBKHT-wwGHcwAa.mjs → dot-prop-6SRZBKHT-wIVDg_fl.mjs} +1 -1
- package/dist/dry-run-DiVy1lVo.mjs +2 -0
- package/dist/durable-objects-CCkeqqBq.mjs +2 -0
- package/dist/email-auth-kdxO51Oz.mjs +2 -0
- package/dist/email-routing-BLggZdQq.mjs +6 -0
- package/dist/email-security-DjADlgdM.mjs +18 -0
- package/dist/email-sending-Cz7E7GoP.mjs +7 -0
- package/dist/error-sanitization-DfLijlBJ.mjs +2 -0
- package/dist/fieldExtractors-BWaMi6lD.mjs +3 -0
- package/dist/firewall-5t6OBIOl.mjs +8 -0
- package/dist/flagship-CzG_VoNR.mjs +4 -0
- package/dist/fraud-UOg_69Ob.mjs +20 -0
- package/dist/google-tag-gateway-DirkD-Q2.mjs +2 -0
- package/dist/healthchecks-BkHZGTp1.mjs +4 -0
- package/dist/hostnames-EUYOZm21.mjs +3 -0
- package/dist/hyperdrive-ZoLJlJCL.mjs +21 -0
- package/dist/iam-BQ2xSgYN.mjs +6 -0
- package/dist/images-CkEq6ScP.mjs +8 -0
- package/dist/index.mjs +1 -1
- package/dist/intel-DDWEdGyl.mjs +8 -0
- package/dist/interactive-B2E03Fs-.mjs +11 -0
- package/dist/interactive-_B-EqD0Y.mjs +23 -0
- package/dist/ips-54Qmy-Uw.mjs +2 -0
- package/dist/keyless-certificates-CXHLc3Qz.mjs +3 -0
- package/dist/keys-rvI4TC3Z.mjs +2 -0
- package/dist/kv-CAeN1zBy.mjs +5 -0
- package/dist/leaked-credential-checks-CbbwtG-p.mjs +4 -0
- package/dist/lifecycle-XswDq0ZB.mjs +2 -0
- package/dist/load-balancers-BFwdwAIU.mjs +6 -0
- package/dist/{local-DGiIS1uM.mjs → local-C6XsFD_W.mjs} +1 -1
- package/dist/{local-runtime--IQr44qq.mjs → local-runtime-BUGCbx8r.mjs} +1 -1
- package/dist/logexplorer-D8rOPB5I.mjs +17 -0
- package/dist/logo-matches-Y3PxVn7t.mjs +2 -0
- package/dist/logos-BN8SvJhS.mjs +3 -0
- package/dist/logpush-BnLA4WVm.mjs +4 -0
- package/dist/logs-CDo7Y5sA.mjs +3 -0
- package/dist/magic-cloud-networking-wPuLwu-F.mjs +5 -0
- package/dist/magic-network-monitoring-BNERUpxS.mjs +4 -0
- package/dist/magic-transit-6tvVOECW.mjs +111 -0
- package/dist/managed-defense-AYwBOYIH.mjs +2 -0
- package/dist/managed-transforms-HZZNrkC7.mjs +3 -0
- package/dist/matches-Dp91L3dL.mjs +2 -0
- package/dist/mcp-P7pcieiT.mjs +4 -0
- package/dist/mesh-DjFrk6PL.mjs +4 -0
- package/dist/mtls-certificates-DZMoef2H.mjs +3 -0
- package/dist/network-7cd1U6-I.mjs +6 -0
- package/dist/network-interconnects-CQ7cPZjK.mjs +41 -0
- package/dist/oauth-DH3kMXSs.mjs +14 -0
- package/dist/oauth-clients-P9t-eMnx.mjs +4 -0
- package/dist/oauth-scopes-C3r9Qh_y.mjs +2 -0
- package/dist/observability-M1DnLhMR.mjs +10 -0
- package/dist/{open-PBXRGS4R-DIiYQyU9.mjs → open-PBXRGS4R-DARSUDEI.mjs} +1 -1
- package/dist/organization-cUE7GDCt.mjs +45 -0
- package/dist/organizations-C-Hcpd0w.mjs +2 -0
- package/dist/origin-ca-certificates-C8cJMyQH.mjs +3 -0
- package/dist/origin-post-quantum-encryption-DjZJCk8M.mjs +2 -0
- package/dist/origin-tls-client-auth-BsjR5EAV.mjs +4 -0
- package/dist/{output-BqDR9h74.mjs → output-COcSQsfn.mjs} +1 -1
- package/dist/page-rules-B-zq1EUb.mjs +27 -0
- package/dist/pages-B6YpkPos.mjs +14 -0
- package/dist/pay-per-crawl-B4wx0lUb.mjs +4 -0
- package/dist/pipelines-BJc_RylD.mjs +6 -0
- package/dist/precursor-CLQu7suY.mjs +4 -0
- package/dist/progress-V6SZV3Ux.mjs +2 -0
- package/dist/prompt-DjRTpML4.mjs +3 -0
- package/dist/queries-DSrrket-.mjs +3 -0
- package/dist/queues-Tf7kPBpn.mjs +7 -0
- package/dist/r2-DmKNnxtC.mjs +25 -0
- package/dist/r2-data-catalog-DBxoifOq.mjs +16 -0
- package/dist/radar-Csk7Ab-b.mjs +2 -0
- package/dist/rate-limits-cdChIg_S.mjs +2 -0
- package/dist/raw-fetch-BVYQR6C5.mjs +2 -0
- package/dist/realtime-CDehZVhV.mjs +20 -0
- package/dist/registrar-sandbox-BxVdfnam.mjs +56 -0
- package/dist/registrar-vflzeNQ9.mjs +43 -0
- package/dist/{registry-5-I2XLwF.mjs → registry-CWUfXloz.mjs} +1 -1
- package/dist/reporting-BaPZ1PHN.mjs +2 -0
- package/dist/request-headers-CC4eHmI2.mjs +3 -0
- package/dist/request-tracers-C_UVBexV.mjs +2 -0
- package/dist/resource-sharing-CoB4S9j1.mjs +6 -0
- package/dist/resource-tagging-CUiUC5g4.mjs +2 -0
- package/dist/rules-4O8076_s.mjs +4 -0
- package/dist/rulesets-C84MxTYo.mjs +5 -0
- package/dist/rum-Bvwkrntx.mjs +4 -0
- package/dist/run-CRfinkSe.mjs +2 -0
- package/dist/schema-C8hU6G9R.mjs +2 -0
- package/dist/{schema-flags-CTfQVGCs.mjs → schema-flags-DC4c6dka.mjs} +1 -1
- package/dist/scim-BvxQmde6.mjs +4 -0
- package/dist/{sdk-ZctLa5jW.mjs → sdk-C12y5qCN.mjs} +2 -2
- package/dist/secrets-store-DOKWiC-j.mjs +7 -0
- package/dist/security-center-Bhy_aC-w.mjs +2 -0
- package/dist/security-txt-L7HJ9tq5.mjs +3 -0
- package/dist/{shared-DlKGNPiT.mjs → shared-YJtB5KZB.mjs} +17 -17
- package/dist/smart-shield-COMXuQ1S.mjs +4 -0
- package/dist/snippets-DffQhlKt.mjs +4 -0
- package/dist/{spawn-C3_tJ3RB.mjs → spawn-C1AISA2V.mjs} +3 -3
- package/dist/spectrum-Cmf7SqQE.mjs +63 -0
- package/dist/speed-m8cdhLFS.mjs +4 -0
- package/dist/src-C8phrg-8.mjs +109 -0
- package/dist/ssl-D4ffsdSw.mjs +15 -0
- package/dist/{startup-profile-Dpxg-MjV.mjs → startup-profile-Dx95Y5cl.mjs} +1 -1
- package/dist/state-CHif8Y5I.mjs +2 -0
- package/dist/stream-DPF5fojV.mjs +16 -0
- package/dist/submit-Br8hfP0_.mjs +2 -0
- package/dist/tags-Bnt4JuxQ.mjs +2 -0
- package/dist/telemetry-Ch1vCICm.mjs +2 -0
- package/dist/telemetry-DjGNSlkU.mjs +5 -0
- package/dist/tenant-D8u0CxoC.mjs +2 -0
- package/dist/tenant-custom-nameservers-BrWMyslZ.mjs +3 -0
- package/dist/{tools-j8UGEtP1.mjs → tools-D9RZkZRc.mjs} +1 -1
- package/dist/tunnels-BkNPpTHa.mjs +5 -0
- package/dist/turnstile-MgwRECJv.mjs +23 -0
- package/dist/ui-DQSZeaG5.mjs +5 -0
- package/dist/url-info-Ddp7MgcI.mjs +2 -0
- package/dist/url-normalization-3ptK9ntV.mjs +3 -0
- package/dist/url-scanner-Psb9ollR.mjs +2 -0
- package/dist/user-DWdshcIu.mjs +12 -0
- package/dist/values-CDKQL1z2.mjs +2 -0
- package/dist/vectorize-CTYYUyQj.mjs +4 -0
- package/dist/waiting-rooms-BUdmwXDY.mjs +11 -0
- package/dist/web-assets-CpDwDEx8.mjs +8 -0
- package/dist/web3-YsjDyAzH.mjs +4 -0
- package/dist/workers-BKKxaZcz.mjs +6 -0
- package/dist/workers-builds-BWo5vUA9.mjs +2 -0
- package/dist/workers-for-platforms-ASJsxYdM.mjs +5 -0
- package/dist/workers-vpc-RkTnRvA2.mjs +3 -0
- package/dist/workflows-KrIFI9ns.mjs +5 -0
- package/dist/zaraz-DglXbVzZ.mjs +2 -0
- package/dist/zero-trust-RilTdSjX.mjs +91 -0
- package/dist/zone-DsBtVkvT.mjs +2 -0
- package/dist/zones-BFxvWFQW.mjs +44 -0
- package/package.json +1 -1
- package/dist/abuse-reports-D40QFl-y.mjs +0 -8
- package/dist/access-Dl2IU1ID.mjs +0 -11
- package/dist/account-CPbieCZ4.mjs +0 -2
- package/dist/account-tags-skfP7H8k.mjs +0 -9
- package/dist/accounts-CSgR6909.mjs +0 -28
- package/dist/acm-CVvCTaNk.mjs +0 -3
- package/dist/addressing-Uq5hEDDP.mjs +0 -13
- package/dist/agent-context-BvuDdaJb.mjs +0 -8
- package/dist/agent-memory-BrHMIU0E.mjs +0 -6
- package/dist/ai-audit-BoZuL84i.mjs +0 -2
- package/dist/ai-gateway-DE50Jem1.mjs +0 -13
- package/dist/ai-search-Fx7NHCHB.mjs +0 -7
- package/dist/ai-security-DyLbY9kv.mjs +0 -4
- package/dist/ai-v2fP1r0s.mjs +0 -5
- package/dist/alerting-5mFZjTcD.mjs +0 -6
- package/dist/analytics-BygTfozw.mjs +0 -3
- package/dist/analytics_engine-4L-q362P.mjs +0 -2
- package/dist/api-security-DjFsRYWx.mjs +0 -50
- package/dist/argo-TzXPN7tz.mjs +0 -2
- package/dist/args-CDgWUP4J.mjs +0 -2
- package/dist/artifacts-dEw2UUBV.mjs +0 -4
- package/dist/audit-logs-CqY7zzwv.mjs +0 -2
- package/dist/auth-CPLdkOC7.mjs +0 -5
- package/dist/auth-DY_Y2bXC.mjs +0 -9
- package/dist/billing-DHQuRT8S.mjs +0 -3
- package/dist/bot-management-CfqG79hF.mjs +0 -5
- package/dist/botnet-feed-BOeNnDoH.mjs +0 -3
- package/dist/brand-protection-DYttrKIM.mjs +0 -3
- package/dist/browser-extension-CTUCdgfn.mjs +0 -3
- package/dist/browser-run-373D4e1i.mjs +0 -4
- package/dist/build-D0ir_S70.mjs +0 -2
- package/dist/cache-DJXBmc3w.mjs +0 -7
- package/dist/calls-COO0Eoz1.mjs +0 -4
- package/dist/certificate-authorities-DbHLmKbd.mjs +0 -2
- package/dist/client-certificates-RBRqYP3f.mjs +0 -3
- package/dist/client-side-security-HOmA37et.mjs +0 -37
- package/dist/cloud-connector-C7hw1c1f.mjs +0 -2
- package/dist/cloudforce-one-DLOj76q4.mjs +0 -36
- package/dist/connector-interrupts-DY-z_LrH.mjs +0 -2
- package/dist/connector-telemetry-events-DCXmcAc9.mjs +0 -2
- package/dist/connector-telemetry-snapshots-D8GNuzx3.mjs +0 -2
- package/dist/connectors-fEOn-J_i.mjs +0 -3
- package/dist/containers-BDBsEs7-.mjs +0 -58
- package/dist/content-scan-Cmj9--XY.mjs +0 -4
- package/dist/csamScanner-BRXyMCyH.mjs +0 -6
- package/dist/ct-alerting-9AvYys-f.mjs +0 -3
- package/dist/custom-certificates-C5qrlyhb.mjs +0 -5
- package/dist/custom-csrs-BgOnTbBW.mjs +0 -3
- package/dist/custom-hostnames-CbQD9aYo.mjs +0 -5
- package/dist/custom-nameservers-2ZajBkRC.mjs +0 -3
- package/dist/custom-pages-Buki_Cb8.mjs +0 -3
- package/dist/d1-n2in0cSF.mjs +0 -20
- package/dist/data-security-DzOQMkv3.mjs +0 -7
- package/dist/dcv-delegation-BTP9LCOm.mjs +0 -2
- package/dist/diagnostics-BvHV8kQb.mjs +0 -3
- package/dist/directory-BeiSyg8A.mjs +0 -3
- package/dist/dispatch-namespaces-Dp8Jjpwy.mjs +0 -7
- package/dist/dist-DvizctjW.mjs +0 -48
- package/dist/dls-BwoU29mS.mjs +0 -3
- package/dist/dns-DISAfuzj.mjs +0 -29
- package/dist/dns-firewall-wBcCx_ua.mjs +0 -57
- package/dist/dry-run-ILZRVpnp.mjs +0 -2
- package/dist/durable-objects-DhDL3San.mjs +0 -2
- package/dist/email-auth-BROqK6-C.mjs +0 -2
- package/dist/email-routing-BZXHDAOO.mjs +0 -6
- package/dist/email-security-DVumybrk.mjs +0 -18
- package/dist/email-sending-CDQ3_wyz.mjs +0 -7
- package/dist/fieldExtractors-Cy1rxHEF.mjs +0 -3
- package/dist/firewall-C0g5X7Zd.mjs +0 -11
- package/dist/flagship-fFBiZUz-.mjs +0 -4
- package/dist/fraud-CjIETOaM.mjs +0 -20
- package/dist/google-tag-gateway-hPa5IHUx.mjs +0 -2
- package/dist/healthchecks-CoycpTf9.mjs +0 -4
- package/dist/hostnames-x_Yezxpr.mjs +0 -3
- package/dist/hyperdrive-BlfrTwSq.mjs +0 -21
- package/dist/iam-Bk7K_PPO.mjs +0 -6
- package/dist/images-BAEFb9q1.mjs +0 -8
- package/dist/intel-DDkyJVaP.mjs +0 -8
- package/dist/interactive-CRnq-B5I.mjs +0 -11
- package/dist/interactive-cytQzL94.mjs +0 -78
- package/dist/ips-DU0ti0i0.mjs +0 -2
- package/dist/keyless-certificates-E1P9jBTb.mjs +0 -3
- package/dist/keys-DqldTZqH.mjs +0 -2
- package/dist/kv-CcfCfnwq.mjs +0 -5
- package/dist/leaked-credential-checks-CqmKaEbd.mjs +0 -4
- package/dist/load-balancers-Dg4pDad1.mjs +0 -6
- package/dist/logexplorer-Bu2mG5rh.mjs +0 -17
- package/dist/logo-matches-CWUzxY7G.mjs +0 -2
- package/dist/logos-BTfdkDPi.mjs +0 -3
- package/dist/logpush-BZyay3h2.mjs +0 -4
- package/dist/logs-BqF7jjQO.mjs +0 -3
- package/dist/magic-cloud-networking-Dhd8pTyM.mjs +0 -5
- package/dist/magic-network-monitoring-D0FnkjuN.mjs +0 -4
- package/dist/magic-transit-B5skt0G7.mjs +0 -111
- package/dist/managed-transforms-B6X_crcJ.mjs +0 -3
- package/dist/matches-DeYaB4I0.mjs +0 -2
- package/dist/mcp-ChjBiMx2.mjs +0 -4
- package/dist/mesh-DRVAFLBX.mjs +0 -4
- package/dist/moq-DE7VDEFS.mjs +0 -13
- package/dist/mtls-certificates-Cbc3uAkN.mjs +0 -3
- package/dist/network-CDPZNFbn.mjs +0 -6
- package/dist/network-interconnects-CMRs_chR.mjs +0 -41
- package/dist/oauth-DAa7SwkM.mjs +0 -14
- package/dist/oauth-clients-DAI_gcuL.mjs +0 -4
- package/dist/oauth-scopes-BE6xF4_h.mjs +0 -2
- package/dist/observability-DnyI8rPJ.mjs +0 -4
- package/dist/organization-yh0mSUdI.mjs +0 -41
- package/dist/organizations-B3aU-RCG.mjs +0 -2
- package/dist/origin-ca-certificates-BaNWfVqf.mjs +0 -3
- package/dist/origin-post-quantum-encryption-CIUtQgyv.mjs +0 -2
- package/dist/origin-tls-client-auth-CvEpbX2Q.mjs +0 -4
- package/dist/page-rules-CzbyXbt6.mjs +0 -27
- package/dist/pages-CX8yefTI.mjs +0 -14
- package/dist/pay-per-crawl-v4vBOMWD.mjs +0 -4
- package/dist/pipelines-BZ1KGupx.mjs +0 -6
- package/dist/precursor-D42A9ay5.mjs +0 -4
- package/dist/progress-jYW64HY7.mjs +0 -2
- package/dist/project-settings-BN7tL0c7.mjs +0 -3
- package/dist/prompt-CyATfGUu.mjs +0 -3
- package/dist/queries-xvETUjUE.mjs +0 -3
- package/dist/queues-CpqHDtxF.mjs +0 -6
- package/dist/r2-data-catalog-DgKmlTKR.mjs +0 -16
- package/dist/r2-jhmLvD1z.mjs +0 -24
- package/dist/radar-C2J16wpX.mjs +0 -2
- package/dist/rate-limits-CoH9Xma0.mjs +0 -5
- package/dist/raw-fetch-CNKIypJ7.mjs +0 -2
- package/dist/realtimekit-CDs0Z5WW.mjs +0 -7
- package/dist/registrar-BI5ewTAk.mjs +0 -23
- package/dist/registrar-sandbox-al1znWMc.mjs +0 -61
- package/dist/reporting-CxsdHAH3.mjs +0 -2
- package/dist/request-tracers-DJJCncft.mjs +0 -2
- package/dist/resource-sharing-qQGn8AEn.mjs +0 -3
- package/dist/resource-tagging-aTtpX5e5.mjs +0 -2
- package/dist/rules-PpsDU89Q.mjs +0 -4
- package/dist/rulesets-DP12Aqik.mjs +0 -5
- package/dist/rum-DxvpzJYc.mjs +0 -4
- package/dist/schema-DlLbiOJj.mjs +0 -2
- package/dist/scim-DJ4AVU20.mjs +0 -4
- package/dist/secrets-store-D6KDNo_s.mjs +0 -7
- package/dist/security-center-008FMs_z.mjs +0 -2
- package/dist/security-txt-CqcfrhlN.mjs +0 -3
- package/dist/share-D5fzsVAJ.mjs +0 -5
- package/dist/smart-shield-DpFscIk8.mjs +0 -4
- package/dist/snippets-CCKgI2ZX.mjs +0 -4
- package/dist/spectrum-LmdqY3ki.mjs +0 -7
- package/dist/speed-CEK36h3A.mjs +0 -4
- package/dist/src-CEb2fgtT.mjs +0 -108
- package/dist/ssl-ChHUyaQm.mjs +0 -15
- package/dist/state-DeX23Kmg.mjs +0 -2
- package/dist/stream-DfUSELMX.mjs +0 -14
- package/dist/submit-DF2G5CIz.mjs +0 -2
- package/dist/tags-nFJJHlLJ.mjs +0 -2
- package/dist/tenant-CRLw1oRU.mjs +0 -2
- package/dist/tenant-custom-nameservers-BvBQRDcs.mjs +0 -3
- package/dist/tunnel-CMQeBgmb.mjs +0 -5
- package/dist/tunnels-iVA3MrdS.mjs +0 -2
- package/dist/turnstile-DQHP6-_b.mjs +0 -23
- package/dist/ui-DJFcf61J.mjs +0 -5
- package/dist/url-info-BVgdb_pf.mjs +0 -2
- package/dist/url-normalization-BTcxLxIQ.mjs +0 -3
- package/dist/url-scanner-DwuDZLPk.mjs +0 -2
- package/dist/user-I_MbB_KX.mjs +0 -12
- package/dist/values-S-Q7-5o8.mjs +0 -2
- package/dist/vectorize-CNZdF_0A.mjs +0 -4
- package/dist/waiting-rooms-Bo-OSsxu.mjs +0 -11
- package/dist/web-assets-tlFzKdNL.mjs +0 -8
- package/dist/web3-CdbfoZ2x.mjs +0 -4
- package/dist/workers-DQ9Q7czn.mjs +0 -28
- package/dist/workers-builds-CGRhYx-x.mjs +0 -9
- package/dist/workflows-BhEy-crm.mjs +0 -5
- package/dist/zaraz-DbKvA_8C.mjs +0 -2
- package/dist/zero-trust-DrHCPVOc.mjs +0 -93
- package/dist/zone-D2zrbJI2.mjs +0 -2
- package/dist/zones-DrpxQ_-A.mjs +0 -21
- /package/dist/{Page-9ry_XAVC.mjs → Page-C-JHZnIy.mjs} +0 -0
- /package/dist/{alerts-9PR5sQ_z.mjs → alerts-B2SJO4nd.mjs} +0 -0
- /package/dist/{autorag-Bevo1kIH.mjs → autorag-iNjZXw1n.mjs} +0 -0
- /package/dist/{body-parser-BGVbwPeM.mjs → body-parser-DIlfApuJ.mjs} +0 -0
- /package/dist/{brands-C4M04Man.mjs → brands-BrVnNrT3.mjs} +0 -0
- /package/dist/{chunk-6EUZQHAF-C3w62dek.mjs → chunk-6EUZQHAF-B7bSMYLe.mjs} +0 -0
- /package/dist/{chunk-Q72B4Q5Z-DVMMVVEs.mjs → chunk-Q72B4Q5Z-CPy_WJKU.mjs} +0 -0
- /package/dist/{clear-DS0eRXOc.mjs → clear-an9o3dJ3.mjs} +0 -0
- /package/dist/{cli-types-C3nVfpSG.mjs → cli-types-CrSoSMPF.mjs} +0 -0
- /package/dist/{connector-telemetry-events-latest-CKKG6_pD.mjs → connector-telemetry-events-latest-BqWfopFc.mjs} +0 -0
- /package/dist/{connector-telemetry-snapshots-latest-Bv5OddJr.mjs → connector-telemetry-snapshots-latest-C1m9U1En.mjs} +0 -0
- /package/dist/{domain-info-BUiaGCEq.mjs → domain-info-B0Ykqv5l.mjs} +0 -0
- /package/dist/{health-vX6Ml2Na.mjs → health-CIUg1C5o.mjs} +0 -0
- /package/dist/{input-validation-1esLElok.mjs → input-validation-BxchZ9jE.mjs} +0 -0
- /package/dist/{internal-ROz7anul.mjs → internal-DmpATljO.mjs} +0 -0
- /package/dist/{live-CSxvigCS.mjs → live-B66u3_0g.mjs} +0 -0
- /package/dist/{metadata-DEqBUaSv.mjs → metadata-D062SVyy.mjs} +0 -0
- /package/dist/{public-BMg6-Hxh-DgIH5obr.mjs → public-BMg6-Hxh-BfUOZTDP.mjs} +0 -0
- /package/dist/{rate-limit-analytics-CgHgKjmV.mjs → rate-limit-analytics-BknoecoM.mjs} +0 -0
- /package/dist/{ready-6G9zVGPJ.mjs → ready-C-H2cwp_.mjs} +0 -0
- /package/dist/{recent-submissions-B3Smh-QM.mjs → recent-submissions-DyuH_n5u.mjs} +0 -0
- /package/dist/{refute-DjkmLSNe.mjs → refute-uSlzkQKq.mjs} +0 -0
- /package/dist/{resolve-DEvdeprv.mjs → resolve-B8CyM1mi.mjs} +0 -0
- /package/dist/{scan-logo-545qLcGs.mjs → scan-logo-DMk--WT7.mjs} +0 -0
- /package/dist/{scan-page-DRQiVufl.mjs → scan-page-DEHnAOJo.mjs} +0 -0
- /package/dist/{schemas-BFCBlp_W.mjs → schemas-O_ZNaF8R.mjs} +0 -0
- /package/dist/{search-CXbqFoqe.mjs → search-BlKeSfVD.mjs} +0 -0
- /package/dist/{signed-url-rU_nvgFA.mjs → signed-url-CiGmGkLQ.mjs} +0 -0
- /package/dist/{submission-info-D6PgXNQP.mjs → submission-info-DHlTHDrs.mjs} +0 -0
- /package/dist/{theme-CrIBazAF.mjs → theme-CeVf-5qG.mjs} +0 -0
- /package/dist/{total-queries-XkFyu8H5.mjs → total-queries-D5WvVfYi.mjs} +0 -0
- /package/dist/{tracked-domains-CmcRXHj_.mjs → tracked-domains-9deBK9bp.mjs} +0 -0
- /package/dist/{verify-CM1NakP0.mjs → verify-S-TmhUDr.mjs} +0 -0
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";function o(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`activate`,describe:`Triggeres a new activation check for a PENDING Zone. This can be triggered every 5 min for paygo/ent customers, every hour for FREE Zones.`,builder:o,handler:async o=>a({command:`zone activate`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zone activate`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/activation_check`,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(`Updating`,async()=>a.zone.activate({zone_id:s})),{successLabel:`Updated`})})},c={command:`zone`,describe:`zone`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{c as default};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{h as e}from"./oauth-DH3kMXSs.mjs";import{r as t}from"./auth-tvDdC1J-.mjs";import{t as n}from"./output-COcSQsfn.mjs";import{t as r}from"./dry-run-DiVy1lVo.mjs";import{t as i}from"./progress-V6SZV3Ux.mjs";import{t as a}from"./run-CRfinkSe.mjs";import"./telemetry-Ch1vCICm.mjs";import{n as o,r as s,t as c}from"./body-parser-DIlfApuJ.mjs";import{n as l}from"./input-validation-BxchZ9jE.mjs";import{a as u,i as d,n as f}from"./prompt-DjRTpML4.mjs";import{t as ee}from"./cli-types-CrSoSMPF.mjs";function te(e){return e.option(`value-enabled`,{type:`boolean`,description:`Whether the feature is enabled or not.`}).option(`value-pool-id`,{type:`string`,description:`Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`edit`,describe:`Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses.`,builder:te,handler:async s=>a({command:`zones aegis edit`,classification:{safeFlags:[`value-enabled`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones aegis edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/aegis`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`)}}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.aegis.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`)}});n(await i(`Updating`,async()=>a.zones.aegis.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function m(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get`,describe:`Aegis provides dedicated egress IPs (from Cloudflare to your origin) for your layer 7 WAF and CDN services. The egress IPs are reserved exclusively for your account so that you can increase your origin security by only allowing traffic from a small list of IP addresses.`,builder:m,handler:async o=>a({command:`zones aegis get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones aegis get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/aegis`,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.zones.aegis.get({zone_id:s})),{successLabel:`Loaded`})})},g={command:`aegis`,describe:`Aegis operations`,builder:e=>e.command(p).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.option(`value-cache-by-device-type`,{type:`boolean`,description:`Whether to cache by device type.`}).option(`value-cf`,{type:`boolean`,description:`Whether the zone is proxied through Cloudflare.`}).option(`value-enabled`,{type:`boolean`,description:`Whether APO is enabled.`}).option(`value-hostnames`,{type:`string`,array:!0,description:`List of hostnames where APO is active.`}).option(`value-recheck`,{type:`boolean`,description:`Whether to recheck WordPress and plugin detection.`}).option(`value-wordpress`,{type:`boolean`,description:`Whether the site is a WordPress site.`}).option(`value-wp-plugin`,{type:`boolean`,description:`Whether the Cloudflare WordPress plugin is installed.`}).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)`}).implies(`value-cf`,[`value-enabled`,`value-wordpress`,`value-wp-plugin`]).implies(`value-enabled`,[`value-cf`,`value-wordpress`,`value-wp-plugin`]).implies(`value-wordpress`,[`value-cf`,`value-enabled`,`value-wp-plugin`]).implies(`value-wp-plugin`,[`value-cf`,`value-enabled`,`value-wordpress`])}const v={command:`edit`,describe:`Automatic Platform Optimization (APO) for WordPress is a performance feature that serves your WordPress site from Cloudflare's edge network, reducing load times for visitors. Refer to the APO documentation for more information.`,builder:_,handler:async s=>a({command:`zones automatic-platform-optimization edit`,classification:{safeFlags:[`value-cache-by-device-type`,`value-cf`,`value-enabled`,`value-recheck`,`value-wordpress`,`value-wp-plugin`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones automatic-platform-optimization edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/automatic_platform_optimization`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:{cache_by_device_type:s[`value-cache-by-device-type`],cf:s[`value-cf`],enabled:s[`value-enabled`],hostnames:s[`value-hostnames`],recheck:s[`value-recheck`],wordpress:s[`value-wordpress`],wp_plugin:s[`value-wp-plugin`]}}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.automaticPlatformOptimization.edit({...e,zone_id:l})),{successLabel:`Updated`});return}let u=c({value:{cache_by_device_type:s[`value-cache-by-device-type`],cf:s[`value-cf`],enabled:s[`value-enabled`],hostnames:s[`value-hostnames`],recheck:s[`value-recheck`],wordpress:s[`value-wordpress`],wp_plugin:s[`value-wp-plugin`]}});n(await i(`Updating`,async()=>a.zones.automaticPlatformOptimization.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Automatic Platform Optimization (APO) for WordPress is a performance feature that serves your WordPress site from Cloudflare's edge network, reducing load times for visitors. Refer to the APO documentation for more information.`,builder:y,handler:async o=>a({command:`zones automatic-platform-optimization get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones automatic-platform-optimization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/automatic_platform_optimization`,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.zones.automaticPlatformOptimization.get({zone_id:s})),{successLabel:`Loaded`})})},x={command:`automatic-platform-optimization`,describe:`Operations for automatic-platform-optimization`,builder:e=>e.command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.option(`value`,{type:`string`,description:`Controls Binary AST behavior:
|
|
3
|
+
- "off": Feature disabled.
|
|
4
|
+
- "on": Binary AST enabled.
|
|
5
|
+
- "latest": Binary AST enabled using the latest version.
|
|
6
|
+
`,choices:[`off`,`on`,`latest`]}).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:`edit`,describe:`Binary AST is a new binary encoding for JavaScript that enables faster parsing of scripts. When enabled, Cloudflare will serve a binary-encoded version of JavaScript to compatible browsers.`,builder:S,handler:async s=>a({command:`zones binary-ast edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones binary-ast edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/binary_ast`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.binaryAst.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Controls Binary AST behavior: - "off": Feature disabled. - "on": Binary AST enabled. - "latest": Binary AST enabled using the latest version. `,[`off`,`on`,`latest`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.binaryAst.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function w(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get`,describe:`Binary AST is a new binary encoding for JavaScript that enables faster parsing of scripts. When enabled, Cloudflare will serve a binary-encoded version of JavaScript to compatible browsers.`,builder:w,handler:async o=>a({command:`zones binary-ast get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones binary-ast get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/binary_ast`,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.zones.binaryAst.get({zone_id:s})),{successLabel:`Loaded`})})},E={command:`binary-ast`,describe:`Operations for binary-ast`,builder:e=>e.command(C).command(T).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function D(e){return e.option(`account-id`,{type:`string`,description:`Identifier`}).option(`name`,{type:`string`,description:`The domain name. Per [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters.`}).option(`type`,{type:`string`,description:`A full zone implies that DNS is hosted with Cloudflare. A partial zone is
|
|
7
|
+
typically a partner-hosted zone or a CNAME setup.
|
|
8
|
+
`,choices:[`full`,`partial`,`secondary`,`internal`],default:`full`}).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 O={command:`create`,describe:`Creates a new zone (domain) in your Cloudflare account. The zone is created in a pending state and must be activated by updating your domain's nameservers to point to Cloudflare, or by completing the verification process for partial (CNAME) setups.`,builder:D,handler:async e=>a({command:`zones create`,classification:{safeFlags:[`type`,`dry-run`]}},e,async()=>{if(e.dryRun){r({command:`cf zones create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({account:{id:l(e[`account-id`],`account-id`,`text`)},name:l(e.name,`name`,`text`),type:l(e.type,`type`,`text`)}):o(e.body)});return}let a=await t(e);if(e.body){let t=o(e.body);n(await i(`Creating`,async()=>a.zones.create({...t})),{successLabel:`Created`});return}e.name===void 0&&(e.name=await u(`name`,`The domain name. Per [RFC 1035](https://datatracker.ietf.org/doc/html/rfc1035#section-2.3.4) the overall zone name can be up to 253 characters, with each segment ("label") not exceeding 63 characters.`));let s=c({account:{id:l(e[`account-id`],`account-id`,`text`)},name:l(e.name,`name`,`text`),type:l(e.type,`type`,`text`)});n(await i(`Creating`,async()=>a.zones.create({...s})),{successLabel:`Created`})})};function k(e){return e.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 A={command:`delete`,describe:`Deletes an existing zone.`,builder:k,handler:async o=>a({command:`zones delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}`,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});if(o.zoneId=s,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
9
|
+
`);return}n(await i(`Deleting`,async()=>a.zones.delete({zone_id:s})),{successLabel:`Deleted`})})};function j(e){return e.option(`paused`,{type:`boolean`,description:`Indicates whether the zone is only using Cloudflare DNS services. A
|
|
10
|
+
true value means the zone will not receive security or performance
|
|
11
|
+
benefits.
|
|
12
|
+
`}).option(`plan-id`,{type:`string`,description:`Identifier`}).option(`type`,{type:`string`,description:`A full zone implies that DNS is hosted with Cloudflare. A partial
|
|
13
|
+
zone is typically a partner-hosted zone or a CNAME setup. This
|
|
14
|
+
parameter is only available to Enterprise customers or if it has
|
|
15
|
+
been explicitly enabled on a zone.
|
|
16
|
+
`,choices:[`full`,`partial`,`secondary`,`internal`]}).option(`vanity-name-servers`,{type:`string`,array:!0,description:`An array of domains used for custom name servers. This is only
|
|
17
|
+
available for Business and Enterprise plans.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const M={command:`edit`,describe:`Edits a zone. Only one zone property can be changed at a time.`,builder:j,handler:async s=>a({command:`zones edit`,classification:{safeFlags:[`paused`,`type`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({paused:s.paused,plan:{id:l(s[`plan-id`],`plan-id`,`text`)},type:l(s.type,`type`,`text`),vanity_name_servers:s[`vanity-name-servers`]}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({paused:s.paused,plan:{id:l(s[`plan-id`],`plan-id`,`text`)},type:l(s.type,`type`,`text`),vanity_name_servers:s[`vanity-name-servers`]});n(await i(`Updating`,async()=>a.zones.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function N(e){return e.option(`value`,{type:`string`,description:`Whether the feature is enabled or disabled.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const P={command:`edit`,describe:`Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information.`,builder:N,handler:async s=>a({command:`zones fonts edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones fonts edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/fonts`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.fonts.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Whether the feature is enabled or disabled.`,[`on`,`off`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.fonts.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function F(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get`,describe:`Enhance your website's font delivery with Cloudflare Fonts. Deliver Google Hosted fonts from your own domain, boost performance, and enhance user privacy. Refer to the Cloudflare Fonts documentation for more information.`,builder:F,handler:async o=>a({command:`zones fonts get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones fonts get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/fonts`,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.zones.fonts.get({zone_id:s})),{successLabel:`Loaded`})})},L={command:`fonts`,describe:`Fonts operations`,builder:e=>e.command(P).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function R(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const z={command:`get`,describe:`Retrieves detailed information about a specific zone identified by its zone ID. Returns zone configuration, status, nameservers, and associated metadata.`,builder:R,handler:async o=>a({command:`zones get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}`,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.zones.get({zone_id:s})),{successLabel:`Loaded`})})};function B(e){return e.option(`value`,{type:`string`,description:`Controls HTTP/2 Prioritization behavior:
|
|
18
|
+
- "off": Use browser default prioritization.
|
|
19
|
+
- "on": Use Cloudflare's optimized prioritization.
|
|
20
|
+
- "custom": Use custom prioritization rules.
|
|
21
|
+
`,choices:[`off`,`on`,`custom`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const V={command:`edit`,describe:`HTTP/2 Prioritization controls the order in which assets are delivered to browsers. Cloudflare's HTTP/2 Prioritization overrides the default browser prioritization order, improving the loading performance of web pages.`,builder:B,handler:async s=>a({command:`zones h2-prioritization edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones h2-prioritization edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/h2_prioritization`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.h2Prioritization.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Controls HTTP/2 Prioritization behavior: - "off": Use browser default prioritization. - "on": Use Cloudflare's optimized prioritization. - "custom": Use custom prioritization rules. `,[`off`,`on`,`custom`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.h2Prioritization.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function H(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const U={command:`get`,describe:`HTTP/2 Prioritization controls the order in which assets are delivered to browsers. Cloudflare's HTTP/2 Prioritization overrides the default browser prioritization order, improving the loading performance of web pages.`,builder:H,handler:async o=>a({command:`zones h2-prioritization get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones h2-prioritization get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/h2_prioritization`,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.zones.h2Prioritization.get({zone_id:s})),{successLabel:`Loaded`})})},W={command:`h2-prioritization`,describe:`Operations for h2-prioritization`,builder:e=>e.command(V).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function G(e){return e.option(`include-subdomains`,{type:`boolean`,description:`If provided, the zone hold will extend to block any subdomain of the given zone, as well
|
|
22
|
+
as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname
|
|
23
|
+
'example.com' and include_subdomains=true will block 'example.com',
|
|
24
|
+
'staging.example.com', 'api.staging.example.com', etc.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const K={command:`create`,describe:`Enforce a zone hold on the zone, blocking the creation and activation of zones with this zone's hostname. Zone holds cannot be enabled on CDN-only zones.`,builder:G,handler:async o=>a({command:`zones holds create`,classification:{safeFlags:[`include-subdomains`,`dry-run`]}},o,async()=>{let a={include_subdomains:o[`include-subdomains`]};if(o.dryRun){r({command:`cf zones holds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/hold`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Creating`,async()=>s.zones.holds.create({zone_id:c,...a})),{successLabel:`Created`})})};function q(e){return e.option(`hold-after`,{type:`string`,description:"If `hold_after` is provided, the hold will be temporarily disabled,\nthen automatically re-enabled by the system at the time specified\nin this RFC3339-formatted timestamp. Otherwise, the hold will be\ndisabled indefinitely. `hold_after` cannot be provided for CDN-only zones."}).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 J={command:`delete`,describe:"Stop enforcement of a zone hold on the zone, permanently or temporarily, allowing the creation and activation of zones with this zone's hostname. Existing zone holds can be removed from CDN-only zones when `hold_after` is not provided. Active holds are automatically disabled when a zone transitions to CDN-only mode.",builder:q,handler:async o=>a({command:`zones holds delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{let a={hold_after:o[`hold-after`]};if(o.dryRun){r({command:`cf zones holds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/hold`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
25
|
+
`);return}n(await i(`Deleting`,async()=>s.zones.holds.delete({zone_id:c,...a})),{successLabel:`Deleted`})})};function Y(e){return e.option(`hold-after`,{type:`string`,description:"If `hold_after` is provided and future-dated, the hold will be temporarily disabled,\nthen automatically re-enabled by the system at the time specified\nin this RFC3339-formatted timestamp. A past-dated `hold_after` value will have\nno effect on an existing, enabled hold. Providing an empty string will set its value\nto the current time. Providing `null` will disable the hold indefinitely."}).option(`include-subdomains`,{type:`boolean`,description:`If \`true\`, the zone hold will extend to block any subdomain of the given zone, as well
|
|
26
|
+
as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname
|
|
27
|
+
'example.com' and include_subdomains=true will block 'example.com',
|
|
28
|
+
'staging.example.com', 'api.staging.example.com', etc.`}).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:`edit`,describe:"Update the `hold_after` and/or `include_subdomains` values on an existing zone hold. The hold is enabled if the `hold_after` date-time value is in the past. Existing zone holds can be removed from CDN-only zones by setting `hold_after` to `null`. Other zone hold updates cannot be made on CDN-only zones. Active holds are automatically disabled when a zone transitions to CDN-only mode.",builder:Y,handler:async s=>a({command:`zones holds edit`,classification:{safeFlags:[`include-subdomains`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones holds edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/hold`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({hold_after:l(s[`hold-after`],`hold-after`,`text`),include_subdomains:s[`include-subdomains`]}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.holds.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({hold_after:l(s[`hold-after`],`hold-after`,`text`),include_subdomains:s[`include-subdomains`]});n(await i(`Updating`,async()=>a.zones.holds.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function Z(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Q={command:`get`,describe:`Retrieve whether the zone is subject to a zone hold, and metadata about the hold.`,builder:Z,handler:async o=>a({command:`zones holds get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones holds get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/hold`,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.zones.holds.get({zone_id:s})),{successLabel:`Loaded`})})},ne={command:`holds`,describe:`Operations for holds`,builder:e=>e.command(K).command(J).command(X).command(Q).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function re(e){return e.option(`value`,{type:`string`,description:`Controls Image Resizing behavior:
|
|
29
|
+
- "off": Feature disabled.
|
|
30
|
+
- "on": Resizing is enabled for same-zone images only.
|
|
31
|
+
- "open": Resizing is enabled for images from any origin.
|
|
32
|
+
- "latest": Resizing is enabled for same-zone images using the latest version.
|
|
33
|
+
`,choices:[`off`,`on`,`open`,`latest`]}).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:`edit`,describe:"Sets the Image Transformations setting for a zone. Accepted values are `off`, `on`, `open`, and `latest`.",builder:re,handler:async s=>a({command:`zones image-resizing edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones image-resizing edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/image_resizing`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.imageResizing.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Controls Image Resizing behavior: - "off": Feature disabled. - "on": Resizing is enabled for same-zone images only. - "open": Resizing is enabled for images from any origin. - "latest": Resizing is enabled for same-zone images using the latest version. `,[`off`,`on`,`open`,`latest`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.imageResizing.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function ae(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const oe={command:`get`,describe:"Gets the Image Transformations setting for a zone. Accepted values are `off`, `on`, `open`, and `latest`.",builder:ae,handler:async o=>a({command:`zones image-resizing get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones image-resizing get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/image_resizing`,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.zones.imageResizing.get({zone_id:s})),{successLabel:`Loaded`})})},se={command:`image-resizing`,describe:`Operations for image-resizing`,builder:e=>e.command(ie).command(oe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ce(e){return e.option(`name`,{type:`string`,description:"A domain name. Optional filter operators can be provided to extend refine the search:\n * `equal` (default)\n * `not_equal`\n * `starts_with`\n * `ends_with`\n * `contains`\n * `starts_with_case_sensitive`\n * `ends_with_case_sensitive`\n * `contains_case_sensitive`"}).option(`status`,{type:`string`,description:`Specify a zone status to filter by.`,choices:[`initializing`,`pending`,`active`,`moved`]}).option(`type`,{type:`string`,description:`Zone types to filter by. Multiple types can be specified as a comma-separated list (e.g., ?type=full,partial,secondary). When this parameter is not provided, zones with type "internal" are excluded from the results.`}).option(`account-id`,{type:`string`,description:`Filter by an account ID.`}).option(`account-name`,{type:`string`,description:"An account Name. Optional filter operators can be provided to extend refine the search:\n * `equal` (default)\n * `not_equal`\n * `starts_with`\n * `ends_with`\n * `contains`\n * `starts_with_case_sensitive`\n * `ends_with_case_sensitive`\n * `contains_case_sensitive`"}).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of zones per page.`}).option(`order`,{type:`string`,description:`Field to order zones by.`,choices:[`name`,`status`,`account.id`,`account.name`,`plan.id`]}).option(`direction`,{type:`string`,description:`Direction to order zones.`,choices:[`asc`,`desc`]}).option(`match`,{type:`string`,description:`Whether to match all search requirements or at least one (any).`,choices:[`any`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed.`,builder:ee(ce),handler:async e=>a({command:`zones list`,classification:{safeFlags:[`status`,`order`,`direction`,`match`,`dry-run`]}},e,async()=>{let a={name:e.name,status:e.status,type:e.type,"account.id":e[`account-id`],"account.name":e[`account-name`],page:e.page,per_page:e[`per-page`],order:e.order,direction:e.direction,match:e.match};if(e.dryRun){r({command:`cf zones list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones`,pathParams:{},query:a,bodyKind:`none`});return}let o=await t(e);n(await i(`Loading`,async()=>o.zones.list(a)),{successLabel:`Loaded`})})};function ue(e){return e.option(`value`,{type:`number`,description:`Value of the Origin H2 Max Streams Setting.`}).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:`edit`,describe:"Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is `100` for all plan types except Enterprise where it is `1`. `1` means that H2 multiplexing is disabled.",builder:ue,handler:async s=>a({command:`zones origin-h2-max-streams edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones origin-h2-max-streams edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/origin_h2_max_streams`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:s.value}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.originH2MaxStreams.edit({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.value===void 0)throw Error(`--value is required (or pass --body with this field set).`);let u=c({value:s.value});n(await i(`Updating`,async()=>a.zones.originH2MaxStreams.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function fe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const pe={command:`get`,describe:"Origin H2 Max Streams configures the max number of concurrent requests that Cloudflare will send within the same connection when communicating with the origin server, if the origin supports it. Note that if your origin does not support H2 multiplexing, 5xx errors may be observed, particularly 520s. Also note that the default value is `100` for all plan types except Enterprise where it is `1`. `1` means that H2 multiplexing is disabled.",builder:fe,handler:async o=>a({command:`zones origin-h2-max-streams get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones origin-h2-max-streams get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/origin_h2_max_streams`,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.zones.originH2MaxStreams.get({zone_id:s})),{successLabel:`Loaded`})})},me={command:`origin-h2-max-streams`,describe:`Origin H2 Max Streams operations`,builder:e=>e.command(de).command(pe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function he(e){return e.option(`value`,{type:`string`,description:`Value of the Origin Max HTTP Version Setting.`,choices:[`2`,`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 ge={command:`edit`,describe:`Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), for more information.). The default value is "2" for all plan types except Enterprise where it is "1".`,builder:he,handler:async s=>a({command:`zones origin-max-http-version edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones origin-max-http-version edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/origin_max_http_version`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.originMaxHttpVersion.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Value of the Origin Max HTTP Version Setting.`,[`2`,`1`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.originMaxHttpVersion.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function _e(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ve={command:`get`,describe:`Origin Max HTTP Setting Version sets the highest HTTP version Cloudflare will attempt to use with your origin. This setting allows Cloudflare to make HTTP/2 requests to your origin. (Refer to [Enable HTTP/2 to Origin](https://developers.cloudflare.com/cache/how-to/enable-http2-to-origin/), for more information.). The default value is "2" for all plan types except Enterprise where it is "1".`,builder:_e,handler:async o=>a({command:`zones origin-max-http-version get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones origin-max-http-version get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/origin_max_http_version`,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.zones.originMaxHttpVersion.get({zone_id:s})),{successLabel:`Loaded`})})},ye={command:`origin-max-http-version`,describe:`Origin Max Http Version operations`,builder:e=>e.command(ge).command(ve).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function be(e){return e.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 xe={command:`delete`,describe:`Delete the Origin TLS Compliance Modes setting for the zone, removing any configured compliance constraint. After deletion, Cloudflare's default behavior applies (no compliance filtering of the key-exchange algorithm list sent to the origin).`,builder:be,handler:async o=>a({command:`zones origin-tls-compliance-modes delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf zones origin-tls-compliance-modes delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/origin_tls_compliance_modes`,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});if(o.zoneId=s,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
34
|
+
`);return}n(await i(`Deleting`,async()=>a.zones.originTlsComplianceModes.delete({zone_id:s})),{successLabel:`Deleted`})})};function Se(e){return e.option(`value`,{type:`string`,array:!0,description:"List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint."}).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 Ce={command:`edit`,describe:'Update the set of TLS compliance modes for the zone. PATCH performs a full replace of the modes list, not a merge — the request body is treated as the complete new list, and any modes not present in it are removed. (To remove a single mode from an existing configuration, send the updated list without it.) The request body must be of the form `{"value": ["fips", "pqh"]}`. Currently supported modes are `fips` and `pqh`; an empty list clears the constraint. Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Invalid mode values are rejected with a 4xx response.',builder:Se,handler:async s=>a({command:`zones origin-tls-compliance-modes edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones origin-tls-compliance-modes edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/origin_tls_compliance_modes`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:s.value}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.originTlsComplianceModes.edit({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.value===void 0)throw Error(`--value is required (or pass --body with this field set).`);let u=c({value:s.value});n(await i(`Updating`,async()=>a.zones.originTlsComplianceModes.edit({...u,zone_id:l})),{successLabel:`Updated`})})};function we(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Te={command:`get`,describe:"Origin TLS Compliance Modes constrains the set of TLS key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. The value is a list of named compliance modes (currently `fips` and `pqh`). Multiple modes are combined as the intersection of their permitted algorithm lists. An empty list (or no rule configured) means no compliance constraint is applied.",builder:we,handler:async o=>a({command:`zones origin-tls-compliance-modes get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones origin-tls-compliance-modes get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/origin_tls_compliance_modes`,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.zones.originTlsComplianceModes.get({zone_id:s})),{successLabel:`Loaded`})})};function Ee(e){return e.option(`value`,{type:`string`,array:!0,description:"List of TLS compliance modes that constrain the key-exchange algorithms Cloudflare may use when establishing the TLS connection to the zone's origin. Currently supported values are `fips` (FIPS-approved curves) and `pqh` (post-quantum hybrid). Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Multiple modes are combined as the intersection of their permitted algorithm lists; selections whose intersection is empty are rejected. An empty list clears the constraint."}).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:`update`,describe:'Replace the entire set of TLS compliance modes for the zone with the list provided in the request body. PUT performs a full replace, not a merge — any modes not present in the request body are removed. The request body must be of the form `{"value": ["fips", "pqh"]}`. Currently supported modes are `fips` and `pqh`; an empty list clears the constraint. Future modes (e.g. `cnsa2`) may be added; clients should treat unknown values as opaque strings. Invalid mode values are rejected with a 4xx response.',builder:Ee,handler:async s=>a({command:`zones origin-tls-compliance-modes update`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones origin-tls-compliance-modes update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/origin_tls_compliance_modes`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:s.value}):o(s.body)});return}let a=await t(s),l=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.originTlsComplianceModes.update({...e,zone_id:l})),{successLabel:`Updated`});return}if(s.value===void 0)throw Error(`--value is required (or pass --body with this field set).`);let u=c({value:s.value});n(await i(`Updating`,async()=>a.zones.originTlsComplianceModes.update({...u,zone_id:l})),{successLabel:`Updated`})})},Oe={command:`origin-tls-compliance-modes`,describe:`Manage zone Origin TLS Compliance Modes setting`,builder:e=>e.command(xe).command(Ce).command(Te).command(De).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ke(e){return e.positional(`plan-identifier`,{type:`string`,description:`Identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ae={command:`get <plan-identifier>`,describe:`Details of the available plan that the zone can subscribe to.`,builder:ke,handler:async o=>a({command:`zones plans get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/available_plans/${o[`plan-identifier`]==null?`<plan-identifier>`:encodeURIComponent(String(o[`plan-identifier`]))}`,pathParams:{"plan-identifier":String(o[`plan-identifier`]??``),"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.zones.plans.get({zone_id:s,plan_identifier:o[`plan-identifier`]})),{successLabel:`Loaded`})})};function je(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Me={command:`list`,describe:`Lists available plans the zone can subscribe to.`,builder:je,handler:async o=>a({command:`zones plans list`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones plans list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/available_plans`,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.zones.plans.list({zone_id:s})),{successLabel:`Loaded`})})},Ne={command:`plans`,describe:`Operations for plans`,builder:e=>e.command(Ae).command(Me).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Pe(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Fe={command:`get`,describe:`Lists all rate plans the zone can subscribe to.`,builder:Pe,handler:async o=>a({command:`zones rate-plans get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones rate-plans get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/available_rate_plans`,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.zones.ratePlans.get({zone_id:s})),{successLabel:`Loaded`})})},Ie={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(Fe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Le(e){return e.option(`value`,{type:`string`,description:`Value can either be On or Off.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const Re={command:`edit`,describe:`Toggles RUM on/off for an existing zone.`,builder:Le,handler:async s=>a({command:`zones rum edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones rum edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/rum`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.rum.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.rum.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function ze(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Be={command:`get`,describe:`Retrieves RUM status for a zone.`,builder:ze,handler:async o=>a({command:`zones rum get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones rum get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/rum`,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.zones.rum.get({zone_id:s})),{successLabel:`Loaded`})})},Ve={command:`rum`,describe:`Rum operations`,builder:e=>e.command(Re).command(Be).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function He(e){return e.positional(`setting-id`,{type:`string`,description:`Setting name`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`ssl-recommender enrollment setting.`}).option(`value-enabled`,{type:`boolean`,description:`Whether the feature is enabled or not.`}).option(`value-pool-id`,{type:`string`,description:`Egress pool id which refers to a grouping of dedicated egress IPs through which Cloudflare will connect to origin.`}).option(`value-cache-by-device-type`,{type:`boolean`,description:`Indicates whether or not [cache by device type](https://developers.cloudflare.com/automatic-platform-optimization/reference/cache-device-type/) is enabled.`}).option(`value-cf`,{type:`boolean`,description:`Indicates whether or not Cloudflare proxy is enabled.`}).option(`value-hostnames`,{type:`string`,array:!0,description:`An array of hostnames where Automatic Platform Optimization for WordPress is activated.`}).option(`value-wordpress`,{type:`boolean`,description:`Indicates whether or not site is powered by WordPress.`}).option(`value-wp-plugin`,{type:`boolean`,description:`Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is installed.`}).option(`value-strict-transport-security-enabled`,{type:`boolean`,description:`Whether or not strict transport security is enabled.`}).option(`value-strict-transport-security-include-subdomains`,{type:`boolean`,description:`Include all subdomains for strict transport security.`}).option(`value-strict-transport-security-max-age`,{type:`number`,description:`Max age in seconds of the strict transport security.`}).option(`value-strict-transport-security-nosniff`,{type:`boolean`,description:`Whether or not to include 'X-Content-Type-Options: nosniff' header.`}).option(`value-strict-transport-security-preload`,{type:`boolean`,description:`Enable automatic preload of the HSTS configuration.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`value-pool-id`,[`value-cache-by-device-type`,`value-cf`,`value-hostnames`,`value-wordpress`,`value-wp-plugin`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).conflicts(`value-cache-by-device-type`,[`value-pool-id`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).implies(`value-cache-by-device-type`,[`value-strict-transport-security-enabled`,`value-cf`,`value-wordpress`,`value-wp-plugin`,`value-hostnames`]).conflicts(`value-cf`,[`value-pool-id`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).implies(`value-cf`,[`value-strict-transport-security-enabled`,`value-wordpress`,`value-wp-plugin`,`value-hostnames`,`value-cache-by-device-type`]).conflicts(`value-hostnames`,[`value-pool-id`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).implies(`value-hostnames`,[`value-strict-transport-security-enabled`,`value-cf`,`value-wordpress`,`value-wp-plugin`,`value-cache-by-device-type`]).conflicts(`value-wordpress`,[`value-pool-id`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).implies(`value-wordpress`,[`value-strict-transport-security-enabled`,`value-cf`,`value-wp-plugin`,`value-hostnames`,`value-cache-by-device-type`]).conflicts(`value-wp-plugin`,[`value-pool-id`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-max-age`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`]).implies(`value-wp-plugin`,[`value-strict-transport-security-enabled`,`value-cf`,`value-wordpress`,`value-hostnames`,`value-cache-by-device-type`]).implies(`value-strict-transport-security-enabled`,[`value-cf`,`value-wordpress`,`value-wp-plugin`,`value-hostnames`,`value-cache-by-device-type`]).conflicts(`value-strict-transport-security-include-subdomains`,[`value-pool-id`,`value-cache-by-device-type`,`value-cf`,`value-hostnames`,`value-wordpress`,`value-wp-plugin`]).conflicts(`value-strict-transport-security-max-age`,[`value-pool-id`,`value-cache-by-device-type`,`value-cf`,`value-hostnames`,`value-wordpress`,`value-wp-plugin`]).conflicts(`value-strict-transport-security-nosniff`,[`value-pool-id`,`value-cache-by-device-type`,`value-cf`,`value-hostnames`,`value-wordpress`,`value-wp-plugin`]).conflicts(`value-strict-transport-security-preload`,[`value-pool-id`,`value-cache-by-device-type`,`value-cf`,`value-hostnames`,`value-wordpress`,`value-wp-plugin`])}const Ue={command:`edit <setting-id>`,describe:`Updates a single zone setting by the identifier`,builder:He,handler:async s=>a({command:`zones settings edit`,classification:{safeFlags:[`enabled`,`value-enabled`,`value-cache-by-device-type`,`value-cf`,`value-wordpress`,`value-wp-plugin`,`value-strict-transport-security-enabled`,`value-strict-transport-security-include-subdomains`,`value-strict-transport-security-nosniff`,`value-strict-transport-security-preload`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/${s[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(s[`setting-id`]))}`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``),"setting-id":String(s[`setting-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({enabled:s.enabled,value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`),cache_by_device_type:s[`value-cache-by-device-type`],cf:s[`value-cf`],hostnames:s[`value-hostnames`],wordpress:s[`value-wordpress`],wp_plugin:s[`value-wp-plugin`],strict_transport_security:{enabled:s[`value-strict-transport-security-enabled`],include_subdomains:s[`value-strict-transport-security-include-subdomains`],max_age:s[`value-strict-transport-security-max-age`],nosniff:s[`value-strict-transport-security-nosniff`],preload:s[`value-strict-transport-security-preload`]}}}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.settings.edit({body:e,zone_id:u,setting_id:s[`setting-id`]})),{successLabel:`Updated`});return}let d=c({enabled:s.enabled,value:{enabled:s[`value-enabled`],pool_id:l(s[`value-pool-id`],`value-pool-id`,`text`),cache_by_device_type:s[`value-cache-by-device-type`],cf:s[`value-cf`],hostnames:s[`value-hostnames`],wordpress:s[`value-wordpress`],wp_plugin:s[`value-wp-plugin`],strict_transport_security:{enabled:s[`value-strict-transport-security-enabled`],include_subdomains:s[`value-strict-transport-security-include-subdomains`],max_age:s[`value-strict-transport-security-max-age`],nosniff:s[`value-strict-transport-security-nosniff`],preload:s[`value-strict-transport-security-preload`]}}});n(await i(`Updating`,async()=>a.zones.settings.edit({body:d,zone_id:u,setting_id:s[`setting-id`]})),{successLabel:`Updated`})})};function We(e){return e.positional(`setting-id`,{type:`string`,description:`Setting name`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Ge={command:`get <setting-id>`,describe:`Fetch a single zone setting by name`,builder:We,handler:async o=>a({command:`zones settings get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones settings get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/${o[`setting-id`]==null?`<setting-id>`:encodeURIComponent(String(o[`setting-id`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"setting-id":String(o[`setting-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.zones.settings.get({zone_id:s,setting_id:o[`setting-id`]})),{successLabel:`Loaded`})})},Ke={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(Ue).command(Ge).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function qe(e){return e.option(`value`,{type:`string`,description:`Whether the feature is enabled or disabled.`,choices:[`on`,`off`]}).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 Je={command:`edit`,describe:`Speed Brain lets compatible browsers speculate on content which can be prefetched or preloaded, making website navigation faster. Refer to the Cloudflare Speed Brain documentation for more information.`,builder:qe,handler:async s=>a({command:`zones speed-brain edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones speed-brain edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/speed_brain`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.speedBrain.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Whether the feature is enabled or disabled.`,[`on`,`off`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.speedBrain.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function Ye(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const Xe={command:`get`,describe:`Speed Brain lets compatible browsers speculate on content which can be prefetched or preloaded, making website navigation faster. Refer to the Cloudflare Speed Brain documentation for more information.`,builder:Ye,handler:async o=>a({command:`zones speed-brain get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones speed-brain get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/speed_brain`,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.zones.speedBrain.get({zone_id:s})),{successLabel:`Loaded`})})},Ze={command:`speed-brain`,describe:`Speed Brain operations`,builder:e=>e.command(Je).command(Xe).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function Qe(e){return e.option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const $e={command:`create`,describe:`Create a zone subscription, either plan or add-ons.`,builder:Qe,handler:async u=>a({command:`zones subscriptions create`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf zones subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/subscription`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({app:{install_id:l(u[`app-install-id`],`app-install-id`,`text`)},component_values:s(u[`component-values`],`component-values`),frequency:l(u.frequency,`frequency`,`text`),rate_plan:{currency:l(u[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:u[`rate-plan-externally-managed`],id:l(u[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:u[`rate-plan-is-contract`],public_name:l(u[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:l(u[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:u[`rate-plan-sets`]}}):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.zones.subscriptions.create({body:e,zone_id:d})),{successLabel:`Created`});return}let f=c({app:{install_id:l(u[`app-install-id`],`app-install-id`,`text`)},component_values:s(u[`component-values`],`component-values`),frequency:l(u.frequency,`frequency`,`text`),rate_plan:{currency:l(u[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:u[`rate-plan-externally-managed`],id:l(u[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:u[`rate-plan-is-contract`],public_name:l(u[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:l(u[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:u[`rate-plan-sets`]}});n(await i(`Creating`,async()=>a.zones.subscriptions.create({body:f,zone_id:d})),{successLabel:`Created`})})};function et(e){return e.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 tt={command:`delete`,describe:`Deletes a zone's subscription.`,builder:et,handler:async o=>a({command:`zones subscriptions delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},o,async()=>{if(o.dryRun){r({command:`cf zones subscriptions delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/subscription`,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});if(o.zoneId=s,!await f({force:!!o.force})){process.stderr.write(`Aborted.
|
|
35
|
+
`);return}n(await i(`Deleting`,async()=>a.zones.subscriptions.delete({zone_id:s})),{successLabel:`Deleted`})})};function nt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const rt={command:`get`,describe:`Lists zone subscription details.`,builder:nt,handler:async o=>a({command:`zones subscriptions get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones subscriptions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/subscription`,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.zones.subscriptions.get({zone_id:s})),{successLabel:`Loaded`})})};function it(e){return e.option(`app-install-id`,{type:`string`,description:`app install id.`}).option(`component-values`,{type:`string`,description:`Configurable component values for the subscription. Provide as a JSON array of objects or @path/to/file.json.`}).option(`frequency`,{type:`string`,description:`How often the subscription is renewed automatically.`,choices:[`weekly`,`monthly`,`quarterly`,`yearly`]}).option(`rate-plan-currency`,{type:`string`,description:`The currency applied to the rate plan subscription.`}).option(`rate-plan-externally-managed`,{type:`boolean`,description:`Whether this rate plan is managed externally from Cloudflare.`}).option(`rate-plan-id`,{type:`string`,description:`The ID of the rate plan.`}).option(`rate-plan-is-contract`,{type:`boolean`,description:`Whether a rate plan is enterprise-based (or newly adopted term contract).`}).option(`rate-plan-public-name`,{type:`string`,description:`The full name of the rate plan.`}).option(`rate-plan-scope`,{type:`string`,description:`The scope that this rate plan applies to.`}).option(`rate-plan-sets`,{type:`string`,array:!0,description:`The list of sets this rate plan applies to. Returns array of strings.`}).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 at={command:`update`,describe:`Updates zone subscriptions, either plan or add-ons.`,builder:it,handler:async u=>a({command:`zones subscriptions update`,classification:{safeFlags:[`frequency`,`rate-plan-externally-managed`,`rate-plan-is-contract`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf zones subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/subscription`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({app:{install_id:l(u[`app-install-id`],`app-install-id`,`text`)},component_values:s(u[`component-values`],`component-values`),frequency:l(u.frequency,`frequency`,`text`),rate_plan:{currency:l(u[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:u[`rate-plan-externally-managed`],id:l(u[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:u[`rate-plan-is-contract`],public_name:l(u[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:l(u[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:u[`rate-plan-sets`]}}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.zones.subscriptions.update({body:e,zone_id:d})),{successLabel:`Updated`});return}let f=c({app:{install_id:l(u[`app-install-id`],`app-install-id`,`text`)},component_values:s(u[`component-values`],`component-values`),frequency:l(u.frequency,`frequency`,`text`),rate_plan:{currency:l(u[`rate-plan-currency`],`rate-plan-currency`,`text`),externally_managed:u[`rate-plan-externally-managed`],id:l(u[`rate-plan-id`],`rate-plan-id`,`text`),is_contract:u[`rate-plan-is-contract`],public_name:l(u[`rate-plan-public-name`],`rate-plan-public-name`,`text`),scope:l(u[`rate-plan-scope`],`rate-plan-scope`,`text`),sets:u[`rate-plan-sets`]}});n(await i(`Updating`,async()=>a.zones.subscriptions.update({body:f,zone_id:d})),{successLabel:`Updated`})})},ot={command:`subscriptions`,describe:`Operations for subscriptions`,builder:e=>e.command($e).command(tt).command(rt).command(at).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function st(e){return e.option(`value`,{type:`string`,description:`Comma-separated list of allowed origin domains for image and video transformations.
|
|
36
|
+
Use "*" to allow all origins (default).
|
|
37
|
+
`}).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 ct={command:`edit`,describe:`Media Transformations Allowed Origins restricts transformations for images and video served through Cloudflare's network to requests originating from specified domains. Refer to the Image Transformations and Video Transformations documentation for more information.`,builder:st,handler:async s=>a({command:`zones transformations-allowed-origins edit`,classification:{safeFlags:[`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones transformations-allowed-origins edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/transformations_allowed_origins`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),d=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=d,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.transformationsAllowedOrigins.edit({...e,zone_id:d})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await u(`value`,`Comma-separated list of allowed origin domains for image and video transformations. Use "*" to allow all origins (default). `));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.transformationsAllowedOrigins.edit({...f,zone_id:d})),{successLabel:`Updated`})})};function lt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ut={command:`get`,describe:`Media Transformations Allowed Origins restricts transformations for images and video served through Cloudflare's network to requests originating from specified domains. Refer to the Image Transformations and Video Transformations documentation for more information.`,builder:lt,handler:async o=>a({command:`zones transformations-allowed-origins get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones transformations-allowed-origins get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/transformations_allowed_origins`,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.zones.transformationsAllowedOrigins.get({zone_id:s})),{successLabel:`Loaded`})})},dt={command:`transformations-allowed-origins`,describe:`Operations for transformations-allowed-origins`,builder:e=>e.command(ct).command(ut).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function ft(e){return e.option(`value`,{type:`string`,description:`Whether C2PA signing is enabled for image transformations.`,choices:[`off`,`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 $={command:`edit`,describe:`C2PA (Coalition for Content Provenance and Authenticity) signing adds cryptographic metadata to images processed through Cloudflare Image Transformations, enabling verification of image authenticity and provenance.`,builder:ft,handler:async s=>a({command:`zones transformations-c2pa edit`,classification:{safeFlags:[`value`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones transformations-c2pa edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/transformations_c2pa`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:l(s.value,`value`,`text`)}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.transformationsC2Pa.edit({...e,zone_id:u})),{successLabel:`Updated`});return}s.value===void 0&&(s.value=await d(`value`,`Whether C2PA signing is enabled for image transformations.`,[`off`,`on`]));let f=c({value:l(s.value,`value`,`text`)});n(await i(`Updating`,async()=>a.zones.transformationsC2Pa.edit({...f,zone_id:u})),{successLabel:`Updated`})})};function pt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const mt={command:`get`,describe:`C2PA (Coalition for Content Provenance and Authenticity) signing adds cryptographic metadata to images processed through Cloudflare Image Transformations, enabling verification of image authenticity and provenance.`,builder:pt,handler:async o=>a({command:`zones transformations-c2pa get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones transformations-c2pa get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/transformations_c2pa`,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.zones.transformationsC2Pa.get({zone_id:s})),{successLabel:`Loaded`})})},ht={command:`transformations-c2pa`,describe:`Operations for transformations-c2pa`,builder:e=>e.command($).command(mt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function gt(e){return e.option(`value-allowed-origins`,{type:`string`,description:`Comma-separated list of allowed origin domains for image and video transformations.
|
|
38
|
+
Use "*" to allow all origins (default).
|
|
39
|
+
`}).option(`value-c2pa`,{type:`string`,description:`Whether C2PA signing is enabled for image transformations.`,choices:[`off`,`on`]}).option(`value-transformations`,{type:`string`,description:`Controls Image Transformations behavior:
|
|
40
|
+
- "off": Feature disabled.
|
|
41
|
+
- "on": Transformations enabled for same-zone images only.
|
|
42
|
+
- "open": Transformations enabled for images from any origin.
|
|
43
|
+
- "latest": Transformations enabled using the latest version.
|
|
44
|
+
`,choices:[`off`,`on`,`open`,`latest`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const _t={command:`edit`,describe:`Updates one or more fields of the combined Transformations configuration for a zone. Omitted fields are left unchanged. The response always returns the full current state of all three sub-settings.`,builder:gt,handler:async s=>a({command:`zones transformations-config edit`,classification:{safeFlags:[`value-c2pa`,`value-transformations`,`dry-run`]}},s,async()=>{if(s.dryRun){r({command:`cf zones transformations-config edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/settings/transformations_config`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?c({value:{allowed_origins:l(s[`value-allowed-origins`],`value-allowed-origins`,`text`),c2pa:l(s[`value-c2pa`],`value-c2pa`,`text`),transformations:l(s[`value-transformations`],`value-transformations`,`text`)}}):o(s.body)});return}let a=await t(s),u=await e({zone:s.zone},a,{quiet:s.quiet});if(s.zoneId=u,s.body){let e=o(s.body);n(await i(`Updating`,async()=>a.zones.transformationsConfig.edit({...e,zone_id:u})),{successLabel:`Updated`});return}let d=c({value:{allowed_origins:l(s[`value-allowed-origins`],`value-allowed-origins`,`text`),c2pa:l(s[`value-c2pa`],`value-c2pa`,`text`),transformations:l(s[`value-transformations`],`value-transformations`,`text`)}});n(await i(`Updating`,async()=>a.zones.transformationsConfig.edit({...d,zone_id:u})),{successLabel:`Updated`})})};function vt(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const yt={command:`get`,describe:`Returns the combined Transformations configuration for a zone, including the transformations toggle, allowed origins, and C2PA signing settings in a single response.`,builder:vt,handler:async o=>a({command:`zones transformations-config get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf zones transformations-config get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/settings/transformations_config`,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.zones.transformationsConfig.get({zone_id:s})),{successLabel:`Loaded`})})},bt={command:`transformations-config`,describe:`Operations for transformations-config`,builder:e=>e.command(_t).command(yt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},xt={command:`zones`,describe:`Zones are domains on Cloudflare — list, create, and configure domain settings`,builder:e=>e.command(O).command(A).command(M).command(z).command(le).command(g).command(x).command(E).command(L).command(W).command(ne).command(se).command(me).command(ye).command(Oe).command(Ne).command(Ie).command(Ve).command(Ke).command(Ze).command(ot).command(dt).command(ht).command(bt).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{xt as default};
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,r as c,t as l}from"./body-parser-BGVbwPeM.mjs";import{n as u}from"./input-validation-1esLElok.mjs";import{a as d,i as f}from"./prompt-CyATfGUu.mjs";import{t as p}from"./cli-types-C3nVfpSG.mjs";function m(e){return e.positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`eligibility <report-id>`,describe:`Returns whether the report is currently appealable, along with the signals behind that decision: whether it already has an open appeal, how many appeals have been submitted against it, and whether it has at least one mitigation that an appeal could reverse.`,builder:m,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports appeals eligibility`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/appeals/eligibility`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.appeals.eligibility({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}},g={command:`appeals`,describe:`Operations for appeals`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.positional(`report-param`,{type:`string`,description:`The report type to be submitted. Example: abuse_general`,demandOption:!0}).option(`act`,{type:`string`,description:`The act field`,choices:[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`]}).option(`comments`,{type:`string`,description:`Any additional comments about the infringement not exceeding 2000 characters`}).option(`company`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email`,{type:`string`,description:`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`email2`,{type:`string`,description:"Should match the value provided in `email`"}).option(`name`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`reported-country`,{type:`string`,description:`Text containing 2 characters`}).option(`reported-user-agent`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`tele`,{type:`string`,description:`Text not exceeding 20 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`title`,{type:`string`,description:`Text not exceeding 255 characters`}).option(`urls`,{type:`string`,description:`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`address1`,{type:`string`,description:`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agent-name`,{type:`string`,description:`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`agree`,{type:`number`,description:"Can be `0` for false or `1` for true. Must be value: 1 for DMCA reports"}).option(`city`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`country`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
3
|
-
`}).option(`host-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
4
|
-
`,choices:[`send`,`send-anon`]}).option(`original-work`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).
|
|
5
|
-
`}).option(`owner-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
6
|
-
`,choices:[`send`,`send-anon`,`none`]}).option(`signature`,{type:`string`,description:`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`}).option(`state`,{type:`string`,description:`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`}).option(`justification`,{type:`string`,description:`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters.
|
|
7
|
-
`}).option(`trademark-number`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-office`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`trademark-symbol`,{type:`string`,description:`Text not exceeding 1000 characters`}).option(`destination-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of destination IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ports-protocols`,{type:`string`,description:`A comma separated list of ports and protocols e.g. 80/TCP, 22/UDP. The total size of the field should not exceed 2000 characters. Each individual port/protocol should not exceed 100 characters. The list should not have more than 30 unique ports and protocols.`}).option(`source-ips`,{type:`string`,description:`A list of IP addresses separated by ‘\\n’ (new line character). The list of source IPs should not exceed 30 IP addresses. Each one of the IP addresses ought to be unique.`}).option(`ncmec-notification`,{type:`string`,description:`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous.
|
|
8
|
-
`,choices:[`send`,`send-anon`]}).option(`reg-who-request-reg-who-authorization-statement`,{type:`string`,description:`Optional authorization statement or power of attorney per RDP 10.2.1.3.`}).option(`reg-who-request-reg-who-good-faith-affirmation`,{type:`boolean`,description:`Affirmation that the request is made in good faith per RDP 10.2.4. Must be true.`}).option(`reg-who-request-reg-who-lawful-processing-agreement`,{type:`boolean`,description:`Agreement to process data lawfully per RDP 10.2.5. Must be true.`}).option(`reg-who-request-reg-who-legal-basis`,{type:`string`,description:`Legal rights and rationale for the request per RDP 10.2.3. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-request-type`,{type:`string`,description:`The type of WHOIS data request per RDP procedure.`,choices:[`disclosure`,`invalid_whois`]}).option(`reg-who-request-reg-who-requested-data-elements`,{type:`string`,array:!0,description:`The specific WHOIS data elements being requested per RDP 10.2.2. Required for all WHOIS requests.`}).option(`reg-who-request-reg-who-requestor-type`,{type:`string`,description:`The nature of the requestor per RDP 10.2.1.2.`,choices:[`government`,`corporation`,`individual`]}).option(`ncsei-subject-representation`,{type:`boolean`,description:`If the submitter is the target of NCSEI in the URLs of the abuse report.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`address1`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`address1`,[`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agent-name`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agent-name`,[`address1`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`agree`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`agree`,[`address1`,`agent-name`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`city`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`city`,[`address1`,`agent-name`,`agree`,`country`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`country`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`original-work`]).implies(`country`,[`address1`,`agent-name`,`agree`,`city`,`host-notification`,`original-work`,`signature`,`state`]).conflicts(`host-notification`,[`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).conflicts(`original-work`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`,`country`]).implies(`original-work`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`signature`,`state`]).conflicts(`signature`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`signature`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`state`]).conflicts(`state`,[`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`state`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`]).conflicts(`justification`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`trademark-number`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-number`,[`host-notification`,`justification`,`trademark-office`,`trademark-symbol`]).conflicts(`trademark-office`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-office`,[`host-notification`,`justification`,`trademark-number`,`trademark-symbol`]).conflicts(`trademark-symbol`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`trademark-symbol`,[`host-notification`,`justification`,`trademark-number`,`trademark-office`]).conflicts(`destination-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ports-protocols`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`source-ips`,[`address1`,`agent-name`,`agree`,`city`,`country`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).conflicts(`ncmec-notification`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`,`ncsei-subject-representation`]).implies(`ncmec-notification`,[`host-notification`,`justification`]).conflicts(`reg-who-request-reg-who-authorization-statement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-good-faith-affirmation`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-lawful-processing-agreement`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-legal-basis`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-request-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requested-data-elements`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`reg-who-request-reg-who-requestor-type`,[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]).conflicts(`ncsei-subject-representation`,[`address1`,`agent-name`,`agree`,`city`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`]).implies(`ncsei-subject-representation`,[`host-notification`]).check(e=>{if([`reg-who-request-reg-who-authorization-statement`,`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`,`reg-who-request-reg-who-requestor-type`].some(t=>e[t]!==void 0)){let t={"reg-who-request-reg-who-good-faith-affirmation":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-lawful-processing-agreement":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-legal-basis":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-request-type":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`],"reg-who-request-reg-who-requested-data-elements":[`address1`,`agent-name`,`agree`,`city`,`country`,`host-notification`,`original-work`,`signature`,`state`,`justification`,`trademark-number`,`trademark-office`,`trademark-symbol`,`destination-ips`,`ports-protocols`,`source-ips`,`ncmec-notification`,`ncsei-subject-representation`]},n=[`reg-who-request-reg-who-good-faith-affirmation`,`reg-who-request-reg-who-lawful-processing-agreement`,`reg-who-request-reg-who-legal-basis`,`reg-who-request-reg-who-request-type`,`reg-who-request-reg-who-requested-data-elements`].filter(n=>e[n]===void 0&&!(t[n]??[]).some(t=>e[t]!==void 0));if(n.length>0)throw Error(`${n.map(e=>`--`+e).join(`, `)} ${n.length===1?`is`:`are`} required when any --reg_who_request-* flag is set`)}return!0})}const v={command:`create <report-param>`,describe:"Submit an abuse report of a particular type. Requires the abuse-reports entitlement on the account (Enterprise accounts have it by default; other accounts must request access) and an API token with the `Account > Abuse Reports > Edit` permission. If the account is not entitled, the request is rejected with an HTTP `401` response (see below).",builder:_,handler:async c=>{if(c.dryRun){a({command:`cf abuse-reports create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${c[`report-param`]==null?`<report-param>`:encodeURIComponent(String(c[`report-param`]))}`,pathParams:{"report-param":String(c[`report-param`]??``)},bodyKind:`json`,body:c.body===void 0?l({act:u(c.act,`act`,`text`),comments:u(c.comments,`comments`,`text`),company:u(c.company,`company`,`text`),email:u(c.email,`email`,`text`),email2:u(c.email2,`email2`,`text`),name:u(c.name,`name`,`text`),reported_country:u(c[`reported-country`],`reported-country`,`text`),reported_user_agent:u(c[`reported-user-agent`],`reported-user-agent`,`text`),tele:u(c.tele,`tele`,`text`),title:u(c.title,`title`,`text`),urls:u(c.urls,`urls`,`text`),address1:u(c.address1,`address1`,`text`),agent_name:u(c[`agent-name`],`agent-name`,`text`),agree:c.agree,city:u(c.city,`city`,`text`),country:u(c.country,`country`,`text`),host_notification:u(c[`host-notification`],`host-notification`,`text`),original_work:u(c[`original-work`],`original-work`,`text`),owner_notification:u(c[`owner-notification`],`owner-notification`,`text`),signature:u(c.signature,`signature`,`text`),state:u(c.state,`state`,`text`),justification:u(c.justification,`justification`,`text`),trademark_number:u(c[`trademark-number`],`trademark-number`,`text`),trademark_office:u(c[`trademark-office`],`trademark-office`,`text`),trademark_symbol:u(c[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:u(c[`destination-ips`],`destination-ips`,`text`),ports_protocols:u(c[`ports-protocols`],`ports-protocols`,`text`),source_ips:u(c[`source-ips`],`source-ips`,`text`),ncmec_notification:u(c[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:u(c[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:c[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:c[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:u(c[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:u(c[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:c[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:u(c[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:c[`ncsei-subject-representation`]}):s(c.body)});return}let p=await r(c),m=c.local?e:await t();if(c.accountId=m,c.body){let e=s(c.body);i(await o(`Creating`,async()=>p.abuseReports.create({body:e,account_id:m,report_param:c[`report-param`]})),{successLabel:`Created`});return}if(c.act===void 0&&(c.act=await f(`act`,`The act field`,[`abuse_dmca`,`abuse_trademark`,`abuse_general`,`abuse_phishing`,`abuse_children`,`abuse_threat`,`abuse_registrar_whois`,`abuse_ncsei`])),c.email===void 0&&(c.email=await d(`email`,`A valid email of the abuse reporter. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),c.email2===void 0&&(c.email2=await d(`email2`,"Should match the value provided in `email`")),c.name===void 0&&(c.name=await d(`name`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),c.urls===void 0&&(c.urls=await d(`urls`,`A list of valid URLs separated by ‘\\n’ (new line character). The list of the URLs should not exceed 250 URLs. All URLs should have the same hostname. Each URL should be unique. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`)),c[`owner-notification`]===void 0&&(c[`owner-notification`]=await f(`owner-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,[`send`,`send-anon`,`none`])),c.act===`abuse_dmca`&&c.address1===void 0&&(c.address1=await d(`address1`,`Text not exceeding 100 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --address1`})),c.act===`abuse_dmca`&&c[`agent-name`]===void 0&&(c[`agent-name`]=await d(`agent-name`,`The name of the copyright holder. Text not exceeding 60 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --agent-name`})),c.act===`abuse_dmca`&&c.agree===void 0)throw Error(`--agree is required (or pass --body with this field set).`);if(c.act===`abuse_dmca`&&c.city===void 0&&(c.city=await d(`city`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --city`})),c.act===`abuse_dmca`&&c.country===void 0&&(c.country=await d(`country`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --country`})),c.act===`abuse_dmca`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_dmca`&&c[`original-work`]===void 0&&(c[`original-work`]=await d(`original-work`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/). `,{question:`Enter value for --original-work`})),c.act===`abuse_dmca`&&c.signature===void 0&&(c.signature=await d(`signature`,`Required for DMCA reports, should be same as Name. An affirmation that all information in the report is true and accurate while agreeing to the policies of Cloudflare's abuse reports`,{question:`Enter value for --signature`})),c.act===`abuse_dmca`&&c.state===void 0&&(c.state=await d(`state`,`Text not exceeding 255 characters. This field may be released by Cloudflare to third parties such as the Lumen Database (https://lumendatabase.org/).`,{question:`Enter value for --state`})),c.act===`abuse_trademark`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_trademark`&&c.justification===void 0&&(c.justification=await d(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),c.act===`abuse_trademark`&&c[`trademark-number`]===void 0&&(c[`trademark-number`]=await d(`trademark-number`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-number`})),c.act===`abuse_trademark`&&c[`trademark-office`]===void 0&&(c[`trademark-office`]=await d(`trademark-office`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-office`})),c.act===`abuse_trademark`&&c[`trademark-symbol`]===void 0&&(c[`trademark-symbol`]=await d(`trademark-symbol`,`Text not exceeding 1000 characters`,{question:`Enter value for --trademark-symbol`})),c.act===`abuse_general`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_general`&&c.justification===void 0&&(c.justification=await d(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),c.act===`abuse_phishing`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_phishing`&&c.justification===void 0&&(c.justification=await d(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),c.act===`abuse_children`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_children`&&c.justification===void 0&&(c.justification=await d(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),c.act===`abuse_children`&&c[`ncmec-notification`]===void 0&&(c[`ncmec-notification`]=await d(`ncmec-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --ncmec-notification`})),c.act===`abuse_threat`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_threat`&&c.justification===void 0&&(c.justification=await d(`justification`,`A detailed description of the infringement, including any necessary access details and the exact steps needed to view the content, not exceeding 5000 characters. `,{question:`Enter value for --justification`})),c.act===`abuse_ncsei`&&c[`host-notification`]===void 0&&(c[`host-notification`]=await d(`host-notification`,`Notification type based on the abuse type. NOTE: Copyright (DMCA) and Trademark reports cannot be anonymous. `,{question:`Enter value for --host-notification`})),c.act===`abuse_ncsei`&&c[`ncsei-subject-representation`]===void 0)throw Error(`--ncsei-subject-representation is required (or pass --body with this field set).`);let h=l({act:u(c.act,`act`,`text`),comments:u(c.comments,`comments`,`text`),company:u(c.company,`company`,`text`),email:u(c.email,`email`,`text`),email2:u(c.email2,`email2`,`text`),name:u(c.name,`name`,`text`),reported_country:u(c[`reported-country`],`reported-country`,`text`),reported_user_agent:u(c[`reported-user-agent`],`reported-user-agent`,`text`),tele:u(c.tele,`tele`,`text`),title:u(c.title,`title`,`text`),urls:u(c.urls,`urls`,`text`),address1:u(c.address1,`address1`,`text`),agent_name:u(c[`agent-name`],`agent-name`,`text`),agree:c.agree,city:u(c.city,`city`,`text`),country:u(c.country,`country`,`text`),host_notification:u(c[`host-notification`],`host-notification`,`text`),original_work:u(c[`original-work`],`original-work`,`text`),owner_notification:u(c[`owner-notification`],`owner-notification`,`text`),signature:u(c.signature,`signature`,`text`),state:u(c.state,`state`,`text`),justification:u(c.justification,`justification`,`text`),trademark_number:u(c[`trademark-number`],`trademark-number`,`text`),trademark_office:u(c[`trademark-office`],`trademark-office`,`text`),trademark_symbol:u(c[`trademark-symbol`],`trademark-symbol`,`text`),destination_ips:u(c[`destination-ips`],`destination-ips`,`text`),ports_protocols:u(c[`ports-protocols`],`ports-protocols`,`text`),source_ips:u(c[`source-ips`],`source-ips`,`text`),ncmec_notification:u(c[`ncmec-notification`],`ncmec-notification`,`text`),reg_who_request:{reg_who_authorization_statement:u(c[`reg-who-request-reg-who-authorization-statement`],`reg-who-request-reg-who-authorization-statement`,`text`),reg_who_good_faith_affirmation:c[`reg-who-request-reg-who-good-faith-affirmation`],reg_who_lawful_processing_agreement:c[`reg-who-request-reg-who-lawful-processing-agreement`],reg_who_legal_basis:u(c[`reg-who-request-reg-who-legal-basis`],`reg-who-request-reg-who-legal-basis`,`text`),reg_who_request_type:u(c[`reg-who-request-reg-who-request-type`],`reg-who-request-reg-who-request-type`,`text`),reg_who_requested_data_elements:c[`reg-who-request-reg-who-requested-data-elements`],reg_who_requestor_type:u(c[`reg-who-request-reg-who-requestor-type`],`reg-who-request-reg-who-requestor-type`,`text`)},ncsei_subject_representation:c[`ncsei-subject-representation`]});i(await o(`Creating`,async()=>p.abuseReports.create({body:h,account_id:m,report_param:c[`report-param`]})),{successLabel:`Created`})}};function y(e){return e.option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1)`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100)`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`List emails sent to the customer for an abuse report. Returns all successful customer emails sent for the specified abuse report. Does not include emails sent to hosts or submitters.`,builder:y,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function x(e){return e.positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page number to retrieve (default 1).`}).option(`per-page`,{type:`number`,description:`Number of emails per page (default 20, max 100).`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`listSubmitted <report-id>`,describe:`List successful emails sent to the submitter of a report submitted by the account. Does not include emails sent to customers or hosts.`,builder:x,handler:async s=>{let c={page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf abuse-reports emails listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/emails`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.emails.listSubmitted({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}},C={command:`emails`,describe:`Emails operations`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function w(e){return e.positional(`report-param`,{type:`string`,description:`Identifier of the abuse report`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`get <report-param>`,describe:`Retrieve the details of an abuse report.`,builder:w,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-param`]==null?`<report-param>`:encodeURIComponent(String(s[`report-param`]))}`,pathParams:{"report-param":String(s[`report-param`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.get({account_id:l,report_param:s[`report-param`]})),{successLabel:`Loaded`})}};function E(e){return e.positional(`report-id`,{type:`string`,description:`Public report code.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`getSubmitted <report-id>`,describe:`Retrieve a report submitted by the account.`,builder:E,handler:async s=>{if(s.dryRun){a({command:`cf abuse-reports getSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}`,pathParams:{"report-id":String(s[`report-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.abuseReports.getSubmitted({account_id:l,report_id:s[`report-id`]})),{successLabel:`Loaded`})}};function O(e){return e.option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order (id, cdate, domain, type, status)`}).option(`domain`,{type:`string`,description:`Filter by domain name related to the abuse report`}).option(`created-before`,{type:`string`,description:`Returns reports created before the specified date`}).option(`created-after`,{type:`string`,description:`Returns reports created after the specified date`}).option(`status`,{type:`string`,description:`Filter by the status of the report.`,choices:[`accepted`,`in_review`]}).option(`type`,{type:`string`,description:`Filter by the type of the report.`,choices:[`PHISH`,`GEN`,`THREAT`,`DMCA`,`EMER`,`TM`,`REG_WHO`,`NCSEI`,`NETWORK`]}).option(`mitigation-status`,{type:`string`,description:`Filter reports that have any mitigations in the given status.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:`List the abuse reports for a given account`,builder:p(O),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type,mitigation_status:s[`mitigation-status`]};if(s.dryRun){a({command:`cf abuse-reports list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.list({account_id:u,...c})),{successLabel:`Loaded`})}};function A(e){return e.option(`page`,{type:`number`,description:`Page of submitted reports to return.`}).option(`per-page`,{type:`number`,description:`Number of submitted reports per page.`}).option(`sort`,{type:`string`,description:`A property and direction to sort by (id, cdate, domain, type, status).`}).option(`id`,{type:`string`,description:`Filter by report code.`}).option(`domain`,{type:`string`,description:`Filter by reported domain. This parameter can be specified multiple times.`}).option(`created-before`,{type:`string`,description:`Return reports submitted before this time.`}).option(`created-after`,{type:`string`,description:`Return reports submitted after this time.`}).option(`status`,{type:`string`,description:`Filter by submitter-facing status. This parameter can be specified multiple times.`}).option(`type`,{type:`string`,description:`Filter by report type. This parameter can be specified multiple times.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const j={command:`listSubmitted`,describe:`List abuse reports submitted by the account.`,builder:p(A),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,id:s.id,domain:s.domain,created_before:s[`created-before`],created_after:s[`created-after`],status:s.status,type:s.type};if(s.dryRun){a({command:`cf abuse-reports listSubmitted`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/submitted`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.listSubmitted({account_id:u,...c})),{successLabel:`Loaded`})}};function M(e){return e.option(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`page`,{type:`number`,description:`Where in pagination to start listing abuse reports`}).option(`per-page`,{type:`number`,description:`How many abuse reports per page to list`}).option(`sort`,{type:`string`,description:`A property to sort by, followed by the order`,choices:[`type,asc`,`type,desc`,`effective_date,asc`,`effective_date,desc`,`status,asc`,`status,desc`,`entity_type,asc`,`entity_type,desc`]}).option(`type`,{type:`string`,description:`Filter by the type of mitigation. This filter parameter can be specified multiple times to include multiple types of mitigations in the result set.`}).option(`effective-before`,{type:`string`,description:`Returns mitigations that were dispatched before the given date`}).option(`effective-after`,{type:`string`,description:`Returns mitigation that were dispatched after the given date`}).option(`status`,{type:`string`,description:`Filter by the status of the mitigation.`,choices:[`pending`,`active`,`in_review`,`cancelled`,`removed`]}).option(`entity-type`,{type:`string`,description:`Filter by the type of entity the mitigation impacts.`,choices:[`url_pattern`,`account`,`zone`,`custom_expression`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const N={command:`list`,describe:`List mitigations done to remediate the abuse report.`,builder:p(M),handler:async s=>{let c={page:s.page,per_page:s[`per-page`],sort:s.sort,type:s.type,effective_before:s[`effective-before`],effective_after:s[`effective-after`],status:s.status,entity_type:s[`entity-type`]};if(s.dryRun){a({command:`cf abuse-reports mitigations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${s[`report-id`]==null?`<report-id>`:encodeURIComponent(String(s[`report-id`]))}/mitigations`,pathParams:{"report-id":String(s[`report-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.abuseReports.mitigations.list({account_id:u,report_id:s[`report-id`],...c})),{successLabel:`Loaded`})}};function P(e){return e.positional(`report-id`,{type:`string`,description:`Abuse Report ID`,demandOption:!0}).option(`appeals`,{type:`string`,description:`List of mitigations to appeal. Provide as a JSON array of objects or @path/to/file.json.`}).option(`data-city`,{type:`string`,description:`The data.city field`}).option(`data-company`,{type:`string`,description:`The data.company field`}).option(`data-counter-notice-response`,{type:`string`,description:`The data.counter_notice_response field`}).option(`data-country`,{type:`string`,description:`The data.country field`}).option(`data-email`,{type:`string`,description:`The data.email field`}).option(`data-full-name`,{type:`string`,description:`The data.full_name field`}).option(`data-jurisdiction-consent`,{type:`boolean`,description:`The data.jurisdiction_consent field`}).option(`data-perjury-attestation`,{type:`boolean`,description:`The data.perjury_attestation field`}).option(`data-phone-number`,{type:`string`,description:`The data.phone_number field`}).option(`data-signature`,{type:`string`,description:`The data.signature field`}).option(`data-state`,{type:`string`,description:`The data.state field`}).option(`data-street-address`,{type:`string`,description:`The data.street_address field`}).option(`data-urls`,{type:`string`,array:!0,description:`The data.urls field`}).option(`data-zip-code`,{type:`string`,description:`The data.zip_code field`}).option(`type`,{type:`string`,description:`The type of appeal being submitted.`,choices:[`counter_notice`,`content_removed`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Submit an appeal for a report. Provide either a list of mitigations to appeal, or an appeal type with its supporting details, but not both. When type is "counter_notice", the counter-notice details are required.`}).check(e=>{if([`data-city`,`data-company`,`data-counter-notice-response`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].some(t=>e[t]!==void 0)){let t=[`data-city`,`data-country`,`data-email`,`data-full-name`,`data-jurisdiction-consent`,`data-perjury-attestation`,`data-phone-number`,`data-signature`,`data-state`,`data-street-address`,`data-urls`,`data-zip-code`].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 --data-* flag is set`)}return!0})}const F={command:`review <report-id>`,describe:`Request a review for mitigations on an account.`,builder:P,handler:async d=>{if(d.dryRun){a({command:`cf abuse-reports mitigations review`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/abuse-reports/${d[`report-id`]==null?`<report-id>`:encodeURIComponent(String(d[`report-id`]))}/mitigations/appeal`,pathParams:{"report-id":String(d[`report-id`]??``)},bodyKind:`json`,body:d.body===void 0?l({appeals:c(d.appeals,`appeals`),data:{city:u(d[`data-city`],`data-city`,`text`),company:u(d[`data-company`],`data-company`,`text`),counter_notice_response:u(d[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:u(d[`data-country`],`data-country`,`text`),email:u(d[`data-email`],`data-email`,`text`),full_name:u(d[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:d[`data-jurisdiction-consent`],perjury_attestation:d[`data-perjury-attestation`],phone_number:u(d[`data-phone-number`],`data-phone-number`,`text`),signature:u(d[`data-signature`],`data-signature`,`text`),state:u(d[`data-state`],`data-state`,`text`),street_address:u(d[`data-street-address`],`data-street-address`,`text`),urls:d[`data-urls`],zip_code:u(d[`data-zip-code`],`data-zip-code`,`text`)},type:u(d.type,`type`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.abuseReports.mitigations.review({body:e,account_id:p,report_id:d[`report-id`]})),{successLabel:`Created`});return}let m=l({appeals:c(d.appeals,`appeals`),data:{city:u(d[`data-city`],`data-city`,`text`),company:u(d[`data-company`],`data-company`,`text`),counter_notice_response:u(d[`data-counter-notice-response`],`data-counter-notice-response`,`text`),country:u(d[`data-country`],`data-country`,`text`),email:u(d[`data-email`],`data-email`,`text`),full_name:u(d[`data-full-name`],`data-full-name`,`text`),jurisdiction_consent:d[`data-jurisdiction-consent`],perjury_attestation:d[`data-perjury-attestation`],phone_number:u(d[`data-phone-number`],`data-phone-number`,`text`),signature:u(d[`data-signature`],`data-signature`,`text`),state:u(d[`data-state`],`data-state`,`text`),street_address:u(d[`data-street-address`],`data-street-address`,`text`),urls:d[`data-urls`],zip_code:u(d[`data-zip-code`],`data-zip-code`,`text`)},type:u(d.type,`type`,`text`)});i(await o(`Creating`,async()=>f.abuseReports.mitigations.review({body:m,account_id:p,report_id:d[`report-id`]})),{successLabel:`Created`})}},I={command:`mitigations`,describe:`Mitigation actions taken in response to abuse reports`,builder:e=>e.command(N).command(F).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},L={command:`abuse-reports`,describe:`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,builder:e=>e.command(v).command(T).command(D).command(k).command(j).command(g).command(C).command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{L as default};
|
package/dist/access-Dl2IU1ID.mjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u,n as d}from"./prompt-CyATfGUu.mjs";import{t as f}from"./cli-types-C3nVfpSG.mjs";function p(e){return e.option(`target-ids`,{type:`string`,array:!0,description:`List of target IDs to bulk delete`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`delete`,describe:`Removes one or more targets.`,builder:p,handler:async l=>{if(l.dryRun){a({command:`cf access targets bulk delete`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch_delete`,pathParams:{},bodyKind:`json`,body:l.body===void 0?c({target_ids:l[`target-ids`]}):s(l.body)});return}let u=await r(l),d=l.local?e:await t();if(l.accountId=d,l.body){let e=s(l.body);i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...e,account_id:d})),{successLabel:`Created`});return}if(l[`target-ids`]===void 0)throw Error(`--target-ids is required (or pass --body with this field set).`);let f=c({target_ids:l[`target-ids`]});i(await o(`Creating`,async()=>u.access.targets.bulk.delete({...f,account_id:d})),{successLabel:`Created`})}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`update`,describe:`Adds one or more targets.`,builder:h,handler:async c=>{if(c.dryRun){a({command:`cf access targets bulk update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/batch`,pathParams:{},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.access.targets.bulk.update({body:e,account_id:u})),{successLabel:`Updated`});return}if(c.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},_={command:`bulk`,describe:`Operations for targets.bulk`,builder:e=>e.command(m).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function v(e){return e.option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
3
|
-
length of 255 characters, supports the use of special characters dash
|
|
4
|
-
and period, does not support spaces, and must start and end with an
|
|
5
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).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 y={command:`create`,describe:`Creates a new infrastructure access target in the account.`,builder:v,handler:async d=>{if(d.dryRun){a({command:`cf access targets create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.access.targets.create({...e,account_id:p})),{successLabel:`Created`});return}d.hostname===void 0&&(d.hostname=await u(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Creating`,async()=>f.access.targets.create({...m,account_id:p})),{successLabel:`Created`})}};function b(e){return e.positional(`target-id`,{type:`string`,description:`Target 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 x={command:`delete <target-id>`,describe:`Removes a single infrastructure access target by its ID.`,builder:b,handler:async s=>{if(s.dryRun){a({command:`cf access targets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${s[`target-id`]==null?`<target-id>`:encodeURIComponent(String(s[`target-id`]))}`,pathParams:{"target-id":String(s[`target-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await d({force:!!s.force})){process.stderr.write(`Aborted.
|
|
6
|
-
`);return}i(await o(`Deleting`,async()=>c.access.targets.delete({account_id:l,target_id:s[`target-id`]})),{successLabel:`Deleted`})}};function S(e){return e.positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <target-id>`,describe:`Fetches a single infrastructure access target by its ID.`,builder:S,handler:async s=>{if(s.dryRun){a({command:`cf access targets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${s[`target-id`]==null?`<target-id>`:encodeURIComponent(String(s[`target-id`]))}`,pathParams:{"target-id":String(s[`target-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.access.targets.get({account_id:l,target_id:s[`target-id`]})),{successLabel:`Loaded`})}};function w(e){return e.option(`hostname`,{type:`string`,description:`Hostname of a target`}).option(`hostname-contains`,{type:`string`,description:`Partial match to the hostname of a target`}).option(`virtual-network-id`,{type:`string`,description:`Private virtual network identifier of the target`}).option(`ip-v4`,{type:`string`,description:`IPv4 address of the target`}).option(`ip-v6`,{type:`string`,description:`IPv6 address of the target`}).option(`created-before`,{type:`string`,description:`Date and time at which the target was created before (inclusive)`}).option(`created-after`,{type:`string`,description:`Date and time at which the target was created after (inclusive)`}).option(`modified-before`,{type:`string`,description:`Date and time at which the target was modified before (inclusive)`}).option(`modified-after`,{type:`string`,description:`Date and time at which the target was modified after (inclusive)`}).option(`ips`,{type:`string`,description:"Filters for targets that have any of the following IP addresses. Specify\n`ips` multiple times in query parameter to build list of candidates."}).option(`target-ids`,{type:`string`,description:`Filters for targets that have any of the following UUIDs. Specify
|
|
7
|
-
\`target_ids\` multiple times in query parameter to build list of
|
|
8
|
-
candidates.`}).option(`ip-like`,{type:`string`,description:"Filters for targets whose IP addresses look like the specified string.\nSupports `*` as a wildcard character"}).option(`ipv4-start`,{type:`string`,description:"Defines an IPv4 filter range's starting value (inclusive). Requires\n`ipv4_end` to be specified as well."}).option(`ipv4-end`,{type:`string`,description:"Defines an IPv4 filter range's ending value (inclusive). Requires\n`ipv4_start` to be specified as well."}).option(`ipv6-start`,{type:`string`,description:"Defines an IPv6 filter range's starting value (inclusive). Requires\n`ipv6_end` to be specified as well."}).option(`ipv6-end`,{type:`string`,description:"Defines an IPv6 filter range's ending value (inclusive). Requires\n`ipv6_start` to be specified as well."}).option(`page`,{type:`number`,description:`Current page in the response`}).option(`per-page`,{type:`number`,description:`Max amount of entries returned per page`}).option(`order`,{type:`string`,description:`The field to sort by.`,choices:[`hostname`,`created_at`]}).option(`direction`,{type:`string`,description:`The sorting direction.`,choices:[`asc`,`desc`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const T={command:`list`,describe:`Lists and sorts an account's targets. Filters are optional and are ANDed together.`,builder:f(w),handler:async s=>{let c={hostname:s.hostname,hostname_contains:s[`hostname-contains`],virtual_network_id:s[`virtual-network-id`],ip_v4:s[`ip-v4`],ip_v6:s[`ip-v6`],created_before:s[`created-before`],created_after:s[`created-after`],modified_before:s[`modified-before`],modified_after:s[`modified-after`],ips:s.ips,target_ids:s[`target-ids`],ip_like:s[`ip-like`],ipv4_start:s[`ipv4-start`],ipv4_end:s[`ipv4-end`],ipv6_start:s[`ipv6-start`],ipv6_end:s[`ipv6-end`],page:s.page,per_page:s[`per-page`],order:s.order,direction:s.direction};if(s.dryRun){a({command:`cf access targets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.access.targets.list({account_id:u,...c})),{successLabel:`Loaded`})}};function E(e){return e.positional(`target-id`,{type:`string`,description:`Target identifier`,demandOption:!0}).option(`hostname`,{type:`string`,description:`A non-unique field that refers to a target. Case insensitive, maximum
|
|
9
|
-
length of 255 characters, supports the use of special characters dash
|
|
10
|
-
and period, does not support spaces, and must start and end with an
|
|
11
|
-
alphanumeric character.`}).option(`ip-ipv4-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv4-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`ip-ipv6-ip-addr`,{type:`string`,description:`IP address of the target`}).option(`ip-ipv6-virtual-network-id`,{type:`string`,description:`(optional) Private virtual network identifier for the target. If omitted, the default virtual network ID will be used.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const D={command:`update <target-id>`,describe:`Updates an existing infrastructure access target by its ID.`,builder:E,handler:async d=>{if(d.dryRun){a({command:`cf access targets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/infrastructure/targets/${d[`target-id`]==null?`<target-id>`:encodeURIComponent(String(d[`target-id`]))}`,pathParams:{"target-id":String(d[`target-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.access.targets.update({...e,account_id:p,target_id:d[`target-id`]})),{successLabel:`Updated`});return}d.hostname===void 0&&(d.hostname=await u(`hostname`,`A non-unique field that refers to a target. Case insensitive, maximum length of 255 characters, supports the use of special characters dash and period, does not support spaces, and must start and end with an alphanumeric character.`));let m=c({hostname:l(d.hostname,`hostname`,`text`),ip:{ipv4:{ip_addr:l(d[`ip-ipv4-ip-addr`],`ip-ipv4-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv4-virtual-network-id`],`ip-ipv4-virtual-network-id`,`text`)},ipv6:{ip_addr:l(d[`ip-ipv6-ip-addr`],`ip-ipv6-ip-addr`,`text`),virtual_network_id:l(d[`ip-ipv6-virtual-network-id`],`ip-ipv6-virtual-network-id`,`text`)}}});i(await o(`Updating`,async()=>f.access.targets.update({...m,account_id:p,target_id:d[`target-id`]})),{successLabel:`Updated`})}},O={command:`targets`,describe:`Operations for targets`,builder:e=>e.command(y).command(x).command(C).command(T).command(D).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},k={command:`access`,describe:`access`,builder:e=>e.command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{k as default};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n}from"./oauth-DAa7SwkM.mjs";import{r}from"./auth-DY_Y2bXC.mjs";import{t as i}from"./output-BqDR9h74.mjs";import{t as a}from"./dry-run-ILZRVpnp.mjs";import{t as o}from"./progress-jYW64HY7.mjs";import{n as s,t as c}from"./body-parser-BGVbwPeM.mjs";import{n as l}from"./input-validation-1esLElok.mjs";import{a as u}from"./prompt-CyATfGUu.mjs";function d(e){return e.option(`account-ids`,{type:`string`,array:!0,description:`Move these accounts to the destination organization.`}).option(`destination-organization-id`,{type:`string`,description:`Move accounts to this organization 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)`})}const f={command:`move`,describe:`Batch move a collection of accounts to a specific organization. ⚠️ Not implemented.`,builder:d,handler:async e=>{if(e.dryRun){a({command:`cf account batch move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/move`,pathParams:{},bodyKind:`json`,body:e.body===void 0?c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)}):s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`});return}if(e[`account-ids`]===void 0)throw Error(`--account-ids is required (or pass --body with this field set).`);e[`destination-organization-id`]===void 0&&(e[`destination-organization-id`]=await u(`destination-organization-id`,`Move accounts to this organization ID.`));let n=c({account_ids:e[`account-ids`],destination_organization_id:l(e[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>t.account.batch.move({...n})),{successLabel:`Created`})}},p={command:`batch`,describe:`Operations for batch`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.option(`destination-organization-id`,{type:`string`,description:`The destination_organization_id field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The destination organization ID is where the account is to be moved.`})}const h={command:`move`,describe:`Move an account within an organization hierarchy or an account outside an organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`,builder:m,handler:async d=>{if(d.dryRun){a({command:`cf account move`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/move`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.account.move({...e,account_id:p})),{successLabel:`Created`});return}d[`destination-organization-id`]===void 0&&(d[`destination-organization-id`]=await u(`destination-organization-id`,`The destination_organization_id field`));let m=c({destination_organization_id:l(d[`destination-organization-id`],`destination-organization-id`,`text`)});i(await o(`Creating`,async()=>f.account.move({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const _={command:`list`,describe:`Retrieve a list of the organizations that "contain" this account or are managing it. The returned list will be in order from "root" to "leaf", where the "leaf" will be the organization that _immediately_ contains the specified account.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf account organization list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/organizations`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.organization.list({account_id:l})),{successLabel:`Loaded`})}},v={command:`organization`,describe:`Operations for organization`,builder:e=>e.command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves the profile information for a specific Cloudflare account, including organization details, settings, and metadata. This endpoint is commonly used to verify account access and retrieve account-level configuration.`,builder:y,handler:async s=>{if(s.dryRun){a({command:`cf account profile get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.account.profile.get({account_id:l})),{successLabel:`Loaded`})}};function x(e){return e.option(`business-address`,{type:`string`,description:`The business_address field`}).option(`business-email`,{type:`string`,description:`The business_email field`}).option(`business-name`,{type:`string`,description:`The business_name field`}).option(`business-phone`,{type:`string`,description:`The business_phone field`}).option(`external-metadata`,{type:`string`,description:`The external_metadata 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 S={command:`update`,describe:`Updates the profile information for a Cloudflare account. Allows modification of account-level settings and organizational details. Requires Account Settings Write permission.`,builder:x,handler:async d=>{if(d.dryRun){a({command:`cf account profile update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/profile`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.account.profile.update({body:e,account_id:p})),{successLabel:`Updated`});return}d[`business-address`]===void 0&&(d[`business-address`]=await u(`business-address`,`The business_address field`)),d[`business-email`]===void 0&&(d[`business-email`]=await u(`business-email`,`The business_email field`)),d[`business-name`]===void 0&&(d[`business-name`]=await u(`business-name`,`The business_name field`)),d[`business-phone`]===void 0&&(d[`business-phone`]=await u(`business-phone`,`The business_phone field`)),d[`external-metadata`]===void 0&&(d[`external-metadata`]=await u(`external-metadata`,`The external_metadata field`));let m=c({business_address:l(d[`business-address`],`business-address`,`text`),business_email:l(d[`business-email`],`business-email`,`text`),business_name:l(d[`business-name`],`business-name`,`text`),business_phone:l(d[`business-phone`],`business-phone`,`text`),external_metadata:l(d[`external-metadata`],`external-metadata`,`text`)});i(await o(`Updating`,async()=>f.account.profile.update({body:m,account_id:p})),{successLabel:`Updated`})}},C={command:`profile`,describe:`Operations for profile`,builder:e=>e.command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},w={command:`account`,describe:`account`,builder:e=>e.command(h).command(p).command(v).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{w as default};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-DGiIS1uM.mjs";import{f as t,g as n,h as r}from"./oauth-DAa7SwkM.mjs";import{a as i,r as a}from"./auth-DY_Y2bXC.mjs";import{t as o}from"./output-BqDR9h74.mjs";import{t as s}from"./dry-run-ILZRVpnp.mjs";import{t as c}from"./progress-jYW64HY7.mjs";import{i as l,n as u,t as d}from"./body-parser-BGVbwPeM.mjs";import{n as f}from"./input-validation-1esLElok.mjs";import{a as p,i as m,n as h}from"./prompt-CyATfGUu.mjs";import{t as g}from"./cli-types-C3nVfpSG.mjs";function _(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
3
|
-
verify the current resource ETag matches before applying the write. Returns
|
|
4
|
-
412 Precondition Failed if the resource has been modified since the ETag was
|
|
5
|
-
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).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:`Request body schema for deleting tags from account-level resources. Use /zones/{zone_id}/tags for zone-level resources.`})}const v={command:`delete`,describe:`Removes all tags from a specific account or zone-level resource.`,builder:_,handler:async g=>{let _={};if(g[`if-match`]!==void 0&&(_[`If-Match`]=String(g[`if-match`])),g.dryRun){let e=g.zone===void 0?await n():void 0,t=g.zone===void 0?`accounts`:`zones`,r=g.zone??e??`<account-id>`;s({command:`cf account-tags delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:g.body===void 0?d({resource_id:f(g[`resource-id`],`resource-id`,`text`),resource_type:f(g[`resource-type`],`resource-type`,`text`),worker_id:f(g[`worker-id`],`worker-id`,`text`)}):u(g.body)});return}let v=await a(g),y=g.zone===void 0?`accounts`:`zones`,b=y===`zones`?await r({zone:g.zone},v,{quiet:g.quiet}):g.local?e:await t();if(y===`zones`?g.zoneId=b:g.accountId=b,!await h({force:!!g.force})){process.stderr.write(`Aborted.
|
|
6
|
-
`);return}if(g.body){let e=u(g.body);o(await c(`Deleting`,async()=>i(v,`DELETE`,`/${y}/${b}/tags`,{body:e,headers:Object.keys(_).length>0?_:void 0})),{successLabel:`Deleted`});return}g[`resource-id`]===void 0&&(g[`resource-id`]=await p(`resource-id`,`Identifies the unique resource.`)),g[`resource-type`]===void 0&&(g[`resource-type`]=await m(`resource-type`,`Enum for worker_version resource type.`,`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),g[`resource-type`]===`worker_version`&&g[`worker-id`]===void 0&&(g[`worker-id`]=await p(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let x={};g[`resource-id`]!==void 0&&l(x,[`resource_id`],f(g[`resource-id`],`resource-id`,`text`)),g[`resource-type`]!==void 0&&l(x,[`resource_type`],f(g[`resource-type`],`resource-type`,`text`)),g[`worker-id`]!==void 0&&l(x,[`worker_id`],f(g[`worker-id`],`worker-id`,`text`)),o(await c(`Deleting`,async()=>i(v,`DELETE`,`/${y}/${b}/tags`,{body:Object.keys(x).length>0?x:void 0,headers:Object.keys(_).length>0?_:void 0})),{successLabel:`Deleted`})}};function y(e){return e.option(`resource-id`,{type:`string`,description:`The ID of the resource to retrieve tags for.`,demandOption:!0}).option(`resource-type`,{type:`string`,description:`The type of the resource.`,choices:`access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker.worker_version`.split(`.`),demandOption:!0}).option(`worker-id`,{type:`string`,description:`Worker identifier. Required for worker_version resources.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`get`,describe:`Retrieves tags for a specific account or zone-level resource.`,builder:g(y),handler:async i=>{let l={resource_id:i[`resource-id`],resource_type:i[`resource-type`],worker_id:i[`worker-id`]};if(i.dryRun){let e=i.zone===void 0?await n():void 0,t=i.zone===void 0?`accounts`:`zones`,r=i.zone??e??`<account-id>`;s({command:`cf account-tags get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},query:l,bodyKind:`none`});return}let u=await a(i),d=i.zone===void 0?`accounts`:`zones`,f=d===`zones`?await r({zone:i.zone},u,{quiet:i.quiet}):i.local?e:await t();d===`zones`?i.zoneId=f:i.accountId=f,o(await c(`Loading`,async()=>u.accountTags.get({account_or_zone:d,account_or_zone_id:f,...l})),{successLabel:`Loaded`})}};function x(e){return e.option(`if-match`,{type:`string`,description:`ETag value for optimistic concurrency control. When provided, the server will
|
|
7
|
-
verify the current resource ETag matches before applying the write. Returns
|
|
8
|
-
412 Precondition Failed if the resource has been modified since the ETag was
|
|
9
|
-
obtained. Omit this header for unconditional writes.`}).option(`resource-id`,{type:`string`,description:`Identifies the unique resource.`}).option(`resource-type`,{type:`string`,description:`Enum for worker_version resource type.`,choices:`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`)}).option(`worker-id`,{type:`string`,description:`Worker ID is required only for worker_version resources`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body schema for setting tags on account-level resources.`})}const S={command:`update`,describe:`Creates or updates tags for a specific account or zone-level resource.`,builder:x,handler:async h=>{let g={};if(h[`if-match`]!==void 0&&(g[`If-Match`]=String(h[`if-match`])),h.dryRun){let e=h.zone===void 0?await n():void 0,t=h.zone===void 0?`accounts`:`zones`,r=h.zone??e??`<account-id>`;s({command:`cf account-tags update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/${t}/${r}/tags`,pathParams:{"account-or-zone":String(t),"account-or-zone-id":String(r)},bodyKind:`json`,body:h.body===void 0?d({resource_id:f(h[`resource-id`],`resource-id`,`text`),resource_type:f(h[`resource-type`],`resource-type`,`text`),worker_id:f(h[`worker-id`],`worker-id`,`text`)}):u(h.body)});return}let _=await a(h),v=h.zone===void 0?`accounts`:`zones`,y=v===`zones`?await r({zone:h.zone},_,{quiet:h.quiet}):h.local?e:await t();if(v===`zones`?h.zoneId=y:h.accountId=y,h.body){let e=u(h.body);o(await c(`Updating`,async()=>i(_,`PUT`,`/${v}/${y}/tags`,{body:e,headers:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`});return}h[`resource-id`]===void 0&&(h[`resource-id`]=await p(`resource-id`,`Identifies the unique resource.`)),h[`resource-type`]===void 0&&(h[`resource-type`]=await m(`resource-type`,`Enum for worker_version resource type.`,`worker_version.access_application.access_group.account.account_ruleset.ai_gateway.alerting_policy.alerting_webhook.cloudflared_tunnel.d1_database.durable_object_namespace.gateway_list.gateway_rule.image.infrastructure_target.kv_namespace.load_balancer_monitor.load_balancer_pool.pages_project.queue.r2_bucket.resource_share.stream_live_input.stream_video.vectorize_index.worker`.split(`.`))),h[`resource-type`]===`worker_version`&&h[`worker-id`]===void 0&&(h[`worker-id`]=await p(`worker-id`,`Worker ID is required only for worker_version resources`,{question:`Enter value for --worker-id`}));let b={};h[`resource-id`]!==void 0&&l(b,[`resource_id`],f(h[`resource-id`],`resource-id`,`text`)),h[`resource-type`]!==void 0&&l(b,[`resource_type`],f(h[`resource-type`],`resource-type`,`text`)),h[`worker-id`]!==void 0&&l(b,[`worker_id`],f(h[`worker-id`],`worker-id`,`text`)),o(await c(`Updating`,async()=>i(_,`PUT`,`/${v}/${y}/tags`,{body:Object.keys(b).length>0?b:void 0,headers:Object.keys(g).length>0?g:void 0})),{successLabel:`Updated`})}},C={command:`account-tags`,describe:`account-tags`,builder:e=>e.command(v).command(b).command(S).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{C as default};
|