cf 0.7.0 → 0.8.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 +1 -1
- package/dist/_meta/commands.json +9 -112
- package/dist/{abuse-reports-BsF9JZPW.mjs → abuse-reports-C6GFnuYE.mjs} +1 -1
- package/dist/{account-D8mYiWxQ.mjs → account-DxzpnGA8.mjs} +1 -1
- package/dist/{accounts-CJci1Oez.mjs → accounts-6RFDuFLF.mjs} +1 -1
- package/dist/{acm-CmCd985Q.mjs → acm-Bndi5Jqo.mjs} +1 -1
- package/dist/{addressing-R7p6TRBe.mjs → addressing-C8HB4n_n.mjs} +1 -1
- package/dist/ai-B4La9Oqk.mjs +8 -0
- package/dist/{ai-audit-B0vJNOZG.mjs → ai-audit-B9kKFhoY.mjs} +1 -1
- package/dist/{ai-gateway-D3vJR3My.mjs → ai-gateway-Bx9MzNxL.mjs} +1 -1
- package/dist/{ai-search-CNg7W7U4.mjs → ai-search-BgIOIgXd.mjs} +1 -1
- package/dist/{alerting-_sdM0B0S.mjs → alerting-DVI-v6mE.mjs} +1 -1
- package/dist/{analytics-BFBJhDrP.mjs → analytics-B98epmDb.mjs} +1 -1
- package/dist/{analytics_engine-CWhFvyeK.mjs → analytics_engine-DwDePA2c.mjs} +1 -1
- package/dist/{api-gateway-D4AIEtUq.mjs → api-gateway-DW2GX64w.mjs} +1 -1
- package/dist/{argo-Bjk6nFfs.mjs → argo-DKEx-B66.mjs} +1 -1
- package/dist/{artifacts-Ba4b3iOa.mjs → artifacts-BEU8fBqt.mjs} +1 -1
- package/dist/{audit-logs-BE0T5All.mjs → audit-logs-DZiEPYL0.mjs} +1 -1
- package/dist/{auth-D_zyQbDR.mjs → auth-009DISzb.mjs} +1 -1
- package/dist/{auth-CZ0E51rF.mjs → auth-B1CY5zpC.mjs} +2 -2
- package/dist/{billing-Dz6Zj8Eq.mjs → billing-10B4_1qb.mjs} +1 -1
- package/dist/{bot-management-pFwIbFi-.mjs → bot-management-D51WzJBO.mjs} +1 -1
- package/dist/{botnet-feed-BY9uGChY.mjs → botnet-feed-Dw-leAwX.mjs} +1 -1
- package/dist/{brand-protection-DkPAk2Cz.mjs → brand-protection-BTYkTsER.mjs} +1 -1
- package/dist/{browser-extension-D9P6Yv8i.mjs → browser-extension-BFa5Ky8u.mjs} +1 -1
- package/dist/{browser-run-DhHtz4y3.mjs → browser-run-BMA8Z_hI.mjs} +1 -1
- package/dist/build-C1FOoThn.mjs +70 -0
- package/dist/{cache-DVhkiIGK.mjs → cache-DrX4gWvg.mjs} +1 -1
- package/dist/{calls-95zjvIcO.mjs → calls-m4WyL1Rb.mjs} +1 -1
- package/dist/{certificate-authorities-BowBqbVq.mjs → certificate-authorities-BA-S8NE-.mjs} +1 -1
- package/dist/{cf-BLT7uKJF.mjs → cf-BhDnTcDR.mjs} +7 -7
- package/dist/chunk-2SIGYDH3-_JSHaszR.mjs +473 -0
- package/dist/{chunk-6IEM75FG-BEjRFMGh.mjs → chunk-Q72B4Q5Z-B-N_eqrM.mjs} +1 -1
- package/dist/{client-certificates-D6mE4vJu.mjs → client-certificates-5h-fXoNq.mjs} +1 -1
- package/dist/{cloud-connector-DmwsjeFN.mjs → cloud-connector-ywFQuqtV.mjs} +1 -1
- package/dist/{cloudforce-one-CG3TT7IN.mjs → cloudforce-one-CPx4C-r3.mjs} +1 -1
- package/dist/{completions-DMc_PlIw.mjs → completions-CCRu-jvY.mjs} +1 -1
- package/dist/{connectivity-DJkE3crz.mjs → connectivity-y-Gav-Ge.mjs} +1 -1
- package/dist/{connector-interrupts-DTgQ7onV.mjs → connector-interrupts-Bs-jfuh8.mjs} +1 -1
- package/dist/{connector-telemetry-events-D0rTHDou.mjs → connector-telemetry-events-Bc6f3xpx.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots--0QmD3z6.mjs → connector-telemetry-snapshots-Bl54XZ3h.mjs} +1 -1
- package/dist/{connectors-zWaZTi2A.mjs → connectors-BnQq_R19.mjs} +1 -1
- package/dist/{content-scanning-CGvGf04y.mjs → content-scanning-Bxk-WkSL.mjs} +1 -1
- package/dist/{ct-alerting-ebSPSWNC.mjs → ct-alerting-BSn2Jqou.mjs} +1 -1
- package/dist/{custom-certificates-CWUrPYLP.mjs → custom-certificates-BBqr4S9W.mjs} +1 -1
- package/dist/{custom-csrs-CRtdrF9R.mjs → custom-csrs-CXeBzLUy.mjs} +1 -1
- package/dist/{custom-hostnames-CVQSksqq.mjs → custom-hostnames-CfCOedoN.mjs} +1 -1
- package/dist/{custom-nameservers-BRwbIdsX.mjs → custom-nameservers-RPXeu7f_.mjs} +1 -1
- package/dist/{custom-pages-Ci8sTQX7.mjs → custom-pages-xGG1xo88.mjs} +1 -1
- package/dist/{d1-78Ym1P6D.mjs → d1-CRIOfBsJ.mjs} +1 -1
- package/dist/{data-security-zmFoMwRU.mjs → data-security-D5Sw5rwj.mjs} +1 -1
- package/dist/{dcv-delegation-Dd4FZ2IG.mjs → dcv-delegation-BBnlgr6F.mjs} +1 -1
- package/dist/deploy-D0_KIUpW.mjs +2 -0
- package/dist/deploy-input-CdWrpzPA.mjs +1178 -0
- package/dist/{dev-DSslyDXx.mjs → dev-Bz87BeKt.mjs} +1 -1
- package/dist/{diagnostics-B8Ev5m_o.mjs → diagnostics-C1qryRf4.mjs} +1 -1
- package/dist/{dispatch-namespaces-Dm5vGeEP.mjs → dispatch-namespaces-DbosPgPV.mjs} +1 -1
- package/dist/{dist-BH-4NQOV.mjs → dist-C-6VkMPZ.mjs} +35 -35
- package/dist/dist-CnaLMpVH.mjs +18 -0
- package/dist/{dns-D7VAaCyO.mjs → dns-ByufYrJH.mjs} +1 -1
- package/dist/{dns-firewall-ByLCsf0q.mjs → dns-firewall-CiokCKRr.mjs} +1 -1
- package/dist/{durable-objects-BIpvyu9m.mjs → durable-objects-DjF-WAD3.mjs} +1 -1
- package/dist/{email-auth-Cx--s8W4.mjs → email-auth-B4BIYMb-.mjs} +1 -1
- package/dist/{email-routing-CiDbivcN.mjs → email-routing-BbbtpVyS.mjs} +1 -1
- package/dist/{email-security-BYeAuSc6.mjs → email-security-DuBVypAO.mjs} +1 -1
- package/dist/{email-sending-Dg2rSmHH.mjs → email-sending-5g-k05Lv.mjs} +1 -1
- package/dist/{filters-DZ8YnQ90.mjs → filters-CzJmLFcS.mjs} +1 -1
- package/dist/{firewall-DEd1hs_I.mjs → firewall-CjmeWA2M.mjs} +1 -1
- package/dist/{flagship-DVw7xGoP.mjs → flagship-BfyVrWP-.mjs} +1 -1
- package/dist/{fraud-BbGS3FZs.mjs → fraud-reRvxNg-.mjs} +1 -1
- package/dist/{google-tag-gateway-CBnRGYQR.mjs → google-tag-gateway-CGwzMZU1.mjs} +1 -1
- package/dist/{healthchecks-Da9N3ix4.mjs → healthchecks-BhCsPWcG.mjs} +1 -1
- package/dist/{hostnames-mimZu2tB.mjs → hostnames-JpgQW4kn.mjs} +1 -1
- package/dist/{hyperdrive-BNdvxOos.mjs → hyperdrive-iwYttuwV.mjs} +1 -1
- package/dist/{iam-DGQ-OgRl.mjs → iam-ffI98_4v.mjs} +1 -1
- package/dist/{images-CI6Iy9ho.mjs → images-Bgb9DGlr.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-BDB-aRtU.mjs → intel-DVRjKpyU.mjs} +1 -1
- package/dist/{ips-B9UuPvsY.mjs → ips-BtLRO19r.mjs} +1 -1
- package/dist/{keyless-certificates-Ua9uJgPt.mjs → keyless-certificates-13w8KOcC.mjs} +1 -1
- package/dist/{kv-BHerx4dZ.mjs → kv-CvQyF_NB.mjs} +1 -1
- package/dist/{leaked-credential-checks-B8Vunj9h.mjs → leaked-credential-checks-DvY8VReW.mjs} +1 -1
- package/dist/{load-balancers-DSjS5WKw.mjs → load-balancers-6lgExyS7.mjs} +1 -1
- package/dist/{logexplorer-DBIfTlRP.mjs → logexplorer-DBfrK1hn.mjs} +1 -1
- package/dist/{logo-matches-C00iGpzW.mjs → logo-matches-XS2RaxQu.mjs} +1 -1
- package/dist/{logos-CJLhx1go.mjs → logos-COtlpbRq.mjs} +1 -1
- package/dist/{logpush-Cr1U-eK-.mjs → logpush-CIpiK3Xl.mjs} +1 -1
- package/dist/{logs-DMvtchc6.mjs → logs-0KjIf_3g.mjs} +1 -1
- package/dist/{magic-cloud-networking-FQfO8QWH.mjs → magic-cloud-networking-q_d9-he-.mjs} +1 -1
- package/dist/{magic-network-monitoring-CDd70fJQ.mjs → magic-network-monitoring-DLNCrUsn.mjs} +1 -1
- package/dist/{magic-transit-DiKiPUax.mjs → magic-transit-sIwSlzoK.mjs} +1 -1
- package/dist/{managed-transforms-fPVUTrAv.mjs → managed-transforms-BKRjmzJS.mjs} +1 -1
- package/dist/{matches-B0yHbQ2I.mjs → matches-DZLS60M2.mjs} +1 -1
- package/dist/{moq-UgBawOXe.mjs → moq-Dbb9QhC1.mjs} +1 -1
- package/dist/{mtls-certificates-xKUbC5EL.mjs → mtls-certificates-BpIqoWpc.mjs} +1 -1
- package/dist/{network-interconnects-BJzOE2ny.mjs → network-interconnects-DZwGJFYT.mjs} +1 -1
- package/dist/{oauth-DBJ5GSFk.mjs → oauth-DC9g9uK_.mjs} +1 -1
- package/dist/{observability-B-1y36QS.mjs → observability-CVLjPAir.mjs} +1 -1
- package/dist/{open-YWOUIZ5Y-CFRcYALi.mjs → open-PBXRGS4R-D5C2-7de.mjs} +1 -1
- package/dist/{organization-Dq3PClZ7.mjs → organization-BGF8N1QQ.mjs} +1 -1
- package/dist/{organizations-AhsQkHyX.mjs → organizations-BInE8nlx.mjs} +1 -1
- package/dist/{origin-ca-certificates-CRgF0UyU.mjs → origin-ca-certificates-wPzWcEa0.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-BXTx7DPa.mjs → origin-post-quantum-encryption-t1Cl9hiy.mjs} +1 -1
- package/dist/{origin-tls-client-auth-BDw5q-6G.mjs → origin-tls-client-auth-Cvr9D8eq.mjs} +1 -1
- package/dist/{page-rules-DqYQ23eg.mjs → page-rules-CMo73oVb.mjs} +1 -1
- package/dist/{page-shield-DKdlZOLO.mjs → page-shield-Z23iqabu.mjs} +1 -1
- package/dist/{pages-BsXF11Kv.mjs → pages-ByaZvYjA.mjs} +1 -1
- package/dist/{pay-per-crawl-BGAwuAP3.mjs → pay-per-crawl-BXTenh_d.mjs} +1 -1
- package/dist/{pipelines-D_QhSnGW.mjs → pipelines-7KWm5BYN.mjs} +1 -1
- package/dist/{progress-O88q63Bk.mjs → progress-BLQ2xXwD.mjs} +1 -1
- package/dist/{prompt-DTAWiEm2.mjs → prompt-DcfYBioA.mjs} +1 -1
- package/dist/{queries-CAE95-OH.mjs → queries-Cgx1lQbn.mjs} +1 -1
- package/dist/{queues-BBz35Mqd.mjs → queues-jnugmCYI.mjs} +1 -1
- package/dist/{r2-Zp99S5xF.mjs → r2-Dllx7F7a.mjs} +1 -1
- package/dist/{r2-data-catalog-BeVLZwrE.mjs → r2-data-catalog-CaAAPwKp.mjs} +1 -1
- package/dist/{radar-Cij-XVQJ.mjs → radar-DLSHX2_1.mjs} +1 -1
- package/dist/{rate-limits-DSdToIWv.mjs → rate-limits-DlVTd6QY.mjs} +1 -1
- package/dist/{raw-fetch-DgezeshQ.mjs → raw-fetch-CeW1mW_u.mjs} +1 -1
- package/dist/{realtime-kit-9rJcapfM.mjs → realtime-kit-ct8Fu2kO.mjs} +1 -1
- package/dist/{registrar-CXViZlah.mjs → registrar-CKTB7QTM.mjs} +1 -1
- package/dist/{registrar-sandbox-CvQyjXLJ.mjs → registrar-sandbox-1-nNk6Uy.mjs} +1 -1
- package/dist/{request-tracers-DATfBnE9.mjs → request-tracers-DO6lno0x.mjs} +1 -1
- package/dist/{resource-sharing-Cmhn6ghR.mjs → resource-sharing-DYhXJw44.mjs} +1 -1
- package/dist/{resource-tagging-BTn05AOj.mjs → resource-tagging-CcKWMF9l.mjs} +1 -1
- package/dist/{rules-ens3OHme.mjs → rules-DQKR3qb7.mjs} +1 -1
- package/dist/{rulesets-bkreZRao.mjs → rulesets-B9fZb_JY.mjs} +1 -1
- package/dist/{rum-CpgXFcwl.mjs → rum-BaJio_GD.mjs} +1 -1
- package/dist/{schema-validation-Ca6o94ts.mjs → schema-validation-Cqv8KT1B.mjs} +1 -1
- package/dist/{scim-C4oT8TMc.mjs → scim-DkYH1dep.mjs} +1 -1
- package/dist/{secrets-store-CWEuiDNo.mjs → secrets-store-CMR_pA1t.mjs} +1 -1
- package/dist/{security-center-BOvm7xy6.mjs → security-center-DCHfgCq6.mjs} +1 -1
- package/dist/{security-txt-BCAUBctN.mjs → security-txt-D19uTyaf.mjs} +1 -1
- package/dist/{session-B1ARgLG7.mjs → session-CQpgz61H.mjs} +1 -1
- package/dist/{share-DhmVspmL.mjs → share-CfJbt0WU.mjs} +1 -1
- package/dist/shared-D0xvDsDl.mjs +2 -0
- package/dist/{smart-shield-DZm4fn6z.mjs → smart-shield-BG5WOmi1.mjs} +1 -1
- package/dist/{snippets-oQ0u26-z.mjs → snippets-CYiSdx7R.mjs} +1 -1
- package/dist/{spawn-ChG5Xi9Z.mjs → spawn-j3dn7A69.mjs} +1 -1
- package/dist/{spectrum-Cnkee5Ww.mjs → spectrum-Qvq3yJax.mjs} +1 -1
- package/dist/{speed-DqNnvLBD.mjs → speed-vpoB9msm.mjs} +1 -1
- package/dist/{src-By-zTCHz.mjs → src-Bn0FyQIp.mjs} +5 -5
- package/dist/{ssl-tS3CYZsZ.mjs → ssl-Qw8eVAiS.mjs} +1 -1
- package/dist/{state-OsdDJvdj.mjs → state-C2cBU9iK.mjs} +1 -1
- package/dist/{stream-Bud9Os5V.mjs → stream-BNbkY3zI.mjs} +1 -1
- package/dist/{submit-BtP8she2.mjs → submit-pQNW7uWj.mjs} +1 -1
- package/dist/{tenant-CMwHa-tU.mjs → tenant-xkvdAutS.mjs} +1 -1
- package/dist/{token-validation-BYC7HTok.mjs → token-validation-5F2AbQCz.mjs} +1 -1
- package/dist/triggers-CYdZhJYr.mjs +2 -0
- package/dist/{turnstile-CP4nScaL.mjs → turnstile-BSIaunXn.mjs} +1 -1
- package/dist/{ui-BNoF0KpD.mjs → ui-CTo5OG9r.mjs} +1 -1
- package/dist/{url-info-Chs9h7Y-.mjs → url-info-Q7m7AVih.mjs} +1 -1
- package/dist/{url-normalization-XYxW5Gj0.mjs → url-normalization-Bs2m5jlD.mjs} +1 -1
- package/dist/{url-scanner-D4pYNlO-.mjs → url-scanner-CYmT3C99.mjs} +1 -1
- package/dist/{user-DtefniLc.mjs → user-Bay_0p3C.mjs} +1 -1
- package/dist/{vectorize-BeAY2g-7.mjs → vectorize-cP2OuB5N.mjs} +1 -1
- package/dist/{versions-dMW3bLVv.mjs → versions-D7F26fhH.mjs} +1 -1
- package/dist/{waiting-rooms-K78HeeTg.mjs → waiting-rooms-B5HR1-37.mjs} +1 -1
- package/dist/{web3-Dhw79l4S.mjs → web3-DqCXM4sx.mjs} +1 -1
- package/dist/{workers-l3zMNOU6.mjs → workers-Cu-A8AZc.mjs} +1 -1
- package/dist/{workers-builds-CuOAB3u4.mjs → workers-builds-CmCg27M-.mjs} +1 -1
- package/dist/{workflows-rb7RYBKP.mjs → workflows-DavS4SEh.mjs} +1 -1
- package/dist/{zaraz-CHecMYuo.mjs → zaraz-CKcVy5Xa.mjs} +1 -1
- package/dist/{zero-trust-DAZoa-Aj.mjs → zero-trust-BKVqb2yq.mjs} +1 -1
- package/dist/{zone-BnnqJwW-.mjs → zone-BOcuY4sU.mjs} +1 -1
- package/dist/{zones-DpI2YikF.mjs → zones-BR-9WaY7.mjs} +1 -1
- package/package.json +5 -4
- package/dist/ai-BzJg0RIX.mjs +0 -3
- package/dist/build-CWuStmDi.mjs +0 -2
- package/dist/chunk-2SIGYDH3-qXx_zE6v.mjs +0 -397
- package/dist/deploy-CVvkZFjR.mjs +0 -2
- package/dist/lib-Og5sB51C.mjs +0 -68
- package/dist/shared-Bod3-Exx.mjs +0 -990
- /package/dist/{schema-DCF4yEp_.mjs → schema-DAW-B7wT.mjs} +0 -0
- /package/dist/{tools-Dru4l8yh.mjs → tools-BpNGzfj2.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{D as e}from"./oauth-
|
|
2
|
+
import{D as e}from"./oauth-DC9g9uK_.mjs";import{n as t}from"./auth-B1CY5zpC.mjs";import{t as n}from"./output-B6fBFRqe.mjs";import{n as r,t as i}from"./progress-BLQ2xXwD.mjs";import{n as a}from"./body-parser-BO6mfo_W.mjs";import{t as o}from"./prompt-DcfYBioA.mjs";import{t as s}from"./cli-types-CFw6Xygp.mjs";function c(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const l={command:`list`,describe:`Retrieves quota for all plans, as well as the current zone quota.`,builder:c,handler:async a=>{if(a.dryRun){r({command:`cf speed availabilities list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/availabilities`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.speed.availabilities.list({zone_id:s})),{successLabel:`Loaded`})}},u={command:`availabilities`,describe:`Operations for availabilities`,builder:e=>e.command(l).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`Lists all webpages which have been tested.`,builder:d,handler:async a=>{if(a.dryRun){r({command:`cf speed pages list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/pages`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.speed.pages.list({zone_id:s})),{successLabel:`Loaded`})}};function p(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const m={command:`create <url>`,describe:`Starts a test for a specific webpage, in a specific region.`,builder:p,handler:async o=>{if(o.dryRun){r({command:`cf speed pages tests create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/speed_api/pages/${o.url==null?`<url>`:encodeURIComponent(String(o.url))}/tests`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),url:String(o.url??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Creating`,async()=>s.speed.pages.tests.create({...e,zone_id:c,url:o.url})),{successLabel:`Created`});return}n(await i(`Creating`,async()=>s.speed.pages.tests.create({zone_id:c,url:o.url})),{successLabel:`Created`})}};function h(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).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 g={command:`delete <url>`,describe:`Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.`,builder:s(h),handler:async a=>{let s={region:a.region};if(a.dryRun){r({command:`cf speed pages tests delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/pages/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}/tests`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:s,bodyKind:`none`});return}let c=await t(a),l=await e({zone:a.zone},c,{quiet:a.quiet});if(a.zoneId=l,!await o({force:!!a.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>c.speed.pages.tests.delete({zone_id:l,url:a.url,...s})),{successLabel:`Deleted`})}};function _(e){return e.positional(`test-id`,{type:`string`,description:`Test ID`,demandOption:!0}).option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <test-id>`,describe:`Retrieves the result of a specific test.`,builder:_,handler:async a=>{if(a.dryRun){r({command:`cf speed pages tests get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/pages/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}/tests/${a[`test-id`]==null?`<test-id>`:encodeURIComponent(String(a[`test-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``),"test-id":String(a[`test-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.speed.pages.tests.get({zone_id:s,url:a.url,test_id:a[`test-id`]})),{successLabel:`Loaded`})}};function y(e){return e.option(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`page`,{type:`number`,description:`Page`}).option(`per-page`,{type:`number`,description:`Per page`}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Test history (list of tests) for a specific webpage.`,builder:s(y),handler:async a=>{let o={page:a.page,per_page:a[`per-page`],region:a.region};if(a.dryRun){r({command:`cf speed pages tests list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/pages/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}/tests`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.speed.pages.tests.list({zone_id:c,url:a.url,...o})),{successLabel:`Loaded`})}},x={command:`tests`,describe:`Operations for pages.tests`,builder:e=>e.command(m).command(g).command(v).command(b).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function S(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`],demandOption:!0}).option(`device-type`,{type:`string`,description:`The type of device.`,choices:[`DESKTOP`,`MOBILE`],demandOption:!0}).option(`start`,{type:`string`,description:`Start`,demandOption:!0}).option(`end`,{type:`string`,description:`End`}).option(`tz`,{type:`string`,description:`The timezone of the start and end timestamps.`,demandOption:!0}).option(`metrics`,{type:`string`,description:`A comma-separated list of metrics to include in the results.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`trend <url>`,describe:`Lists the core web vital metrics trend over time for a specific page.`,builder:s(S),handler:async a=>{let o={region:a.region,deviceType:a[`device-type`],start:a.start,end:a.end,tz:a.tz,metrics:a.metrics};if(a.dryRun){r({command:`cf speed pages trend`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/pages/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}/trend`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.speed.pages.trend({zone_id:c,url:a.url,...o})),{successLabel:`Loaded`})}},w={command:`pages`,describe:`Operations for pages`,builder:e=>e.command(f).command(C).command(x).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`frequency`,{type:`string`,description:`The frequency of the scheduled test. Defaults to WEEKLY for free plans, DAILY for paid plans.`,choices:[`DAILY`,`WEEKLY`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`create <url>`,describe:`Creates a scheduled test for a page.`,builder:s(T),handler:async a=>{let o={region:a.region,frequency:a.frequency};if(a.dryRun){r({command:`cf speed schedule create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/schedule/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Creating`,async()=>s.speed.schedule.create({zone_id:c,url:a.url,...o})),{successLabel:`Created`})}};function D(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const O={command:`delete <url>`,describe:`Deletes a scheduled test for a page.`,builder:s(D),handler:async a=>{let s={region:a.region};if(a.dryRun){r({command:`cf speed schedule delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/schedule/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:s,bodyKind:`none`});return}let c=await t(a),l=await e({zone:a.zone},c,{quiet:a.quiet});if(a.zoneId=l,!await o({force:!!a.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}n(await i(`Deleting`,async()=>c.speed.schedule.delete({zone_id:l,url:a.url,...s})),{successLabel:`Deleted`})}};function k(e){return e.positional(`url`,{type:`string`,description:`A URL.`,demandOption:!0}).option(`region`,{type:`string`,description:`A test region.`,choices:[`asia-east1`,`asia-northeast1`,`asia-northeast2`,`asia-south1`,`asia-southeast1`,`australia-southeast1`,`europe-north1`,`europe-southwest1`,`europe-west1`,`europe-west2`,`europe-west3`,`europe-west4`,`europe-west8`,`europe-west9`,`me-west1`,`southamerica-east1`,`us-central1`,`us-east1`,`us-east4`,`us-south1`,`us-west1`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get <url>`,describe:`Retrieves the test schedule for a page in a specific region.`,builder:s(k),handler:async a=>{let o={region:a.region};if(a.dryRun){r({command:`cf speed schedule get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/speed_api/schedule/${a.url==null?`<url>`:encodeURIComponent(String(a.url))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),url:String(a.url??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.speed.schedule.get({zone_id:c,url:a.url,...o})),{successLabel:`Loaded`})}},j={command:`schedule`,describe:`Operations for schedule`,builder:e=>e.command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`speed`,describe:`speed`,builder:e=>e.command(u).command(w).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{o as e,t}from"./chunk-DH-VkVmc.mjs";import{a as n,n as r,o as i,r as a,s as o,t as s}from"./session-
|
|
2
|
+
import{o as e,t}from"./chunk-DH-VkVmc.mjs";import{a as n,n as r,o as i,r as a,s as o,t as s}from"./session-CQpgz61H.mjs";import{r as c}from"./sdk-pQ5kaGUX.mjs";import{Y as l}from"./chunk-2SIGYDH3-_JSHaszR.mjs";import{a as u,n as d,t as f}from"./theme-DbNbIY4d.mjs";import{i as p,t as m}from"./ui-CTo5OG9r.mjs";import{createRequire as h}from"node:module";import{notStrictEqual as g,strictEqual as ee}from"assert";import{basename as _,dirname as te,extname as v,join as ne,normalize as re,relative as ie,resolve as y}from"path";import{readFileSync as b,readdirSync as ae,statSync as x,writeFile as S}from"fs";import{format as oe,inspect as se}from"util";import{fileURLToPath as ce}from"url";import{readFileSync as le,readdirSync as ue}from"node:fs";const de={right:C,center:ge};var fe=class{constructor(e){this.width=e.width,this.wrap=e.wrap??!0,this.rows=[]}span(...e){let t=this.div(...e);t.span=!0}resetOutput(){this.rows=[]}div(...e){if(e.length===0&&this.div(``),this.wrap&&this.shouldApplyLayoutDSL(...e)&&typeof e[0]==`string`)return this.applyLayoutDSL(e[0]);let t=e.map(e=>typeof e==`string`?this.colFromString(e):e);return this.rows.push(t),t}shouldApplyLayoutDSL(...e){return e.length===1&&typeof e[0]==`string`&&/[\t\n]/.test(e[0])}applyLayoutDSL(e){let t=e.split(`
|
|
3
3
|
`).map(e=>e.split(` `)),n=0;return t.forEach(e=>{e.length>1&&w.stringWidth(e[0])>n&&(n=Math.min(Math.floor(this.width*.5),w.stringWidth(e[0])))}),t.forEach(e=>{this.div(...e.map((t,r)=>({text:t.trim(),padding:this.measurePadding(t),width:r===0&&e.length>1?n:void 0})))}),this.rows[this.rows.length-1]}colFromString(e){return{text:e,padding:this.measurePadding(e)}}measurePadding(e){let t=w.stripAnsi(e);return[0,t.match(/\s*$/)[0].length,0,t.match(/^\s*/)[0].length]}toString(){let e=[];return this.rows.forEach(t=>{this.rowToString(t,e)}),e.filter(e=>!e.hidden).map(e=>e.text).join(`
|
|
4
4
|
`)}rowToString(e,t){return this.rasterize(e).forEach((n,r)=>{let i=``;n.forEach((n,a)=>{let{width:o}=e[a],s=this.negatePadding(e[a]),c=n;if(s>w.stringWidth(n)&&(c+=` `.repeat(s-w.stringWidth(n))),e[a].align&&e[a].align!==`left`&&this.wrap){let t=de[e[a].align];c=t(c,s),w.stringWidth(c)<s&&(c+=` `.repeat((o||0)-w.stringWidth(c)-1))}let l=e[a].padding||[0,0,0,0];l[3]&&(i+=` `.repeat(l[3])),i+=pe(e[a],c,`| `),i+=c,i+=pe(e[a],c,` |`),l[1]&&(i+=` `.repeat(l[1])),r===0&&t.length>0&&(i=this.renderInline(i,t[t.length-1]))}),t.push({text:i.replace(/ +$/,``),span:e.span})}),t}renderInline(e,t){let n=e.match(/^ */),r=n?n[0].length:0,i=t.text,a=w.stringWidth(i.trimRight());return t.span?this.wrap?r<a?e:(t.hidden=!0,i.trimRight()+` `.repeat(r-a)+e.trimLeft()):(t.hidden=!0,i+e):e}rasterize(e){let t=[],n=this.columnWidths(e),r;return e.forEach((e,i)=>{e.width=n[i],r=this.wrap?w.wrap(e.text,this.negatePadding(e),{hard:!0}).split(`
|
|
5
5
|
`):e.text.split(`
|
|
@@ -95,7 +95,7 @@ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name
|
|
|
95
95
|
`)}`:``;t.fail(i(`Missing required argument: %s`,`Missing required arguments: %s`,Object.keys(r).length,Object.keys(r).join(`, `)+n))}},a.unknownArguments=function(n,r,o,s,c=!0){let l=e.getInternalMethods().getCommandInstance().getCommands(),u=[],d=e.getInternalMethods().getContext();if(Object.keys(n).forEach(t=>{!Zt.includes(t)&&!Object.prototype.hasOwnProperty.call(o,t)&&!Object.prototype.hasOwnProperty.call(e.getInternalMethods().getParseContext(),t)&&!a.isValidAndSomeAliasIsNotNew(t,r)&&u.push(t)}),c&&(d.commands.length>0||l.length>0||s)&&n._.slice(d.commands.length).forEach(e=>{l.includes(``+e)||u.push(``+e)}),c){let t=e.getDemandedCommands()._?.max||0,r=d.commands.length+t;r<n._.length&&n._.slice(r).forEach(e=>{e=String(e),!d.commands.includes(e)&&!u.includes(e)&&u.push(e)})}u.length&&t.fail(i(`Unknown argument: %s`,`Unknown arguments: %s`,u.length,u.map(e=>e.trim()?e:`"${e}"`).join(`, `)))},a.unknownCommands=function(n){let r=e.getInternalMethods().getCommandInstance().getCommands(),a=[],o=e.getInternalMethods().getContext();return(o.commands.length>0||r.length>0)&&n._.slice(o.commands.length).forEach(e=>{r.includes(``+e)||a.push(``+e)}),a.length>0?(t.fail(i(`Unknown command: %s`,`Unknown commands: %s`,a.length,a.join(`, `))),!0):!1},a.isValidAndSomeAliasIsNotNew=function(t,n){if(!Object.prototype.hasOwnProperty.call(n,t))return!1;let r=e.parsed.newAliases;return[t,...n[t]].some(e=>!Object.prototype.hasOwnProperty.call(r,e)||!r[t])},a.limitedChoices=function(n){let i=e.getOptions(),a={};if(!Object.keys(i.choices).length)return;Object.keys(n).forEach(e=>{Zt.indexOf(e)===-1&&Object.prototype.hasOwnProperty.call(i.choices,e)&&[].concat(n[e]).forEach(t=>{i.choices[e].indexOf(t)===-1&&t!==void 0&&(a[e]=(a[e]||[]).concat(t))})});let o=Object.keys(a);if(!o.length)return;let s=r(`Invalid values:`);o.forEach(e=>{s+=`\n ${r(`Argument: %s, Given: %s, Choices: %s`,e,t.stringifiedValues(a[e]),t.stringifiedValues(i.choices[e]))}`}),t.fail(s)};let o={};a.implies=function(t,r){N(`<string|object> [array|number|string]`,[t,r],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.implies(e,t[e])}):(e.global(t),o[t]||(o[t]=[]),Array.isArray(r)?r.forEach(e=>a.implies(t,e)):(A(r,void 0,n),o[t].push(r)))},a.getImplied=function(){return o};function s(e,t){let n=Number(t);return t=isNaN(n)?t:n,typeof t==`number`?t=e._.length>=t:t.match(/^--no-.+/)?(t=t.match(/^--no-(.+)/)[1],t=!Object.prototype.hasOwnProperty.call(e,t)):t=Object.prototype.hasOwnProperty.call(e,t),t}a.implications=function(e){let n=[];if(Object.keys(o).forEach(t=>{let r=t;(o[t]||[]).forEach(t=>{let i=r,a=t;i=s(e,i),t=s(e,t),i&&!t&&n.push(` ${r} -> ${a}`)})}),n.length){let e=`${r(`Implications failed:`)}\n`;n.forEach(t=>{e+=t}),t.fail(e)}};let c={};a.conflicts=function(t,n){N(`<string|object> [array|string]`,[t,n],arguments.length),typeof t==`object`?Object.keys(t).forEach(e=>{a.conflicts(e,t[e])}):(e.global(t),c[t]||(c[t]=[]),Array.isArray(n)?n.forEach(e=>a.conflicts(t,e)):c[t].push(n))},a.getConflicting=()=>c,a.conflicting=function(i){Object.keys(i).forEach(e=>{c[e]&&c[e].forEach(n=>{n&&i[e]!==void 0&&i[n]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,n))})}),e.getInternalMethods().getParserConfiguration()[`strip-dashed`]&&Object.keys(c).forEach(e=>{c[e].forEach(a=>{a&&i[n.Parser.camelCase(e)]!==void 0&&i[n.Parser.camelCase(a)]!==void 0&&t.fail(r(`Arguments %s and %s are mutually exclusive`,e,a))})})},a.recommendCommands=function(e,n){n=n.sort((e,t)=>t.length-e.length);let i=null,a=1/0;for(let t=0,r;(r=n[t])!==void 0;t++){let t=Xt(e,r);t<=3&&t<a&&(a=t,i=r)}i&&t.fail(r(`Did you mean %s?`,i))},a.reset=function(e){return o=Rt(o,t=>!e[t]),c=Rt(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();A(e,void 0,n),{implied:o,conflicting:c}=e},a}let $t=[],en;function tn(e,t,n,r){en=r;let i={};if(Object.prototype.hasOwnProperty.call(e,`extends`)){if(typeof e.extends!=`string`)return i;let a=/\.json|\..*rc$/.test(e.extends),o=null;if(a)o=rn(t,e.extends);else try{o=import.meta.resolve(e.extends)}catch{return e}nn(o),$t.push(o),i=a?JSON.parse(en.readFileSync(o,`utf8`)):r.require(e.extends),delete e.extends,i=tn(i,en.path.dirname(o),n,en)}return $t=[],n?an(i,e):Object.assign({},i,e)}function nn(e){if($t.indexOf(e)>-1)throw new M(`Circular extended configurations: '${e}'.`)}function rn(e,t){return en.path.resolve(e,t)}function an(e,t){let n={};function r(e){return e&&typeof e==`object`&&!Array.isArray(e)}Object.assign(n,e);for(let i of Object.keys(t))r(t[i])&&r(n[i])?n[i]=an(e[i],t[i]):n[i]=t[i];return n}var P=function(e,t,n,r,i){if(r===`m`)throw TypeError(`Private method is not writable`);if(r===`a`&&!i)throw TypeError(`Private accessor was defined without a setter`);if(typeof t==`function`?e!==t||!i:!t.has(e))throw TypeError(`Cannot write private member to an object whose class did not declare it`);return r===`a`?i.call(e,n):i?i.value=n:t.set(e,n),n},F=function(e,t,n,r){if(n===`a`&&!r)throw TypeError(`Private accessor was defined without a getter`);if(typeof t==`function`?e!==t||!r:!t.has(e))throw TypeError(`Cannot read private member from an object whose class did not declare it`);return n===`m`?r:n===`a`?r.call(e):r?r.value:t.get(e)},I,on,sn,L,R,cn,z,ln,un,B,dn,V,H,U,W,fn,pn,G,K,mn,hn,q,gn,_n,vn,yn,bn,J,xn,Sn,Cn,Y,wn,X,Z;function Tn(e){return(t=[],n=e.process.cwd(),r)=>{let i=new sr(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const En=Symbol(`copyDoubleDash`),Dn=Symbol(`copyDoubleDash`),On=Symbol(`deleteFromParserHintObject`),kn=Symbol(`emitWarning`),An=Symbol(`freeze`),jn=Symbol(`getDollarZero`),Mn=Symbol(`getParserConfiguration`),Nn=Symbol(`getUsageConfiguration`),Pn=Symbol(`guessLocale`),Fn=Symbol(`guessVersion`),In=Symbol(`parsePositionalNumbers`),Ln=Symbol(`pkgUp`),Q=Symbol(`populateParserHintArray`),Rn=Symbol(`populateParserHintSingleValueDictionary`),zn=Symbol(`populateParserHintArrayDictionary`),Bn=Symbol(`populateParserHintDictionary`),Vn=Symbol(`sanitizeKey`),Hn=Symbol(`setKey`),Un=Symbol(`unfreeze`),Wn=Symbol(`validateAsync`),Gn=Symbol(`getCommandInstance`),Kn=Symbol(`getContext`),qn=Symbol(`getHasOutput`),Jn=Symbol(`getLoggerInstance`),Yn=Symbol(`getParseContext`),Xn=Symbol(`getUsageInstance`),Zn=Symbol(`getValidationInstance`),Qn=Symbol(`hasParseCallback`),$n=Symbol(`isGlobalContext`),er=Symbol(`postProcess`),tr=Symbol(`rebase`),nr=Symbol(`reset`),rr=Symbol(`runYargsParserAndExecuteCommands`),ir=Symbol(`runValidation`),ar=Symbol(`setHasOutput`),or=Symbol(`kTrackManuallySetKeys`);var sr=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,I.set(this,void 0),on.set(this,void 0),sn.set(this,{commands:[],fullCommands:[]}),L.set(this,null),R.set(this,null),cn.set(this,`show-hidden`),z.set(this,null),ln.set(this,!0),un.set(this,{}),B.set(this,!0),dn.set(this,[]),V.set(this,void 0),H.set(this,{}),U.set(this,!1),W.set(this,null),fn.set(this,!0),pn.set(this,void 0),G.set(this,``),K.set(this,void 0),mn.set(this,void 0),hn.set(this,{}),q.set(this,null),gn.set(this,null),_n.set(this,{}),vn.set(this,{}),yn.set(this,void 0),bn.set(this,!1),J.set(this,void 0),xn.set(this,!1),Sn.set(this,!1),Cn.set(this,!1),Y.set(this,void 0),wn.set(this,{}),X.set(this,null),Z.set(this,void 0),P(this,J,r,`f`),P(this,yn,e,`f`),P(this,on,t,`f`),P(this,mn,n,`f`),P(this,V,new Tt(this),`f`),this.$0=this[jn](),this[nr](),P(this,I,F(this,I,`f`),`f`),P(this,Y,F(this,Y,`f`),`f`),P(this,Z,F(this,Z,`f`),`f`),P(this,K,F(this,K,`f`),`f`),F(this,K,`f`).showHiddenOpt=F(this,cn,`f`),P(this,pn,this[Dn](),`f`),F(this,J,`f`).y18n.setLocale(`en_US`)}addHelpOpt(e,t){return N(`[string|boolean] [string]`,[e,t],arguments.length),F(this,W,`f`)&&(this[On](F(this,W,`f`)),P(this,W,null,`f`)),e===!1&&t===void 0?this:(P(this,W,typeof e==`string`?e:`help`,`f`),this.boolean(F(this,W,`f`)),this.describe(F(this,W,`f`),t||F(this,Y,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(N(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:F(this,cn,`f`);return this.boolean(n),this.describe(n,t||F(this,Y,`f`).deferY18nLookup(`Show hidden options`)),F(this,K,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[zn](this.alias.bind(this),`alias`,e,t),this}array(e){return N(`<array|string>`,[e],arguments.length),this[Q](`array`,e),this[or](e),this}boolean(e){return N(`<array|string>`,[e],arguments.length),this[Q](`boolean`,e),this[or](e),this}check(e,t){return N(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>Ot(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&F(this,Y,`f`).fail(n.toString(),n):F(this,Y,`f`).fail(F(this,J,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(F(this,Y,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return N(`<object|string|array> [string|array]`,[e,t],arguments.length),this[zn](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(N(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new M(`coerce callback must be provided`);for(let n of e)this.coerce(n,t);return this}else if(typeof e==`object`){for(let t of Object.keys(e))this.coerce(t,e[t]);return this}if(!t)throw new M(`coerce callback must be provided`);let n=e;return F(this,K,`f`).key[n]=!0,F(this,V,`f`).addCoerceMiddleware((e,r)=>{let i=[n,...r.getAliases()[n]??[]].filter(t=>Object.prototype.hasOwnProperty.call(e,t));return i.length===0?e:Ot(()=>t(e[i[0]]),t=>(i.forEach(n=>{e[n]=t}),e),e=>{throw new M(e.message)})},n),this}conflicts(e,t){return N(`<string|object> [string|array]`,[e,t],arguments.length),F(this,Z,`f`).conflicts(e,t),this}config(e=`config`,t,n){return N(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=tn(e,F(this,on,`f`),this[Mn]()[`deep-merge-config`]||!1,F(this,J,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||F(this,Y,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{F(this,K,`f`).config[e]=n||!0}),this)}completion(e,t,n){return N(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),P(this,R,e||F(this,R,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(F(this,R,`f`),t),n&&F(this,L,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return N(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),F(this,I,`f`).addHandler(e,t,n,r,i,a),this}commands(e,t,n,r,i,a){return this.command(e,t,n,r,i,a)}commandDir(e,t){N(`<string> [object]`,[e,t],arguments.length);let n=F(this,mn,`f`)||F(this,J,`f`).require;return F(this,I,`f`).addDirectory(e,n,F(this,J,`f`).getCallerFile(),t),this}count(e){return N(`<array|string>`,[e],arguments.length),this[Q](`count`,e),this[or](e),this}default(e,t,n){return N(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(yt(e,F(this,J,`f`)),F(this,K,`f`).defaultDescription[e]=n),typeof t==`function`&&(yt(e,F(this,J,`f`)),F(this,K,`f`).defaultDescription[e]||(F(this,K,`f`).defaultDescription[e]=F(this,Y,`f`).functionDescription(t)),t=t.call()),this[Rn](this.default.bind(this),`default`,e,t),this}defaults(e,t,n){return this.default(e,t,n)}demandCommand(e=1,t,n,r){return N(`[number] [number|string] [string|null|undefined] [string|null|undefined]`,[e,t,n,r],arguments.length),typeof t!=`number`&&(n=t,t=1/0),this.global(`_`,!1),F(this,K,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{A(n,!0,F(this,J,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(A(n,!0,F(this,J,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{A(n,!0,F(this,J,`f`)),this.demandOption(e,n)}):typeof n==`string`?this.demandOption(e,n):(n===!0||n===void 0)&&this.demandOption(e),this}demandOption(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[Rn](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return N(`<string> [string|boolean]`,[e,t],arguments.length),F(this,K,`f`).deprecatedOptions[e]=t,this}describe(e,t){return N(`<object|string|array> [string]`,[e,t],arguments.length),this[Hn](e,!0),F(this,Y,`f`).describe(e,t),this}detectLocale(e){return N(`<boolean>`,[e],arguments.length),P(this,ln,e,`f`),this}env(e){return N(`[string|boolean]`,[e],arguments.length),e===!1?delete F(this,K,`f`).envPrefix:F(this,K,`f`).envPrefix=e||``,this}epilogue(e){return N(`<string>`,[e],arguments.length),F(this,Y,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return N(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):F(this,Y,`f`).example(e,t),this}exit(e,t){P(this,U,!0,`f`),P(this,z,t,`f`),F(this,B,`f`)&&F(this,J,`f`).process.exit(e)}exitProcess(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,B,e,`f`),this}fail(e){if(N(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new M(`Invalid first argument. Expected function or boolean 'false'`);return F(this,Y,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return N(`<array> [function]`,[e,t],arguments.length),t?F(this,L,`f`).getCompletion(e,t):new Promise((t,n)=>{F(this,L,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return N([],0),F(this,K,`f`).demandedOptions}getDemandedCommands(){return N([],0),F(this,K,`f`).demandedCommands}getDeprecatedOptions(){return N([],0),F(this,K,`f`).deprecatedOptions}getDetectLocale(){return F(this,ln,`f`)}getExitProcess(){return F(this,B,`f`)}getGroups(){return Object.assign({},F(this,H,`f`),F(this,vn,`f`))}getHelp(){if(P(this,U,!0,`f`),!F(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[rr](F(this,yn,`f`),void 0,void 0,0,!0);if(j(e))return e.then(()=>F(this,Y,`f`).help())}let e=F(this,I,`f`).runDefaultBuilderOn(this);if(j(e))return e.then(()=>F(this,Y,`f`).help())}return Promise.resolve(F(this,Y,`f`).help())}getOptions(){return F(this,K,`f`)}getStrict(){return F(this,xn,`f`)}getStrictCommands(){return F(this,Sn,`f`)}getStrictOptions(){return F(this,Cn,`f`)}global(e,t){return N(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{F(this,K,`f`).local.includes(e)||F(this,K,`f`).local.push(e)}):F(this,K,`f`).local=F(this,K,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){N(`<string|array> <string>`,[e,t],arguments.length);let n=F(this,vn,`f`)[t]||F(this,H,`f`)[t];F(this,vn,`f`)[t]&&delete F(this,vn,`f`)[t];let r={};return F(this,H,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return N(`<string>`,[e],arguments.length),F(this,K,`f`).hiddenOptions.push(e),this}implies(e,t){return N(`<string|object> [number|string|array]`,[e,t],arguments.length),F(this,Z,`f`).implies(e,t),this}locale(e){return N(`[string]`,[e],arguments.length),e===void 0?(this[Pn](),F(this,J,`f`).y18n.getLocale()):(P(this,ln,!1,`f`),F(this,J,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return F(this,V,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return N(`<string|object|array> [number]`,[e,t],arguments.length),this[Rn](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return N(`<array|string>`,[e],arguments.length),this[Q](`normalize`,e),this}number(e){return N(`<array|string>`,[e],arguments.length),this[Q](`number`,e),this[or](e),this}option(e,t){if(N(`<string|object> [object]`,[e,t],arguments.length),typeof e==`object`)Object.keys(e).forEach(t=>{this.options(t,e[t])});else{typeof t!=`object`&&(t={}),this[or](e),F(this,X,`f`)&&(e===`version`||t?.alias===`version`)&&this[kn]([`"version" is a reserved word.`,`Please do one of the following:`,'- Disable version with `yargs.version(false)` if using "version" as an option',"- Use the built-in `yargs.version` method instead (if applicable)",`- Use a different option key`,`https://yargs.js.org/docs/#api-reference-version`].join(`
|
|
96
96
|
`),void 0,`versionWarning`),F(this,K,`f`).key[e]=!0,t.alias&&this.alias(e,t.alias);let n=t.deprecate||t.deprecated;n&&this.deprecateOption(e,n);let r=t.demand||t.required||t.require;r&&this.demand(e,r),t.demandOption&&this.demandOption(e,typeof t.demandOption==`string`?t.demandOption:void 0),t.conflicts&&this.conflicts(e,t.conflicts),`default`in t&&this.default(e,t.default),t.implies!==void 0&&this.implies(e,t.implies),t.nargs!==void 0&&this.nargs(e,t.nargs),t.config&&this.config(e,t.configParser),t.normalize&&this.normalize(e),t.choices&&this.choices(e,t.choices),t.coerce&&this.coerce(e,t.coerce),t.group&&this.group(e,t.group),(t.boolean||t.type===`boolean`)&&(this.boolean(e),t.alias&&this.boolean(t.alias)),(t.array||t.type===`array`)&&(this.array(e),t.alias&&this.array(t.alias)),(t.number||t.type===`number`)&&(this.number(e),t.alias&&this.number(t.alias)),(t.string||t.type===`string`)&&(this.string(e),t.alias&&this.string(t.alias)),(t.count||t.type===`count`)&&this.count(e),typeof t.global==`boolean`&&this.global(e,t.global),t.defaultDescription&&(F(this,K,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=F(this,Y,`f`).getDescriptions();(!Object.prototype.hasOwnProperty.call(a,e)||typeof i==`string`)&&this.describe(e,i),t.hidden&&this.hide(e),t.requiresArg&&this.requiresArg(e)}return this}options(e,t){return this.option(e,t)}parse(e,t,n){N(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[An](),e===void 0&&(e=F(this,yn,`f`)),typeof t==`object`&&(P(this,gn,t,`f`),t=n),typeof t==`function`&&(P(this,q,t,`f`),t=!1),t||P(this,yn,e,`f`),F(this,q,`f`)&&P(this,B,!1,`f`);let r=this[rr](e,!!t),i=this.parsed;return F(this,L,`f`).setParsed(this.parsed),j(r)?r.then(e=>(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),e,F(this,G,`f`)),e)).catch(e=>{throw F(this,q,`f`)&&F(this,q,`f`)(e,this.parsed.argv,F(this,G,`f`)),e}).finally(()=>{this[Un](),this.parsed=i}):(F(this,q,`f`)&&F(this,q,`f`).call(this,F(this,z,`f`),r,F(this,G,`f`)),this[Un](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return j(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(j(r))throw new M(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,hn,e,`f`),this}pkgConf(e,t){N(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Ln](t||F(this,on,`f`));return r[e]&&typeof r[e]==`object`&&(n=tn(r[e],t||F(this,on,`f`),this[Mn]()[`deep-merge-config`]||!1,F(this,J,`f`)),F(this,K,`f`).configObjects=(F(this,K,`f`).configObjects||[]).concat(n)),this}positional(e,t){N(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=Rt(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=F(this,sn,`f`).fullCommands[F(this,sn,`f`).fullCommands.length-1],i=r?F(this,I,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return bt(i).forEach(n=>{let r=i[n];Array.isArray(r)?r.indexOf(e)!==-1&&(t[n]=!0):r[e]&&!(n in t)&&(t[n]=r[e])}),this.group(e,F(this,Y,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return N(`[boolean]`,[e],arguments.length),P(this,bn,e,`f`),this}required(e,t,n){return this.demand(e,t,n)}require(e,t,n){return this.demand(e,t,n)}requiresArg(e){return N(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&F(this,K,`f`).narg[e]||this[Rn](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return N(`[string] [string]`,[e,t],arguments.length),e||=this.$0,F(this,pn,`f`).log(F(this,L,`f`).generateCompletionScript(e,t||F(this,R,`f`)||`completion`)),this}showHelp(e){if(N(`[string|function]`,[e],arguments.length),P(this,U,!0,`f`),!F(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[rr](F(this,yn,`f`),void 0,void 0,0,!0);if(j(t))return t.then(()=>{F(this,Y,`f`).showHelp(e)}),this}let t=F(this,I,`f`).runDefaultBuilderOn(this);if(j(t))return t.then(()=>{F(this,Y,`f`).showHelp(e)}),this}return F(this,Y,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return N(`[boolean|string] [string]`,[e,t],arguments.length),F(this,Y,`f`).showHelpOnFail(e,t),this}showVersion(e){return N(`[string|function]`,[e],arguments.length),F(this,Y,`f`).showVersion(e),this}skipValidation(e){return N(`<array|string>`,[e],arguments.length),this[Q](`skipValidation`,e),this}strict(e){return N(`[boolean]`,[e],arguments.length),P(this,xn,e!==!1,`f`),this}strictCommands(e){return N(`[boolean]`,[e],arguments.length),P(this,Sn,e!==!1,`f`),this}strictOptions(e){return N(`[boolean]`,[e],arguments.length),P(this,Cn,e!==!1,`f`),this}string(e){return N(`<array|string>`,[e],arguments.length),this[Q](`string`,e),this[or](e),this}terminalWidth(){return N([],0),F(this,J,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return N(`<object>`,[e],arguments.length),P(this,ln,!1,`f`),F(this,J,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(N(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(A(e,null,F(this,J,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new M(`.usage() description must start with $0 if being used as alias for .command()`)}else return F(this,Y,`f`).usage(e),this}usageConfiguration(e){return N(`<object>`,[e],arguments.length),P(this,wn,e,`f`),this}version(e,t,n){let r=`version`;if(N(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),F(this,X,`f`)&&(this[On](F(this,X,`f`)),F(this,Y,`f`).version(void 0),P(this,X,null,`f`)),arguments.length===0)n=this[Fn](),e=r;else if(arguments.length===1){if(e===!1)return this;n=e,e=r}else arguments.length===2&&(n=t,t=void 0);return P(this,X,typeof e==`string`?e:r,`f`),t||=F(this,Y,`f`).deferY18nLookup(`Show version number`),F(this,Y,`f`).version(n||void 0),this.boolean(F(this,X,`f`)),this.describe(F(this,X,`f`),t),this}wrap(e){return N(`<number|null|undefined>`,[e],arguments.length),F(this,Y,`f`).wrap(e),this}[(I=new WeakMap,on=new WeakMap,sn=new WeakMap,L=new WeakMap,R=new WeakMap,cn=new WeakMap,z=new WeakMap,ln=new WeakMap,un=new WeakMap,B=new WeakMap,dn=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,W=new WeakMap,fn=new WeakMap,pn=new WeakMap,G=new WeakMap,K=new WeakMap,mn=new WeakMap,hn=new WeakMap,q=new WeakMap,gn=new WeakMap,_n=new WeakMap,vn=new WeakMap,yn=new WeakMap,bn=new WeakMap,J=new WeakMap,xn=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,Y=new WeakMap,wn=new WeakMap,X=new WeakMap,Z=new WeakMap,En)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[Dn](){return{log:(...e)=>{this[Qn]()||console.log(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
|
|
97
97
|
`,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)},error:(...e)=>{this[Qn]()||console.error(...e),P(this,U,!0,`f`),F(this,G,`f`).length&&P(this,G,F(this,G,`f`)+`
|
|
98
|
-
`,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[On](e){bt(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,Y,`f`).getDescriptions()[e]}[kn](e,t,n){F(this,un,`f`)[n]||(F(this,J,`f`).process.emitWarning(e,t),F(this,un,`f`)[n]=!0)}[An](){F(this,dn,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,xn,`f`),strictCommands:F(this,Sn,`f`),strictOptions:F(this,Cn,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,gn,`f`)}),F(this,Y,`f`).freeze(),F(this,Z,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[jn](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,J,`f`).process.argv()[0])?F(this,J,`f`).process.argv().slice(1,2):F(this,J,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[tr](F(this,on,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,J,`f`).getEnv(`_`)&&F(this,J,`f`).getProcessArgvBin()===F(this,J,`f`).getEnv(`_`)&&(e=F(this,J,`f`).getEnv(`_`).replace(`${F(this,J,`f`).path.dirname(F(this,J,`f`).process.execPath())}/`,``)),e}[Mn](){return F(this,hn,`f`)}[Nn](){return F(this,wn,`f`)}[Pn](){if(!F(this,ln,`f`))return;let e=F(this,J,`f`).getEnv(`LC_ALL`)||F(this,J,`f`).getEnv(`LC_MESSAGES`)||F(this,J,`f`).getEnv(`LANG`)||F(this,J,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Fn](){return this[Ln]().version||`unknown`}[In](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,J,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Ln](e){let t=e||`*`;if(F(this,_n,`f`)[t])return F(this,_n,`f`)[t];let n={};try{let t=e||F(this,J,`f`).mainFilename;F(this,J,`f`).path.extname(t)&&(t=F(this,J,`f`).path.dirname(t));let r=F(this,J,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});A(r,void 0,F(this,J,`f`)),n=JSON.parse(F(this,J,`f`).readFileSync(r,`utf8`))}catch{}return F(this,_n,`f`)[t]=n||{},F(this,_n,`f`)[t]}[Q](e,t){t=[].concat(t),t.forEach(t=>{t=this[Vn](t),F(this,K,`f`)[e].push(t)})}[Rn](e,t,n,r){this[Bn](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[zn](e,t,n,r){this[Bn](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[Bn](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of bt(n))e(t,n[t]);else i(t,this[Vn](n),r)}[Vn](e){return e===`__proto__`?`___proto___`:e}[Hn](e,t){return this[Rn](this[Hn].bind(this),`key`,e,t),this}[Un](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,dn,`f`).pop();A(f,void 0,F(this,J,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,xn,e,`f`)}}.value,strictCommands:{set value(e){P(s,Sn,e,`f`)}}.value,strictOptions:{set value(e){P(c,Cn,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,gn,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,Y,`f`).unfreeze(),F(this,Z,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[Wn](e,t){return Ot(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Gn].bind(this),getContext:this[Kn].bind(this),getHasOutput:this[qn].bind(this),getLoggerInstance:this[Jn].bind(this),getParseContext:this[Yn].bind(this),getParserConfiguration:this[Mn].bind(this),getUsageConfiguration:this[Nn].bind(this),getUsageInstance:this[Xn].bind(this),getValidationInstance:this[Zn].bind(this),hasParseCallback:this[Qn].bind(this),isGlobalContext:this[$n].bind(this),postProcess:this[er].bind(this),reset:this[nr].bind(this),runValidation:this[ir].bind(this),runYargsParserAndExecuteCommands:this[rr].bind(this),setHasOutput:this[ar].bind(this)}}[Gn](){return F(this,I,`f`)}[Kn](){return F(this,sn,`f`)}[qn](){return F(this,U,`f`)}[Jn](){return F(this,pn,`f`)}[Yn](){return F(this,gn,`f`)||{}}[Xn](){return F(this,Y,`f`)}[Zn](){return F(this,Z,`f`)}[Qn](){return!!F(this,q,`f`)}[$n](){return F(this,fn,`f`)}[er](e,t,n,r){return n||j(e)?e:(t||(e=this[En](e)),(this[Mn]()[`parse-positional-numbers`]||this[Mn]()[`parse-positional-numbers`]===void 0)&&(e=this[In](e)),r&&(e=Dt(e,this,F(this,V,`f`).getMiddleware(),!1)),e)}[nr](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,vn,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=Rt(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,Y,F(this,Y,`f`)?F(this,Y,`f`).reset(n):Vt(this,F(this,J,`f`)),`f`),P(this,Z,F(this,Z,`f`)?F(this,Z,`f`).reset(n):Qt(this,F(this,Y,`f`),F(this,J,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():Mt(F(this,Y,`f`),F(this,Z,`f`),F(this,V,`f`),F(this,J,`f`)),`f`),F(this,L,`f`)||P(this,L,qt(this,F(this,Y,`f`),F(this,I,`f`),F(this,J,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[tr](e,t){return F(this,J,`f`).path.relative(e,t)}[rr](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,yn,`f`),F(this,K,`f`).__=F(this,J,`f`).y18n.__,F(this,K,`f`).configuration=this[Mn]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,J,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,gn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,X,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,Y,`f`).clearCachedHelpMessage();try{if(this[Pn](),t)return this[er](l,o,!!n,!1);F(this,W,`f`)&&[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),P(this,fn,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`)?.completionKey?[F(this,L,`f`)?.completionKey,...this.getAliases()[F(this,L,`f`)?.completionKey]??[]].some(e=>Object.prototype.hasOwnProperty.call(l,e)):!1,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[er](e,o,!!n,!1)}else if(!e&&a!==F(this,R,`f`)){e=a;break}!F(this,I,`f`).hasDefaultCommand()&&F(this,bn,`f`)&&e&&!h&&F(this,Z,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&zt(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[er](e,o,!!n,!1)}if(m){F(this,B,`f`)&&zt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new M(e.message);(t||[]).forEach(e=>{F(this,pn,`f`).log(e)}),this.exit(0)}),this[er](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&zt(!0),a=!0,this.showHelp(e=>{F(this,pn,`f`).log(e),this.exit(0)})):p&&(F(this,B,`f`)&&zt(!0),a=!0,F(this,Y,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new M(c.error.message);if(!m){let e=this[ir](d,{},c.error);n||(u=Dt(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[Wn](e,u??l),j(u)&&!n&&(u=u.then(()=>Dt(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof M)F(this,Y,`f`).fail(e.message,e);else throw e}return this[er](u??l,o,!!n,!0)}[ir](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new M(n.message);F(this,Z,`f`).nonOptionCount(a),F(this,Z,`f`).requiredArguments(a,i);let o=!1;F(this,Sn,`f`)&&(o=F(this,Z,`f`).unknownCommands(a)),F(this,xn,`f`)&&!o?F(this,Z,`f`).unknownArguments(a,e,t,!!r):F(this,Cn,`f`)&&F(this,Z,`f`).unknownArguments(a,e,{},!1,!1),F(this,Z,`f`).limitedChoices(a),F(this,Z,`f`).implications(a),F(this,Z,`f`).conflicting(a)}}[ar](){P(this,U,!0,`f`)}[or](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function cr(e){return!!e&&typeof e.getInternalMethods==`function`}const lr=Tn(vt);function $(e,t,n){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{await(await n()).default.handler(e)}}}const ur=[{command:$(`abuse-reports`,`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,()=>import(`./abuse-reports-BsF9JZPW.mjs`)),hideCommand:!0},{command:$(`account`,`account`,()=>import(`./account-D8mYiWxQ.mjs`)),hideCommand:!1},{command:$(`accounts`,`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,()=>import(`./accounts-CJci1Oez.mjs`)),hideCommand:!1},{command:$(`acm`,`Advanced Certificate Manager — Total TLS auto-issuance and custom origin trust store certificates`,()=>import(`./acm-CmCd985Q.mjs`)),hideCommand:!0},{command:$(`addressing`,`IP address management — BYOIP prefixes, address maps, regional hostnames, and BGP advertisement control`,()=>import(`./addressing-R7p6TRBe.mjs`)),hideCommand:!0},{command:$(`ai`,`Run inference on Workers AI models — text generation, image classification, embeddings, and more`,()=>import(`./ai-BzJg0RIX.mjs`)),hideCommand:!0},{command:$(`ai-audit`,`ai-audit`,()=>import(`./ai-audit-B0vJNOZG.mjs`)),hideCommand:!1},{command:$(`ai-gateway`,`Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more`,()=>import(`./ai-gateway-D3vJR3My.mjs`)),hideCommand:!0},{command:$(`ai-search`,`ai-search`,()=>import(`./ai-search-CNg7W7U4.mjs`)),hideCommand:!1},{command:$(`alerting`,`Notification policies, delivery destinations, silence windows, and alert history`,()=>import(`./alerting-_sdM0B0S.mjs`)),hideCommand:!0},{command:$(`alerts`,`alerts`,()=>import(`./alerts-dpT6Qsdu.mjs`)),hideCommand:!0},{command:$(`analytics`,`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,()=>import(`./analytics-BFBJhDrP.mjs`)),hideCommand:!0},{command:$(`analytics_engine`,`analytics_engine`,()=>import(`./analytics_engine-CWhFvyeK.mjs`)),hideCommand:!0},{command:$(`api-gateway`,`Discover, monitor, and protect your API endpoints with schema validation, abuse detection, and routing`,()=>import(`./api-gateway-D4AIEtUq.mjs`)),hideCommand:!0},{command:$(`argo`,`Network optimization features that speed up and improve reliability of traffic to your origins`,()=>import(`./argo-Bjk6nFfs.mjs`)),hideCommand:!0},{command:$(`artifacts`,`artifacts`,()=>import(`./artifacts-Ba4b3iOa.mjs`)),hideCommand:!0},{command:$(`audit-logs`,`Immutable audit trail of actions taken by account members — who changed what and when`,()=>import(`./audit-logs-BE0T5All.mjs`)),hideCommand:!0},{command:$(`autorag`,`autorag`,()=>import(`./autorag-Cnpp8PAG.mjs`)),hideCommand:!0},{command:$(`billing`,`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,()=>import(`./billing-Dz6Zj8Eq.mjs`)),hideCommand:!1},{command:$(`bot-management`,`Bot detection and mitigation settings — configure bot scores, JavaScript detections, and challenge behavior`,()=>import(`./bot-management-pFwIbFi-.mjs`)),hideCommand:!0},{command:$(`botnet-feed`,`Botnet threat intelligence feeds — IP and ASN-level data on known command-and-control infrastructure`,()=>import(`./botnet-feed-BY9uGChY.mjs`)),hideCommand:!0},{command:$(`brand-protection`,`Monitor the Internet for phishing sites, lookalike domains, and unauthorized use of your brand assets`,()=>import(`./brand-protection-DkPAk2Cz.mjs`)),hideCommand:!0},{command:$(`brands`,`brands`,()=>import(`./brands-CGpk9nZB.mjs`)),hideCommand:!0},{command:$(`browser-extension`,`browser-extension`,()=>import(`./browser-extension-D9P6Yv8i.mjs`)),hideCommand:!1},{command:$(`browser-run`,`browser-run`,()=>import(`./browser-run-DhHtz4y3.mjs`)),hideCommand:!0},{command:$(`cache`,`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,()=>import(`./cache-DVhkiIGK.mjs`)),hideCommand:!0},{command:$(`calls`,`calls`,()=>import(`./calls-95zjvIcO.mjs`)),hideCommand:!0},{command:$(`certificate-authorities`,`Map client certificates to specific hostnames for mTLS authentication`,()=>import(`./certificate-authorities-BowBqbVq.mjs`)),hideCommand:!0},{command:$(`clear`,`clear`,()=>import(`./clear-DXx8WBAN.mjs`)),hideCommand:!0},{command:$(`client-certificates`,`Issue and manage client certificates for mutual TLS (mTLS) authentication on your zone`,()=>import(`./client-certificates-D6mE4vJu.mjs`)),hideCommand:!0},{command:$(`cloud-connector`,`Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers`,()=>import(`./cloud-connector-DmwsjeFN.mjs`)),hideCommand:!0},{command:$(`cloudforce-one`,`Threat intelligence platform — request investigations, scan indicators, and track threat events`,()=>import(`./cloudforce-one-CG3TT7IN.mjs`)),hideCommand:!1},{command:$(`connectivity`,`Service directory for network connectivity endpoints and their configurations`,()=>import(`./connectivity-DJkE3crz.mjs`)),hideCommand:!0},{command:$(`connector-interrupts`,`connector-interrupts`,()=>import(`./connector-interrupts-DTgQ7onV.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-events`,`connector-telemetry-events`,()=>import(`./connector-telemetry-events-D0rTHDou.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-snapshots`,`connector-telemetry-snapshots`,()=>import(`./connector-telemetry-snapshots--0QmD3z6.mjs`)),hideCommand:!0},{command:$(`connectors`,`connectors`,()=>import(`./connectors-zWaZTi2A.mjs`)),hideCommand:!0},{command:$(`content-scanning`,`content-scanning`,()=>import(`./content-scanning-CGvGf04y.mjs`)),hideCommand:!0},{command:$(`ct-alerting`,`ct-alerting`,()=>import(`./ct-alerting-ebSPSWNC.mjs`)),hideCommand:!0},{command:$(`custom-certificates`,`Upload and manage your own SSL/TLS certificates for a zone, with priority ordering`,()=>import(`./custom-certificates-CWUrPYLP.mjs`)),hideCommand:!0},{command:$(`custom-csrs`,`custom-csrs`,()=>import(`./custom-csrs-CRtdrF9R.mjs`)),hideCommand:!0},{command:$(`custom-hostnames`,`Bring custom vanity domains to your SaaS zone with per-hostname SSL and origin mapping`,()=>import(`./custom-hostnames-CVQSksqq.mjs`)),hideCommand:!0},{command:$(`custom-nameservers`,`Vanity nameservers that use your own domain instead of Cloudflare-assigned NS records`,()=>import(`./custom-nameservers-BRwbIdsX.mjs`)),hideCommand:!0},{command:$(`custom-pages`,`Custom error and challenge pages (1000s, WAF blocks, captchas) for zones and accounts`,()=>import(`./custom-pages-Ci8sTQX7.mjs`)),hideCommand:!0},{command:$(`d1`,`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,()=>import(`./d1-78Ym1P6D.mjs`)),hideCommand:!0},{command:$(`data-security`,`data-security`,()=>import(`./data-security-zmFoMwRU.mjs`)),hideCommand:!0},{command:$(`dcv-delegation`,`Delegate domain control validation (DCV) to Cloudflare so certificates auto-renew without manual DNS changes`,()=>import(`./dcv-delegation-Dd4FZ2IG.mjs`)),hideCommand:!0},{command:$(`diagnostics`,`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,()=>import(`./diagnostics-B8Ev5m_o.mjs`)),hideCommand:!0},{command:$(`dispatch-namespaces`,`Workers for Platforms dispatch namespaces — isolate customer Workers for SaaS and multi-tenant deployments`,()=>import(`./dispatch-namespaces-Dm5vGeEP.mjs`)),hideCommand:!0},{command:$(`dns`,`DNS management API for zones, records, DNSSEC, analytics, and zone transfers`,()=>import(`./dns-D7VAaCyO.mjs`)),hideCommand:!1},{command:$(`dns-firewall`,`DNS proxy clusters that filter and forward DNS queries with DDoS protection and caching`,()=>import(`./dns-firewall-ByLCsf0q.mjs`)),hideCommand:!0},{command:$(`domain-info`,`domain-info`,()=>import(`./domain-info-CRvKc2Lg.mjs`)),hideCommand:!0},{command:$(`durable-objects`,`Stateful serverless objects with transactional storage, ideal for coordination, sessions, and real-time collaboration`,()=>import(`./durable-objects-BIpvyu9m.mjs`)),hideCommand:!0},{command:$(`email-auth`,`email-auth`,()=>import(`./email-auth-Cx--s8W4.mjs`)),hideCommand:!0},{command:$(`email-routing`,`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,()=>import(`./email-routing-CiDbivcN.mjs`)),hideCommand:!0},{command:$(`email-security`,`Cloud email security (Area 1) — investigate threats, manage allow/block policies, and detect phishing`,()=>import(`./email-security-BYeAuSc6.mjs`)),hideCommand:!0},{command:$(`email-sending`,`Send emails and manage sending subdomains`,()=>import(`./email-sending-Dg2rSmHH.mjs`)),hideCommand:!1},{command:$(`filters`,`Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations`,()=>import(`./filters-DZ8YnQ90.mjs`)),hideCommand:!0},{command:$(`firewall`,`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,()=>import(`./firewall-DEd1hs_I.mjs`)),hideCommand:!0},{command:$(`flagship`,`flagship`,()=>import(`./flagship-DVw7xGoP.mjs`)),hideCommand:!0},{command:$(`fraud`,`Fraud detection for login and signup flows — identify credential stuffing, account takeover, and fake accounts`,()=>import(`./fraud-BbGS3FZs.mjs`)),hideCommand:!0},{command:$(`google-tag-gateway`,`Google Tag Gateway operations`,()=>import(`./google-tag-gateway-CBnRGYQR.mjs`)),hideCommand:!0},{command:$(`healthchecks`,`Standalone health checks that monitor origin server availability from Cloudflare's edge`,()=>import(`./healthchecks-Da9N3ix4.mjs`)),hideCommand:!0},{command:$(`hostnames`,`Per-hostname TLS settings — minimum TLS version, ciphers, and certificate pinning overrides`,()=>import(`./hostnames-mimZu2tB.mjs`)),hideCommand:!0},{command:$(`hyperdrive`,`Accelerate access to existing databases by caching queries and pooling connections at the edge`,()=>import(`./hyperdrive-BNdvxOos.mjs`)),hideCommand:!1},{command:$(`iam`,`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,()=>import(`./iam-DGQ-OgRl.mjs`)),hideCommand:!0},{command:$(`images`,`images`,()=>import(`./images-CI6Iy9ho.mjs`)),hideCommand:!1},{command:$(`intel`,`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,()=>import(`./intel-BDB-aRtU.mjs`)),hideCommand:!0},{command:$(`internal`,`internal`,()=>import(`./internal-Czlp5Ekb.mjs`)),hideCommand:!0},{command:$(`ips`,`List Cloudflare's IP ranges used for proxying traffic — useful for firewall allowlisting`,()=>import(`./ips-B9UuPvsY.mjs`)),hideCommand:!0},{command:$(`keyless-certificates`,`Use your own SSL certificates without exposing private keys — keys stay on your infrastructure`,()=>import(`./keyless-certificates-Ua9uJgPt.mjs`)),hideCommand:!0},{command:$(`kv`,`Global, low-latency key-value storage for Workers — namespaces, keys, values, and bulk operations`,()=>import(`./kv-BHerx4dZ.mjs`)),hideCommand:!0},{command:$(`leaked-credential-checks`,`leaked-credential-checks`,()=>import(`./leaked-credential-checks-B8Vunj9h.mjs`)),hideCommand:!0},{command:$(`live`,`live`,()=>import(`./live-Ce7dZW7p.mjs`)),hideCommand:!0},{command:$(`load-balancers`,`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,()=>import(`./load-balancers-DSjS5WKw.mjs`)),hideCommand:!0},{command:$(`logexplorer`,`logexplorer`,()=>import(`./logexplorer-DBIfTlRP.mjs`)),hideCommand:!0},{command:$(`logo-matches`,`logo-matches`,()=>import(`./logo-matches-C00iGpzW.mjs`)),hideCommand:!0},{command:$(`logos`,`logos`,()=>import(`./logos-CJLhx1go.mjs`)),hideCommand:!0},{command:$(`logpush`,`Push Cloudflare logs to external storage destinations — R2, S3, Splunk, Datadog, and more`,()=>import(`./logpush-Cr1U-eK-.mjs`)),hideCommand:!0},{command:$(`logs`,`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,()=>import(`./logs-DMvtchc6.mjs`)),hideCommand:!0},{command:$(`magic-cloud-networking`,`Multi-cloud networking — discover cloud resources, manage on-ramps, and automate cross-cloud connectivity`,()=>import(`./magic-cloud-networking-FQfO8QWH.mjs`)),hideCommand:!0},{command:$(`magic-network-monitoring`,`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,()=>import(`./magic-network-monitoring-CDd70fJQ.mjs`)),hideCommand:!0},{command:$(`magic-transit`,`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,()=>import(`./magic-transit-DiKiPUax.mjs`)),hideCommand:!0},{command:$(`managed-transforms`,`Cloudflare-managed HTTP header transforms — automatically add security headers, remove server info, etc.`,()=>import(`./managed-transforms-fPVUTrAv.mjs`)),hideCommand:!0},{command:$(`matches`,`matches`,()=>import(`./matches-B0yHbQ2I.mjs`)),hideCommand:!0},{command:$(`moq`,`moq`,()=>import(`./moq-UgBawOXe.mjs`)),hideCommand:!1},{command:$(`mtls-certificates`,`Upload and manage mTLS certificates used by API Shield, Workers, and Gateway for client authentication`,()=>import(`./mtls-certificates-xKUbC5EL.mjs`)),hideCommand:!0},{command:$(`network-interconnects`,`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,()=>import(`./network-interconnects-BJzOE2ny.mjs`)),hideCommand:!0},{command:$(`observability`,`observability`,()=>import(`./observability-B-1y36QS.mjs`)),hideCommand:!0},{command:$(`organization`,`organization`,()=>import(`./organization-Dq3PClZ7.mjs`)),hideCommand:!1},{command:$(`organizations`,`Multi-user organizations that group accounts, members, and shared settings under a single entity`,()=>import(`./organizations-AhsQkHyX.mjs`)),hideCommand:!1},{command:$(`origin-ca-certificates`,`Free Cloudflare-signed certificates installed on your origin server for Full (strict) SSL mode`,()=>import(`./origin-ca-certificates-CRgF0UyU.mjs`)),hideCommand:!0},{command:$(`origin-post-quantum-encryption`,`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,()=>import(`./origin-post-quantum-encryption-BXTx7DPa.mjs`)),hideCommand:!0},{command:$(`origin-tls-client-auth`,`Authenticated Origin Pulls — require Cloudflare to present a client certificate when connecting to your origin`,()=>import(`./origin-tls-client-auth-BDw5q-6G.mjs`)),hideCommand:!0},{command:$(`page-rules`,`Legacy URL-pattern rules that override zone settings for matching requests — prefer Rules/Transform Rules instead`,()=>import(`./page-rules-DqYQ23eg.mjs`)),hideCommand:!0},{command:$(`page-shield`,`Client-side security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks`,()=>import(`./page-shield-DKdlZOLO.mjs`)),hideCommand:!0},{command:$(`pages`,`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,()=>import(`./pages-BsXF11Kv.mjs`)),hideCommand:!0},{command:$(`pay-per-crawl`,`pay-per-crawl`,()=>import(`./pay-per-crawl-BGAwuAP3.mjs`)),hideCommand:!1},{command:$(`pipelines`,`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,()=>import(`./pipelines-D_QhSnGW.mjs`)),hideCommand:!1},{command:$(`queries`,`queries`,()=>import(`./queries-CAE95-OH.mjs`)),hideCommand:!0},{command:$(`queues`,`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,()=>import(`./queues-BBz35Mqd.mjs`)),hideCommand:!0},{command:$(`r2`,`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,()=>import(`./r2-Zp99S5xF.mjs`)),hideCommand:!1},{command:$(`r2-data-catalog`,`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,()=>import(`./r2-data-catalog-BeVLZwrE.mjs`)),hideCommand:!0},{command:$(`radar`,`radar`,()=>import(`./radar-Cij-XVQJ.mjs`)),hideCommand:!0},{command:$(`rate-limit-analytics`,`rate-limit-analytics`,()=>import(`./rate-limit-analytics-CGviSPnJ.mjs`)),hideCommand:!1},{command:$(`rate-limits`,`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,()=>import(`./rate-limits-DSdToIWv.mjs`)),hideCommand:!0},{command:$(`ready`,`ready`,()=>import(`./ready-DMpJvyaz.mjs`)),hideCommand:!0},{command:$(`realtime-kit`,`Real-time video and audio — meetings, livestreams, recordings, and session management via Cloudflare Calls`,()=>import(`./realtime-kit-9rJcapfM.mjs`)),hideCommand:!0},{command:$(`recent-submissions`,`recent-submissions`,()=>import(`./recent-submissions-LS5IM-bm.mjs`)),hideCommand:!0},{command:$(`refute`,`refute`,()=>import(`./refute-BGTpr5sy.mjs`)),hideCommand:!0},{command:$(`registrar`,`Domain registration and transfer management through Cloudflare Registrar`,()=>import(`./registrar-CXViZlah.mjs`)),hideCommand:!1},{command:$(`registrar-sandbox`,`registrar-sandbox`,()=>import(`./registrar-sandbox-CvQyjXLJ.mjs`)),hideCommand:!1},{command:$(`request-tracers`,`request-tracers`,()=>import(`./request-tracers-DATfBnE9.mjs`)),hideCommand:!0},{command:$(`resource-sharing`,`resource-sharing`,()=>import(`./resource-sharing-Cmhn6ghR.mjs`)),hideCommand:!1},{command:$(`resource-tagging`,`Tag accounts and zones with key-value metadata for organization, filtering, and policy targeting`,()=>import(`./resource-tagging-BTn05AOj.mjs`)),hideCommand:!0},{command:$(`rules`,`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,()=>import(`./rules-ens3OHme.mjs`)),hideCommand:!0},{command:$(`rulesets`,`Versioned collections of rules that control how Cloudflare processes traffic — WAF, transform, redirect, and more`,()=>import(`./rulesets-bkreZRao.mjs`)),hideCommand:!0},{command:$(`rum`,`rum`,()=>import(`./rum-CpgXFcwl.mjs`)),hideCommand:!0},{command:$(`scan-logo`,`scan-logo`,()=>import(`./scan-logo-DUDIZJ2A.mjs`)),hideCommand:!0},{command:$(`scan-page`,`scan-page`,()=>import(`./scan-page-BqoQTk3R.mjs`)),hideCommand:!0},{command:$(`schema-validation`,`API schema validation settings — enforce request/response schemas and configure validation behavior`,()=>import(`./schema-validation-Ca6o94ts.mjs`)),hideCommand:!0},{command:$(`scim`,`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,()=>import(`./scim-C4oT8TMc.mjs`)),hideCommand:!0},{command:$(`search`,`search`,()=>import(`./search-C4T5riPh.mjs`)),hideCommand:!0},{command:$(`secrets-store`,`Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products`,()=>import(`./secrets-store-CWEuiDNo.mjs`)),hideCommand:!0},{command:$(`security-center`,`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,()=>import(`./security-center-BOvm7xy6.mjs`)),hideCommand:!1},{command:$(`security-txt`,`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,()=>import(`./security-txt-BCAUBctN.mjs`)),hideCommand:!0},{command:$(`share`,`share`,()=>import(`./share-DhmVspmL.mjs`)),hideCommand:!1},{command:$(`signed-url`,`signed-url`,()=>import(`./signed-url-DA509wgp.mjs`)),hideCommand:!0},{command:$(`smart-shield`,`Smart Shield settings, health checks, and cache reserve management`,()=>import(`./smart-shield-DZm4fn6z.mjs`)),hideCommand:!0},{command:$(`snippets`,`Lightweight JavaScript snippets that run on requests before Workers — for quick header modifications and redirects`,()=>import(`./snippets-oQ0u26-z.mjs`)),hideCommand:!0},{command:$(`spectrum`,`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,()=>import(`./spectrum-Cnkee5Ww.mjs`)),hideCommand:!0},{command:$(`speed`,`speed`,()=>import(`./speed-DqNnvLBD.mjs`)),hideCommand:!0},{command:$(`ssl`,`SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations`,()=>import(`./ssl-tS3CYZsZ.mjs`)),hideCommand:!0},{command:$(`stream`,`stream`,()=>import(`./stream-Bud9Os5V.mjs`)),hideCommand:!0},{command:$(`submission-info`,`submission-info`,()=>import(`./submission-info-DfIXmu-M.mjs`)),hideCommand:!0},{command:$(`submit`,`submit`,()=>import(`./submit-BtP8she2.mjs`)),hideCommand:!0},{command:$(`tenant`,`tenant`,()=>import(`./tenant-CMwHa-tU.mjs`)),hideCommand:!1},{command:$(`token-validation`,`Validate JWT tokens at the edge — configure token sources, signing keys, and validation rules`,()=>import(`./token-validation-BYC7HTok.mjs`)),hideCommand:!0},{command:$(`total-queries`,`total-queries`,()=>import(`./total-queries-DdLBNJzd.mjs`)),hideCommand:!0},{command:$(`tracked-domains`,`tracked-domains`,()=>import(`./tracked-domains-BbaY-IuY.mjs`)),hideCommand:!0},{command:$(`turnstile`,`turnstile`,()=>import(`./turnstile-CP4nScaL.mjs`)),hideCommand:!0},{command:$(`url-info`,`url-info`,()=>import(`./url-info-Chs9h7Y-.mjs`)),hideCommand:!0},{command:$(`url-normalization`,`Normalize incoming request URLs to a consistent format before rule evaluation and caching`,()=>import(`./url-normalization-XYxW5Gj0.mjs`)),hideCommand:!0},{command:$(`url-scanner`,`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,()=>import(`./url-scanner-D4pYNlO-.mjs`)),hideCommand:!0},{command:$(`user`,`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,()=>import(`./user-DtefniLc.mjs`)),hideCommand:!1},{command:$(`vectorize`,`Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers`,()=>import(`./vectorize-BeAY2g-7.mjs`)),hideCommand:!0},{command:$(`verify`,`verify`,()=>import(`./verify-D7J3F_NZ.mjs`)),hideCommand:!0},{command:$(`waiting-rooms`,`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,()=>import(`./waiting-rooms-K78HeeTg.mjs`)),hideCommand:!0},{command:$(`web3`,`Web3 gateways — serve IPFS and Ethereum content through custom hostnames on Cloudflare`,()=>import(`./web3-Dhw79l4S.mjs`)),hideCommand:!0},{command:$(`workers`,`Deploy and manage serverless JavaScript/WASM applications on Cloudflare's global network`,()=>import(`./workers-l3zMNOU6.mjs`)),hideCommand:!0},{command:$(`workers-builds`,`Automated build and deployment pipeline for Workers — track builds, logs, and repo connections`,()=>import(`./workers-builds-CuOAB3u4.mjs`)),hideCommand:!0},{command:$(`workflows`,`Durable, multi-step workflows that run on Workers with automatic retries and state persistence`,()=>import(`./workflows-rb7RYBKP.mjs`)),hideCommand:!1},{command:$(`zaraz`,`Server-side tag manager — load third-party tools (analytics, pixels, etc.) from Cloudflare's edge without client-side JS`,()=>import(`./zaraz-CHecMYuo.mjs`)),hideCommand:!0},{command:$(`zero-trust`,`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,()=>import(`./zero-trust-DAZoa-Aj.mjs`)),hideCommand:!0},{command:$(`zone`,`zone`,()=>import(`./zone-BnnqJwW-.mjs`)),hideCommand:!1},{command:$(`zones`,`Zones are domains on Cloudflare — list, create, and configure domain settings`,()=>import(`./zones-DpI2YikF.mjs`)),hideCommand:!1}];function dr(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function fr(e){if(s(n),e instanceof c){let t=d(),n=e.statusCode,r=e.body,i=n===void 0?`Envelope Error`:mr(n),a=[];if(r){let e=r;Array.isArray(e.errors)&&(a=e.errors)}let o=e.rawResponse?.url?`HTTP ${dr(e.rawResponse.url)}`:void 0,s=n===void 0?i:`${n} ${i}`,c=o?`${s} · ${o}`:s,l=t.dim(c),u=``;return a.length>0?u=a.map((e,n)=>{let r=typeof e.code==`number`?t.hex(f.error).bold(`[${e.code}]`):t.hex(f.error).bold(`[error]`),i=t.bold(e.message??``);return n===a.length-1?`${r} ${i}\n${l}`:`${r} ${i}`}).join(`
|
|
98
|
+
`,`f`),P(this,G,F(this,G,`f`)+e.join(` `),`f`)}}}[On](e){bt(F(this,K,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=F(this,K,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete F(this,Y,`f`).getDescriptions()[e]}[kn](e,t,n){F(this,un,`f`)[n]||(F(this,J,`f`).process.emitWarning(e,t),F(this,un,`f`)[n]=!0)}[An](){F(this,dn,`f`).push({options:F(this,K,`f`),configObjects:F(this,K,`f`).configObjects.slice(0),exitProcess:F(this,B,`f`),groups:F(this,H,`f`),strict:F(this,xn,`f`),strictCommands:F(this,Sn,`f`),strictOptions:F(this,Cn,`f`),completionCommand:F(this,R,`f`),output:F(this,G,`f`),exitError:F(this,z,`f`),hasOutput:F(this,U,`f`),parsed:this.parsed,parseFn:F(this,q,`f`),parseContext:F(this,gn,`f`)}),F(this,Y,`f`).freeze(),F(this,Z,`f`).freeze(),F(this,I,`f`).freeze(),F(this,V,`f`).freeze()}[jn](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(F(this,J,`f`).process.argv()[0])?F(this,J,`f`).process.argv().slice(1,2):F(this,J,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[tr](F(this,on,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),F(this,J,`f`).getEnv(`_`)&&F(this,J,`f`).getProcessArgvBin()===F(this,J,`f`).getEnv(`_`)&&(e=F(this,J,`f`).getEnv(`_`).replace(`${F(this,J,`f`).path.dirname(F(this,J,`f`).process.execPath())}/`,``)),e}[Mn](){return F(this,hn,`f`)}[Nn](){return F(this,wn,`f`)}[Pn](){if(!F(this,ln,`f`))return;let e=F(this,J,`f`).getEnv(`LC_ALL`)||F(this,J,`f`).getEnv(`LC_MESSAGES`)||F(this,J,`f`).getEnv(`LANG`)||F(this,J,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[Fn](){return this[Ln]().version||`unknown`}[In](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)F(this,J,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Ln](e){let t=e||`*`;if(F(this,_n,`f`)[t])return F(this,_n,`f`)[t];let n={};try{let t=e||F(this,J,`f`).mainFilename;F(this,J,`f`).path.extname(t)&&(t=F(this,J,`f`).path.dirname(t));let r=F(this,J,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});A(r,void 0,F(this,J,`f`)),n=JSON.parse(F(this,J,`f`).readFileSync(r,`utf8`))}catch{}return F(this,_n,`f`)[t]=n||{},F(this,_n,`f`)[t]}[Q](e,t){t=[].concat(t),t.forEach(t=>{t=this[Vn](t),F(this,K,`f`)[e].push(t)})}[Rn](e,t,n,r){this[Bn](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=n})}[zn](e,t,n,r){this[Bn](e,t,n,r,(e,t,n)=>{F(this,K,`f`)[e][t]=(F(this,K,`f`)[e][t]||[]).concat(n)})}[Bn](e,t,n,r,i){if(Array.isArray(n))n.forEach(t=>{e(t,r)});else if((e=>typeof e==`object`)(n))for(let t of bt(n))e(t,n[t]);else i(t,this[Vn](n),r)}[Vn](e){return e===`__proto__`?`___proto___`:e}[Hn](e,t){return this[Rn](this[Hn].bind(this),`key`,e,t),this}[Un](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=F(this,dn,`f`).pop();A(f,void 0,F(this,J,`f`));let p;e=this,t=this,n=this,r=this,i=this,a=this,o=this,s=this,c=this,l=this,u=this,d=this,{options:{set value(t){P(e,K,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){P(t,B,e,`f`)}}.value,groups:{set value(e){P(n,H,e,`f`)}}.value,output:{set value(e){P(r,G,e,`f`)}}.value,exitError:{set value(e){P(i,z,e,`f`)}}.value,hasOutput:{set value(e){P(a,U,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){P(o,xn,e,`f`)}}.value,strictCommands:{set value(e){P(s,Sn,e,`f`)}}.value,strictOptions:{set value(e){P(c,Cn,e,`f`)}}.value,completionCommand:{set value(e){P(l,R,e,`f`)}}.value,parseFn:{set value(e){P(u,q,e,`f`)}}.value,parseContext:{set value(e){P(d,gn,e,`f`)}}.value}=f,F(this,K,`f`).configObjects=p,F(this,Y,`f`).unfreeze(),F(this,Z,`f`).unfreeze(),F(this,I,`f`).unfreeze(),F(this,V,`f`).unfreeze()}[Wn](e,t){return Ot(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Gn].bind(this),getContext:this[Kn].bind(this),getHasOutput:this[qn].bind(this),getLoggerInstance:this[Jn].bind(this),getParseContext:this[Yn].bind(this),getParserConfiguration:this[Mn].bind(this),getUsageConfiguration:this[Nn].bind(this),getUsageInstance:this[Xn].bind(this),getValidationInstance:this[Zn].bind(this),hasParseCallback:this[Qn].bind(this),isGlobalContext:this[$n].bind(this),postProcess:this[er].bind(this),reset:this[nr].bind(this),runValidation:this[ir].bind(this),runYargsParserAndExecuteCommands:this[rr].bind(this),setHasOutput:this[ar].bind(this)}}[Gn](){return F(this,I,`f`)}[Kn](){return F(this,sn,`f`)}[qn](){return F(this,U,`f`)}[Jn](){return F(this,pn,`f`)}[Yn](){return F(this,gn,`f`)||{}}[Xn](){return F(this,Y,`f`)}[Zn](){return F(this,Z,`f`)}[Qn](){return!!F(this,q,`f`)}[$n](){return F(this,fn,`f`)}[er](e,t,n,r){return n||j(e)?e:(t||(e=this[En](e)),(this[Mn]()[`parse-positional-numbers`]||this[Mn]()[`parse-positional-numbers`]===void 0)&&(e=this[In](e)),r&&(e=Dt(e,this,F(this,V,`f`).getMiddleware(),!1)),e)}[nr](e={}){P(this,K,F(this,K,`f`)||{},`f`);let t={};t.local=F(this,K,`f`).local||[],t.configObjects=F(this,K,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(F(this,vn,`f`),Object.keys(F(this,H,`f`)).reduce((e,t)=>{let r=F(this,H,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),P(this,H,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(F(this,K,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=Rt(F(this,K,`f`)[e],e=>!n[e])}),t.envPrefix=F(this,K,`f`).envPrefix,P(this,K,t,`f`),P(this,Y,F(this,Y,`f`)?F(this,Y,`f`).reset(n):Vt(this,F(this,J,`f`)),`f`),P(this,Z,F(this,Z,`f`)?F(this,Z,`f`).reset(n):Qt(this,F(this,Y,`f`),F(this,J,`f`)),`f`),P(this,I,F(this,I,`f`)?F(this,I,`f`).reset():Mt(F(this,Y,`f`),F(this,Z,`f`),F(this,V,`f`),F(this,J,`f`)),`f`),F(this,L,`f`)||P(this,L,qt(this,F(this,Y,`f`),F(this,I,`f`),F(this,J,`f`)),`f`),F(this,V,`f`).reset(),P(this,R,null,`f`),P(this,G,``,`f`),P(this,z,null,`f`),P(this,U,!1,`f`),this.parsed=!1,this}[tr](e,t){return F(this,J,`f`).path.relative(e,t)}[rr](e,t,n,r=0,i=!1){let a=!!n||i;e||=F(this,yn,`f`),F(this,K,`f`).__=F(this,J,`f`).y18n.__,F(this,K,`f`).configuration=this[Mn]();let o=!!F(this,K,`f`).configuration[`populate--`],s=Object.assign({},F(this,K,`f`).configuration,{"populate--":!0}),c=F(this,J,`f`).Parser.detailed(e,Object.assign({},F(this,K,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,F(this,gn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===F(this,W,`f`)&&l[e]?f=!0:e===F(this,X,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&F(this,Y,`f`).clearCachedHelpMessage();try{if(this[Pn](),t)return this[er](l,o,!!n,!1);F(this,W,`f`)&&[F(this,W,`f`)].concat(d[F(this,W,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),P(this,fn,!1,`f`);let s=F(this,I,`f`).getCommands(),m=F(this,L,`f`)?.completionKey?[F(this,L,`f`)?.completionKey,...this.getAliases()[F(this,L,`f`)?.completionKey]??[]].some(e=>Object.prototype.hasOwnProperty.call(l,e)):!1,h=f||m||i;if(l._.length){if(s.length){let e;for(let t=r||0,a;l._[t]!==void 0;t++)if(a=String(l._[t]),s.includes(a)&&a!==F(this,R,`f`)){let e=F(this,I,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[er](e,o,!!n,!1)}else if(!e&&a!==F(this,R,`f`)){e=a;break}!F(this,I,`f`).hasDefaultCommand()&&F(this,bn,`f`)&&e&&!h&&F(this,Z,`f`).recommendCommands(e,s)}F(this,R,`f`)&&l._.includes(F(this,R,`f`))&&!m&&(F(this,B,`f`)&&zt(!0),this.showCompletionScript(),this.exit(0))}if(F(this,I,`f`).hasDefaultCommand()&&!h){let e=F(this,I,`f`).runCommand(null,this,c,0,i,f||p||i);return this[er](e,o,!!n,!1)}if(m){F(this,B,`f`)&&zt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${F(this,L,`f`).completionKey}`)+1);return F(this,L,`f`).getCompletion(t,(e,t)=>{if(e)throw new M(e.message);(t||[]).forEach(e=>{F(this,pn,`f`).log(e)}),this.exit(0)}),this[er](l,!o,!!n,!1)}if(F(this,U,`f`)||(f?(F(this,B,`f`)&&zt(!0),a=!0,this.showHelp(e=>{F(this,pn,`f`).log(e),this.exit(0)})):p&&(F(this,B,`f`)&&zt(!0),a=!0,F(this,Y,`f`).showVersion(`log`),this.exit(0))),!a&&F(this,K,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>F(this,K,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new M(c.error.message);if(!m){let e=this[ir](d,{},c.error);n||(u=Dt(l,this,F(this,V,`f`).getMiddleware(),!0)),u=this[Wn](e,u??l),j(u)&&!n&&(u=u.then(()=>Dt(l,this,F(this,V,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof M)F(this,Y,`f`).fail(e.message,e);else throw e}return this[er](u??l,o,!!n,!0)}[ir](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new M(n.message);F(this,Z,`f`).nonOptionCount(a),F(this,Z,`f`).requiredArguments(a,i);let o=!1;F(this,Sn,`f`)&&(o=F(this,Z,`f`).unknownCommands(a)),F(this,xn,`f`)&&!o?F(this,Z,`f`).unknownArguments(a,e,t,!!r):F(this,Cn,`f`)&&F(this,Z,`f`).unknownArguments(a,e,{},!1,!1),F(this,Z,`f`).limitedChoices(a),F(this,Z,`f`).implications(a),F(this,Z,`f`).conflicting(a)}}[ar](){P(this,U,!0,`f`)}[or](e){if(typeof e==`string`)F(this,K,`f`).key[e]=!0;else for(let t of e)F(this,K,`f`).key[t]=!0}};function cr(e){return!!e&&typeof e.getInternalMethods==`function`}const lr=Tn(vt);function $(e,t,n){return{command:e,describe:t,builder:async e=>{let t=(await n()).default.builder;return typeof t==`function`?t(e):e},handler:async e=>{await(await n()).default.handler(e)}}}const ur=[{command:$(`abuse-reports`,`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,()=>import(`./abuse-reports-C6GFnuYE.mjs`)),hideCommand:!0},{command:$(`account`,`account`,()=>import(`./account-DxzpnGA8.mjs`)),hideCommand:!1},{command:$(`accounts`,`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,()=>import(`./accounts-6RFDuFLF.mjs`)),hideCommand:!1},{command:$(`acm`,`Advanced Certificate Manager — Total TLS auto-issuance and custom origin trust store certificates`,()=>import(`./acm-Bndi5Jqo.mjs`)),hideCommand:!0},{command:$(`addressing`,`IP address management — BYOIP prefixes, address maps, regional hostnames, and BGP advertisement control`,()=>import(`./addressing-C8HB4n_n.mjs`)),hideCommand:!0},{command:$(`ai`,`Run inference on Workers AI models — text generation, image classification, embeddings, and more`,()=>import(`./ai-B4La9Oqk.mjs`)),hideCommand:!0},{command:$(`ai-audit`,`ai-audit`,()=>import(`./ai-audit-B9kKFhoY.mjs`)),hideCommand:!1},{command:$(`ai-gateway`,`Proxy, cache, rate-limit, and observe requests to AI providers — OpenAI, Anthropic, Workers AI, and more`,()=>import(`./ai-gateway-Bx9MzNxL.mjs`)),hideCommand:!0},{command:$(`ai-search`,`ai-search`,()=>import(`./ai-search-BgIOIgXd.mjs`)),hideCommand:!1},{command:$(`alerting`,`Notification policies, delivery destinations, silence windows, and alert history`,()=>import(`./alerting-DVI-v6mE.mjs`)),hideCommand:!0},{command:$(`alerts`,`alerts`,()=>import(`./alerts-dpT6Qsdu.mjs`)),hideCommand:!0},{command:$(`analytics`,`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,()=>import(`./analytics-B98epmDb.mjs`)),hideCommand:!0},{command:$(`analytics_engine`,`analytics_engine`,()=>import(`./analytics_engine-DwDePA2c.mjs`)),hideCommand:!0},{command:$(`api-gateway`,`Discover, monitor, and protect your API endpoints with schema validation, abuse detection, and routing`,()=>import(`./api-gateway-DW2GX64w.mjs`)),hideCommand:!0},{command:$(`argo`,`Network optimization features that speed up and improve reliability of traffic to your origins`,()=>import(`./argo-DKEx-B66.mjs`)),hideCommand:!0},{command:$(`artifacts`,`artifacts`,()=>import(`./artifacts-BEU8fBqt.mjs`)),hideCommand:!0},{command:$(`audit-logs`,`Immutable audit trail of actions taken by account members — who changed what and when`,()=>import(`./audit-logs-DZiEPYL0.mjs`)),hideCommand:!0},{command:$(`autorag`,`autorag`,()=>import(`./autorag-Cnpp8PAG.mjs`)),hideCommand:!0},{command:$(`billing`,`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,()=>import(`./billing-10B4_1qb.mjs`)),hideCommand:!1},{command:$(`bot-management`,`Bot detection and mitigation settings — configure bot scores, JavaScript detections, and challenge behavior`,()=>import(`./bot-management-D51WzJBO.mjs`)),hideCommand:!0},{command:$(`botnet-feed`,`Botnet threat intelligence feeds — IP and ASN-level data on known command-and-control infrastructure`,()=>import(`./botnet-feed-Dw-leAwX.mjs`)),hideCommand:!0},{command:$(`brand-protection`,`Monitor the Internet for phishing sites, lookalike domains, and unauthorized use of your brand assets`,()=>import(`./brand-protection-BTYkTsER.mjs`)),hideCommand:!0},{command:$(`brands`,`brands`,()=>import(`./brands-CGpk9nZB.mjs`)),hideCommand:!0},{command:$(`browser-extension`,`browser-extension`,()=>import(`./browser-extension-BFa5Ky8u.mjs`)),hideCommand:!1},{command:$(`browser-run`,`browser-run`,()=>import(`./browser-run-BMA8Z_hI.mjs`)),hideCommand:!0},{command:$(`cache`,`Purge cached content and configure Cache Reserve, tiered caching, and variant serving`,()=>import(`./cache-DrX4gWvg.mjs`)),hideCommand:!0},{command:$(`calls`,`calls`,()=>import(`./calls-m4WyL1Rb.mjs`)),hideCommand:!0},{command:$(`certificate-authorities`,`Map client certificates to specific hostnames for mTLS authentication`,()=>import(`./certificate-authorities-BA-S8NE-.mjs`)),hideCommand:!0},{command:$(`clear`,`clear`,()=>import(`./clear-DXx8WBAN.mjs`)),hideCommand:!0},{command:$(`client-certificates`,`Issue and manage client certificates for mutual TLS (mTLS) authentication on your zone`,()=>import(`./client-certificates-5h-fXoNq.mjs`)),hideCommand:!0},{command:$(`cloud-connector`,`Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers`,()=>import(`./cloud-connector-ywFQuqtV.mjs`)),hideCommand:!0},{command:$(`cloudforce-one`,`Threat intelligence platform — request investigations, scan indicators, and track threat events`,()=>import(`./cloudforce-one-CPx4C-r3.mjs`)),hideCommand:!1},{command:$(`connectivity`,`Service directory for network connectivity endpoints and their configurations`,()=>import(`./connectivity-y-Gav-Ge.mjs`)),hideCommand:!0},{command:$(`connector-interrupts`,`connector-interrupts`,()=>import(`./connector-interrupts-Bs-jfuh8.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-events`,`connector-telemetry-events`,()=>import(`./connector-telemetry-events-Bc6f3xpx.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-snapshots`,`connector-telemetry-snapshots`,()=>import(`./connector-telemetry-snapshots-Bl54XZ3h.mjs`)),hideCommand:!0},{command:$(`connectors`,`connectors`,()=>import(`./connectors-BnQq_R19.mjs`)),hideCommand:!0},{command:$(`content-scanning`,`content-scanning`,()=>import(`./content-scanning-Bxk-WkSL.mjs`)),hideCommand:!0},{command:$(`ct-alerting`,`ct-alerting`,()=>import(`./ct-alerting-BSn2Jqou.mjs`)),hideCommand:!0},{command:$(`custom-certificates`,`Upload and manage your own SSL/TLS certificates for a zone, with priority ordering`,()=>import(`./custom-certificates-BBqr4S9W.mjs`)),hideCommand:!0},{command:$(`custom-csrs`,`custom-csrs`,()=>import(`./custom-csrs-CXeBzLUy.mjs`)),hideCommand:!0},{command:$(`custom-hostnames`,`Bring custom vanity domains to your SaaS zone with per-hostname SSL and origin mapping`,()=>import(`./custom-hostnames-CfCOedoN.mjs`)),hideCommand:!0},{command:$(`custom-nameservers`,`Vanity nameservers that use your own domain instead of Cloudflare-assigned NS records`,()=>import(`./custom-nameservers-RPXeu7f_.mjs`)),hideCommand:!0},{command:$(`custom-pages`,`Custom error and challenge pages (1000s, WAF blocks, captchas) for zones and accounts`,()=>import(`./custom-pages-xGG1xo88.mjs`)),hideCommand:!0},{command:$(`d1`,`D1 is Cloudflare's managed, serverless database with SQLite's SQL semantics, built-in disaster recovery, and Worker and HTTP API access.`,()=>import(`./d1-CRIOfBsJ.mjs`)),hideCommand:!0},{command:$(`data-security`,`data-security`,()=>import(`./data-security-D5Sw5rwj.mjs`)),hideCommand:!0},{command:$(`dcv-delegation`,`Delegate domain control validation (DCV) to Cloudflare so certificates auto-renew without manual DNS changes`,()=>import(`./dcv-delegation-BBnlgr6F.mjs`)),hideCommand:!0},{command:$(`diagnostics`,`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,()=>import(`./diagnostics-C1qryRf4.mjs`)),hideCommand:!0},{command:$(`dispatch-namespaces`,`Workers for Platforms dispatch namespaces — isolate customer Workers for SaaS and multi-tenant deployments`,()=>import(`./dispatch-namespaces-DbosPgPV.mjs`)),hideCommand:!0},{command:$(`dns`,`DNS management API for zones, records, DNSSEC, analytics, and zone transfers`,()=>import(`./dns-ByufYrJH.mjs`)),hideCommand:!1},{command:$(`dns-firewall`,`DNS proxy clusters that filter and forward DNS queries with DDoS protection and caching`,()=>import(`./dns-firewall-CiokCKRr.mjs`)),hideCommand:!0},{command:$(`domain-info`,`domain-info`,()=>import(`./domain-info-CRvKc2Lg.mjs`)),hideCommand:!0},{command:$(`durable-objects`,`Stateful serverless objects with transactional storage, ideal for coordination, sessions, and real-time collaboration`,()=>import(`./durable-objects-DjF-WAD3.mjs`)),hideCommand:!0},{command:$(`email-auth`,`email-auth`,()=>import(`./email-auth-B4BIYMb-.mjs`)),hideCommand:!0},{command:$(`email-routing`,`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,()=>import(`./email-routing-BbbtpVyS.mjs`)),hideCommand:!0},{command:$(`email-security`,`Cloud email security (Area 1) — investigate threats, manage allow/block policies, and detect phishing`,()=>import(`./email-security-DuBVypAO.mjs`)),hideCommand:!0},{command:$(`email-sending`,`Send emails and manage sending subdomains`,()=>import(`./email-sending-5g-k05Lv.mjs`)),hideCommand:!1},{command:$(`filters`,`Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations`,()=>import(`./filters-CzJmLFcS.mjs`)),hideCommand:!0},{command:$(`firewall`,`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,()=>import(`./firewall-CjmeWA2M.mjs`)),hideCommand:!0},{command:$(`flagship`,`flagship`,()=>import(`./flagship-BfyVrWP-.mjs`)),hideCommand:!0},{command:$(`fraud`,`Fraud detection for login and signup flows — identify credential stuffing, account takeover, and fake accounts`,()=>import(`./fraud-reRvxNg-.mjs`)),hideCommand:!0},{command:$(`google-tag-gateway`,`Google Tag Gateway operations`,()=>import(`./google-tag-gateway-CGwzMZU1.mjs`)),hideCommand:!0},{command:$(`healthchecks`,`Standalone health checks that monitor origin server availability from Cloudflare's edge`,()=>import(`./healthchecks-BhCsPWcG.mjs`)),hideCommand:!0},{command:$(`hostnames`,`Per-hostname TLS settings — minimum TLS version, ciphers, and certificate pinning overrides`,()=>import(`./hostnames-JpgQW4kn.mjs`)),hideCommand:!0},{command:$(`hyperdrive`,`Accelerate access to existing databases by caching queries and pooling connections at the edge`,()=>import(`./hyperdrive-iwYttuwV.mjs`)),hideCommand:!1},{command:$(`iam`,`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,()=>import(`./iam-ffI98_4v.mjs`)),hideCommand:!0},{command:$(`images`,`images`,()=>import(`./images-Bgb9DGlr.mjs`)),hideCommand:!1},{command:$(`intel`,`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,()=>import(`./intel-DVRjKpyU.mjs`)),hideCommand:!0},{command:$(`internal`,`internal`,()=>import(`./internal-Czlp5Ekb.mjs`)),hideCommand:!0},{command:$(`ips`,`List Cloudflare's IP ranges used for proxying traffic — useful for firewall allowlisting`,()=>import(`./ips-BtLRO19r.mjs`)),hideCommand:!0},{command:$(`keyless-certificates`,`Use your own SSL certificates without exposing private keys — keys stay on your infrastructure`,()=>import(`./keyless-certificates-13w8KOcC.mjs`)),hideCommand:!0},{command:$(`kv`,`Global, low-latency key-value storage for Workers — namespaces, keys, values, and bulk operations`,()=>import(`./kv-CvQyF_NB.mjs`)),hideCommand:!0},{command:$(`leaked-credential-checks`,`leaked-credential-checks`,()=>import(`./leaked-credential-checks-DvY8VReW.mjs`)),hideCommand:!0},{command:$(`live`,`live`,()=>import(`./live-Ce7dZW7p.mjs`)),hideCommand:!0},{command:$(`load-balancers`,`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,()=>import(`./load-balancers-6lgExyS7.mjs`)),hideCommand:!0},{command:$(`logexplorer`,`logexplorer`,()=>import(`./logexplorer-DBfrK1hn.mjs`)),hideCommand:!0},{command:$(`logo-matches`,`logo-matches`,()=>import(`./logo-matches-XS2RaxQu.mjs`)),hideCommand:!0},{command:$(`logos`,`logos`,()=>import(`./logos-COtlpbRq.mjs`)),hideCommand:!0},{command:$(`logpush`,`Push Cloudflare logs to external storage destinations — R2, S3, Splunk, Datadog, and more`,()=>import(`./logpush-CIpiK3Xl.mjs`)),hideCommand:!0},{command:$(`logs`,`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,()=>import(`./logs-0KjIf_3g.mjs`)),hideCommand:!0},{command:$(`magic-cloud-networking`,`Multi-cloud networking — discover cloud resources, manage on-ramps, and automate cross-cloud connectivity`,()=>import(`./magic-cloud-networking-q_d9-he-.mjs`)),hideCommand:!0},{command:$(`magic-network-monitoring`,`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,()=>import(`./magic-network-monitoring-DLNCrUsn.mjs`)),hideCommand:!0},{command:$(`magic-transit`,`DDoS-protected network transit — GRE/IPsec tunnels, static routes, Magic WAN sites, connectors, and packet captures`,()=>import(`./magic-transit-sIwSlzoK.mjs`)),hideCommand:!0},{command:$(`managed-transforms`,`Cloudflare-managed HTTP header transforms — automatically add security headers, remove server info, etc.`,()=>import(`./managed-transforms-BKRjmzJS.mjs`)),hideCommand:!0},{command:$(`matches`,`matches`,()=>import(`./matches-DZLS60M2.mjs`)),hideCommand:!0},{command:$(`moq`,`moq`,()=>import(`./moq-Dbb9QhC1.mjs`)),hideCommand:!1},{command:$(`mtls-certificates`,`Upload and manage mTLS certificates used by API Shield, Workers, and Gateway for client authentication`,()=>import(`./mtls-certificates-BpIqoWpc.mjs`)),hideCommand:!0},{command:$(`network-interconnects`,`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,()=>import(`./network-interconnects-DZwGJFYT.mjs`)),hideCommand:!0},{command:$(`observability`,`observability`,()=>import(`./observability-CVLjPAir.mjs`)),hideCommand:!0},{command:$(`organization`,`organization`,()=>import(`./organization-BGF8N1QQ.mjs`)),hideCommand:!1},{command:$(`organizations`,`Multi-user organizations that group accounts, members, and shared settings under a single entity`,()=>import(`./organizations-BInE8nlx.mjs`)),hideCommand:!1},{command:$(`origin-ca-certificates`,`Free Cloudflare-signed certificates installed on your origin server for Full (strict) SSL mode`,()=>import(`./origin-ca-certificates-wPzWcEa0.mjs`)),hideCommand:!0},{command:$(`origin-post-quantum-encryption`,`Enable post-quantum key exchange for connections between Cloudflare and your origin server`,()=>import(`./origin-post-quantum-encryption-t1Cl9hiy.mjs`)),hideCommand:!0},{command:$(`origin-tls-client-auth`,`Authenticated Origin Pulls — require Cloudflare to present a client certificate when connecting to your origin`,()=>import(`./origin-tls-client-auth-Cvr9D8eq.mjs`)),hideCommand:!0},{command:$(`page-rules`,`Legacy URL-pattern rules that override zone settings for matching requests — prefer Rules/Transform Rules instead`,()=>import(`./page-rules-CMo73oVb.mjs`)),hideCommand:!0},{command:$(`page-shield`,`Client-side security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks`,()=>import(`./page-shield-Z23iqabu.mjs`)),hideCommand:!0},{command:$(`pages`,`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,()=>import(`./pages-ByaZvYjA.mjs`)),hideCommand:!0},{command:$(`pay-per-crawl`,`pay-per-crawl`,()=>import(`./pay-per-crawl-BXTenh_d.mjs`)),hideCommand:!1},{command:$(`pipelines`,`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,()=>import(`./pipelines-7KWm5BYN.mjs`)),hideCommand:!1},{command:$(`queries`,`queries`,()=>import(`./queries-Cgx1lQbn.mjs`)),hideCommand:!0},{command:$(`queues`,`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,()=>import(`./queues-jnugmCYI.mjs`)),hideCommand:!0},{command:$(`r2`,`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,()=>import(`./r2-Dllx7F7a.mjs`)),hideCommand:!1},{command:$(`r2-data-catalog`,`Iceberg-compatible data catalog for R2 — organize objects into tables and namespaces for SQL query engines`,()=>import(`./r2-data-catalog-CaAAPwKp.mjs`)),hideCommand:!0},{command:$(`radar`,`radar`,()=>import(`./radar-DLSHX2_1.mjs`)),hideCommand:!0},{command:$(`rate-limit-analytics`,`rate-limit-analytics`,()=>import(`./rate-limit-analytics-CGviSPnJ.mjs`)),hideCommand:!1},{command:$(`rate-limits`,`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,()=>import(`./rate-limits-DlVTd6QY.mjs`)),hideCommand:!0},{command:$(`ready`,`ready`,()=>import(`./ready-DMpJvyaz.mjs`)),hideCommand:!0},{command:$(`realtime-kit`,`Real-time video and audio — meetings, livestreams, recordings, and session management via Cloudflare Calls`,()=>import(`./realtime-kit-ct8Fu2kO.mjs`)),hideCommand:!0},{command:$(`recent-submissions`,`recent-submissions`,()=>import(`./recent-submissions-LS5IM-bm.mjs`)),hideCommand:!0},{command:$(`refute`,`refute`,()=>import(`./refute-BGTpr5sy.mjs`)),hideCommand:!0},{command:$(`registrar`,`Domain registration and transfer management through Cloudflare Registrar`,()=>import(`./registrar-CKTB7QTM.mjs`)),hideCommand:!1},{command:$(`registrar-sandbox`,`registrar-sandbox`,()=>import(`./registrar-sandbox-1-nNk6Uy.mjs`)),hideCommand:!1},{command:$(`request-tracers`,`request-tracers`,()=>import(`./request-tracers-DO6lno0x.mjs`)),hideCommand:!0},{command:$(`resource-sharing`,`resource-sharing`,()=>import(`./resource-sharing-DYhXJw44.mjs`)),hideCommand:!1},{command:$(`resource-tagging`,`Tag accounts and zones with key-value metadata for organization, filtering, and policy targeting`,()=>import(`./resource-tagging-CcKWMF9l.mjs`)),hideCommand:!0},{command:$(`rules`,`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,()=>import(`./rules-DQKR3qb7.mjs`)),hideCommand:!0},{command:$(`rulesets`,`Versioned collections of rules that control how Cloudflare processes traffic — WAF, transform, redirect, and more`,()=>import(`./rulesets-B9fZb_JY.mjs`)),hideCommand:!0},{command:$(`rum`,`rum`,()=>import(`./rum-BaJio_GD.mjs`)),hideCommand:!0},{command:$(`scan-logo`,`scan-logo`,()=>import(`./scan-logo-DUDIZJ2A.mjs`)),hideCommand:!0},{command:$(`scan-page`,`scan-page`,()=>import(`./scan-page-BqoQTk3R.mjs`)),hideCommand:!0},{command:$(`schema-validation`,`API schema validation settings — enforce request/response schemas and configure validation behavior`,()=>import(`./schema-validation-Cqv8KT1B.mjs`)),hideCommand:!0},{command:$(`scim`,`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,()=>import(`./scim-DkYH1dep.mjs`)),hideCommand:!0},{command:$(`search`,`search`,()=>import(`./search-C4T5riPh.mjs`)),hideCommand:!0},{command:$(`secrets-store`,`Centralized secret management — store API keys, tokens, and credentials for use across Workers and other products`,()=>import(`./secrets-store-CMR_pA1t.mjs`)),hideCommand:!0},{command:$(`security-center`,`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,()=>import(`./security-center-DCHfgCq6.mjs`)),hideCommand:!1},{command:$(`security-txt`,`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,()=>import(`./security-txt-D19uTyaf.mjs`)),hideCommand:!0},{command:$(`share`,`share`,()=>import(`./share-CfJbt0WU.mjs`)),hideCommand:!1},{command:$(`signed-url`,`signed-url`,()=>import(`./signed-url-DA509wgp.mjs`)),hideCommand:!0},{command:$(`smart-shield`,`Smart Shield settings, health checks, and cache reserve management`,()=>import(`./smart-shield-BG5WOmi1.mjs`)),hideCommand:!0},{command:$(`snippets`,`Lightweight JavaScript snippets that run on requests before Workers — for quick header modifications and redirects`,()=>import(`./snippets-CYiSdx7R.mjs`)),hideCommand:!0},{command:$(`spectrum`,`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,()=>import(`./spectrum-Qvq3yJax.mjs`)),hideCommand:!0},{command:$(`speed`,`speed`,()=>import(`./speed-vpoB9msm.mjs`)),hideCommand:!0},{command:$(`ssl`,`SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations`,()=>import(`./ssl-Qw8eVAiS.mjs`)),hideCommand:!0},{command:$(`stream`,`stream`,()=>import(`./stream-BNbkY3zI.mjs`)),hideCommand:!0},{command:$(`submission-info`,`submission-info`,()=>import(`./submission-info-DfIXmu-M.mjs`)),hideCommand:!0},{command:$(`submit`,`submit`,()=>import(`./submit-pQNW7uWj.mjs`)),hideCommand:!0},{command:$(`tenant`,`tenant`,()=>import(`./tenant-xkvdAutS.mjs`)),hideCommand:!1},{command:$(`token-validation`,`Validate JWT tokens at the edge — configure token sources, signing keys, and validation rules`,()=>import(`./token-validation-5F2AbQCz.mjs`)),hideCommand:!0},{command:$(`total-queries`,`total-queries`,()=>import(`./total-queries-DdLBNJzd.mjs`)),hideCommand:!0},{command:$(`tracked-domains`,`tracked-domains`,()=>import(`./tracked-domains-BbaY-IuY.mjs`)),hideCommand:!0},{command:$(`turnstile`,`turnstile`,()=>import(`./turnstile-BSIaunXn.mjs`)),hideCommand:!0},{command:$(`url-info`,`url-info`,()=>import(`./url-info-Q7m7AVih.mjs`)),hideCommand:!0},{command:$(`url-normalization`,`Normalize incoming request URLs to a consistent format before rule evaluation and caching`,()=>import(`./url-normalization-Bs2m5jlD.mjs`)),hideCommand:!0},{command:$(`url-scanner`,`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,()=>import(`./url-scanner-CYmT3C99.mjs`)),hideCommand:!0},{command:$(`user`,`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,()=>import(`./user-Bay_0p3C.mjs`)),hideCommand:!1},{command:$(`vectorize`,`Globally distributed vector database for building semantic search, recommendations, and RAG applications on Workers`,()=>import(`./vectorize-cP2OuB5N.mjs`)),hideCommand:!0},{command:$(`verify`,`verify`,()=>import(`./verify-D7J3F_NZ.mjs`)),hideCommand:!0},{command:$(`waiting-rooms`,`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,()=>import(`./waiting-rooms-B5HR1-37.mjs`)),hideCommand:!0},{command:$(`web3`,`Web3 gateways — serve IPFS and Ethereum content through custom hostnames on Cloudflare`,()=>import(`./web3-DqCXM4sx.mjs`)),hideCommand:!0},{command:$(`workers`,`Deploy and manage serverless JavaScript/WASM applications on Cloudflare's global network`,()=>import(`./workers-Cu-A8AZc.mjs`)),hideCommand:!0},{command:$(`workers-builds`,`Automated build and deployment pipeline for Workers — track builds, logs, and repo connections`,()=>import(`./workers-builds-CmCg27M-.mjs`)),hideCommand:!0},{command:$(`workflows`,`Durable, multi-step workflows that run on Workers with automatic retries and state persistence`,()=>import(`./workflows-DavS4SEh.mjs`)),hideCommand:!1},{command:$(`zaraz`,`Server-side tag manager — load third-party tools (analytics, pixels, etc.) from Cloudflare's edge without client-side JS`,()=>import(`./zaraz-CKcVy5Xa.mjs`)),hideCommand:!0},{command:$(`zero-trust`,`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,()=>import(`./zero-trust-BKVqb2yq.mjs`)),hideCommand:!0},{command:$(`zone`,`zone`,()=>import(`./zone-BOcuY4sU.mjs`)),hideCommand:!1},{command:$(`zones`,`Zones are domains on Cloudflare — list, create, and configure domain settings`,()=>import(`./zones-BR-9WaY7.mjs`)),hideCommand:!1}];function dr(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function fr(e){if(s(n),e instanceof c){let t=d(),n=e.statusCode,r=e.body,i=n===void 0?`Envelope Error`:mr(n),a=[];if(r){let e=r;Array.isArray(e.errors)&&(a=e.errors)}let o=e.rawResponse?.url?`HTTP ${dr(e.rawResponse.url)}`:void 0,s=n===void 0?i:`${n} ${i}`,c=o?`${s} · ${o}`:s,l=t.dim(c),u=``;return a.length>0?u=a.map((e,n)=>{let r=typeof e.code==`number`?t.hex(f.error).bold(`[${e.code}]`):t.hex(f.error).bold(`[error]`),i=t.bold(e.message??``);return n===a.length-1?`${r} ${i}\n${l}`:`${r} ${i}`}).join(`
|
|
99
99
|
|
|
100
100
|
`):(u=t.hex(f.error).bold(e.message||c),e.message&&c&&(u+=`\n${l}`)),console.error(p(u,void 0,{title:`APIError`,rawMessage:!0})),n===401?console.error(`
|
|
101
101
|
`+m(`Try running: cf auth login`)):n===403&&console.error(`
|
|
@@ -103,6 +103,6 @@ complete -o bashdefault -o default -F _{{app_name}}_yargs_completions {{app_name
|
|
|
103
103
|
|
|
104
104
|
`)}else{let n=t.hex(f.error).bold(e.message);a=r?`${n}\n${r}`:n}return console.error(p(a,void 0,{title:`APIError`,rawMessage:!0})),e.status===401?console.error(`
|
|
105
105
|
`+m(`Try running: cf auth login`)):e.status===403&&console.error(`
|
|
106
|
-
`+m(`Check your API token permissions`)),e}if(e instanceof Error){let t=process.env.DEBUG&&e.stack?pr(e.stack):void 0;return console.error(p(e.message,t)),e}return console.error(p(`An unexpected error occurred`,String(e))),e}function pr(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function mr(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}const hr=$(`auth`,`Manage authentication and profiles`,()=>import(`./auth-
|
|
107
|
-
`)),!0}function
|
|
108
|
-
The Cloudflare CLI - manage your Cloudflare resources`).updateStrings({"Commands:":t(`Commands`),"Options:":t(`Options`),"Positionals:":t(`Positionals`),"Examples:":t(`Examples`)}).help(`help`,`Show help`).alias(`h`,`help`).option(`quiet`,{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1}).option(`zone`,{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0}).option(`profile`,{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0}).option(`local`,{type:`boolean`,description:"Route to a local `wrangler dev` / `cf dev` Miniflare session",global:!0,default:!1}).option(`local-endpoint`,{type:`string`,description:`Local Miniflare endpoint URL (required with --local until auto-discovery ships)`,global:!0}).group([`quiet`,`zone`,`profile`,`local`,`local-endpoint`,`help`,`version`],t(`Global flags`)).command(hr).command(xr).command(gr).command(Sr).command(br).command(Cr).command(_r).command(vr).command(yr);for(let e of ur)e.hideCommand?i.command({...e.command,describe:!1}):i.command(e.command);return i.middleware(async e=>{if(e.local&&!e.localEndpoint)throw Error("--local requires --local-endpoint <url> (e.g. http://127.0.0.1:8787).\nDiscovery via the dev registry will land in a future release; until then,\npoint cf at your running `wrangler dev` / `cf dev` session explicitly.");if(!e.local){let{resolveProfile:t}=await import(`./oauth-
|
|
106
|
+
`+m(`Check your API token permissions`)),e}if(e instanceof Error){let t=process.env.DEBUG&&e.stack?pr(e.stack):void 0;return console.error(p(e.message,t)),e}return console.error(p(`An unexpected error occurred`,String(e))),e}function pr(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function mr(e){return{400:`Bad Request`,401:`Unauthorized`,403:`Forbidden`,404:`Not Found`,405:`Method Not Allowed`,409:`Conflict`,422:`Unprocessable Entity`,429:`Too Many Requests`,500:`Internal Server Error`,502:`Bad Gateway`,503:`Service Unavailable`,504:`Gateway Timeout`}[e]??``}const hr=$(`auth`,`Manage authentication and profiles`,()=>import(`./auth-009DISzb.mjs`)),gr=$(`complete [shell]`,`Generate and handle shell completions`,()=>import(`./completions-CCRu-jvY.mjs`)),_r=$(`schema [command..]`,`Show API schema details for a command`,()=>import(`./schema-DAW-B7wT.mjs`)),vr=$(`agent-context [product]`,`Output agent context and tool definitions`,()=>import(`./agent-context-Bzl5PGW-.mjs`)),yr=$(`tools`,!1,()=>import(`./tools-BpNGzfj2.mjs`)),br=$(`dev [implArgs..]`,`Run the project's Cloudflare dev server`,()=>import(`./dev-Bz87BeKt.mjs`)),xr=$(`build`,`Build a project for Cloudflare`,()=>import(`./build-C1FOoThn.mjs`).then(e=>e.t)),Sr=$(`deploy`,`Deploy a project to Cloudflare`,()=>import(`./deploy-D0_KIUpW.mjs`)),Cr=$(`triggers`,`Manage triggers (Routes, Workflows, Cron triggers etc.)`,()=>import(`./triggers-CYdZhJYr.mjs`)),wr=$(`versions`,`Manage Worker Versions`,()=>import(`./versions-D7F26fhH.mjs`));function Tr(e){return e.includes(`--quiet`)||e.includes(`-q`)}function Er(){process.stderr.isTTY&&(Tr(process.argv.slice(2))||process.argv.slice(2).find(e=>!e.startsWith(`-`))!==`complete`&&import(`./state-C2cBU9iK.mjs`).then(({readState:e,updateState:t})=>{e().completions?.prompted||(process.stderr.write(u.muted("Tip: run `cf complete <bash|zsh|fish>` to install shell completions.\n")),t({completions:{prompted:!0}}))}))}function Dr(){let e=process.argv.slice(2);return!e.includes(`--version`)&&!e.includes(`-v`)?!1:(console.log(a(n)),!0)}function Or(){if(process.argv.slice(2).length>0)return!1;let e=[a(n),``,`The Cloudflare CLI — manage your account, zones, and developer platform.`,``,`${u.bold(`Get started:`)}`,` ${u.code(`cf auth login`)} ${u.muted(`Authenticate with Cloudflare`)}`,` ${u.code(`cf --help`)} ${u.muted(`Browse all commands`)}`,` ${u.code(`cf <command> --help`)} ${u.muted(`Per-command help`)}`,` ${u.code(`cf complete bash`)} ${u.muted(`Install shell completions`)}`,``,`${u.bold(`Docs:`)} ${u.brand(`https://developers.cloudflare.com/`)}`,``];return console.log(e.join(`
|
|
107
|
+
`)),!0}function kr(){let e=process.argv.slice(2);e.length!==0&&(e.includes(`--version`)||e.includes(`-v`)||e.find(e=>!e.startsWith(`-`))!==`complete`&&s(n,{quiet:Tr(e)}))}function Ar(e){let t=e=>u.brand(e),i=lr(e).scriptName(`cf`).usage(`$0 <command> [options]`).usage(`
|
|
108
|
+
The Cloudflare CLI - manage your Cloudflare resources`).updateStrings({"Commands:":t(`Commands`),"Options:":t(`Options`),"Positionals:":t(`Positionals`),"Examples:":t(`Examples`)}).help(`help`,`Show help`).alias(`h`,`help`).option(`quiet`,{type:`boolean`,alias:`q`,description:`Suppress non-essential output`,global:!0,default:!1}).option(`zone`,{type:`string`,alias:`z`,description:`Zone ID or domain name (overrides CLOUDFLARE_ZONE_ID)`,global:!0}).option(`profile`,{type:`string`,description:`Use a specific auth profile`,requiresArg:!0,global:!0}).option(`local`,{type:`boolean`,description:"Route to a local `wrangler dev` / `cf dev` Miniflare session",global:!0,default:!1}).option(`local-endpoint`,{type:`string`,description:`Local Miniflare endpoint URL (required with --local until auto-discovery ships)`,global:!0}).group([`quiet`,`zone`,`profile`,`local`,`local-endpoint`,`help`,`version`],t(`Global flags`)).command(hr).command(xr).command(gr).command(Sr).command(br).command(Cr).command(wr).command(_r).command(vr).command(yr);for(let e of ur)e.hideCommand?i.command({...e.command,describe:!1}):i.command(e.command);return i.middleware(async e=>{if(e.local&&!e.localEndpoint)throw Error("--local requires --local-endpoint <url> (e.g. http://127.0.0.1:8787).\nDiscovery via the dev registry will land in a future release; until then,\npoint cf at your running `wrangler dev` / `cf dev` session explicitly.");if(!e.local){let{resolveProfile:t}=await import(`./oauth-DC9g9uK_.mjs`).then(e=>e.l);r(t(e.profile))}}).demandCommand(1,`You need to specify a command`).strict().version(n).alias(`v`,`version`).epilogue(`For more information, visit https://developers.cloudflare.com/`).exitProcess(!1).fail((e,t,n)=>{if(t)throw t;if(e===`Please specify a subcommand`){n.showHelp(`log`);return}throw n.showHelp(`error`),Error(e)}),i}var jr=class extends Error{constructor(e){super(`CliExit(${e})`),this.code=e,this.name=`CliExit`}};async function Mr(e){let t=process.argv;process.argv=[`node`,`cf`,...e];try{await Nr()}finally{process.argv=t}}async function Nr(){if(Dr()||Or())throw new jr(0);kr();let e=Ar(ct(process.argv));Er();try{await e.parse(ct(process.argv))}catch(e){throw e instanceof jr?e:fr(e)}}export{Mr as i,Ar as n,Nr as r,jr as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{D as e}from"./oauth-
|
|
2
|
+
import{D as e}from"./oauth-DC9g9uK_.mjs";import{n as t}from"./auth-B1CY5zpC.mjs";import{t as n}from"./output-B6fBFRqe.mjs";import{n as r,t as i}from"./progress-BLQ2xXwD.mjs";import{n as a,t as o}from"./body-parser-BO6mfo_W.mjs";import{n as s}from"./input-validation-BwUR9z8e.mjs";import{n as c,t as l}from"./prompt-DcfYBioA.mjs";import{t as u}from"./cli-types-CFw6Xygp.mjs";function d(e){return e.option(`bundle-method`,{type:`string`,description:`A ubiquitous bundle has the highest probability of being verified everywhere, even by clients using outdated or unusual trust stores. An optimal bundle uses the shortest chain and newest intermediates. And the force bundle verifies the chain, but does not otherwise modify it.`,choices:[`ubiquitous`,`optimal`,`force`],default:`ubiquitous`}).option(`certificate`,{type:`string`,description:`The zone's SSL certificate or certificate and the intermediate(s).`}).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:`create`,describe:`Returns the set of hostnames, the signature algorithm, and the expiration date of the certificate.`,builder:d,handler:async c=>{if(c.dryRun){r({command:`cf ssl analyze create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/ssl/analyze`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({bundle_method:s(c[`bundle-method`],`bundle-method`,`text`),certificate:s(c.certificate,`certificate`,`text`)}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Creating`,async()=>l.ssl.analyze.create({...e,zone_id:u})),{successLabel:`Created`});return}let d=o({bundle_method:s(c[`bundle-method`],`bundle-method`,`text`),certificate:s(c.certificate,`certificate`,`text`)});n(await i(`Creating`,async()=>l.ssl.analyze.create({...d,zone_id:u})),{successLabel:`Created`})}},p={command:`analyze`,describe:`Operations for analyze`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};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:`If the system is enabled, the response will include next_scheduled_scan, representing the next time this zone will be scanned and the zone's ssl/tls encryption mode is potentially upgraded by the system. If the system is disabled, next_scheduled_scan will not be present in the response body.`,builder:m,handler:async a=>{if(a.dryRun){r({command:`cf ssl automatic-upgrader get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/settings/ssl_automatic_mode`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.ssl.automaticUpgrader.get({zone_id:s})),{successLabel:`Loaded`})}};function g(e){return e.option(`value`,{type:`string`,description:`Controls enablement of Automatic SSL/TLS.`,choices:[`auto`,`custom`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Update enablement of Automatic SSL/TLS.`})}const _={command:`patch`,describe:`The automatic system is enabled when this endpoint is hit with value in the request body is set to "auto", and disabled when the request body value is set to "custom".`,builder:g,handler:async l=>{if(l.dryRun){r({command:`cf ssl automatic-upgrader patch`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/settings/ssl_automatic_mode`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({value:s(l.value,`value`,`text`)}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Updating`,async()=>u.ssl.automaticUpgrader.patch({...e,zone_id:d})),{successLabel:`Updated`});return}l.value===void 0&&(l.value=await c(`value`,`Controls enablement of Automatic SSL/TLS.`,[`auto`,`custom`]));let f=o({value:s(l.value,`value`,`text`)});n(await i(`Updating`,async()=>u.ssl.automaticUpgrader.patch({...f,zone_id:d})),{successLabel:`Updated`})}},v={command:`automatic-upgrader`,describe:`SSL automatic mode enrollment — get or update automatic SSL/TLS upgrader settings`,builder:e=>e.command(h).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function y(e){return e.option(`certificate-authority`,{type:`string`,description:`Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities).`,choices:[`google`,`lets_encrypt`,`ssl_com`]}).option(`cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`hosts`,{type:`string`,array:!0,description:`Comma separated list of valid host names for the certificate packs. Must contain the zone apex, may not contain more than 50 hosts, and may not be empty.`}).option(`type`,{type:`string`,description:`Type of certificate pack.`,choices:[`advanced`]}).option(`validation-method`,{type:`string`,description:`Validation Method selected for the order.`,choices:[`txt`,`http`,`email`]}).option(`validity-days`,{type:`number`,description:`Validity Days selected for the order.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`create`,describe:`For a given zone, order an advanced certificate pack.`,builder:y,handler:async l=>{if(l.dryRun){r({command:`cf ssl certificate-packs create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/ssl/certificate_packs/order`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({certificate_authority:s(l[`certificate-authority`],`certificate-authority`,`text`),cloudflare_branding:l[`cloudflare-branding`],hosts:l.hosts,type:s(l.type,`type`,`text`),validation_method:s(l[`validation-method`],`validation-method`,`text`),validity_days:l[`validity-days`]}):a(l.body)});return}let u=await t(l),d=await e({zone:l.zone},u,{quiet:l.quiet});if(l.zoneId=d,l.body){let e=a(l.body);n(await i(`Creating`,async()=>u.ssl.certificatePacks.create({...e,zone_id:d})),{successLabel:`Created`});return}if(l[`certificate-authority`]===void 0&&(l[`certificate-authority`]=await c(`certificate-authority`,`Certificate Authority selected for the order. For information on any certificate authority specific details or restrictions [see this page for more details](https://developers.cloudflare.com/ssl/reference/certificate-authorities).`,[`google`,`lets_encrypt`,`ssl_com`])),l.hosts===void 0)throw Error(`--hosts is required (or pass --body with this field set).`);if(l.type===void 0&&(l.type=await c(`type`,`Type of certificate pack.`,[`advanced`])),l[`validation-method`]===void 0&&(l[`validation-method`]=await c(`validation-method`,`Validation Method selected for the order.`,[`txt`,`http`,`email`])),l[`validity-days`]===void 0)throw Error(`--validity-days is required (or pass --body with this field set).`);let f=o({certificate_authority:s(l[`certificate-authority`],`certificate-authority`,`text`),cloudflare_branding:l[`cloudflare-branding`],hosts:l.hosts,type:s(l.type,`type`,`text`),validation_method:s(l[`validation-method`],`validation-method`,`text`),validity_days:l[`validity-days`]});n(await i(`Creating`,async()=>u.ssl.certificatePacks.create({...f,zone_id:d})),{successLabel:`Created`})}};function x(e){return e.positional(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete <certificate-pack-id>`,describe:`For a given zone, delete an advanced certificate pack.`,builder:x,handler:async a=>{if(a.dryRun){r({command:`cf ssl certificate-packs delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ssl/certificate_packs/${a[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(a[`certificate-pack-id`]))}`,pathParams:{"certificate-pack-id":String(a[`certificate-pack-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await l({force:!!a.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>o.ssl.certificatePacks.delete({zone_id:s,certificate_pack_id:a[`certificate-pack-id`]})),{successLabel:`Deleted`})}};function C(e){return e.positional(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`cloudflare-branding`,{type:`boolean`,description:`Whether or not to add Cloudflare Branding for the order. This will add a subdomain of sni.cloudflaressl.com as the Common Name if set to true.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const w={command:`edit <certificate-pack-id>`,describe:`For a given zone, restart validation or add cloudflare branding for an advanced certificate pack. The former is only a validation operation for a Certificate Pack in a validation_timed_out status.`,builder:C,handler:async s=>{if(s.dryRun){r({command:`cf ssl certificate-packs edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/ssl/certificate_packs/${s[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(s[`certificate-pack-id`]))}`,pathParams:{"certificate-pack-id":String(s[`certificate-pack-id`]??``),"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?o({cloudflare_branding:s[`cloudflare-branding`]}):a(s.body)});return}let c=await t(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=a(s.body);n(await i(`Updating`,async()=>c.ssl.certificatePacks.edit({...e,zone_id:l,certificate_pack_id:s[`certificate-pack-id`]})),{successLabel:`Updated`});return}let u=o({cloudflare_branding:s[`cloudflare-branding`]});n(await i(`Updating`,async()=>c.ssl.certificatePacks.edit({...u,zone_id:l,certificate_pack_id:s[`certificate-pack-id`]})),{successLabel:`Updated`})}};function T(e){return e.positional(`certificate-pack-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <certificate-pack-id>`,describe:`For a given zone, get a certificate pack.`,builder:T,handler:async a=>{if(a.dryRun){r({command:`cf ssl certificate-packs get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ssl/certificate_packs/${a[`certificate-pack-id`]==null?`<certificate-pack-id>`:encodeURIComponent(String(a[`certificate-pack-id`]))}`,pathParams:{"certificate-pack-id":String(a[`certificate-pack-id`]??``),"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.ssl.certificatePacks.get({zone_id:s,certificate_pack_id:a[`certificate-pack-id`]})),{successLabel:`Loaded`})}};function D(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of certificate packs per page.`}).option(`status`,{type:`string`,description:`Include Certificate Packs of all statuses, not just active ones.`,choices:[`all`]}).option(`deploy`,{type:`string`,description:`Specify the deployment environment for the certificate packs.`,choices:[`staging`,`production`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`list`,describe:`For a given zone, list all active certificate packs.`,builder:u(D),handler:async a=>{let o={page:a.page,per_page:a[`per-page`],status:a.status,deploy:a.deploy};if(a.dryRun){r({command:`cf ssl certificate-packs list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ssl/certificate_packs`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.ssl.certificatePacks.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function k(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const A={command:`get`,describe:`For a given zone, list certificate pack quotas.`,builder:k,handler:async a=>{if(a.dryRun){r({command:`cf ssl certificate-packs quota get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/ssl/certificate_packs/quota`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.ssl.certificatePacks.quota.get({zone_id:s})),{successLabel:`Loaded`})}},j={command:`quota`,describe:`Operations for certificate-packs.quota`,builder:e=>e.command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`certificate-packs`,describe:`Operations for certificate-packs`,builder:e=>e.command(b).command(S).command(w).command(E).command(O).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.option(`enabled`,{type:`boolean`,description:`Disabling Universal SSL removes any currently active Universal SSL certificates for your zone from the edge and prevents any future Universal SSL certificates from being ordered. If there are no advanced certificates or custom certificates uploaded for the domain, visitors will be unable to access the domain over HTTPS.
|
|
4
4
|
|
|
5
5
|
By disabling Universal SSL, you understand that the following Cloudflare settings and preferences will result in visitors being unable to visit your domain unless you have uploaded a custom certificate or purchased an advanced certificate.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,r as t}from"./cf-
|
|
2
|
+
import{i as e,r as t}from"./cf-BhDnTcDR.mjs";import{join as n}from"node:path";const r=t(()=>n(e(),`state.json`));function i(){return r.read()??{}}function a(e){r.write({...i(),...e})}export{i as readState,a as updateState};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{O as e,w as t}from"./oauth-
|
|
2
|
+
import{O as e,w as t}from"./oauth-DC9g9uK_.mjs";import{i as n,n as r}from"./auth-B1CY5zpC.mjs";import{t as i}from"./output-B6fBFRqe.mjs";import{n as a,t as o}from"./progress-BLQ2xXwD.mjs";import{t as s}from"./local-C6TLPAT6.mjs";import{n as c,r as l,t as u}from"./body-parser-BO6mfo_W.mjs";import{n as d,t as f}from"./input-validation-BwUR9z8e.mjs";import{r as p,t as m}from"./prompt-DcfYBioA.mjs";import{t as h}from"./cli-types-CFw6Xygp.mjs";import{n as g,t as _}from"./raw-fetch-CeW1mW_u.mjs";function ee(e){return e.positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).option(`url`,{type:`string`,description:"An audio track URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file."}).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 te={command:`copy <identifier>`,describe:`Adds an additional audio track to a video using the provided audio track URL.`,builder:ee,handler:async n=>{if(n.dryRun){a({command:`cf stream audio-tracks copy`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/audio/copy`,pathParams:{identifier:String(n.identifier??``)},bodyKind:`json`,body:n.body===void 0?u({label:d(n.label,`label`,`text`),url:d(n.url,`url`,`text`)}):c(n.body)});return}let l=await r(n),f=n.local?s:await t();if(n.accountId=f,n.body){let e=c(n.body);i(await o(`Creating`,async()=>l.stream.audioTracks.copy({...e,account_id:f,identifier:n.identifier})),{successLabel:`Created`});return}n.label===void 0&&(n.label=await p(`label`,`A string to uniquely identify the track amongst other audio track labels for the specified video.`));let m=u({label:d(n.label,`label`,`text`),url:d(n.url,`url`,`text`)});i(await o(`Creating`,async()=>l.stream.audioTracks.copy({...m,account_id:f,identifier:n.identifier})),{successLabel:`Created`})}};function v(e){return e.positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <audio-identifier>`,describe:`Deletes additional audio tracks on a video. Deleting a default audio track is not allowed. You must assign another audio track as default prior to deletion.`,builder:v,handler:async n=>{if(n.dryRun){a({command:`cf stream audio-tracks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/audio/${n[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(n[`audio-identifier`]))}`,pathParams:{identifier:String(n.identifier??``),"audio-identifier":String(n[`audio-identifier`]??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();if(n.accountId=l,!await m({force:!!n.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>c.stream.audioTracks.delete({account_id:l,identifier:n.identifier,audio_identifier:n[`audio-identifier`]})),{successLabel:`Deleted`})}};function b(e){return e.positional(`audio-identifier`,{type:`string`,description:`The unique identifier for an additional audio track.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`default`,{type:`boolean`,description:`Denotes whether the audio track will be played by default in a player.`}).option(`label`,{type:`string`,description:`A string to uniquely identify the track amongst other audio track labels for the specified video.`}).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 <audio-identifier>`,describe:"Edits additional audio tracks on a video. Editing the default status of an audio track to `true` will mark all other audio tracks on the video default status to `false`.",builder:b,handler:async n=>{if(n.dryRun){a({command:`cf stream audio-tracks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/audio/${n[`audio-identifier`]==null?`<audio-identifier>`:encodeURIComponent(String(n[`audio-identifier`]))}`,pathParams:{identifier:String(n.identifier??``),"audio-identifier":String(n[`audio-identifier`]??``)},bodyKind:`json`,body:n.body===void 0?u({default:n.default,label:d(n.label,`label`,`text`)}):c(n.body)});return}let l=await r(n),f=n.local?s:await t();if(n.accountId=f,n.body){let e=c(n.body);i(await o(`Updating`,async()=>l.stream.audioTracks.edit({...e,account_id:f,identifier:n.identifier,audio_identifier:n[`audio-identifier`]})),{successLabel:`Updated`});return}let p=u({default:n.default,label:d(n.label,`label`,`text`)});i(await o(`Updating`,async()=>l.stream.audioTracks.edit({...p,account_id:f,identifier:n.identifier,audio_identifier:n[`audio-identifier`]})),{successLabel:`Updated`})}};function S(e){return e.positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const C={command:`get <identifier>`,describe:`Lists additional audio tracks on a video. Note this API will not return information for audio attached to the video upload.`,builder:S,handler:async n=>{if(n.dryRun){a({command:`cf stream audio-tracks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/audio`,pathParams:{identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();n.accountId=l,i(await o(`Loading`,async()=>c.stream.audioTracks.get({account_id:l,identifier:n.identifier})),{successLabel:`Loaded`})}},w={command:`audio-tracks`,describe:`Operations for audio-tracks`,builder:e=>e.command(te).command(y).command(x).command(C).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function T(e){return e.positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`get <identifier>`,describe:`Lists the available captions or subtitles for a specific video.`,builder:T,handler:async n=>{if(n.dryRun){a({command:`cf stream captions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/captions`,pathParams:{identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();n.accountId=l,i(await o(`Loading`,async()=>c.stream.captions.get({account_id:l,identifier:n.identifier})),{successLabel:`Loaded`})}};function D(e){return e.positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const O={command:`create <language>`,describe:`Generate captions or subtitles for provided language via AI.`,builder:D,handler:async n=>{if(n.dryRun){a({command:`cf stream captions language create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/captions/${n.language==null?`<language>`:encodeURIComponent(String(n.language))}/generate`,pathParams:{language:String(n.language??``),identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();n.accountId=l,i(await o(`Creating`,async()=>c.stream.captions.language.create({account_id:l,identifier:n.identifier,language:n.language})),{successLabel:`Created`})}};function k(e){return e.positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,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 A={command:`delete <language>`,describe:`Removes the captions or subtitles from a video.`,builder:k,handler:async n=>{if(n.dryRun){a({command:`cf stream captions language delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/captions/${n.language==null?`<language>`:encodeURIComponent(String(n.language))}`,pathParams:{language:String(n.language??``),identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();if(n.accountId=l,!await m({force:!!n.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}i(await o(`Deleting`,async()=>c.stream.captions.language.delete({account_id:l,identifier:n.identifier,language:n.language})),{successLabel:`Deleted`})}};function j(e){return e.positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const M={command:`get <language>`,describe:`Lists the captions or subtitles for provided language.`,builder:j,handler:async n=>{if(n.dryRun){a({command:`cf stream captions language get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/captions/${n.language==null?`<language>`:encodeURIComponent(String(n.language))}`,pathParams:{language:String(n.language??``),identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();n.accountId=l,i(await o(`Loading`,async()=>c.stream.captions.language.get({account_id:l,identifier:n.identifier,language:n.language})),{successLabel:`Loaded`})}};function N(e){return e.positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`})}const P={command:`update <language>`,describe:`Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.`,builder:N,handler:async c=>{if(c.dryRun){a({command:`cf stream captions language update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${c.identifier==null?`<identifier>`:encodeURIComponent(String(c.identifier))}/captions/${c.language==null?`<language>`:encodeURIComponent(String(c.language))}`,pathParams:{language:String(c.language??``),identifier:String(c.identifier??``)},bodyKind:`multipart`,body:{body:c.body,file:c.file}});return}let l=await r(c),u=c.local?s:await t();if(c.accountId=u,c.file!==void 0||c.body!==void 0){let e=new FormData;if(c.file){let t=f(c.file);e.append(`file`,new Blob([t]),c.file.split(/[\\/]/).filter(Boolean).pop())}else c.body!==void 0&&e.append(`file`,c.body);i(await o(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(c.identifier))}/captions/${encodeURIComponent(String(c.language))}`,{body:e})),{successLabel:`Updated`});return}if(c.body){let e=d(c.body,`body`,`binary`);i(await o(`Updating`,async()=>n(l,`PUT`,`/accounts/${u}/stream/${encodeURIComponent(String(c.identifier))}/captions/${encodeURIComponent(String(c.language))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{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.`)}};function F(e){return e.positional(`language`,{type:`string`,description:`The language tag in BCP 47 format.`,demandOption:!0}).option(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const I={command:`get <language>`,describe:`Return WebVTT captions for a provided language.`,builder:F,handler:async n=>{if(n.dryRun){a({command:`cf stream captions language vtt get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}/captions/${n.language==null?`<language>`:encodeURIComponent(String(n.language))}/vtt`,pathParams:{language:String(n.language??``),identifier:String(n.identifier??``)},bodyKind:`none`});return}await r(n);let i=n.local?s:await t();n.accountId=i,g((await o(`Loading`,async()=>_(`/accounts/${i}/stream/${encodeURIComponent(String(n.identifier))}/captions/${encodeURIComponent(String(n.language))}/vtt`,{method:`GET`,localEndpoint:n.local?n.localEndpoint:void 0}))).toString(`utf-8`))}},L={command:`vtt`,describe:`Operations for captions.language.vtt`,builder:e=>e.command(I).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},R={command:`language`,describe:`Operations for captions.language`,builder:e=>e.command(O).command(A).command(M).command(P).command(L).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},z={command:`captions`,describe:`Operations for captions`,builder:e=>e.command(E).command(R).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function B(e){return e.option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`clipped-from-video-uid`,{type:`string`,description:`The unique video identifier (UID).`}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`end-time-seconds`,{type:`number`,description:`Specifies the end time for the video clip in seconds.`}).option(`input`,{type:`string`,description:`A video's URL. Preferred over 'url'.`}).option(`name`,{type:`string`,description:`A name for the video.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`start-time-seconds`,{type:`number`,description:`Specifies the start time for the video clip in seconds.`}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:`A video's URL (legacy field, use 'input' instead).`}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).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:`create`,describe:`Clips a video based on the specified start and end times provided in seconds.`,builder:B,handler:async n=>{if(n.dryRun){a({command:`cf stream clip create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/clip`,pathParams:{},bodyKind:`json`,body:n.body===void 0?u({allowedOrigins:n[`allowed-origins`],clippedFromVideoUID:d(n[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:d(n.creator,`creator`,`text`),endTimeSeconds:n[`end-time-seconds`],input:d(n.input,`input`,`text`),name:d(n.name,`name`,`text`),requireSignedURLs:n[`require-signed-urls`],scheduledDeletion:d(n[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:n[`start-time-seconds`],thumbnailTimestampPct:n[`thumbnail-timestamp-pct`],url:d(n.url,`url`,`text`),watermark:{uid:d(n[`watermark-uid`],`watermark-uid`,`text`)}}):c(n.body)});return}let l=await r(n),f=n.local?s:await t();if(n.accountId=f,n.body){let e=c(n.body);i(await o(`Creating`,async()=>l.stream.clip.create({...e,account_id:f})),{successLabel:`Created`});return}if(n[`clipped-from-video-uid`]===void 0&&(n[`clipped-from-video-uid`]=await p(`clipped-from-video-uid`,`The unique video identifier (UID).`)),n[`end-time-seconds`]===void 0)throw Error(`--end-time-seconds is required (or pass --body with this field set).`);if(n[`start-time-seconds`]===void 0)throw Error(`--start-time-seconds is required (or pass --body with this field set).`);let m=u({allowedOrigins:n[`allowed-origins`],clippedFromVideoUID:d(n[`clipped-from-video-uid`],`clipped-from-video-uid`,`text`),creator:d(n.creator,`creator`,`text`),endTimeSeconds:n[`end-time-seconds`],input:d(n.input,`input`,`text`),name:d(n.name,`name`,`text`),requireSignedURLs:n[`require-signed-urls`],scheduledDeletion:d(n[`scheduled-deletion`],`scheduled-deletion`,`text`),startTimeSeconds:n[`start-time-seconds`],thumbnailTimestampPct:n[`thumbnail-timestamp-pct`],url:d(n.url,`url`,`text`),watermark:{uid:d(n[`watermark-uid`],`watermark-uid`,`text`)}});i(await o(`Creating`,async()=>l.stream.clip.create({...m,account_id:f})),{successLabel:`Created`})}},H={command:`clip`,describe:`Operations for clip`,builder:e=>e.command(V).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function U(e){return e.option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`allowed-origins`,{type:`string`,array:!0,description:"Lists the origins allowed to display the video. Enter allowed origin domains in an array and use `*` for wildcard subdomains. Empty arrays allow the video to be viewed on any origin."}).option(`creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`input`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This is the preferred field over `url`."}).option(`name`,{type:`string`,description:`A video's name. Used for legacy compatibility.`}).option(`require-signed-urls`,{type:`boolean`,description:"Indicates whether the video can be a accessed using the UID. When set to `true`, a signed token must be generated with a signing key to view the video.",default:!1}).option(`scheduled-deletion`,{type:`string`,description:"Indicates the date and time at which the video will be deleted. Omit the field to indicate no change, or include with a `null` value to remove an existing scheduled deletion. If specified, must be at least 30 days from upload time."}).option(`thumbnail-timestamp-pct`,{type:`number`,description:`The timestamp for a thumbnail image calculated as a percentage value of the video's duration. To convert from a second-wise timestamp to a percentage, divide the desired timestamp by the total duration of the video. If this value is not set, the default thumbnail image is taken from 0s of the video.`,default:0}).option(`url`,{type:`string`,description:"A video's URL. The server must be publicly routable and support `HTTP HEAD` requests and `HTTP GET` range requests. The server should respond to `HTTP HEAD` requests with a `content-range` header that includes the size of the file. This field is deprecated in favor of `input`."}).option(`watermark-uid`,{type:`string`,description:`The unique identifier for the watermark profile.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Copy upload request. Provide `input` (preferred) or `url` (deprecated)."})}const W={command:`create`,describe:`Uploads a video to Stream from a provided URL.`,builder:U,handler:async f=>{let p={};if(f[`upload-creator`]!==void 0&&(p[`Upload-Creator`]=String(f[`upload-creator`])),f.dryRun){a({command:`cf stream copy create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/copy`,pathParams:{},bodyKind:`json`,body:f.body===void 0?u({allowedOrigins:f[`allowed-origins`],creator:d(f.creator,`creator`,`text`),input:d(f.input,`input`,`text`),name:d(f.name,`name`,`text`),requireSignedURLs:f[`require-signed-urls`],scheduledDeletion:d(f[`scheduled-deletion`],`scheduled-deletion`,`text`),thumbnailTimestampPct:f[`thumbnail-timestamp-pct`],url:d(f.url,`url`,`text`),watermark:{uid:d(f[`watermark-uid`],`watermark-uid`,`text`)}}):c(f.body)});return}let m=await r(f),h=f.local?s:await t();if(f.accountId=h,f.body){let e=c(f.body);i(await o(`Creating`,async()=>n(m,`POST`,`/accounts/${h}/stream/copy`,{body:e,headers:Object.keys(p).length>0?p:void 0})),{successLabel:`Created`});return}let g={};f[`allowed-origins`]!==void 0&&l(g,[`allowedOrigins`],f[`allowed-origins`]),f.creator!==void 0&&l(g,[`creator`],d(f.creator,`creator`,`text`)),f.input!==void 0&&l(g,[`input`],d(f.input,`input`,`text`)),f.name!==void 0&&l(g,[`name`],d(f.name,`name`,`text`)),f[`require-signed-urls`]!==void 0&&l(g,[`requireSignedURLs`],f[`require-signed-urls`]),f[`scheduled-deletion`]!==void 0&&l(g,[`scheduledDeletion`],d(f[`scheduled-deletion`],`scheduled-deletion`,`text`)),f[`thumbnail-timestamp-pct`]!==void 0&&l(g,[`thumbnailTimestampPct`],f[`thumbnail-timestamp-pct`]),f.url!==void 0&&l(g,[`url`],d(f.url,`url`,`text`)),f[`watermark-uid`]!==void 0&&l(g,[`watermark`,`uid`],d(f[`watermark-uid`],`watermark-uid`,`text`)),i(await o(`Creating`,async()=>n(m,`POST`,`/accounts/${h}/stream/copy`,{body:Object.keys(g).length>0?g:void 0,headers:Object.keys(p).length>0?p:void 0})),{successLabel:`Created`})}},G={command:`copy`,describe:`Operations for copy`,builder:e=>e.command(W).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function K(e){return e.option(`direct-user`,{type:`boolean`,description:`Provisions a URL to let your end users upload videos directly to Cloudflare Stream without exposing your API token to clients.`}).option(`tus-resumable`,{type:`string`,description:`Specifies the TUS protocol version. This value must be included in every upload request.
|
|
5
5
|
Notes: The only supported version of TUS protocol is 1.0.0.`,demandOption:!0}).option(`upload-creator`,{type:`string`,description:`A user-defined identifier for the media creator.`}).option(`upload-length`,{type:`string`,description:`Indicates the size of the entire upload in bytes. The value must be a non-negative integer.`,demandOption:!0}).option(`upload-metadata`,{type:`string`,description:"Comma-separated key-value pairs following the TUS protocol specification. Values are Base-64 encoded.\nSupported keys: `name`, `requiresignedurls`, `allowedorigins`, `thumbnailtimestamppct`, `watermark`, `scheduleddeletion`, `maxdurationseconds`."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const q={command:`create`,describe:"Initiates a video upload using the TUS protocol. On success, the server responds with a status code 201 (created) and includes a `location` header to indicate where the content should be uploaded. Refer to https://tus.io for protocol details.",builder:K,handler:async c=>{let l={direct_user:c[`direct-user`]},u={};if(c[`tus-resumable`]!==void 0&&(u[`Tus-Resumable`]=String(c[`tus-resumable`])),c[`upload-creator`]!==void 0&&(u[`Upload-Creator`]=String(c[`upload-creator`])),c[`upload-length`]!==void 0&&(u[`Upload-Length`]=String(c[`upload-length`])),c[`upload-metadata`]!==void 0&&(u[`Upload-Metadata`]=String(c[`upload-metadata`])),c.dryRun){a({command:`cf stream create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream`,pathParams:{},query:l,bodyKind:`none`});return}let d=await r(c),f=c.local?s:await t();c.accountId=f,i(await o(`Creating`,async()=>n(d,`POST`,`/accounts/${f}/stream`,{query:l,headers:Object.keys(u).length>0?u:void 0})),{successLabel:`Created`})}};function J(e){return e.positional(`identifier`,{type:`string`,description:`A Cloudflare-generated unique identifier for a media item.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const Y={command:`delete <identifier>`,describe:`Deletes a video and its copies from Cloudflare Stream.`,builder:J,handler:async n=>{if(n.dryRun){a({command:`cf stream delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/stream/${n.identifier==null?`<identifier>`:encodeURIComponent(String(n.identifier))}`,pathParams:{identifier:String(n.identifier??``)},bodyKind:`none`});return}let c=await r(n),l=n.local?s:await t();if(n.accountId=l,!await m({force:!!n.force})){process.stderr.write(`Aborted.
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{O as e,w as t}from"./oauth-
|
|
2
|
+
import{O as e,w as t}from"./oauth-DC9g9uK_.mjs";import{n}from"./auth-B1CY5zpC.mjs";import{t as r}from"./output-B6fBFRqe.mjs";import{n as i,t as a}from"./progress-BLQ2xXwD.mjs";import{t as o}from"./local-C6TLPAT6.mjs";function s(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`create`,describe:`Return new URL submissions`,builder:s,handler:async s=>{if(s.dryRun){i({command:`cf submit create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await e()??`<account-id>`}/brand-protection/submit`,pathParams:{},bodyKind:`none`});return}let c=await n(s),l=s.local?o:await t();s.accountId=l,r(await a(`Creating`,async()=>c.submit.create({account_id:l})),{successLabel:`Created`})}},l={command:`submit`,describe:`submit`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{l as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{n as e}from"./auth-
|
|
2
|
+
import{n as e}from"./auth-B1CY5zpC.mjs";import{t}from"./output-B6fBFRqe.mjs";import{n,t as r}from"./progress-BLQ2xXwD.mjs";function i(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const a={command:`list`,describe:`List of account types available for the Tenant to provision accounts.`,builder:i,handler:async i=>{if(i.dryRun){n({command:`cf tenant account-type list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/account_types`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.accountType.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},o={command:`account-type`,describe:`Operations for account-type`,builder:e=>e.command(a).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function s(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const c={command:`list`,describe:`List of accounts for the Tenant.`,builder:s,handler:async i=>{if(i.dryRun){n({command:`cf tenant account list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/accounts`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.account.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},l={command:`account`,describe:`Operations for account`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`list`,describe:`List of innate entitlements available for the Tenant.`,builder:u,handler:async i=>{if(i.dryRun){n({command:`cf tenant entitlement list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/entitlements`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.entitlement.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},f={command:`entitlement`,describe:`Operations for entitlement`,builder:e=>e.command(d).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function p(e){return e.positional(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`get <tenant-id>`,describe:`Retrieves a Tenant by Tenant ID.`,builder:p,handler:async i=>{if(i.dryRun){n({command:`cf tenant get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.get({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}};function h(e){return e.option(`tenant-id`,{type:`string`,description:`Tenant ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`list`,describe:`List of active members (Cloudflare users) for the Tenant.`,builder:h,handler:async i=>{if(i.dryRun){n({command:`cf tenant membership list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/tenants/${i[`tenant-id`]==null?`<tenant-id>`:encodeURIComponent(String(i[`tenant-id`]))}/memberships`,pathParams:{"tenant-id":String(i[`tenant-id`]??``)},bodyKind:`none`});return}let a=await e(i);t(await r(`Loading`,async()=>a.tenant.membership.list({tenant_id:i[`tenant-id`]})),{successLabel:`Loaded`})}},_={command:`membership`,describe:`Operations for membership`,builder:e=>e.command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},v={command:`tenant`,describe:`tenant`,builder:e=>e.command(m).command(l).command(o).command(f).command(_).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{v as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{D as e}from"./oauth-
|
|
2
|
+
import{D as e}from"./oauth-DC9g9uK_.mjs";import{n as t}from"./auth-B1CY5zpC.mjs";import{t as n}from"./output-B6fBFRqe.mjs";import{n as r,t as i}from"./progress-BLQ2xXwD.mjs";import{n as a,t as o}from"./body-parser-BO6mfo_W.mjs";import{n as s}from"./input-validation-BwUR9z8e.mjs";import{n as c,r as l,t as u}from"./prompt-DcfYBioA.mjs";import{t as d}from"./cli-types-CFw6Xygp.mjs";function f(e){return e.option(`description`,{type:`string`,description:`The description field`}).option(`title`,{type:`string`,description:`The title field`}).option(`token-type`,{type:`string`,description:`The token_type field`,choices:[`JWT`]}).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:`create`,describe:`Create a new Token Validation configuration`,builder:f,handler:async u=>{if(u.dryRun){r({command:`cf token-validation configuration create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/token_validation/config`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?o({description:s(u.description,`description`,`text`),title:s(u.title,`title`,`text`),token_type:s(u[`token-type`],`token-type`,`text`)}):a(u.body)});return}let d=await t(u),f=await e({zone:u.zone},d,{quiet:u.quiet});if(u.zoneId=f,u.body){let e=a(u.body);n(await i(`Creating`,async()=>d.tokenValidation.configuration.create({...e,zone_id:f})),{successLabel:`Created`});return}u.description===void 0&&(u.description=await l(`description`,`The description field`)),u.title===void 0&&(u.title=await l(`title`,`The title field`)),u[`token-type`]===void 0&&(u[`token-type`]=await c(`token-type`,`The token_type field`,[`JWT`]));let p=o({description:s(u.description,`description`,`text`),title:s(u.title,`title`,`text`),token_type:s(u[`token-type`],`token-type`,`text`)});n(await i(`Creating`,async()=>d.tokenValidation.configuration.create({...p,zone_id:f})),{successLabel:`Created`})}};function m(e){return e.positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request payload for create and PUT credentials operations. Provided keys define the complete stored key set. Key identities (`{alg,kid}`) must be unique."})}const h={command:`update <config-id>`,describe:'Update Token Configuration credentials with full replacement semantics. Key identities (`{alg,kid}`) must be unique within the request. Symmetric keys (`kty: "oct"`) require `k`; `k: null` is invalid.',builder:m,handler:async o=>{if(o.dryRun){r({command:`cf token-validation configuration credentials update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/token_validation/config/${o[`config-id`]==null?`<config-id>`:encodeURIComponent(String(o[`config-id`]))}/credentials`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"config-id":String(o[`config-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Updating`,async()=>s.tokenValidation.configuration.credentials.update({body:e,zone_id:c,config_id:o[`config-id`]})),{successLabel:`Updated`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},g={command:`credentials`,describe:`Token validation configurations defining JWT sources, JWKS endpoints, and claim requirements`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const v={command:`delete <config-id>`,describe:`Delete Token Configuration`,builder:_,handler:async a=>{if(a.dryRun){r({command:`cf token-validation configuration delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/token_validation/config/${a[`config-id`]==null?`<config-id>`:encodeURIComponent(String(a[`config-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"config-id":String(a[`config-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});if(a.zoneId=s,!await u({force:!!a.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>o.tokenValidation.configuration.delete({zone_id:s,config_id:a[`config-id`]})),{successLabel:`Deleted`})}};function y(e){return e.positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`description`,{type:`string`,description:`The description field`}).option(`title`,{type:`string`,description:`The title field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const b={command:`edit <config-id>`,describe:`Edit fields of an existing Token Configuration`,builder:y,handler:async c=>{if(c.dryRun){r({command:`cf token-validation configuration edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/token_validation/config/${c[`config-id`]==null?`<config-id>`:encodeURIComponent(String(c[`config-id`]))}`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``),"config-id":String(c[`config-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({description:s(c.description,`description`,`text`),title:s(c.title,`title`,`text`)}):a(c.body)});return}let l=await t(c),u=await e({zone:c.zone},l,{quiet:c.quiet});if(c.zoneId=u,c.body){let e=a(c.body);n(await i(`Updating`,async()=>l.tokenValidation.configuration.edit({...e,zone_id:u,config_id:c[`config-id`]})),{successLabel:`Updated`});return}let d=o({description:s(c.description,`description`,`text`),title:s(c.title,`title`,`text`)});n(await i(`Updating`,async()=>l.tokenValidation.configuration.edit({...d,zone_id:u,config_id:c[`config-id`]})),{successLabel:`Updated`})}};function x(e){return e.positional(`config-id`,{type:`string`,description:`Token Configuration ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const S={command:`get <config-id>`,describe:`Get a single Token Configuration`,builder:x,handler:async a=>{if(a.dryRun){r({command:`cf token-validation configuration get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/token_validation/config/${a[`config-id`]==null?`<config-id>`:encodeURIComponent(String(a[`config-id`]))}`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``),"config-id":String(a[`config-id`]??``)},bodyKind:`none`});return}let o=await t(a),s=await e({zone:a.zone},o,{quiet:a.quiet});a.zoneId=s,n(await i(`Loading`,async()=>o.tokenValidation.configuration.get({zone_id:s,config_id:a[`config-id`]})),{successLabel:`Loaded`})}};function C(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Maximum number of results per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`Lists all token validation configurations for this zone`,builder:C,handler:async a=>{let o={page:a.page,per_page:a[`per-page`]};if(a.dryRun){r({command:`cf token-validation configuration list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/token_validation/config`,pathParams:{"zone-id":String(a.zone??a[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await t(a),c=await e({zone:a.zone},s,{quiet:a.quiet});a.zoneId=c,n(await i(`Loading`,async()=>s.tokenValidation.configuration.list({zone_id:c,...o})),{successLabel:`Loaded`})}},T={command:`configuration`,describe:`Token validation configurations defining JWT sources, JWKS endpoints, and claim requirements`,builder:e=>e.command(p).command(v).command(b).command(S).command(w).command(g).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function E(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 D={command:`bulk-create`,describe:`Create zone token validation rules. A request can create multiple Token Validation Rules.`,builder:E,handler:async o=>{if(o.dryRun){r({command:`cf token-validation rules bulk-create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/token_validation/rules/bulk`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Creating`,async()=>s.tokenValidation.rules.bulkCreate({body:e,zone_id:c})),{successLabel:`Created`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function O(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 k={command:`bulk-edit`,describe:"Edit token validation rules. A request can update multiple Token Validation Rules. Rules can be re-ordered using the `position` field. Returns all updated rules.",builder:O,handler:async o=>{if(o.dryRun){r({command:`cf token-validation rules bulk-edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/token_validation/rules/bulk`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`json`,body:o.body===void 0?void 0:a(o.body)});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});if(o.zoneId=c,o.body){let e=a(o.body);n(await i(`Updating`,async()=>s.tokenValidation.rules.bulkEdit({body:e,zone_id:c})),{successLabel:`Updated`});return}if(o.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}};function A(e){return e.option(`action`,{type:`string`,description:"Action to take on requests that match operations included in `selector` and fail `expression`.",choices:[`log`,`block`]}).option(`description`,{type:`string`,description:"A human-readable description that gives more details than `title`."}).option(`enabled`,{type:`boolean`,description:`Toggle rule on or off.`}).option(`expression`,{type:`string`,description:`Rule expression. Requests that fail to match this expression will be subject to \`action\`.
|
|
4
4
|
|
|
5
5
|
For details on expressions, see the [Cloudflare Docs](https://developers.cloudflare.com/api-shield/security/jwt-validation/).
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{a as e,o as t}from"./theme-DbNbIY4d.mjs";import"./ui-CTo5OG9r.mjs";import{w as n}from"./oauth-DC9g9uK_.mjs";import{n as r}from"./dist-B7hsuvbF.mjs";import{r as i}from"./auth-B1CY5zpC.mjs";import{a,i as o,n as s}from"./build-C1FOoThn.mjs";import{a as c,l,r as u,s as d}from"./deploy-input-CdWrpzPA.mjs";function f(e){return e.option(`mode`,{type:`string`,alias:`m`,description:`Build mode (e.g. production, staging, preview)`}).option(`dry-run`,{type:`boolean`,description:`Build a project and run checks without applying triggers`,default:!1})}const p={command:`deploy`,describe:`Apply triggers (Routes, Workflows, Cron triggers etc.)`,builder:f,handler:async f=>{await s(f.mode),r.message(``,{spacing:0});let{workers:[p],settings:m}=await a(process.cwd()),{wranglerConfig:h}=o(p,m),g=await i(),_=await n();l(c(g)),r.message(e.bold(`Deploy triggers`),{symbol:t.dim(`├`),spacing:0}),await d(u(p,h,_,f)),r.success(f[`dry-run`]?`Dry run complete`:`Trigger deploy complete`)}},m={command:`triggers`,describe:`Manage triggers (Routes, Workflows, Cron triggers etc.)`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{O as e,w as t}from"./oauth-
|
|
2
|
+
import{O as e,w as t}from"./oauth-DC9g9uK_.mjs";import{n}from"./auth-B1CY5zpC.mjs";import{t as r}from"./output-B6fBFRqe.mjs";import{n as i,t as a}from"./progress-BLQ2xXwD.mjs";import{t as o}from"./local-C6TLPAT6.mjs";import{n as s,t as c}from"./body-parser-BO6mfo_W.mjs";import{n as l}from"./input-validation-BwUR9z8e.mjs";import{n as u,r as d,t as f}from"./prompt-DcfYBioA.mjs";import{t as p}from"./cli-types-CFw6Xygp.mjs";function m(e){return e.option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of items per page.`}).option(`order`,{type:`string`,description:`Field to order widgets by.`,choices:[`id`,`sitekey`,`name`,`created_on`,`modified_on`]}).option(`direction`,{type:`string`,description:`Direction to order widgets.`,choices:[`asc`,`desc`]}).option(`filter`,{type:`string`,description:"Filter widgets by field using case-insensitive substring matching.\nFormat: `field:value`\n\nSupported fields:\n- `name` - Filter by widget name (e.g., `filter=name:login-form`)\n- `sitekey` - Filter by sitekey (e.g., `filter=sitekey:0x4AAA`)\n\nReturns 400 Bad Request if the field is unsupported or format is invalid.\nAn empty filter value returns all results."}).option(`bot-fight-mode`,{type:`boolean`,description:`If bot_fight_mode is set to \`true\`, Cloudflare issues computationally
|
|
3
3
|
expensive challenges in response to malicious bots (ENT only).
|
|
4
4
|
`}).option(`clearance-level`,{type:`string`,description:`If Turnstile is embedded on a Cloudflare site and the widget should grant challenge clearance,
|
|
5
5
|
this setting can determine the clearance level to be set
|