cf 0.0.6 → 0.1.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/README.md +2 -4
- package/bin/cf +11 -0
- package/dist/_meta/agent-context.json +7 -7
- package/dist/_meta/commands.json +9051 -1085
- package/dist/abuse-reports-ChV_yD7f.mjs +8 -0
- package/dist/accounts-BCYecXFh.mjs +21 -0
- package/dist/acm-DD8zSds2.mjs +3 -0
- package/dist/addressing-D4Eqw5Bi.mjs +13 -0
- package/dist/{agent-context-BBJnI_Q7.mjs → agent-context-D26woB9J.mjs} +1 -1
- package/dist/ai-DfXMOMx_.mjs +2 -0
- package/dist/ai-gateway-DdRFthMo.mjs +8 -0
- package/dist/ai-search-C_68CDj1.mjs +7 -0
- package/dist/alerting-DbhqhVCp.mjs +6 -0
- package/dist/analytics-BSBBc7ep.mjs +20 -0
- package/dist/api-gateway-CZ4swbkQ.mjs +33 -0
- package/dist/argo-tms9ZwHO.mjs +2 -0
- package/dist/audit-logs-24qyW8cl.mjs +2 -0
- package/dist/auth-BlSmtIKd.mjs +112 -0
- package/dist/auth-DQ8miey6.mjs +6 -0
- package/dist/autorag-kgNt06GD.mjs +2 -0
- package/dist/billing-lwBHNTXC.mjs +2 -0
- package/dist/body-parser-Br-BoYk-.mjs +2 -0
- package/dist/bot-management-LKf7BqUr.mjs +5 -0
- package/dist/botnet-feed-nQ-gErTS.mjs +3 -0
- package/dist/brand-protection-DOKv9GRr.mjs +3 -0
- package/dist/browser-rendering-CBExtgGt.mjs +4 -0
- package/dist/build-C_48VvoK.mjs +1056 -0
- package/dist/{builds-B5sC8Gh_.mjs → builds-C_ySULja.mjs} +1 -1
- package/dist/cache-BBiiNZHP.mjs +5 -0
- package/dist/calls-DA5Xzwev.mjs +4 -0
- package/dist/certificate-authorities-sXyR_yGp.mjs +2 -0
- package/dist/chunk-DH-VkVmc.mjs +2 -0
- package/dist/client-certificates-tV0aCLQJ.mjs +3 -0
- package/dist/cloud-connector-DZfHcSso.mjs +2 -0
- package/dist/cloudforce-one-y1PgQmI9.mjs +21 -0
- package/dist/{completions-BSRqbcrz.mjs → completions-BKrxcfhN.mjs} +1 -1
- package/dist/config-BIfdEY0E.mjs +2 -0
- package/dist/connectivity-8SOqaFDn.mjs +3 -0
- package/dist/content-scanning-B9y6K_G5.mjs +4 -0
- package/dist/context-DTIbtQn5.mjs +2 -0
- package/dist/custom-certificates-sWksR8Ys.mjs +5 -0
- package/dist/custom-hostnames-91QZkdqN.mjs +5 -0
- package/dist/custom-nameservers-DajZaZvE.mjs +3 -0
- package/dist/custom-pages-Cu7gmwzT.mjs +4 -0
- package/dist/d1-H_VRsVmF.mjs +3 -0
- package/dist/dcv-delegation-C-qhEYEZ.mjs +2 -0
- package/dist/delegate.mjs +2 -0
- package/dist/deploy--9wYOkHg.mjs +2 -0
- package/dist/dev-BfKYB-R_.mjs +6 -0
- package/dist/diagnostics-D2B2LPZZ.mjs +3 -0
- package/dist/dispatch-namespaces-CyrXBU_w.mjs +7 -0
- package/dist/dist-C_bu5HwZ.mjs +82 -0
- package/dist/dist-DvKjT2TT.mjs +303 -0
- package/dist/dns-Bn9Uz_Nj.mjs +29 -0
- package/dist/dns-firewall-BslP4p-j.mjs +57 -0
- package/dist/durable-objects-BN1ZnHhm.mjs +2 -0
- package/dist/email-routing-n2TnTaRR.mjs +10 -0
- package/dist/email-security-C9SEx0kh.mjs +60 -0
- package/dist/email-sending-DayZ7u3I.mjs +3 -0
- package/dist/filters-CI_XTgfQ.mjs +4 -0
- package/dist/firewall-CcaayGig.mjs +11 -0
- package/dist/fraud-Cr7aPCV8.mjs +8 -0
- package/dist/google-tag-gateway-B3GpYgQ4.mjs +2 -0
- package/dist/healthchecks-CVTsR_OC.mjs +4 -0
- package/dist/hostnames-Bd_Wa5l6.mjs +3 -0
- package/dist/hyperdrive-BBJhEDZd.mjs +18 -0
- package/dist/iam-D_FN0pDF.mjs +6 -0
- package/dist/images-CAP2hAlZ.mjs +5 -0
- package/dist/index.mjs +1 -1
- package/dist/input-validation-zEO81MWN.mjs +2 -0
- package/dist/intel-CkxfzqmJ.mjs +3 -0
- package/dist/ips-B0cK7D0_.mjs +2 -0
- package/dist/keyless-certificates-LcLmHZsX.mjs +3 -0
- package/dist/kv-_TkUQ6fs.mjs +5 -0
- package/dist/leaked-credential-checks-Dhvaen22.mjs +3 -0
- package/dist/lib-Eu1wXxuh.mjs +68 -0
- package/dist/load-balancers-Ckr0UIpk.mjs +6 -0
- package/dist/local-VJaJ3BZ1.mjs +2 -0
- package/dist/logpush-Cj946hxT.mjs +4 -0
- package/dist/logs-DgC9hjvJ.mjs +3 -0
- package/dist/magic-cloud-networking-WbDvPzuG.mjs +5 -0
- package/dist/magic-network-monitoring-BcHShvGQ.mjs +4 -0
- package/dist/magic-transit-B8sCOkt_.mjs +89 -0
- package/dist/managed-transforms-BpOr-8HY.mjs +3 -0
- package/dist/mtls-certificates-fOul8D5g.mjs +3 -0
- package/dist/network-interconnects-BSW65xlh.mjs +36 -0
- package/dist/organizations-T4vKGFAb.mjs +41 -0
- package/dist/origin-ca-certificates-ChM0lZ64.mjs +3 -0
- package/dist/origin-post-quantum-encryption-C7o26ARh.mjs +2 -0
- package/dist/origin-tls-client-auth-D32dpZk_.mjs +5 -0
- package/dist/{output-CqGQp2r6.mjs → output-D7_yAFVR.mjs} +1 -1
- package/dist/page-rules-RFoj8CjN.mjs +18 -0
- package/dist/page-shield-VTktzKDN.mjs +37 -0
- package/dist/pages-L1ITjXDZ.mjs +10 -0
- package/dist/pipelines-BPO0Lnil.mjs +6 -0
- package/dist/progress-DZfTxbrx.mjs +2 -0
- package/dist/queues-B0C06L9r.mjs +6 -0
- package/dist/r2-DP020Tmq.mjs +21 -0
- package/dist/r2-data-catalog-Dmipvz5F.mjs +14 -0
- package/dist/radar-DR3VMknH.mjs +2 -0
- package/dist/rate-limits-DnHPBPgU.mjs +5 -0
- package/dist/raw-fetch-DlXYwVA8.mjs +2 -0
- package/dist/realtime-kit-C430aq2d.mjs +6 -0
- package/dist/registrar-7Qy50zbW.mjs +46 -0
- package/dist/request-tracers-sv99NDIl.mjs +2 -0
- package/dist/resolve-BuJRWSk0.mjs +2 -0
- package/dist/resource-sharing-uEjC7lnQ.mjs +5 -0
- package/dist/resource-tagging-CiODdP3N.mjs +16 -0
- package/dist/rules-FXAyTrwk.mjs +4 -0
- package/dist/rulesets-B6aUsFFB.mjs +8 -0
- package/dist/rum-CyyGJhp5.mjs +4 -0
- package/dist/{schema-qJlCfmo8.mjs → schema-D0_cbcDt.mjs} +1 -1
- package/dist/schema-validation-ByU49h--.mjs +4 -0
- package/dist/scim-DdTS65_C.mjs +3 -0
- package/dist/{scm-C872x0C2.mjs → scm-CilfPOue.mjs} +1 -1
- package/dist/secrets-store-ClOUVhBJ.mjs +18 -0
- package/dist/security-center-4iSBqTrf.mjs +2 -0
- package/dist/security-txt-kGxdkDY6.mjs +3 -0
- package/dist/session-mW-s8ghP.mjs +2 -0
- package/dist/smart-shield-B-SQd2Qp.mjs +3 -0
- package/dist/snippets-Aq58ojqw.mjs +4 -0
- package/dist/spawn-D_cjG87Z.mjs +10 -0
- package/dist/spectrum-0gFvGI6y.mjs +59 -0
- package/dist/speed-DAZU8w3T.mjs +4 -0
- package/dist/src-C5qivNKH.mjs +108 -0
- package/dist/ssl-BRlXa-5w.mjs +15 -0
- package/dist/stream-BAxsVeBX.mjs +14 -0
- package/dist/tenants-Df6xDqoA.mjs +2 -0
- package/dist/{theme-BKCxTQTe.mjs → theme-BklJDrb2.mjs} +2 -2
- package/dist/token-validation-pO4dCjCy.mjs +4 -0
- package/dist/{tools-CawscCBu.mjs → tools-CtKbk6VS.mjs} +1 -1
- package/dist/turnstile-B1dmO8wE.mjs +23 -0
- package/dist/{ui-Dj3No2vN.mjs → ui-mP_arYIg.mjs} +1 -1
- package/dist/url-normalization-sUDVmrUt.mjs +3 -0
- package/dist/url-scanner-CwOKRkYo.mjs +2 -0
- package/dist/user-D_UrIdNq.mjs +10 -0
- package/dist/vectorize-BEbBn9G9.mjs +4 -0
- package/dist/{vuln-scanner-B1VwCIko.mjs → vuln-scanner-Br_2lQp1.mjs} +1 -1
- package/dist/waiting-rooms-BQC-urV4.mjs +11 -0
- package/dist/web3-CIH2iQeX.mjs +4 -0
- package/dist/workers-B9EvrpH3.mjs +16 -0
- package/dist/workers-builds-DzWSiRd2.mjs +7 -0
- package/dist/workflows-aD81gA4k.mjs +4 -0
- package/dist/zaraz-Cg1dsvrZ.mjs +2 -0
- package/dist/zero-trust-D-xQXWcy.mjs +119 -0
- package/dist/zones-DQzucJDd.mjs +28 -0
- package/package.json +13 -3
- package/dist/abuse-reports-DR0yMg-Q.mjs +0 -2
- package/dist/accounts-BjGtCB8T.mjs +0 -6
- package/dist/acm-h4YPDN7k.mjs +0 -3
- package/dist/addressing-BiEnQ1o1.mjs +0 -11
- package/dist/ai-BPln2Yka.mjs +0 -2
- package/dist/ai-gateway-DgD9nKyd.mjs +0 -8
- package/dist/ai-search-EjrONI5a.mjs +0 -7
- package/dist/alerting-CPWMKr-m.mjs +0 -6
- package/dist/analytics-3dX9-scQ.mjs +0 -2
- package/dist/api-gateway-7FKFHdI-.mjs +0 -9
- package/dist/argo-Dxz9P37E.mjs +0 -2
- package/dist/audit-logs-D_Xw5x8Y.mjs +0 -2
- package/dist/auth-BHD_B2p9.mjs +0 -277
- package/dist/auth-caVo2j1K.mjs +0 -6
- package/dist/autorag-D7nMweNF.mjs +0 -2
- package/dist/billing-yaIBp1Xq.mjs +0 -2
- package/dist/body-parser-iA3vRFmh.mjs +0 -2
- package/dist/bot-management-C0H6U0t4.mjs +0 -2
- package/dist/botnet-feed-BXV9GVwF.mjs +0 -3
- package/dist/brand-protection-CI0NQa_l.mjs +0 -3
- package/dist/browser-rendering-DnKNRJJe.mjs +0 -4
- package/dist/cache-B6M_pm_D.mjs +0 -5
- package/dist/calls-C5XCC0i1.mjs +0 -4
- package/dist/certificate-authorities-BQuHL4dm.mjs +0 -2
- package/dist/client-certificates-CwpzEnCT.mjs +0 -3
- package/dist/cloud-connector-CU3PLNLe.mjs +0 -2
- package/dist/cloudforce-one-DzrArr1o.mjs +0 -21
- package/dist/config-BmTd_qeU.mjs +0 -2
- package/dist/connectivity-C4tXPkW_.mjs +0 -3
- package/dist/content-scanning-CH_YXdlZ.mjs +0 -4
- package/dist/context-6lBIck1r.mjs +0 -2
- package/dist/custom-certificates-pllRyU2y.mjs +0 -3
- package/dist/custom-hostnames-GmF0DfYA.mjs +0 -5
- package/dist/custom-nameservers-DPVHUlUQ.mjs +0 -3
- package/dist/custom-pages-XWwfn7hV.mjs +0 -4
- package/dist/d1-c_zhZGWf.mjs +0 -3
- package/dist/dcv-delegation-pXpU48A8.mjs +0 -2
- package/dist/dev-Bu26u5Jm.mjs +0 -14
- package/dist/diagnostics-BU07Jnku.mjs +0 -3
- package/dist/dispatch-namespaces-D_Kq_2gX.mjs +0 -7
- package/dist/dns-CrvIxztB.mjs +0 -11
- package/dist/dns-firewall-CLtGAQ9x.mjs +0 -3
- package/dist/dry-run-FV0pZwdg.mjs +0 -2
- package/dist/durable-objects-Y5rLFSQX.mjs +0 -2
- package/dist/email-routing-CxU5JlXT.mjs +0 -10
- package/dist/email-security-CnpAHWpj.mjs +0 -8
- package/dist/email-sending-MeCKsktR.mjs +0 -3
- package/dist/filters-Sx2Po1UP.mjs +0 -4
- package/dist/firewall-B0_012XO.mjs +0 -9
- package/dist/fraud-CG0G_VG-.mjs +0 -2
- package/dist/google-tag-gateway-BLbj1y3h.mjs +0 -2
- package/dist/healthchecks-C0LgExxa.mjs +0 -4
- package/dist/hostnames-D4K6s9EX.mjs +0 -3
- package/dist/hyperdrive-D7XvTRys.mjs +0 -3
- package/dist/iam-4LhJianW.mjs +0 -6
- package/dist/images-BqXyIycX.mjs +0 -5
- package/dist/input-validation-BpVQi9rR.mjs +0 -2
- package/dist/intel-CiO3Sy4x.mjs +0 -3
- package/dist/ips-DLuGN7Mr.mjs +0 -2
- package/dist/keyless-certificates-x-87T5SM.mjs +0 -3
- package/dist/kv-CVYCrk7L.mjs +0 -5
- package/dist/leaked-credential-checks-FvhVCL23.mjs +0 -3
- package/dist/load-balancers-cxodJuI2.mjs +0 -6
- package/dist/local-OqhVQbv0.mjs +0 -2
- package/dist/logpush-BX7z2xWz.mjs +0 -4
- package/dist/logs-C7vxr6Kp.mjs +0 -3
- package/dist/magic-cloud-networking-C3grROf-.mjs +0 -5
- package/dist/magic-network-monitoring-DiZ5ZXxh.mjs +0 -4
- package/dist/magic-transit-troGMFb9.mjs +0 -30
- package/dist/managed-transforms-B5w_LlVN.mjs +0 -3
- package/dist/mtls-certificates-C1S9MciH.mjs +0 -3
- package/dist/network-interconnects-CVSiv1fF.mjs +0 -4
- package/dist/organizations-BtlEchi-.mjs +0 -4
- package/dist/origin-ca-certificates-0XCi4dO6.mjs +0 -3
- package/dist/origin-post-quantum-encryption-CTvkdYDG.mjs +0 -2
- package/dist/origin-tls-client-auth-qAvRD1BQ.mjs +0 -5
- package/dist/page-rules-CcMmrvY4.mjs +0 -3
- package/dist/page-shield-Dxh4bJ-w.mjs +0 -3
- package/dist/pages-F1vdzqgC.mjs +0 -6
- package/dist/pipelines-DsF1HHMY.mjs +0 -6
- package/dist/progress-5sHFvwez.mjs +0 -2
- package/dist/queues-BuvkxFPX.mjs +0 -6
- package/dist/r2-Du-fgHiT.mjs +0 -9
- package/dist/r2-data-catalog-BUiMNSwc.mjs +0 -3
- package/dist/radar-C0eqNmWR.mjs +0 -2
- package/dist/rate-limits-CUv2cxXV.mjs +0 -3
- package/dist/raw-fetch-CxFs4i0R.mjs +0 -2
- package/dist/realtime-kit-C-jix3I_.mjs +0 -6
- package/dist/registrar-B7V7i89n.mjs +0 -2
- package/dist/request-tracers-D2V7QUrC.mjs +0 -2
- package/dist/resolve-GtphSYWh.mjs +0 -2
- package/dist/resource-sharing-BgH0w9wm.mjs +0 -5
- package/dist/resource-tagging-BOknFugv.mjs +0 -4
- package/dist/rolldown-runtime-CR7SCCRW.mjs +0 -2
- package/dist/rules-DzJFHGW1.mjs +0 -4
- package/dist/rulesets-BzI1dUiq.mjs +0 -8
- package/dist/rum-CQ_rJ96u.mjs +0 -4
- package/dist/schema-validation-TmikfxS9.mjs +0 -4
- package/dist/scim-ByZ5kqXS.mjs +0 -3
- package/dist/secrets-store-D7HL4VXw.mjs +0 -8
- package/dist/security-center-OUrILUnx.mjs +0 -2
- package/dist/security-txt-Ca13oCJ8.mjs +0 -3
- package/dist/session-Dxi_LbAk.mjs +0 -2
- package/dist/smart-shield-foPT0J9L.mjs +0 -3
- package/dist/snippets-FDPiBMWc.mjs +0 -4
- package/dist/spectrum-DPoh_BPx.mjs +0 -3
- package/dist/speed-BuEappVX.mjs +0 -4
- package/dist/src-D8_cWUwt.mjs +0 -104
- package/dist/ssl-bJbzEoRv.mjs +0 -3
- package/dist/stream-DuYGiGk6.mjs +0 -13
- package/dist/tenants-BYqEutrr.mjs +0 -2
- package/dist/token-validation-DwmtbWUB.mjs +0 -4
- package/dist/turnstile-Dy91RVTn.mjs +0 -3
- package/dist/url-normalization-DoD9iHWH.mjs +0 -3
- package/dist/url-scanner-qwL64FIo.mjs +0 -2
- package/dist/user-Cduf3VRi.mjs +0 -7
- package/dist/vectorize-CMLobU9V.mjs +0 -4
- package/dist/waiting-rooms-B4-IAJeT.mjs +0 -5
- package/dist/web3-Bcx68Kq3.mjs +0 -4
- package/dist/workers-D5fOQsUA.mjs +0 -16
- package/dist/workers-builds-2kdzxjlN.mjs +0 -7
- package/dist/workflows-qFD80noW.mjs +0 -4
- package/dist/zaraz-C0iJimA4.mjs +0 -2
- package/dist/zero-trust-Btix6zOy.mjs +0 -73
- package/dist/zones-Nu3wMtds.mjs +0 -5
- /package/dist/{metadata-DhSO1vle.mjs → metadata-DGdCpUxn.mjs} +0 -0
package/dist/zones-Nu3wMtds.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
import{h as e,m as t,p as n,t as r,u as i}from"./auth-BHD_B2p9.mjs";import{n as a,r as o}from"./input-validation-BpVQi9rR.mjs";import{n as s,t as c}from"./body-parser-iA3vRFmh.mjs";import{t as l}from"./output-CqGQp2r6.mjs";import{t as u}from"./dry-run-FV0pZwdg.mjs";import{t as d}from"./progress-5sHFvwez.mjs";const f={command:`trigger`,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:e=>e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}),handler:async e=>{if(e.dryRun){u({command:`cf zones activation-check trigger`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/activation_check`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`none`,validation:`passed`});return}let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Updating activation check`,async()=>t.zones.activationCheck.trigger(n)),{successLabel:`Updated activation check`})}},p={command:`activation-check`,describe:`Operations for activation-check`,builder:e=>e.command(f).demandCommand(1),handler:()=>{}},m={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:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones aegis edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/aegis`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{valueEnabled:e.valueEnabled,valuePoolId:e.valuePoolId,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating aegi`,async()=>t.patch(`/zones/${e.zoneId}/settings/aegis`,{body:n})),{successLabel:`Updated aegi`});return}let n={};e.valueEnabled!==void 0&&s(n,[`value`,`enabled`],e.valueEnabled),e.valuePoolId!==void 0&&s(n,[`value`,`pool_id`],a(e.valuePoolId,`valuePoolId`,`text`)),l(await d(`Updating aegi`,async()=>t.patch(`/zones/${e.zoneId}/settings/aegis`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated aegi`})}},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:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading aegi`,async()=>t.zones.aegis.get(n)),{successLabel:`Loaded aegi`})}},g={command:`aegis`,describe:`Aegis operations`,builder:e=>e.command(m).command(h).demandCommand(1),handler:()=>{}},_={command:`create`,describe:`Create Zone`,builder:e=>e.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 typically a partner-hosted zone or a CNAME setup. `,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)`}),handler:async t=>{if(t.dryRun){u({command:`cf zones create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones`,pathParams:{},bodyKind:`json`,body:{name:t.name,type:t.type,body:t.body},validation:`passed`});return}let n=await r(t);if(t.body){let e=c(t.body);l(await d(`Creating zone`,async()=>n.post(`/zones`,{body:e})),{successLabel:`Created zone`});return}t.name===void 0&&(t.name=await e(`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 i={};t.name!==void 0&&s(i,[`name`],a(t.name,`name`,`text`)),t.type!==void 0&&s(i,[`type`],a(t.type,`type`,`text`)),l(await d(`Creating zone`,async()=>n.post(`/zones`,{body:Object.keys(i).length>0?i:void 0})),{successLabel:`Created zone`})}},v={command:`delete`,describe:`Deletes an existing zone.`,builder:e=>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}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{body:e.body},validation:`passed`});return}let t=await r(e),a=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await n(`zone`,String(a??``),{force:!!e.force})){process.stderr.write(`Aborted.
|
|
3
|
-
`);return}if(e.body){let n=c(e.body);l(await d(`Deleting zone`,async()=>t.delete(`/zones/${e.zoneId}`,{body:n})),{successLabel:`Deleted zone`});return}l(await d(`Deleting zone`,async()=>t.zones.delete(a)),{successLabel:`Deleted zone`})}},y={command:`edit`,describe:`Edits a zone. Only one zone property can be changed at a time.`,builder:e=>e.option(`paused`,{type:`boolean`,description:`Indicates whether the zone is only using Cloudflare DNS services. A true value means the zone will not receive security or performance benefits. `,default:!1}).option(`plan-id`,{type:`string`,description:`Identifier`}).option(`type`,{type:`string`,description:`A full zone implies that DNS is hosted with Cloudflare. A partial zone is typically a partner-hosted zone or a CNAME setup. This parameter is only available to Enterprise customers or if it has been explicitly enabled on a zone. `,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 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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{paused:e.paused,planId:e.planId,type:e.type,vanityNameServers:e.vanityNameServers,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating zone`,async()=>t.patch(`/zones/${e.zoneId}`,{body:n})),{successLabel:`Updated zone`});return}let n={};e.paused!==void 0&&s(n,[`paused`],e.paused),e.planId!==void 0&&s(n,[`plan`,`id`],a(e.planId,`planId`,`text`)),e.type!==void 0&&s(n,[`type`],a(e.type,`type`,`text`)),e.vanityNameServers!==void 0&&s(n,[`vanity_name_servers`],e.vanityNameServers),l(await d(`Updating zone`,async()=>t.patch(`/zones/${e.zoneId}`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated zone`})}},b={command:`create`,describe:`Create zone environments`,builder:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones environments create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/environments`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{body:e.body},validation:`passed`});return}let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let n=c(e.body);l(await d(`Creating environment`,async()=>t.post(`/zones/${e.zoneId}/environments`,{body:n})),{successLabel:`Created environment`});return}l(await d(`Creating environment`,async()=>t.zones.environments.create(n)),{successLabel:`Created environment`})}},x={command:`delete`,describe:`Delete zone environment`,builder:e=>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}),handler:async e=>{if(e.dryRun){u({command:`cf zones environments delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/environments/${e.environmentId??`<environmentId>`}`,pathParams:{zoneId:String(e.zoneId??``),environmentId:String(e.environmentId??``)},bodyKind:`none`,validation:`passed`});return}let t=await r(e),a=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=a,!await n(`environment`,String(a??``),{force:!!e.force})){process.stderr.write(`Aborted.
|
|
4
|
-
`);return}l(await d(`Deleting environment`,async()=>t.zones.environments.delete(a,e.environmentId)),{successLabel:`Deleted environment`})}},S={command:`edit`,describe:`Partially update zone environments`,builder:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones environments edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/environments`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{body:e.body},validation:`passed`});return}let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let n=c(e.body);l(await d(`Updating environment`,async()=>t.patch(`/zones/${e.zoneId}/environments`,{body:n})),{successLabel:`Updated environment`});return}l(await d(`Updating environment`,async()=>t.zones.environments.edit(n)),{successLabel:`Updated environment`})}},C={command:`list`,describe:`List zone environments`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading environments`,async()=>t.zones.environments.list(n)),{successLabel:`Loaded environments`})}},w={command:`rollback`,describe:`Roll back zone environment`,builder:e=>e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}),handler:async e=>{if(e.dryRun){u({command:`cf zones environments rollback`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/environments/${e.environmentId??`<environmentId>`}/rollback`,pathParams:{zoneId:String(e.zoneId??``),environmentId:String(e.environmentId??``)},bodyKind:`none`,validation:`passed`});return}let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Creating environment`,async()=>t.zones.environments.rollback(n,e.environmentId)),{successLabel:`Created environment`})}},T={command:`update`,describe:`Upsert zone environments`,builder:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones environments update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/environments`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{body:e.body},validation:`passed`});return}let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});if(e.zoneId=n,e.body){let n=c(e.body);l(await d(`Updating environment`,async()=>t.put(`/zones/${e.zoneId}/environments`,{body:n})),{successLabel:`Updated environment`});return}l(await d(`Updating environment`,async()=>t.zones.environments.update(n)),{successLabel:`Updated environment`})}},E={command:`environments`,describe:`Operations for environments`,builder:e=>e.command(b).command(x).command(S).command(C).command(w).command(T).demandCommand(1),handler:()=>{}},D={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:e=>e.option(`value`,{type:`string`,description:`Whether the feature is enabled or disabled.`,choices:[`on`,`off`],default:`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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones fonts edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/fonts`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{value:e.value,body:e.body},validation:`passed`});return}let n=await r(e);if(e.zoneId=await i({zone:e.zone},n,{quiet:e.quiet}),e.body){let t=c(e.body);l(await d(`Updating font`,async()=>n.patch(`/zones/${e.zoneId}/settings/fonts`,{body:t})),{successLabel:`Updated font`});return}e.value===void 0&&(e.value=await t(`value`,`Whether the feature is enabled or disabled.`,[`on`,`off`]));let o={};e.value!==void 0&&s(o,[`value`],a(e.value,`value`,`text`)),l(await d(`Updating font`,async()=>n.patch(`/zones/${e.zoneId}/settings/fonts`,{body:Object.keys(o).length>0?o:void 0})),{successLabel:`Updated font`})}},O={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:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading font`,async()=>t.zones.fonts.get(n)),{successLabel:`Loaded font`})}},k={command:`fonts`,describe:`Fonts operations`,builder:e=>e.command(D).command(O).demandCommand(1),handler:()=>{}},A={command:`get`,describe:`Zone Details`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading zone`,async()=>t.zones.get(n)),{successLabel:`Loaded zone`})}},j={command:`create`,describe:`Enforce a zone hold on the zone, blocking the creation and activation of zones with this zone's hostname.`,builder:e=>e.option(`include-subdomains`,{type:`boolean`,description:`If provided, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', 'staging.example.com', 'api.staging.example.com', etc.`,default:!1}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}),handler:async e=>{let t={};if(e.includeSubdomains!==void 0&&(t.include_subdomains=e.includeSubdomains),e.dryRun){u({command:`cf zones holds create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/hold`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{...t},validation:`passed`});return}let n=await r(e),a=await i({zone:e.zone},n,{quiet:e.quiet});e.zoneId=a,l(await d(`Creating hold`,async()=>n.zones.holds.create(a,Object.keys(t).length>0?t:void 0)),{successLabel:`Created hold`})}},M={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.`,builder:e=>e.option(`hold-after`,{type:`string`,description:"If `hold_after` is provided, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. Otherwise, the hold will be disabled indefinitely."}).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}),handler:async e=>{let t={};if(e.holdAfter!==void 0&&(t.hold_after=e.holdAfter),e.dryRun){u({command:`cf zones holds delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/hold`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{...t},validation:`passed`});return}let a=await r(e),o=await i({zone:e.zone},a,{quiet:e.quiet});if(e.zoneId=o,!await n(`hold`,String(o??``),{force:!!e.force})){process.stderr.write(`Aborted.
|
|
5
|
-
`);return}l(await d(`Deleting hold`,async()=>a.zones.holds.delete(o,Object.keys(t).length>0?t:void 0)),{successLabel:`Deleted hold`})}},N={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.",builder:e=>e.option(`hold-after`,{type:`string`,description:"If `hold_after` is provided and future-dated, the hold will be temporarily disabled, then automatically re-enabled by the system at the time specified in this RFC3339-formatted timestamp. A past-dated `hold_after` value will have no effect on an existing, enabled hold. Providing an empty string will set its value to the current time."}).option(`include-subdomains`,{type:`boolean`,description:"If `true`, the zone hold will extend to block any subdomain of the given zone, as well as SSL4SaaS Custom Hostnames. For example, a zone hold on a zone with the hostname 'example.com' and include_subdomains=true will block 'example.com', '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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones holds edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/hold`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{holdAfter:e.holdAfter,includeSubdomains:e.includeSubdomains,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating hold`,async()=>t.patch(`/zones/${e.zoneId}/hold`,{body:n})),{successLabel:`Updated hold`});return}let n={};e.holdAfter!==void 0&&s(n,[`hold_after`],a(e.holdAfter,`holdAfter`,`text`)),e.includeSubdomains!==void 0&&s(n,[`include_subdomains`],e.includeSubdomains),l(await d(`Updating hold`,async()=>t.patch(`/zones/${e.zoneId}/hold`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated hold`})}},P={command:`get`,describe:`Retrieve whether the zone is subject to a zone hold, and metadata about the hold.`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading hold`,async()=>t.zones.holds.get(n)),{successLabel:`Loaded hold`})}},F={command:`holds`,describe:`Operations for holds`,builder:e=>e.command(j).command(M).command(N).command(P).demandCommand(1),handler:()=>{}},I={command:`list`,describe:`Lists, searches, sorts, and filters your zones. Listing zones across more than 500 accounts is currently not allowed.`,builder:e=>e.option(`name`,{type:`string`,description:"A domain name. Optional filter operators can be provided to extend refine the search: * `equal` (default) * `not_equal` * `starts_with` * `ends_with` * `contains` * `starts_with_case_sensitive` * `ends_with_case_sensitive` * `contains_case_sensitive`"}).option(`status`,{type:`string`,description:`Specify a zone status to filter by.`,choices:[`initializing`,`pending`,`active`,`moved`]}).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: * `equal` (default) * `not_equal` * `starts_with` * `ends_with` * `contains` * `starts_with_case_sensitive` * `ends_with_case_sensitive` * `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`]}),handler:async e=>{let t={};e.name!==void 0&&(t.name=e.name),e.status!==void 0&&(t.status=e.status),e.accountId!==void 0&&(t.accountId=e.accountId),e.accountName!==void 0&&(t.accountName=e.accountName),e.page!==void 0&&(t.page=e.page),e.perPage!==void 0&&(t.per_page=e.perPage),e.order!==void 0&&(t.order=e.order),e.direction!==void 0&&(t.direction=e.direction),e.match!==void 0&&(t.match=e.match);let n=await r(e);l(await d(`Loading zones`,async()=>n.zones.list(Object.keys(t).length>0?t:void 0)),{successLabel:`Loaded zones`})}},ee={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:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones origin-h2-max-streams edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/origin_h2_max_streams`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{value:e.value,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating origin h2 max stream`,async()=>t.patch(`/zones/${e.zoneId}/settings/origin_h2_max_streams`,{body:n})),{successLabel:`Updated origin h2 max stream`});return}if(e.value===void 0)throw Error(`--value is required (or pass --body with this field set).`);let n={};e.value!==void 0&&s(n,[`value`],e.value),l(await d(`Updating origin h2 max stream`,async()=>t.patch(`/zones/${e.zoneId}/settings/origin_h2_max_streams`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated origin h2 max stream`})}},L={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:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading origin h2 max stream`,async()=>t.zones.originH2MaxStreams.get(n)),{successLabel:`Loaded origin h2 max stream`})}},R={command:`origin-h2-max-streams`,describe:`Origin H2 Max Streams operations`,builder:e=>e.command(ee).command(L).demandCommand(1),handler:()=>{}},z={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:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones origin-max-http-version edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/origin_max_http_version`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{value:e.value,body:e.body},validation:`passed`});return}let n=await r(e);if(e.zoneId=await i({zone:e.zone},n,{quiet:e.quiet}),e.body){let t=c(e.body);l(await d(`Updating origin max http version`,async()=>n.patch(`/zones/${e.zoneId}/settings/origin_max_http_version`,{body:t})),{successLabel:`Updated origin max http version`});return}e.value===void 0&&(e.value=await t(`value`,`Value of the Origin Max HTTP Version Setting.`,[`2`,`1`]));let o={};e.value!==void 0&&s(o,[`value`],a(e.value,`value`,`text`)),l(await d(`Updating origin max http version`,async()=>n.patch(`/zones/${e.zoneId}/settings/origin_max_http_version`,{body:Object.keys(o).length>0?o:void 0})),{successLabel:`Updated origin max http version`})}},B={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=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading origin max http version`,async()=>t.zones.originMaxHTTPVersion.get(n)),{successLabel:`Loaded origin max http version`})}},V={command:`origin-max-http-version`,describe:`Origin Max Http Version operations`,builder:e=>e.command(z).command(B).demandCommand(1),handler:()=>{}},H={command:`get <planIdentifier>`,describe:`Details of the available plan that the zone can subscribe to.`,builder:e=>e.positional(`planIdentifier`,{type:`string`,description:`Identifier`,demandOption:!0}),handler:async e=>{o(e.planIdentifier,`planIdentifier`);let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading plan`,async()=>t.zones.plans.get(e.planIdentifier,n)),{successLabel:`Loaded plan`})}},U={command:`list`,describe:`Lists available plans the zone can subscribe to.`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading plans`,async()=>t.zones.plans.list(n)),{successLabel:`Loaded plans`})}},W={command:`plans`,describe:`Operations for plans`,builder:e=>e.command(H).command(U).demandCommand(1),handler:()=>{}},G={command:`get`,describe:`Lists all rate plans the zone can subscribe to.`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading rate plan`,async()=>t.zones.ratePlans.get(n)),{successLabel:`Loaded rate plan`})}},K={command:`rate-plans`,describe:`Operations for rate-plans`,builder:e=>e.command(G).demandCommand(1),handler:()=>{}},q={command:`edit`,describe:`Toggles RUM on/off for an existing zone.`,builder:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones rum edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/rum`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{value:e.value,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating rum`,async()=>t.patch(`/zones/${e.zoneId}/settings/rum`,{body:n})),{successLabel:`Updated rum`});return}let n={};e.value!==void 0&&s(n,[`value`],a(e.value,`value`,`text`)),l(await d(`Updating rum`,async()=>t.patch(`/zones/${e.zoneId}/settings/rum`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated rum`})}},J={command:`get`,describe:`Retrieves RUM status for a zone.`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading rum`,async()=>t.zones.rum.get(n)),{successLabel:`Loaded rum`})}},Y={command:`rum`,describe:`Rum operations`,builder:e=>e.command(q).command(J).demandCommand(1),handler:()=>{}},X={command:`edit <settingId>`,describe:`Updates a single zone setting by the identifier`,builder:e=>e.positional(`settingId`,{type:`string`,description:`Setting name`,demandOption:!0}).option(`enabled`,{type:`boolean`,description:`ssl-recommender enrollment setting.`,default:!1}).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.`,default:!1}).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.`,default:!1}).option(`value-wp-plugin`,{type:`boolean`,description:`Indicates whether or not [Cloudflare for WordPress plugin](https://wordpress.org/plugins/cloudflare/) is installed.`,default:!1}).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`]),handler:async e=>{if(o(e.settingId,`settingId`),e.dryRun){u({command:`cf zones settings edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/${e.settingId??`<settingId>`}`,pathParams:{zoneId:String(e.zoneId??``),settingId:String(e.settingId??``)},bodyKind:`json`,body:{enabled:e.enabled,valueEnabled:e.valueEnabled,valuePoolId:e.valuePoolId,valueCacheByDeviceType:e.valueCacheByDeviceType,valueCf:e.valueCf,valueHostnames:e.valueHostnames,valueWordpress:e.valueWordpress,valueWpPlugin:e.valueWpPlugin,valueStrictTransportSecurityEnabled:e.valueStrictTransportSecurityEnabled,valueStrictTransportSecurityIncludeSubdomains:e.valueStrictTransportSecurityIncludeSubdomains,valueStrictTransportSecurityMaxAge:e.valueStrictTransportSecurityMaxAge,valueStrictTransportSecurityNosniff:e.valueStrictTransportSecurityNosniff,valueStrictTransportSecurityPreload:e.valueStrictTransportSecurityPreload,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating setting`,async()=>t.patch(`/zones/${e.zoneId}/settings/${e.settingId}`,{body:n})),{successLabel:`Updated setting`});return}let n={};e.enabled!==void 0&&s(n,[`enabled`],e.enabled),e.valueEnabled!==void 0&&s(n,[`value`,`enabled`],e.valueEnabled),e.valuePoolId!==void 0&&s(n,[`value`,`pool_id`],a(e.valuePoolId,`valuePoolId`,`text`)),e.valueCacheByDeviceType!==void 0&&s(n,[`value`,`cache_by_device_type`],e.valueCacheByDeviceType),e.valueCf!==void 0&&s(n,[`value`,`cf`],e.valueCf),e.valueHostnames!==void 0&&s(n,[`value`,`hostnames`],e.valueHostnames),e.valueWordpress!==void 0&&s(n,[`value`,`wordpress`],e.valueWordpress),e.valueWpPlugin!==void 0&&s(n,[`value`,`wp_plugin`],e.valueWpPlugin),e.valueStrictTransportSecurityEnabled!==void 0&&s(n,[`value`,`strict_transport_security`,`enabled`],e.valueStrictTransportSecurityEnabled),e.valueStrictTransportSecurityIncludeSubdomains!==void 0&&s(n,[`value`,`strict_transport_security`,`include_subdomains`],e.valueStrictTransportSecurityIncludeSubdomains),e.valueStrictTransportSecurityMaxAge!==void 0&&s(n,[`value`,`strict_transport_security`,`max_age`],e.valueStrictTransportSecurityMaxAge),e.valueStrictTransportSecurityNosniff!==void 0&&s(n,[`value`,`strict_transport_security`,`nosniff`],e.valueStrictTransportSecurityNosniff),e.valueStrictTransportSecurityPreload!==void 0&&s(n,[`value`,`strict_transport_security`,`preload`],e.valueStrictTransportSecurityPreload),l(await d(`Updating setting`,async()=>t.patch(`/zones/${e.zoneId}/settings/${e.settingId}`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated setting`})}},Z={command:`get <settingId>`,describe:`Fetch a single zone setting by name`,builder:e=>e.positional(`settingId`,{type:`string`,description:`Setting name`,demandOption:!0}),handler:async e=>{o(e.settingId,`settingId`);let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading setting`,async()=>t.zones.settings.get(n,e.settingId)),{successLabel:`Loaded setting`})}},Q={command:`settings`,describe:`Operations for settings`,builder:e=>e.command(X).command(Z).demandCommand(1),handler:()=>{}},$={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:e=>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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones speed-brain edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/settings/speed_brain`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{value:e.value,body:e.body},validation:`passed`});return}let n=await r(e);if(e.zoneId=await i({zone:e.zone},n,{quiet:e.quiet}),e.body){let t=c(e.body);l(await d(`Updating speed brain`,async()=>n.patch(`/zones/${e.zoneId}/settings/speed_brain`,{body:t})),{successLabel:`Updated speed brain`});return}e.value===void 0&&(e.value=await t(`value`,`Whether the feature is enabled or disabled.`,[`on`,`off`]));let o={};e.value!==void 0&&s(o,[`value`],a(e.value,`value`,`text`)),l(await d(`Updating speed brain`,async()=>n.patch(`/zones/${e.zoneId}/settings/speed_brain`,{body:Object.keys(o).length>0?o:void 0})),{successLabel:`Updated speed brain`})}},te={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:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading speed brain`,async()=>t.zones.speedBrain.get(n)),{successLabel:`Loaded speed brain`})}},ne={command:`speed-brain`,describe:`Speed Brain operations`,builder:e=>e.command($).command(te).demandCommand(1),handler:()=>{}},re={command:`create`,describe:`Create a zone subscription, either plan or add-ons.`,builder:e=>e.option(`app-install-id`,{type:`string`,description:`app install id.`}).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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones subscriptions create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/subscription`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{appInstallId:e.appInstallId,frequency:e.frequency,ratePlanCurrency:e.ratePlanCurrency,ratePlanExternallyManaged:e.ratePlanExternallyManaged,ratePlanId:e.ratePlanId,ratePlanIsContract:e.ratePlanIsContract,ratePlanPublicName:e.ratePlanPublicName,ratePlanScope:e.ratePlanScope,ratePlanSets:e.ratePlanSets,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Creating subscription`,async()=>t.post(`/zones/${e.zoneId}/subscription`,{body:n})),{successLabel:`Created subscription`});return}let n={};e.appInstallId!==void 0&&s(n,[`app`,`install_id`],a(e.appInstallId,`appInstallId`,`text`)),e.frequency!==void 0&&s(n,[`frequency`],a(e.frequency,`frequency`,`text`)),e.ratePlanCurrency!==void 0&&s(n,[`rate_plan`,`currency`],a(e.ratePlanCurrency,`ratePlanCurrency`,`text`)),e.ratePlanExternallyManaged!==void 0&&s(n,[`rate_plan`,`externally_managed`],e.ratePlanExternallyManaged),e.ratePlanId!==void 0&&s(n,[`rate_plan`,`id`],a(e.ratePlanId,`ratePlanId`,`text`)),e.ratePlanIsContract!==void 0&&s(n,[`rate_plan`,`is_contract`],e.ratePlanIsContract),e.ratePlanPublicName!==void 0&&s(n,[`rate_plan`,`public_name`],a(e.ratePlanPublicName,`ratePlanPublicName`,`text`)),e.ratePlanScope!==void 0&&s(n,[`rate_plan`,`scope`],a(e.ratePlanScope,`ratePlanScope`,`text`)),e.ratePlanSets!==void 0&&s(n,[`rate_plan`,`sets`],e.ratePlanSets),l(await d(`Creating subscription`,async()=>t.post(`/zones/${e.zoneId}/subscription`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Created subscription`})}},ie={command:`get`,describe:`Lists zone subscription details.`,builder:e=>e,handler:async e=>{let t=await r(e),n=await i({zone:e.zone},t,{quiet:e.quiet});e.zoneId=n,l(await d(`Loading subscription`,async()=>t.zones.subscriptions.get(n)),{successLabel:`Loaded subscription`})}},ae={command:`update`,describe:`Updates zone subscriptions, either plan or add-ons.`,builder:e=>e.option(`app-install-id`,{type:`string`,description:`app install id.`}).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)`}),handler:async e=>{if(e.dryRun){u({command:`cf zones subscriptions update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${e.zoneId??`<zoneId>`}/subscription`,pathParams:{zoneId:String(e.zoneId??``)},bodyKind:`json`,body:{appInstallId:e.appInstallId,frequency:e.frequency,ratePlanCurrency:e.ratePlanCurrency,ratePlanExternallyManaged:e.ratePlanExternallyManaged,ratePlanId:e.ratePlanId,ratePlanIsContract:e.ratePlanIsContract,ratePlanPublicName:e.ratePlanPublicName,ratePlanScope:e.ratePlanScope,ratePlanSets:e.ratePlanSets,body:e.body},validation:`passed`});return}let t=await r(e);if(e.zoneId=await i({zone:e.zone},t,{quiet:e.quiet}),e.body){let n=c(e.body);l(await d(`Updating subscription`,async()=>t.put(`/zones/${e.zoneId}/subscription`,{body:n})),{successLabel:`Updated subscription`});return}let n={};e.appInstallId!==void 0&&s(n,[`app`,`install_id`],a(e.appInstallId,`appInstallId`,`text`)),e.frequency!==void 0&&s(n,[`frequency`],a(e.frequency,`frequency`,`text`)),e.ratePlanCurrency!==void 0&&s(n,[`rate_plan`,`currency`],a(e.ratePlanCurrency,`ratePlanCurrency`,`text`)),e.ratePlanExternallyManaged!==void 0&&s(n,[`rate_plan`,`externally_managed`],e.ratePlanExternallyManaged),e.ratePlanId!==void 0&&s(n,[`rate_plan`,`id`],a(e.ratePlanId,`ratePlanId`,`text`)),e.ratePlanIsContract!==void 0&&s(n,[`rate_plan`,`is_contract`],e.ratePlanIsContract),e.ratePlanPublicName!==void 0&&s(n,[`rate_plan`,`public_name`],a(e.ratePlanPublicName,`ratePlanPublicName`,`text`)),e.ratePlanScope!==void 0&&s(n,[`rate_plan`,`scope`],a(e.ratePlanScope,`ratePlanScope`,`text`)),e.ratePlanSets!==void 0&&s(n,[`rate_plan`,`sets`],e.ratePlanSets),l(await d(`Updating subscription`,async()=>t.put(`/zones/${e.zoneId}/subscription`,{body:Object.keys(n).length>0?n:void 0})),{successLabel:`Updated subscription`})}},oe={command:`subscriptions`,describe:`Operations for subscriptions`,builder:e=>e.command(re).command(ie).command(ae).demandCommand(1),handler:()=>{}},se={command:`zones`,describe:`Zones are domains on Cloudflare — list, create, and configure domain settings`,builder:e=>e.command(_).command(v).command(y).command(A).command(I).command(p).command(g).command(E).command(k).command(F).command(R).command(V).command(W).command(K).command(Y).command(Q).command(ne).command(oe).demandCommand(1),handler:()=>{}};export{se as default};
|
|
File without changes
|