cf 0.9.0 → 0.9.1
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/{abuse-reports-DnNvw2gG.mjs → abuse-reports-CzDAjFpo.mjs} +1 -1
- package/dist/{access-RbqBFrSC.mjs → access-CxyW_sIW.mjs} +1 -1
- package/dist/{account-D7xvYqDx.mjs → account-Dd4-tDYJ.mjs} +1 -1
- package/dist/{account-tags-CKRh1jra.mjs → account-tags-65fAlHrf.mjs} +1 -1
- package/dist/{accounts-2pGhN4s8.mjs → accounts-Bp5KGc6r.mjs} +1 -1
- package/dist/{acm-Szq4CoQN.mjs → acm-CHacxa3s.mjs} +1 -1
- package/dist/{addressing-CgTTbuCF.mjs → addressing-BnqNmmYN.mjs} +1 -1
- package/dist/{agent-memory-C8pT01pR.mjs → agent-memory-D--BQS0W.mjs} +1 -1
- package/dist/{ai-Cn0BniR4.mjs → ai-BnVlQDiI.mjs} +1 -1
- package/dist/{ai-audit-CCygMmsh.mjs → ai-audit-CfpDKXkD.mjs} +1 -1
- package/dist/{ai-gateway-D4tATNRV.mjs → ai-gateway-oG4j_oYN.mjs} +1 -1
- package/dist/{ai-search-2xP8FP_W.mjs → ai-search-B2l3B_jn.mjs} +1 -1
- package/dist/{ai-security-AUfzagSE.mjs → ai-security-byjIIrfl.mjs} +1 -1
- package/dist/{alerting-DbXVpGv3.mjs → alerting-qa8SkXlD.mjs} +1 -1
- package/dist/{analytics-UQrIx99t.mjs → analytics-DeIKjC9n.mjs} +1 -1
- package/dist/{analytics_engine-B_bMbfxW.mjs → analytics_engine-BnECMIWJ.mjs} +1 -1
- package/dist/{api-security-pSJdgmtK.mjs → api-security-MfHbfZyf.mjs} +1 -1
- package/dist/{argo-Br60zF3y.mjs → argo-DFerMyXF.mjs} +1 -1
- package/dist/{artifacts-D8HMRQmb.mjs → artifacts-CtyEYYDa.mjs} +1 -1
- package/dist/{audit-logs-BIHP5-rk.mjs → audit-logs-retFtvow.mjs} +1 -1
- package/dist/{auth-C6MhC9EZ.mjs → auth-DuLchM18.mjs} +2 -2
- package/dist/{auth-MeSu8lFz.mjs → auth-aazs91XL.mjs} +1 -1
- package/dist/{billing-0RNCYBJM.mjs → billing-CxQVqpGZ.mjs} +1 -1
- package/dist/{bot-management-uhBRnSPl.mjs → bot-management-Rli7v7tg.mjs} +1 -1
- package/dist/{botnet-feed-DEbMknrE.mjs → botnet-feed-Cw6XSEf8.mjs} +1 -1
- package/dist/{brand-protection-DY2qPL8d.mjs → brand-protection-CTvnHGfV.mjs} +1 -1
- package/dist/{browser-extension-DBsmLCUj.mjs → browser-extension-q79xHrVW.mjs} +1 -1
- package/dist/{browser-run-C5pYOwtf.mjs → browser-run-FwtwnBzA.mjs} +1 -1
- package/dist/{build-Nivzj54_.mjs → build-Dji9BYmV.mjs} +1 -1
- package/dist/{cache-BgRIDcFJ.mjs → cache-Cl7vKJwH.mjs} +1 -1
- package/dist/{calls-JrRne0U0.mjs → calls-DtK_ANxq.mjs} +1 -1
- package/dist/{certificate-authorities-BJ7W8GGQ.mjs → certificate-authorities-DZP1RzAs.mjs} +1 -1
- package/dist/{cf-BUKsENG5.mjs → cf-oSz9pud_.mjs} +1 -1
- package/dist/{client-certificates-6xxvcOgI.mjs → client-certificates-BtPU9GsQ.mjs} +1 -1
- package/dist/{client-side-security-cU0Z1tql.mjs → client-side-security-DAn-3jwp.mjs} +1 -1
- package/dist/{cloud-connector-DFooSAcn.mjs → cloud-connector-BpVcvhjZ.mjs} +1 -1
- package/dist/{cloudforce-one-Cp4bQmrG.mjs → cloudforce-one-2PecncfX.mjs} +1 -1
- package/dist/{connector-interrupts-BR47snkh.mjs → connector-interrupts-ollUcksZ.mjs} +1 -1
- package/dist/{connector-telemetry-events-CTMmX2BA.mjs → connector-telemetry-events-D5_3X7XW.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-5Y7m8Cw8.mjs → connector-telemetry-snapshots-CJ9gLRFR.mjs} +1 -1
- package/dist/{connectors-BRCQSsos.mjs → connectors-Bo6ZT8PT.mjs} +1 -1
- package/dist/{containers-CfKOM_f5.mjs → containers-Bog7j0Hw.mjs} +1 -1
- package/dist/{content-scan-CB4xHGv1.mjs → content-scan-D03UfK2X.mjs} +1 -1
- package/dist/{csamScanner-AQo_QTlq.mjs → csamScanner-DgS-7ADh.mjs} +1 -1
- package/dist/{ct-alerting-Bai-1Z3k.mjs → ct-alerting-8AKtNnUg.mjs} +1 -1
- package/dist/{custom-certificates-D6aQIGu2.mjs → custom-certificates-4y35UC1X.mjs} +1 -1
- package/dist/{custom-csrs-D0zBkQT5.mjs → custom-csrs-DwBrLh-H.mjs} +1 -1
- package/dist/{custom-hostnames-BiOVGwnR.mjs → custom-hostnames-CDIAnsRa.mjs} +1 -1
- package/dist/{custom-nameservers-G2MWpRwY.mjs → custom-nameservers-stk7ymnP.mjs} +1 -1
- package/dist/{custom-pages-BINNZTds.mjs → custom-pages-vfDxrXbt.mjs} +1 -1
- package/dist/{d1-FmAh7T7l.mjs → d1-Cllm-iTT.mjs} +1 -1
- package/dist/{data-security-2fmzF_Me.mjs → data-security-rnoSCEdL.mjs} +1 -1
- package/dist/{dcv-delegation-Cmxxgi9V.mjs → dcv-delegation-DCRCOL6l.mjs} +1 -1
- package/dist/{deploy-BzFbjH6a.mjs → deploy-DGlmjPTS.mjs} +1 -1
- package/dist/{deploy-input-BRMQehgs.mjs → deploy-input-DhCo1I0I.mjs} +1 -1
- package/dist/{dev-CWaf-qW4.mjs → dev-BbLV0Ti-.mjs} +1 -1
- package/dist/{diagnostics-Ca6r_972.mjs → diagnostics-D5Yo2xqx.mjs} +1 -1
- package/dist/{directory-CGNWfVQc.mjs → directory-CCndFkbQ.mjs} +1 -1
- package/dist/{dispatch-namespaces-CBo5kuf7.mjs → dispatch-namespaces-C48JQ9EA.mjs} +1 -1
- package/dist/{dls-CobKlH4N.mjs → dls-BBq99pjI.mjs} +1 -1
- package/dist/{dns-OfJXNYkK.mjs → dns-DdQYtenF.mjs} +1 -1
- package/dist/{dns-firewall-DZ2ij-nX.mjs → dns-firewall-DdwVtm12.mjs} +1 -1
- package/dist/{durable-objects-Cw_y37WB.mjs → durable-objects-BvxXBht_.mjs} +1 -1
- package/dist/{email-auth-DuJHdiwN.mjs → email-auth-DFvXKSkg.mjs} +1 -1
- package/dist/{email-routing-CRvIUSFm.mjs → email-routing-QBRPBlyl.mjs} +1 -1
- package/dist/{email-security-D-P8ln2L.mjs → email-security-BFagcRPP.mjs} +1 -1
- package/dist/{email-sending-BwRN8PMW.mjs → email-sending-Ddhe7xjN.mjs} +1 -1
- package/dist/{filters-DczM8qpH.mjs → filters-CGisPGD1.mjs} +1 -1
- package/dist/{firewall-BMiETRmM.mjs → firewall-DD8U-Brd.mjs} +1 -1
- package/dist/{flagship-CPkQMist.mjs → flagship-FJHc4mFi.mjs} +1 -1
- package/dist/{fraud-BhX0QNUl.mjs → fraud-AH47n-wL.mjs} +1 -1
- package/dist/{google-tag-gateway-CDtRxao4.mjs → google-tag-gateway-149kbuG_.mjs} +1 -1
- package/dist/{healthchecks-D2WwALvQ.mjs → healthchecks-DfEUG007.mjs} +1 -1
- package/dist/{hostnames-CGAFkYT1.mjs → hostnames-DQUiD3Vr.mjs} +1 -1
- package/dist/{hyperdrive-zLFPWFQj.mjs → hyperdrive-RyQboMWI.mjs} +1 -1
- package/dist/{iam-Su_hpatD.mjs → iam-BhHYhMXO.mjs} +1 -1
- package/dist/{images-D2ZflvBi.mjs → images-CDViyKtZ.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-DPGzVovJ.mjs → intel-YHZbPlS3.mjs} +1 -1
- package/dist/{interactive-CM2G03lr.mjs → interactive-mV8PABm6.mjs} +1 -1
- package/dist/{ips-C5-NH1b0.mjs → ips-BpCdldFx.mjs} +1 -1
- package/dist/{keyless-certificates-Xx-oAN3Z.mjs → keyless-certificates-oNu5jWKF.mjs} +1 -1
- package/dist/{keys-B0FBtlOD.mjs → keys-yYtv7Ztr.mjs} +1 -1
- package/dist/{kv-BbZ9st5o.mjs → kv-Bi9B4E0A.mjs} +1 -1
- package/dist/{leaked-credential-checks-Vonw4inx.mjs → leaked-credential-checks-DKRjBLcr.mjs} +1 -1
- package/dist/{load-balancers-Ct5cyyF9.mjs → load-balancers-jRCN75mX.mjs} +1 -1
- package/dist/{local-eEF0NF51.mjs → local-DTyuGwTw.mjs} +1 -1
- package/dist/{local-runtime-BNCCOZ8s.mjs → local-runtime-IAXhEugU.mjs} +1 -1
- package/dist/{logexplorer-BhsAWxCr.mjs → logexplorer-kO8CULiK.mjs} +1 -1
- package/dist/{logo-matches-oHYc8Xaz.mjs → logo-matches-LyDAYPbI.mjs} +1 -1
- package/dist/{logos-DS0krPAz.mjs → logos-O9f5bGSB.mjs} +1 -1
- package/dist/{logpush-CFQBi88z.mjs → logpush-dtXLu3Ck.mjs} +1 -1
- package/dist/{logs-C07M9zn-.mjs → logs-DmWWL5f9.mjs} +1 -1
- package/dist/{magic-cloud-networking-ZPEK7O5I.mjs → magic-cloud-networking-XbTa6P52.mjs} +1 -1
- package/dist/{magic-network-monitoring-CY3CHSpX.mjs → magic-network-monitoring-CpfkgZMp.mjs} +1 -1
- package/dist/{magic-transit-CgPZ8iMn.mjs → magic-transit-DwgZeIj-.mjs} +1 -1
- package/dist/{managed-transforms-2XyQ14s3.mjs → managed-transforms-DCmogkxv.mjs} +1 -1
- package/dist/{matches-CIaCrdrs.mjs → matches-BAeN8VM1.mjs} +1 -1
- package/dist/{mcp-D2afM8MD.mjs → mcp-DKZ2D050.mjs} +1 -1
- package/dist/{mesh-DLNLi3UT.mjs → mesh-CzIPtuaM.mjs} +1 -1
- package/dist/{moq-BBQVNGo1.mjs → moq-CJpE-eNj.mjs} +1 -1
- package/dist/{mtls-certificates-C5j0Gn65.mjs → mtls-certificates-Bbm_1lQI.mjs} +1 -1
- package/dist/{network-CmuJqtFJ.mjs → network-D2WRXCDe.mjs} +1 -1
- package/dist/{network-interconnects-BlajBQqs.mjs → network-interconnects-Clq4X1U8.mjs} +1 -1
- package/dist/{oauth-BjHjJtnn.mjs → oauth-BPizUUqP.mjs} +1 -1
- package/dist/{oauth-clients-BSthfZP-.mjs → oauth-clients-hilWfAlm.mjs} +1 -1
- package/dist/{oauth-scopes-ByUp5bLU.mjs → oauth-scopes-CmbgsPYd.mjs} +1 -1
- package/dist/{observability-B5p3iwrq.mjs → observability-DXYgDdU5.mjs} +1 -1
- package/dist/{organization-DQIfNVCT.mjs → organization-D41rIvJa.mjs} +1 -1
- package/dist/{organizations-L_ycAy6r.mjs → organizations-eNzfOwlP.mjs} +1 -1
- package/dist/{origin-ca-certificates-opIcs3_Q.mjs → origin-ca-certificates-DaiAmw45.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-TSMXzoEL.mjs → origin-post-quantum-encryption-7YztBged.mjs} +1 -1
- package/dist/{origin-tls-client-auth-5CtcPUR6.mjs → origin-tls-client-auth-DRwURM8s.mjs} +1 -1
- package/dist/{page-rules-DPd1Y3IL.mjs → page-rules-B2Csdc4h.mjs} +1 -1
- package/dist/{pages-CskAn5mR.mjs → pages-BAL6Q7OY.mjs} +1 -1
- package/dist/{pay-per-crawl-BMa_V40s.mjs → pay-per-crawl-C-1-ZAtn.mjs} +1 -1
- package/dist/{pipelines-BbJjj1ZQ.mjs → pipelines-cyQOuFLb.mjs} +1 -1
- package/dist/{precursor-DgRWBN9_.mjs → precursor-BrweY39h.mjs} +1 -1
- package/dist/{progress-C-oFUtvC.mjs → progress-B84wYh91.mjs} +1 -1
- package/dist/{prompt-DM4z101s.mjs → prompt-CDtLWxNv.mjs} +1 -1
- package/dist/{queries-DrqcK0ZX.mjs → queries-oM8uGZy5.mjs} +1 -1
- package/dist/{queues-CutvMZcc.mjs → queues-CTx04ZNw.mjs} +1 -1
- package/dist/{r2-sFI62vhq.mjs → r2-CnlIUn7R.mjs} +1 -1
- package/dist/{r2-data-catalog-3vzU6FE1.mjs → r2-data-catalog-DLtf9d6o.mjs} +1 -1
- package/dist/{radar-Cu9rsTw_.mjs → radar-CGNgGh8v.mjs} +1 -1
- package/dist/{rate-limits-HRZ8zMSl.mjs → rate-limits-B1YjnGue.mjs} +1 -1
- package/dist/{raw-fetch-25gXED6c.mjs → raw-fetch-Dz-QBoP_.mjs} +1 -1
- package/dist/{realtimekit-msnGHBbf.mjs → realtimekit-BPwzhNS9.mjs} +1 -1
- package/dist/{registrar-C0EsXf83.mjs → registrar-BEcb90RX.mjs} +1 -1
- package/dist/{registrar-sandbox-CR9Rr7jV.mjs → registrar-sandbox-0i1T3zne.mjs} +1 -1
- package/dist/{registry-CJvn75Bq.mjs → registry-DDcSvd8H.mjs} +1 -1
- package/dist/{reporting-BB6sqe6r.mjs → reporting-CLbjHlnw.mjs} +1 -1
- package/dist/{request-tracers-BrsM3zXZ.mjs → request-tracers-BcKpofP1.mjs} +1 -1
- package/dist/{resource-sharing-CusU3kiy.mjs → resource-sharing-Ctdi9D-j.mjs} +1 -1
- package/dist/{resource-tagging-wXAcblmz.mjs → resource-tagging-DGEyVTDN.mjs} +1 -1
- package/dist/{rules-C2BxykEe.mjs → rules-CmuB5rIN.mjs} +1 -1
- package/dist/{rulesets-BHvhAeG_.mjs → rulesets-CGaMq8vG.mjs} +1 -1
- package/dist/{rum-Dyno5zj3.mjs → rum-QT6EP4JK.mjs} +1 -1
- package/dist/{schema-flags-C1BRprT2.mjs → schema-flags-DHryz6SF.mjs} +1 -1
- package/dist/{scim-Bb2xHpIz.mjs → scim-BgGsmHrL.mjs} +1 -1
- package/dist/{secrets-store-BMhjbceW.mjs → secrets-store-BCpFhYFv.mjs} +1 -1
- package/dist/{security-center-DRC4Mf3R.mjs → security-center-BNm4uPVB.mjs} +1 -1
- package/dist/{security-txt-Bh_2gymk.mjs → security-txt-Be2Bif0z.mjs} +1 -1
- package/dist/{session-Br-q_UIW.mjs → session-Ckt20hHa.mjs} +1 -1
- package/dist/{share-DfTpOxhk.mjs → share-Bz2tFTUP.mjs} +1 -1
- package/dist/{shared-BNjZc02w.mjs → shared-BzPQog8H.mjs} +1 -1
- package/dist/{smart-shield-rHn-Lckq.mjs → smart-shield-SODkOUyO.mjs} +1 -1
- package/dist/{snippets-nSLwH8uJ.mjs → snippets-B5jY8v_7.mjs} +1 -1
- package/dist/{spawn-Bj8QRFJ5.mjs → spawn-CHkoow5W.mjs} +1 -1
- package/dist/{spectrum-DuhSUTZI.mjs → spectrum-BA0a42eM.mjs} +1 -1
- package/dist/{speed-Dgby_e1J.mjs → speed-mmOjxOzo.mjs} +1 -1
- package/dist/{src-CgAVPA4I.mjs → src-CHW7s5IS.mjs} +4 -4
- package/dist/{ssl-BsxTHasY.mjs → ssl-Yr6kELqg.mjs} +1 -1
- package/dist/{state-C1m9nwUm.mjs → state-DZC531l2.mjs} +1 -1
- package/dist/{stream-CkEOX5Ko.mjs → stream-Cu0kYWbc.mjs} +1 -1
- package/dist/{submit-BjdywxTq.mjs → submit-Dl_27e0n.mjs} +1 -1
- package/dist/{tags-CFAw_Sce.mjs → tags-Cdo_Pwtr.mjs} +1 -1
- package/dist/{tenant-C66iOy5O.mjs → tenant-EX-ANl6X.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-CyJZ_AB0.mjs → tenant-custom-nameservers-BPHUeckw.mjs} +1 -1
- package/dist/{triggers-Dv22ZXM4.mjs → triggers-Bf9hbP3h.mjs} +1 -1
- package/dist/{tunnel-BatkLdds.mjs → tunnel-CDYkWjnt.mjs} +1 -1
- package/dist/{tunnels-CstoXOoq.mjs → tunnels-CgyX8R2J.mjs} +1 -1
- package/dist/{turnstile-IoRtama4.mjs → turnstile-BUtzlW-0.mjs} +1 -1
- package/dist/{ui-DjQ4AQww.mjs → ui-DIpjthrV.mjs} +1 -1
- package/dist/{url-info-Hjhwr2la.mjs → url-info-CJsa1Oc9.mjs} +1 -1
- package/dist/{url-normalization-C2BP_Kl0.mjs → url-normalization-BeKkOZz7.mjs} +1 -1
- package/dist/{url-scanner-DmYVTdAE.mjs → url-scanner-Cz-yl0_3.mjs} +1 -1
- package/dist/{user-CVHm-cnB.mjs → user-BxHjEqpd.mjs} +1 -1
- package/dist/{values-Cmlw5wGZ.mjs → values-C43NurfT.mjs} +1 -1
- package/dist/{vectorize-BQtIqiNO.mjs → vectorize-CjXfiFH4.mjs} +1 -1
- package/dist/{versions-CU6Av1vh.mjs → versions-BFbc90Wu.mjs} +1 -1
- package/dist/{waiting-rooms-ku9UsAr9.mjs → waiting-rooms-C5jSQv_r.mjs} +1 -1
- package/dist/{web-assets-DmSKaxzf.mjs → web-assets-BzM5vVzy.mjs} +1 -1
- package/dist/{web3-DVv4jNul.mjs → web3-Ctv9HGiR.mjs} +1 -1
- package/dist/{workers-D8czeT64.mjs → workers-D-YbIedB.mjs} +1 -1
- package/dist/{workers-builds-DgrejrUc.mjs → workers-builds-B44wc67O.mjs} +1 -1
- package/dist/{workflows-BOi5MTEN.mjs → workflows-rFuQWClt.mjs} +1 -1
- package/dist/{zaraz-CGSSFJng.mjs → zaraz-BA6kY-b6.mjs} +1 -1
- package/dist/{zero-trust-BmA0VkgF.mjs → zero-trust-DOFLlUz1.mjs} +1 -1
- package/dist/{zone-Bx5ElO9U.mjs → zone-B_rgejLV.mjs} +1 -1
- package/dist/{zone-tags-izd3WWmy.mjs → zone-tags-BWdza4rH.mjs} +1 -1
- package/dist/{zones-_SnlZMiM.mjs → zones-DTWO7Vvn.mjs} +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-
|
|
2
|
+
import{t as e}from"./local-DTyuGwTw.mjs";import{f as t,g as n}from"./oauth-BPizUUqP.mjs";import{r}from"./auth-DuLchM18.mjs";import{t as i}from"./output-DgW1hQGX.mjs";import{n as a,t as o}from"./progress-B84wYh91.mjs";import{n as s,t as c}from"./body-parser-CYD7PKFC.mjs";import{n as l}from"./input-validation-BBKJRoRB.mjs";import{a as u,i as d,n as f}from"./prompt-CDtLWxNv.mjs";import{t as p}from"./cli-types-BWdZbsFE.mjs";function m(e){return e.option(`name`,{type:`string`,description:`The name of the share.`}).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 h={command:`create`,describe:`Creates a new resource share for sharing Cloudflare resources with other accounts or organizations.`,builder:m,handler:async d=>{if(d.dryRun){a({command:`cf share create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,pathParams:{},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Creating`,async()=>f.share.create({...e,account_id:p})),{successLabel:`Created`});return}d.name===void 0&&(d.name=await u(`name`,`The name of the share.`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Creating`,async()=>f.share.create({...m,account_id:p})),{successLabel:`Created`})}};function g(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const _={command:`delete <share-id>`,describe:`Deletion is not immediate, an updated share object with a new status will be returned.`,builder:g,handler:async s=>{if(s.dryRun){a({command:`cf share delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}i(await o(`Deleting`,async()=>c.share.delete({account_id:l,share_id:s[`share-id`]})),{successLabel:`Deleted`})}};function v(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const y={command:`get <share-id>`,describe:`Fetches share by ID.`,builder:v,handler:async s=>{let c={include_resources:s[`include-resources`],include_recipient_counts:s[`include-recipient-counts`]};if(s.dryRun){a({command:`cf share get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.share.get({account_id:u,share_id:s[`share-id`],...c})),{successLabel:`Loaded`})}};function b(e){return e.option(`status`,{type:`string`,description:`Filter shares by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`kind`,{type:`string`,description:`Filter shares by kind.`,choices:[`sent`,`received`]}).option(`target-type`,{type:`string`,description:`Filter shares by target_type.`,choices:[`account`,`organization`]}).option(`resource-types`,{type:`string`,description:`Filter share resources by resource_types.`}).option(`order`,{type:`string`,description:`Order shares by values in the given field.`,choices:[`name`,`created`]}).option(`direction`,{type:`string`,description:`Direction to sort objects.`,choices:[`asc`,`desc`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`include-recipient-counts`,{type:`boolean`,description:`Include recipient counts in the response.`}).option(`tag`,{type:`string`,description:"Filter shares by tag. Each value is either `key=value` (matches shares whose tags contain that key/value pair) or `key` alone (matches shares that have any value for that key). May be repeated; multiple `tag` parameters are ANDed together. Maximum 20 `tag` parameters per request."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const x={command:`list`,describe:`Lists all account shares.`,builder:p(b),handler:async s=>{let c={status:s.status,kind:s.kind,target_type:s[`target-type`],resource_types:s[`resource-types`],order:s.order,direction:s.direction,page:s.page,per_page:s[`per-page`],include_resources:s[`include-resources`],include_recipient_counts:s[`include-recipient-counts`],tag:s.tag};if(s.dryRun){a({command:`cf share list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares`,pathParams:{},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.share.list({account_id:u,...c})),{successLabel:`Loaded`})}};function S(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`Organization identifier.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Optionally specify `recipient_account_id` to target a specific account, or `organization_id` to target the caller's whole organization. If neither is provided, the caller's organization is used. The legacy field `account_id` is accepted as a synonym for `recipient_account_id` during the deprecation period (see `x-sunset` on that field). "})}const C={command:`create <share-id>`,describe:"Adds a single recipient to an account-targeted resource share, granting them access to the shared resources. The recipient account must belong to the same organization as the share owner. To replace the entire recipient list in one call, use `PUT /accounts/{account_id}/shares/{share_id}/recipients` instead.",builder:S,handler:async e=>{if(e.dryRun){a({command:`cf share recipient create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?c({organization_id:l(e[`organization-id`],`organization-id`,`text`)}):s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Creating`,async()=>t.share.recipient.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`});return}let n=c({organization_id:l(e[`organization-id`],`organization-id`,`text`)});i(await o(`Creating`,async()=>t.share.recipient.create({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Created`})}};function w(e){return e.positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const T={command:`delete <recipient-id>`,describe:"Performs a **soft delete**: sets the recipient's `desired_association_status` to `disassociated`, which signals the background reconciliation workflow (Temporal) to remove the shared resources from the recipient account. The recipient record remains in the database for audit purposes and is still returned by `GET /accounts/{account_id}/shares/{share_id}/recipients` with its updated status. Resource access is not fully removed until the workflow completes and `current_association_status` transitions to `disassociated`. The recipient record itself is never physically deleted.",builder:w,handler:async s=>{if(s.dryRun){a({command:`cf share recipient delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/recipients/${s[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(s[`recipient-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"recipient-id":String(s[`recipient-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}i(await o(`Deleting`,async()=>c.share.recipient.delete({account_id:l,share_id:s[`share-id`],recipient_id:s[`recipient-id`]})),{successLabel:`Deleted`})}};function E(e){return e.positional(`recipient-id`,{type:`string`,description:`Share Recipient identifier tag.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const D={command:`get <recipient-id>`,describe:`Get share recipient by ID.`,builder:E,handler:async s=>{let c={include_resources:s[`include-resources`]};if(s.dryRun){a({command:`cf share recipient get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/recipients/${s[`recipient-id`]==null?`<recipient-id>`:encodeURIComponent(String(s[`recipient-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"recipient-id":String(s[`recipient-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.share.recipient.get({account_id:u,share_id:s[`share-id`],recipient_id:s[`recipient-id`],...c})),{successLabel:`Loaded`})}};function O(e){return e.option(`account-id-path`,{type:`string`,description:`Account identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`include-resources`,{type:`boolean`,description:`Include resources in the response.`}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const k={command:`list`,describe:'List share recipients by share ID. Returns **all** recipients regardless of their `association_status` (associating, associated, disassociating, disassociated). Callers that want only "active" recipients must filter client-side on the `association_status` field.',builder:O,handler:async e=>{let t={include_resources:e[`include-resources`],page:e.page,per_page:e[`per-page`]};if(e.dryRun){a({command:`cf share recipient list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},query:t,bodyKind:`none`});return}let n=await r(e);i(await o(`Loading`,async()=>n.share.recipient.list({account_id_path:e[`account-id-path`],share_id:e[`share-id`],...t})),{successLabel:`Loaded`})}};function A(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`account-id-path`,{type:`string`,description:`Account identifier.`,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 j={command:`update <share-id>`,describe:"Replaces the full recipient list for an account-targeted share. The server computes the diff between the current and desired recipients: new accounts are added, accounts no longer in the list are marked for disassociation, and unchanged accounts are left as-is. Returns an error if the share targets an organization (`target_type=organization`); org-targeted shares derive their recipients dynamically from org membership and cannot be modified through this endpoint.",builder:A,handler:async e=>{if(e.dryRun){a({command:`cf share recipient update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${e[`account-id-path`]==null?`<account-id-path>`:encodeURIComponent(String(e[`account-id-path`]))}/shares/${e[`share-id`]==null?`<share-id>`:encodeURIComponent(String(e[`share-id`]))}/recipients`,pathParams:{"account-id-path":String(e[`account-id-path`]??``),"share-id":String(e[`share-id`]??``)},bodyKind:`json`,body:e.body===void 0?void 0:s(e.body)});return}let t=await r(e);if(e.body){let n=s(e.body);i(await o(`Updating`,async()=>t.share.recipient.update({body:n,account_id_path:e[`account-id-path`],share_id:e[`share-id`]})),{successLabel:`Updated`});return}if(e.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)}},M={command:`recipient`,describe:`Operations for recipient`,builder:e=>e.command(C).command(T).command(D).command(k).command(j).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function N(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`resource-account-id`,{type:`string`,description:`Account identifier.`}).option(`resource-id`,{type:`string`,description:`Share Resource identifier.`}).option(`resource-type`,{type:`string`,description:`Resource Type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).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 <share-id>`,describe:`Adds a resource to an existing share, making it available to share recipients.`,builder:N,handler:async f=>{if(f.dryRun){a({command:`cf share resource create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${f[`share-id`]==null?`<share-id>`:encodeURIComponent(String(f[`share-id`]))}/resources`,pathParams:{"share-id":String(f[`share-id`]??``)},bodyKind:`json`,body:f.body===void 0?c({resource_account_id:l(f[`resource-account-id`],`resource-account-id`,`text`),resource_id:l(f[`resource-id`],`resource-id`,`text`),resource_type:l(f[`resource-type`],`resource-type`,`text`)}):s(f.body)});return}let p=await r(f),m=f.local?e:await t();if(f.accountId=m,f.body){let e=s(f.body);i(await o(`Creating`,async()=>p.share.resource.create({body:e,account_id:m,share_id:f[`share-id`]})),{successLabel:`Created`});return}f[`resource-account-id`]===void 0&&(f[`resource-account-id`]=await u(`resource-account-id`,`Account identifier.`)),f[`resource-id`]===void 0&&(f[`resource-id`]=await u(`resource-id`,`Share Resource identifier.`)),f[`resource-type`]===void 0&&(f[`resource-type`]=await d(`resource-type`,`Resource Type.`,[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]));let h=c({resource_account_id:l(f[`resource-account-id`],`resource-account-id`,`text`),resource_id:l(f[`resource-id`],`resource-id`,`text`),resource_type:l(f[`resource-type`],`resource-type`,`text`)});i(await o(`Creating`,async()=>p.share.resource.create({body:h,account_id:m,share_id:f[`share-id`]})),{successLabel:`Created`})}};function F(e){return e.positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const I={command:`delete <share-resource-id>`,describe:`Deletion is not immediate, an updated share resource object with a new status will be returned.`,builder:F,handler:async s=>{if(s.dryRun){a({command:`cf share resource delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/resources/${s[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(s[`share-resource-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"share-resource-id":String(s[`share-resource-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();if(s.accountId=l,!await f({force:!!s.force,message:`Are you sure? This action cannot be undone.`})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}i(await o(`Deleting`,async()=>c.share.resource.delete({account_id:l,share_id:s[`share-id`],share_resource_id:s[`share-resource-id`]})),{successLabel:`Deleted`})}};function L(e){return e.positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const R={command:`get <share-resource-id>`,describe:`Get share resource by ID.`,builder:L,handler:async s=>{if(s.dryRun){a({command:`cf share resource get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/resources/${s[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(s[`share-resource-id`]))}`,pathParams:{"share-id":String(s[`share-id`]??``),"share-resource-id":String(s[`share-resource-id`]??``)},bodyKind:`none`});return}let c=await r(s),l=s.local?e:await t();s.accountId=l,i(await o(`Loading`,async()=>c.share.resource.get({account_id:l,share_id:s[`share-id`],share_resource_id:s[`share-resource-id`]})),{successLabel:`Loaded`})}};function z(e){return e.option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`status`,{type:`string`,description:`Filter share resources by status.`,choices:[`active`,`deleting`,`deleted`]}).option(`resource-type`,{type:`string`,description:`Filter share resources by resource_type.`,choices:[`custom-ruleset`,`gateway-policy`,`gateway-destination-ip`,`gateway-block-page-settings`,`gateway-extended-email-matching`,`idp-federation-grant`,`trust-grant`]}).option(`page`,{type:`number`,description:"Page number. Defaults to `1` when `per_page` is supplied without\n`page`. May be omitted entirely along with `per_page` to receive a\nnon-paginated response."}).option(`per-page`,{type:`number`,description:"Number of objects to return per page. Defaults to `20` when `page`\nis supplied without `per_page`. May be omitted entirely along with\n`page` to receive a non-paginated response."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const B={command:`list`,describe:`List share resources by share ID.`,builder:p(z),handler:async s=>{let c={status:s.status,resource_type:s[`resource-type`],page:s.page,per_page:s[`per-page`]};if(s.dryRun){a({command:`cf share resource list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${s[`share-id`]==null?`<share-id>`:encodeURIComponent(String(s[`share-id`]))}/resources`,pathParams:{"share-id":String(s[`share-id`]??``)},query:c,bodyKind:`none`});return}let l=await r(s),u=s.local?e:await t();s.accountId=u,i(await o(`Loading`,async()=>l.share.resource.list({account_id:u,share_id:s[`share-id`],...c})),{successLabel:`Loaded`})}};function V(e){return e.positional(`share-resource-id`,{type:`string`,description:`Share Resource identifier.`,demandOption:!0}).option(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const H={command:`update <share-resource-id>`,describe:`Update is not immediate, an updated share resource object with a new status will be returned.`,builder:V,handler:async c=>{if(c.dryRun){a({command:`cf share resource update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${c[`share-id`]==null?`<share-id>`:encodeURIComponent(String(c[`share-id`]))}/resources/${c[`share-resource-id`]==null?`<share-resource-id>`:encodeURIComponent(String(c[`share-resource-id`]))}`,pathParams:{"share-id":String(c[`share-id`]??``),"share-resource-id":String(c[`share-resource-id`]??``)},bodyKind:`json`,body:c.body===void 0?void 0:s(c.body)});return}let l=await r(c),u=c.local?e:await t();if(c.accountId=u,c.body){let e=s(c.body);i(await o(`Updating`,async()=>l.share.resource.update({...e,account_id:u,share_id:c[`share-id`],share_resource_id:c[`share-resource-id`]})),{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.`)}},U={command:`resource`,describe:`Operations for resource`,builder:e=>e.command(P).command(I).command(R).command(B).command(H).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function W(e){return e.positional(`share-id`,{type:`string`,description:`Share identifier tag.`,demandOption:!0}).option(`name`,{type:`string`,description:`The name of the share.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:"Request body for `PUT /accounts/{account_id}/shares/{share_id}`. The share's display `name` and `tags` can be updated via this endpoint. To modify recipients, use the `/accounts/{account_id}/shares/{share_id}/recipients` subresource endpoints (POST, PUT, DELETE). "})}const G={command:`update <share-id>`,describe:"Updates the share's display name and tags. This endpoint does **not** modify recipients or resources — those are managed via dedicated subresource endpoints: - **Recipients**: Use `POST /accounts/{account_id}/shares/{share_id}/recipients` to add a single recipient, `PUT /accounts/{account_id}/shares/{share_id}/recipients` to replace the full recipient list, or `DELETE /accounts/{account_id}/shares/{share_id}/recipients/{recipient_id}` to remove a recipient. - **Resources**: Use the share's resource subresource endpoints. Updating is not immediate; an updated share object with a new status will be returned.",builder:W,handler:async d=>{if(d.dryRun){a({command:`cf share update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/shares/${d[`share-id`]==null?`<share-id>`:encodeURIComponent(String(d[`share-id`]))}`,pathParams:{"share-id":String(d[`share-id`]??``)},bodyKind:`json`,body:d.body===void 0?c({name:l(d.name,`name`,`text`)}):s(d.body)});return}let f=await r(d),p=d.local?e:await t();if(d.accountId=p,d.body){let e=s(d.body);i(await o(`Updating`,async()=>f.share.update({...e,account_id:p,share_id:d[`share-id`]})),{successLabel:`Updated`});return}d.name===void 0&&(d.name=await u(`name`,`The name of the share.`));let m=c({name:l(d.name,`name`,`text`)});i(await o(`Updating`,async()=>f.share.update({...m,account_id:p,share_id:d[`share-id`]})),{successLabel:`Updated`})}},K={command:`share`,describe:`share`,builder:e=>e.command(h).command(_).command(y).command(x).command(G).command(M).command(U).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{K as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,o as t}from"./theme-BePJemMn.mjs";import"./ui-
|
|
2
|
+
import{a as e,o as t}from"./theme-BePJemMn.mjs";import"./ui-DIpjthrV.mjs";import{f as n}from"./oauth-BPizUUqP.mjs";import{c as r}from"./interactive-mV8PABm6.mjs";import{i}from"./auth-DuLchM18.mjs";import{a,i as o,n as s}from"./build-Dji9BYmV.mjs";import{a as c,c as l,i as u,l as d,n as f,o as p,t as m}from"./deploy-input-DhCo1I0I.mjs";function h(e){return e.option(`mode`,{type:`string`,alias:`m`,description:`Deployment mode (e.g. production, staging, preview)`}).option(`prebuilt`,{type:`boolean`,description:`Deploy existing Build Output API files without building`,default:!1}).option(`tag`,{type:`string`,description:`A tag to associate with this Worker Version`,requiresArg:!0}).option(`message`,{type:`string`,description:`A message to associate with this Worker Version`,requiresArg:!0}).option(`secrets-file`,{type:`string`,description:`Path to a file containing secrets to upload with the version (JSON or .env format)`,requiresArg:!0}).option(`dry-run`,{describe:`Build a project and run checks without actually uploading the Worker`,type:`boolean`,default:!1})}async function g(h,g){h.prebuilt||(await s(h.mode),r.message(``,{spacing:0}));let{workers:{default:_},settings:v}=await a(process.cwd()),{wranglerConfig:y,builtConfig:b}=o(_,v),x=m(_,b),S=await i(),C=await n();if(d(c(S)),g.command===`Deploy`){let n=f(_,y,C,h);r.message(e.bold(`Deploy`),{symbol:t.dim(`├`),spacing:0}),await p(n,y,x,{syncWorkersSite:void 0,getNormalizedContainerOptions:void 0,buildContainer:void 0,deployContainers:void 0,analyseBundle:void 0})}else{let n=u(_,y,C,h);r.message(e.bold(`Upload`),{symbol:t.dim(`├`),spacing:0}),await l(n,y,x,{analyseBundle:void 0})}r.success(h[`dry-run`]?`Dry run complete`:`${g.command} complete`)}export{h as n,g as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,n as l}from"./prompt-CDtLWxNv.mjs";function u(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const d={command:`clear`,describe:`You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`,builder:u,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield cache-reserve-clear clear`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,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});if(a.zoneId=s,!await l({force:!!a.force,message:`This operation permanently clears Cache Reserve for this zone and cannot be undone.`})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}n(await i(`Deleting`,async()=>o.smartShield.cacheReserveClear.clear({zone_id:s})),{successLabel:`Deleted`})}};function f(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`status`,describe:`You can use Cache Reserve Clear to clear your Cache Reserve, but you must first disable Cache Reserve. In most cases, this will be accomplished within 24 hours. You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind that you cannot undo or cancel this operation.`,builder:f,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield cache-reserve-clear status`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/cache_reserve_clear`,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.smartShield.cacheReserveClear.status({zone_id:s})),{successLabel:`Loaded`})}},m={command:`cache-reserve-clear`,describe:`Operations for cache-reserve-clear`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get`,describe:`Retrieve Smart Shield Settings.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield`,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.smartShield.get({zone_id:s})),{successLabel:`Loaded`})}};function _(e){return e.option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`,default:1}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`,default:1}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`,default:!1}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`,default:!1}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`],default:`GET`}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`,default:`/`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`,default:80}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`,default:60}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`,default:2}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`,default:!1}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`],default:`connection_established`}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`,default:80}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`,default:5}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`,default:`HTTP`}).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:`Create a new health check.`,builder:_,handler:async l=>{if(l.dryRun){r({command:`cf smart-shield health-checks create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/smart_shield/healthchecks`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`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(`Creating`,async()=>u.smartShield.healthChecks.create({body:e,zone_id:d})),{successLabel:`Created`});return}l.address===void 0&&(l.address=await c(`address`,`The hostname or IP address of the origin server to run health checks on.`)),l.name===void 0&&(l.name=await c(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)});n(await i(`Creating`,async()=>u.smartShield.healthChecks.create({body:f,zone_id:d})),{successLabel:`Created`})}};function y(e){return e.positional(`healthcheck-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 b={command:`delete <healthcheck-id>`,describe:`Delete a health check.`,builder:y,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield health-checks delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks/${a[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(a[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(a[`healthcheck-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.
|
|
4
4
|
`);return}n(await i(`Deleting`,async()=>o.smartShield.healthChecks.delete({zone_id:s,healthcheck_id:a[`healthcheck-id`]})),{successLabel:`Deleted`})}};function x(e){return e.positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const S={command:`edit <healthcheck-id>`,describe:`Patch a configured health check.`,builder:x,handler:async l=>{if(l.dryRun){r({command:`cf smart-shield health-checks edit`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/smart_shield/healthchecks/${l[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(l[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(l[`healthcheck-id`]??``),"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`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.smartShield.healthChecks.edit({body:e,zone_id:d,healthcheck_id:l[`healthcheck-id`]})),{successLabel:`Updated`});return}l.address===void 0&&(l.address=await c(`address`,`The hostname or IP address of the origin server to run health checks on.`)),l.name===void 0&&(l.name=await c(`name`,`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`));let f=o({address:s(l.address,`address`,`text`),check_regions:l[`check-regions`],consecutive_fails:l[`consecutive-fails`],consecutive_successes:l[`consecutive-successes`],description:s(l.description,`description`,`text`),http_config:{allow_insecure:l[`http-config-allow-insecure`],expected_body:s(l[`http-config-expected-body`],`http-config-expected-body`,`text`),expected_codes:l[`http-config-expected-codes`],follow_redirects:l[`http-config-follow-redirects`],method:s(l[`http-config-method`],`http-config-method`,`text`),path:s(l[`http-config-path`],`http-config-path`,`text`),port:l[`http-config-port`]},interval:l.interval,name:s(l.name,`name`,`text`),retries:l.retries,suspended:l.suspended,tcp_config:{method:s(l[`tcp-config-method`],`tcp-config-method`,`text`),port:l[`tcp-config-port`]},timeout:l.timeout,type:s(l.type,`type`,`text`)});n(await i(`Updating`,async()=>u.smartShield.healthChecks.edit({body:f,zone_id:d,healthcheck_id:l[`healthcheck-id`]})),{successLabel:`Updated`})}};function C(e){return e.positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`get <healthcheck-id>`,describe:`Fetch a single configured health check.`,builder:C,handler:async a=>{if(a.dryRun){r({command:`cf smart-shield health-checks get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks/${a[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(a[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(a[`healthcheck-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.smartShield.healthChecks.get({zone_id:s,healthcheck_id:a[`healthcheck-id`]})),{successLabel:`Loaded`})}};function T(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. Must be a multiple of 5.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const E={command:`list`,describe:`List configured health checks.`,builder:T,handler:async a=>{let o={page:a.page,per_page:a[`per-page`]};if(a.dryRun){r({command:`cf smart-shield health-checks list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/smart_shield/healthchecks`,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.smartShield.healthChecks.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function D(e){return e.positional(`healthcheck-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`result-address`,{type:`string`,description:`The hostname or IP address of the origin server to run health checks on.`}).option(`result-check-regions`,{type:`string`,array:!0,description:`A list of regions from which to run health checks. Null means Cloudflare will pick a default region.`}).option(`result-consecutive-fails`,{type:`number`,description:`The number of consecutive fails required from a health check before changing the health to unhealthy.`}).option(`result-consecutive-successes`,{type:`number`,description:`The number of consecutive successes required from a health check before changing the health to healthy.`}).option(`result-description`,{type:`string`,description:`A human-readable description of the health check.`}).option(`result-http-config-allow-insecure`,{type:`boolean`,description:`Do not validate the certificate when the health check uses HTTPS.`}).option(`result-http-config-expected-body`,{type:`string`,description:`A case-insensitive sub-string to look for in the response body. If this string is not found, the origin will be marked as unhealthy.`}).option(`result-http-config-expected-codes`,{type:`string`,array:!0,description:`The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all codes starting with 2) of the health check.`}).option(`result-http-config-follow-redirects`,{type:`boolean`,description:`Follow redirects if the origin returns a 3xx status code.`}).option(`result-http-config-method`,{type:`string`,description:`The HTTP method to use for the health check.`,choices:[`GET`,`HEAD`]}).option(`result-http-config-path`,{type:`string`,description:`The endpoint path to health check against.`}).option(`result-http-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80 if type is HTTP or 443 if type is HTTPS.`}).option(`result-interval`,{type:`number`,description:`The interval between each health check. Shorter intervals may give quicker notifications if the origin status changes, but will increase load on the origin as we check from multiple locations.`}).option(`result-name`,{type:`string`,description:`A short name to identify the health check. Only alphanumeric characters, hyphens and underscores are allowed.`}).option(`result-retries`,{type:`number`,description:`The number of retries to attempt in case of a timeout before marking the origin as unhealthy. Retries are attempted immediately.`}).option(`result-suspended`,{type:`boolean`,description:`If suspended, no health checks are sent to the origin.`}).option(`result-tcp-config-method`,{type:`string`,description:`The TCP connection method to use for the health check.`,choices:[`connection_established`]}).option(`result-tcp-config-port`,{type:`number`,description:`Port number to connect to for the health check. Defaults to 80.`}).option(`result-timeout`,{type:`number`,description:`The timeout (in seconds) before marking the health check as failed.`}).option(`result-type`,{type:`string`,description:`The protocol to use for the health check. Currently supported protocols are 'HTTP', 'HTTPS' and 'TCP'.`}).option(`success`,{type:`boolean`,description:`Whether the API call was successful.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const O={command:`update <healthcheck-id>`,describe:`Update a configured health check.`,builder:D,handler:async c=>{if(c.dryRun){r({command:`cf smart-shield health-checks update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/smart_shield/healthchecks/${c[`healthcheck-id`]==null?`<healthcheck-id>`:encodeURIComponent(String(c[`healthcheck-id`]))}`,pathParams:{"healthcheck-id":String(c[`healthcheck-id`]??``),"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({result:{address:s(c[`result-address`],`result-address`,`text`),check_regions:c[`result-check-regions`],consecutive_fails:c[`result-consecutive-fails`],consecutive_successes:c[`result-consecutive-successes`],description:s(c[`result-description`],`result-description`,`text`),http_config:{allow_insecure:c[`result-http-config-allow-insecure`],expected_body:s(c[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:c[`result-http-config-expected-codes`],follow_redirects:c[`result-http-config-follow-redirects`],method:s(c[`result-http-config-method`],`result-http-config-method`,`text`),path:s(c[`result-http-config-path`],`result-http-config-path`,`text`),port:c[`result-http-config-port`]},interval:c[`result-interval`],name:s(c[`result-name`],`result-name`,`text`),retries:c[`result-retries`],suspended:c[`result-suspended`],tcp_config:{method:s(c[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:c[`result-tcp-config-port`]},timeout:c[`result-timeout`],type:s(c[`result-type`],`result-type`,`text`)},success:c.success}):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.smartShield.healthChecks.update({...e,zone_id:u,healthcheck_id:c[`healthcheck-id`]})),{successLabel:`Updated`});return}if(c.success===void 0)throw Error(`--success is required (or pass --body with this field set).`);let d=o({result:{address:s(c[`result-address`],`result-address`,`text`),check_regions:c[`result-check-regions`],consecutive_fails:c[`result-consecutive-fails`],consecutive_successes:c[`result-consecutive-successes`],description:s(c[`result-description`],`result-description`,`text`),http_config:{allow_insecure:c[`result-http-config-allow-insecure`],expected_body:s(c[`result-http-config-expected-body`],`result-http-config-expected-body`,`text`),expected_codes:c[`result-http-config-expected-codes`],follow_redirects:c[`result-http-config-follow-redirects`],method:s(c[`result-http-config-method`],`result-http-config-method`,`text`),path:s(c[`result-http-config-path`],`result-http-config-path`,`text`),port:c[`result-http-config-port`]},interval:c[`result-interval`],name:s(c[`result-name`],`result-name`,`text`),retries:c[`result-retries`],suspended:c[`result-suspended`],tcp_config:{method:s(c[`result-tcp-config-method`],`result-tcp-config-method`,`text`),port:c[`result-tcp-config-port`]},timeout:c[`result-timeout`],type:s(c[`result-type`],`result-type`,`text`)},success:c.success});n(await i(`Updating`,async()=>l.smartShield.healthChecks.update({...d,zone_id:u,healthcheck_id:c[`healthcheck-id`]})),{successLabel:`Updated`})}},k={command:`health-checks`,describe:`Operations for health-checks`,builder:e=>e.command(v).command(b).command(S).command(w).command(E).command(O).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function A(e){return e.option(`cache-reserve-value`,{type:`string`,description:`Specifies the enablement value of Cache Reserve.`,choices:[`on`,`off`]}).option(`regional-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Regional Tiered Cache.`,choices:[`on`,`off`]}).option(`smart-routing-value`,{type:`string`,description:`Specifies the enablement value of Smart Routing.`,choices:[`on`,`off`]}).option(`smart-tiered-cache-value`,{type:`string`,description:`Specifies the enablement value of Smart Tiered Cache.`,choices:[`on`,`off`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`The patch body for Smart Shield.`})}const j={command:`update`,describe:`Set Smart Shield Settings.`,builder:A,handler:async c=>{if(c.dryRun){r({command:`cf smart-shield update`,method:`PATCH`,url:`https://api.cloudflare.com/client/v4/zones/${c.zone??c.zoneId??`<zone>`}/smart_shield`,pathParams:{"zone-id":String(c.zone??c[`zone-id`]??``)},bodyKind:`json`,body:c.body===void 0?o({cache_reserve:{value:s(c[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:s(c[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:s(c[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:s(c[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`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.smartShield.update({...e,zone_id:u})),{successLabel:`Updated`});return}let d=o({cache_reserve:{value:s(c[`cache-reserve-value`],`cache-reserve-value`,`text`)},regional_tiered_cache:{value:s(c[`regional-tiered-cache-value`],`regional-tiered-cache-value`,`text`)},smart_routing:{value:s(c[`smart-routing-value`],`smart-routing-value`,`text`)},smart_tiered_cache:{value:s(c[`smart-tiered-cache-value`],`smart-tiered-cache-value`,`text`)}});n(await i(`Updating`,async()=>l.smartShield.update({...d,zone_id:u})),{successLabel:`Updated`})}},M={command:`smart-shield`,describe:`smart-shield`,builder:e=>e.command(g).command(j).command(m).command(k).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{M as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BPizUUqP.mjs";import{a as t,r as n}from"./auth-DuLchM18.mjs";import{t as r}from"./output-DgW1hQGX.mjs";import{n as i,t as a}from"./progress-B84wYh91.mjs";import{n as o}from"./body-parser-CYD7PKFC.mjs";import{n as s,t as c}from"./input-validation-BBKJRoRB.mjs";import{n as l}from"./prompt-CDtLWxNv.mjs";import{n as u,t as d}from"./raw-fetch-Dz-QBoP_.mjs";function f(e){return e.positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`text`,{type:`boolean`,description:`Decode the response body as UTF-8 text instead of writing raw bytes`,default:!1})}const p={command:`get <snippet-name>`,describe:`Fetches the content of a snippet belonging to the zone.`,builder:f,handler:async t=>{if(t.dryRun){i({command:`cf snippets content get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}/content`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let r=await n(t);t.zoneId=await e({zone:t.zone},r,{quiet:t.quiet});let o=await a(`Loading`,async()=>d(`/zones/${t.zoneId}/snippets/${encodeURIComponent(String(t[`snippet-name`]))}/content`,{method:`GET`,local:t.local===!0,persistTo:t.persistTo}));u(t.text===!0?o.toString(`utf-8`):o)}},m={command:`content`,describe:`Operations for content`,builder:e=>e.command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function h(e){return e.positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,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 g={command:`delete <snippet-name>`,describe:`Deletes a snippet belonging to the zone. Returns a 4XX response if the zone or snippet no longer exists.`,builder:h,handler:async t=>{if(t.dryRun){i({command:`cf snippets delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await l({force:!!t.force})){process.stderr.write(`Aborted.
|
|
3
3
|
`);return}r(await a(`Deleting`,async()=>o.snippets.delete({zone_id:s,snippet_name:t[`snippet-name`]})),{successLabel:`Deleted`})}};function _(e){return e.positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`get <snippet-name>`,describe:`Fetches a snippet belonging to the zone.`,builder:_,handler:async t=>{if(t.dryRun){i({command:`cf snippets get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/${t[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(t[`snippet-name`]))}`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``),"snippet-name":String(t[`snippet-name`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.snippets.get({zone_id:s,snippet_name:t[`snippet-name`]})),{successLabel:`Loaded`})}};function y(e){return e.option(`page`,{type:`number`,description:`Specifies the current page number.`}).option(`per-page`,{type:`number`,description:`Specifies how many results to return per page.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const b={command:`list`,describe:`Fetches all snippets belonging to the zone.`,builder:y,handler:async t=>{let o={page:t.page,per_page:t[`per-page`]};if(t.dryRun){i({command:`cf snippets list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},query:o,bodyKind:`none`});return}let s=await n(t),c=await e({zone:t.zone},s,{quiet:t.quiet});t.zoneId=c,r(await a(`Loading`,async()=>s.snippets.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function x(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const S={command:`delete`,describe:`Deletes all snippet rules belonging to the zone.`,builder:x,handler:async t=>{if(t.dryRun){i({command:`cf snippets rules delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});if(t.zoneId=s,!await l({force:!!t.force})){process.stderr.write(`Aborted.
|
|
4
4
|
`);return}r(await a(`Deleting`,async()=>o.snippets.rules.delete({zone_id:s})),{successLabel:`Deleted`})}};function C(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const w={command:`list`,describe:`Fetches all snippet rules belonging to the zone.`,builder:C,handler:async t=>{if(t.dryRun){i({command:`cf snippets rules list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${t.zone??t.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(t.zone??t[`zone-id`]??``)},bodyKind:`none`});return}let o=await n(t),s=await e({zone:t.zone},o,{quiet:t.quiet});t.zoneId=s,r(await a(`Loading`,async()=>o.snippets.rules.list({zone_id:s})),{successLabel:`Loaded`})}};function T(e){return e.option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet rules object.`})}const E={command:`update`,describe:`Updates all snippet rules belonging to the zone.`,builder:T,handler:async s=>{if(s.dryRun){i({command:`cf snippets rules update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${s.zone??s.zoneId??`<zone>`}/snippets/snippet_rules`,pathParams:{"zone-id":String(s.zone??s[`zone-id`]??``)},bodyKind:`json`,body:s.body===void 0?void 0:o(s.body)});return}let c=await n(s),l=await e({zone:s.zone},c,{quiet:s.quiet});if(s.zoneId=l,s.body){let e=o(s.body);r(await a(`Updating`,async()=>c.snippets.rules.update({...e,zone_id:l})),{successLabel:`Updated`});return}r(await a(`Updating`,async()=>t(c,`PUT`,`/zones/${s.zoneId}/snippets/snippet_rules`)),{successLabel:`Updated`})}},D={command:`rules`,describe:`Operations for rules`,builder:e=>e.command(S).command(w).command(E).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function O(e){return e.positional(`snippet-name`,{type:`string`,description:`Identify the snippet.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Define a snippet object.`}).option(`file`,{type:`string`,description:`Path to a file to upload as the request body`}).option(`metadata`,{type:`string`,description:`Provide metadata about the snippet.`})}const k={command:`update <snippet-name>`,describe:`Creates or updates a snippet belonging to the zone.`,builder:O,handler:async o=>{if(o.dryRun){i({command:`cf snippets update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/snippets/${o[`snippet-name`]==null?`<snippet-name>`:encodeURIComponent(String(o[`snippet-name`]))}`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``),"snippet-name":String(o[`snippet-name`]??``)},bodyKind:`multipart`,body:{body:o.body,file:o.file,metadata:o.metadata}});return}let l=await n(o);if(o.zoneId=await e({zone:o.zone},l,{quiet:o.quiet}),o.file!==void 0||o.body!==void 0||o.metadata!==void 0){let e=new FormData;if(o.file){let t=c(o.file);e.append(`file`,new Blob([t]),o.file.split(/[\\/]/).filter(Boolean).pop())}else o.body!==void 0&&e.append(`file`,o.body);if(o.metadata!==void 0){let t=typeof o.metadata==`string`?s(o.metadata,`metadata`,`text`):o.metadata;e.append(`metadata`,typeof t==`string`?t:JSON.stringify(t))}r(await a(`Updating`,async()=>t(l,`PUT`,`/zones/${o.zoneId}/snippets/${encodeURIComponent(String(o[`snippet-name`]))}`,{body:e})),{successLabel:`Updated`});return}if(o.body){let e=s(o.body,`body`,`binary`);r(await a(`Updating`,async()=>t(l,`PUT`,`/zones/${o.zoneId}/snippets/${encodeURIComponent(String(o[`snippet-name`]))}`,{body:e,headers:{"Content-Type":`multipart/form-data`}})),{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.`)}},A={command:`snippets`,describe:`snippets`,builder:e=>e.command(g).command(v).command(b).command(k).command(m).command(D).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{A as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{t as r}from"./src-
|
|
2
|
+
import{i as e,r as t,t as n}from"./chunk-vbHwaUoU.mjs";import{t as r}from"./src-CHW7s5IS.mjs";import{C as i,Ct as a,Dt as o,F as s,I as c,Ot as l,S as u,Tt as d,V as f,X as p,g as m,kt as h,lt as g,ut as _,v,x as y,y as b}from"./chunk-LQW53VED-Xakf_rUn.mjs";import{a as x}from"./theme-BePJemMn.mjs";import"./ui-DIpjthrV.mjs";import{a as S,i as C,n as w,o as T,r as E,s as D,t as O}from"./chunk-6EUZQHAF-l8tR2Qyj.mjs";import{i as ee,t as te}from"./dist-COfwjT96.mjs";import{_ as ne,a as re,c as k,f as A,g as ie,h as j,i as M,m as ae,n as oe,o as se,p as ce,s as N,u as P,v as le}from"./interactive-mV8PABm6.mjs";import{t as F}from"./registry-DDcSvd8H.mjs";import{basename as ue,dirname as de,isAbsolute as fe,join as pe,relative as me,resolve as he}from"path";import{promises as ge}from"fs";import{appendFileSync as _e,existsSync as I,mkdirSync as ve,promises as ye,readFileSync as be,statSync as xe,writeFileSync as Se}from"node:fs";import L from"node:assert";import R,{basename as Ce,join as z,relative as we,resolve as Te}from"node:path";import Ee,{constants as De,homedir as Oe}from"node:os";import B,{exit as ke}from"node:process";import Ae from"node:tty";import je,{execFileSync as Me,spawn as Ne}from"node:child_process";import{Buffer as Pe}from"node:buffer";import{fileURLToPath as Fe}from"node:url";import{readFile as Ie,readdir as Le,stat as Re,writeFile as ze}from"node:fs/promises";import{constants as Be}from"os";const{white:Ve,gray:He,dim:V,hidden:Ue,bold:We,cyanBright:Ge,bgCyan:Ke}=p,H=p.hex(`#BD5B08`),qe=p.hex(`#111`),Je=p.hex(`#0E838F`),Ye=qe.bgHex(`#0E838F`),Xe=p.hex(`#AB2526`),Ze=qe.bgHex(`#AB2526`);p.hex(`#218529`);const Qe=qe.bgHex(`#218529`),$e=p.hex(`#7F7322`),et=qe.bgHex(`#7F7322`),tt=process.stdout,nt=process.stderr;se();const U={diamond:`◇`,dash:`─`,radioInactive:`○`,radioActive:`●`,backActive:`◀`,backInactive:`◁`,bar:`│`,leftT:`├`,rigthT:`┤`,arrows:{left:`‹`,right:`›`},corners:{tl:`╭`,bl:`╰`,tr:`╮`,br:`╯`}},rt={error:Ze(` ERROR `),warning:et(` WARNING `),info:Ye(` INFO `),success:Qe(` SUCCESS `),cancel:Ve.bgRed(` X `)},it=(e=1)=>Ue(` `.repeat(e)),at={none:-1,error:0,warn:1,info:2,log:3,debug:4};function ot(){return`log`}const st=e=>{at[ot()]>=at.log&&tt.write(`${e}\n`)},ct=e=>{st(e.split(`
|
|
3
3
|
`).map(e=>`${He(U.bar)}${e.length>0?` `+Ve(e):``}`).join(`
|
|
4
4
|
`))},lt=()=>{ct(``)},ut=(e,{linePrefix:t=He(U.bar),firstLinePrefix:n=t,newlineBefore:r=!1,newlineAfter:i=!1,formatLine:a=e=>Ve(e),multiline:o=!0}={})=>{let s=(o?e.split(`
|
|
5
5
|
`):[e]).map((e,r)=>(r===0?n:t)+it()+a(e));return r&&s.unshift(t),i&&s.push(t),s.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a,t as o}from"./body-parser-CYD7PKFC.mjs";import{n as s}from"./input-validation-BBKJRoRB.mjs";import{a as c,n as l}from"./prompt-CDtLWxNv.mjs";import{t as u}from"./cli-types-BWdZbsFE.mjs";function d(e){return e.option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
|
|
3
3
|
Notes: Only available for TCP or UDP applications with traffic_type set to "direct".`,default:!1}).option(`dns-name`,{type:`string`,description:`The name of the DNS record associated with the application.`}).option(`dns-type`,{type:`string`,description:`The type of DNS record associated with the application.`,choices:[`CNAME`,`ADDRESS`]}).option(`edge-ips-connectivity`,{type:`string`,description:`The IP versions supported for inbound connections on Spectrum anycast IPs.`,choices:[`all`,`ipv4`,`ipv6`]}).option(`edge-ips-type`,{type:`string`,description:`The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.`,choices:[`dynamic`,`static`]}).option(`edge-ips-ips`,{type:`string`,array:!0,description:`The array of customer owned IPs we broadcast via anycast for this hostname and application.`}).option(`ip-firewall`,{type:`boolean`,description:`Enables IP Access Rules for this application.
|
|
4
4
|
Notes: Only available for TCP applications.`,default:!1}).option(`origin-direct`,{type:`string`,array:!0,description:`List of origin IP addresses. Array may contain multiple IP addresses for load balancing.`}).option(`origin-dns-name`,{type:`string`,description:`The name of the DNS record associated with the origin.`}).option(`origin-dns-ttl`,{type:`number`,description:`The TTL of our resolution of your DNS record in seconds.`}).option(`origin-dns-type`,{type:`string`,description:`The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.`,choices:[`A`,`AAAA`,`SRV`]}).option(`protocol`,{type:`string`,description:'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'}).option(`proxy-protocol`,{type:`string`,description:`Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.`,choices:[`off`,`v1`,`v2`,`simple`],default:`off`}).option(`tls`,{type:`string`,description:`The type of TLS termination associated with the application.`,choices:[`off`,`flexible`,`full`,`strict`],default:`off`}).option(`traffic-type`,{type:`string`,description:`Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the \`protocol\`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly.`,choices:[`direct`,`http`,`https`],default:`direct`}).option(`virtual-network-id`,{type:`string`,description:`Optional UUID of a virtual network for routing origin traffic through tunnel virtual networks.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`}).conflicts(`edge-ips-connectivity`,[`edge-ips-ips`]).conflicts(`edge-ips-ips`,[`edge-ips-connectivity`])}const f={command:`create`,describe:`Creates a new Spectrum application from a configuration using a name for the origin.`,builder:d,handler:async l=>{if(l.dryRun){r({command:`cf spectrum apps create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${l.zone??l.zoneId??`<zone>`}/spectrum/apps`,pathParams:{"zone-id":String(l.zone??l[`zone-id`]??``)},bodyKind:`json`,body:l.body===void 0?o({argo_smart_routing:l[`argo-smart-routing`],dns:{name:s(l[`dns-name`],`dns-name`,`text`),type:s(l[`dns-type`],`dns-type`,`text`)},edge_ips:{connectivity:s(l[`edge-ips-connectivity`],`edge-ips-connectivity`,`text`),type:s(l[`edge-ips-type`],`edge-ips-type`,`text`),ips:l[`edge-ips-ips`]},ip_firewall:l[`ip-firewall`],origin_direct:l[`origin-direct`],origin_dns:{name:s(l[`origin-dns-name`],`origin-dns-name`,`text`),ttl:l[`origin-dns-ttl`],type:s(l[`origin-dns-type`],`origin-dns-type`,`text`)},protocol:s(l.protocol,`protocol`,`text`),proxy_protocol:s(l[`proxy-protocol`],`proxy-protocol`,`text`),tls:s(l.tls,`tls`,`text`),traffic_type:s(l[`traffic-type`],`traffic-type`,`text`),virtual_network_id:s(l[`virtual-network-id`],`virtual-network-id`,`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(`Creating`,async()=>u.spectrum.apps.create({body:e,zone_id:d})),{successLabel:`Created`});return}l.protocol===void 0&&(l.protocol=await c(`protocol`,'The port configuration at Cloudflare\'s edge. May specify a single port, for example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.'));let f=o({argo_smart_routing:l[`argo-smart-routing`],dns:{name:s(l[`dns-name`],`dns-name`,`text`),type:s(l[`dns-type`],`dns-type`,`text`)},edge_ips:{connectivity:s(l[`edge-ips-connectivity`],`edge-ips-connectivity`,`text`),type:s(l[`edge-ips-type`],`edge-ips-type`,`text`),ips:l[`edge-ips-ips`]},ip_firewall:l[`ip-firewall`],origin_direct:l[`origin-direct`],origin_dns:{name:s(l[`origin-dns-name`],`origin-dns-name`,`text`),ttl:l[`origin-dns-ttl`],type:s(l[`origin-dns-type`],`origin-dns-type`,`text`)},protocol:s(l.protocol,`protocol`,`text`),proxy_protocol:s(l[`proxy-protocol`],`proxy-protocol`,`text`),tls:s(l.tls,`tls`,`text`),traffic_type:s(l[`traffic-type`],`traffic-type`,`text`),virtual_network_id:s(l[`virtual-network-id`],`virtual-network-id`,`text`)});n(await i(`Creating`,async()=>u.spectrum.apps.create({body:f,zone_id:d})),{successLabel:`Created`})}};function p(e){return e.positional(`app-id`,{type:`string`,description:`App 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 m={command:`delete <app-id>`,describe:`Deletes a previously existing application.`,builder:p,handler:async a=>{if(a.dryRun){r({command:`cf spectrum apps delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/spectrum/apps/${a[`app-id`]==null?`<app-id>`:encodeURIComponent(String(a[`app-id`]))}`,pathParams:{"app-id":String(a[`app-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.
|
|
5
5
|
`);return}n(await i(`Deleting`,async()=>o.spectrum.apps.delete({zone_id:s,app_id:a[`app-id`]})),{successLabel:`Deleted`})}};function h(e){return e.positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <app-id>`,describe:`Gets the application configuration of a specific application inside a zone.`,builder:h,handler:async a=>{if(a.dryRun){r({command:`cf spectrum apps get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/spectrum/apps/${a[`app-id`]==null?`<app-id>`:encodeURIComponent(String(a[`app-id`]))}`,pathParams:{"app-id":String(a[`app-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.spectrum.apps.get({zone_id:s,app_id:a[`app-id`]})),{successLabel:`Loaded`})}};function _(e){return e.option(`page`,{type:`number`,description:"Page number of paginated results. This parameter is required in order to use other pagination parameters. If included in the query, `result_info` will be present in the response."}).option(`per-page`,{type:`number`,description:`Sets the maximum number of results per page.`}).option(`direction`,{type:`string`,description:`Sets the direction by which results are ordered.`,choices:[`asc`,`desc`]}).option(`order`,{type:`string`,description:`Application field by which results are ordered.`,choices:[`protocol`,`app_id`,`created_on`,`modified_on`,`dns`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`Retrieves a list of currently existing Spectrum applications inside a zone.`,builder:u(_),handler:async a=>{let o={page:a.page,per_page:a[`per-page`],direction:a.direction,order:a.order};if(a.dryRun){r({command:`cf spectrum apps list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${a.zone??a.zoneId??`<zone>`}/spectrum/apps`,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.spectrum.apps.list({zone_id:c,...o})),{successLabel:`Loaded`})}};function y(e){return e.positional(`app-id`,{type:`string`,description:`App ID`,demandOption:!0}).option(`argo-smart-routing`,{type:`boolean`,description:`Enables Argo Smart Routing for this application.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{h as e}from"./oauth-
|
|
2
|
+
import{h as e}from"./oauth-BPizUUqP.mjs";import{r as t}from"./auth-DuLchM18.mjs";import{t as n}from"./output-DgW1hQGX.mjs";import{n as r,t as i}from"./progress-B84wYh91.mjs";import{n as a}from"./body-parser-CYD7PKFC.mjs";import{n as o}from"./prompt-CDtLWxNv.mjs";import{t as s}from"./cli-types-BWdZbsFE.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:`Check which speed test regions and configurations are available for your zone`,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:`Tested pages with their performance history, trends, and individual test results`,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:`Scheduled recurring speed tests that automatically run at regular intervals`,builder:e=>e.command(E).command(O).command(A).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},M={command:`speed`,describe:`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,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{i as e,t}from"./chunk-vbHwaUoU.mjs";import{a as n,n as r,o as i,r as a,s as o,t as s}from"./session-
|
|
2
|
+
import{i as e,t}from"./chunk-vbHwaUoU.mjs";import{a as n,n as r,o as i,r as a,s as o,t as s}from"./session-Ckt20hHa.mjs";import{r as c}from"./sdk-m4xeaua4.mjs";import{ft as l}from"./chunk-LQW53VED-Xakf_rUn.mjs";import{a as u,n as d,t as f}from"./theme-BePJemMn.mjs";import{i as p,t as m}from"./ui-DIpjthrV.mjs";import{i as h}from"./local-DTyuGwTw.mjs";import{createRequire as g}from"node:module";import{notStrictEqual as ee,strictEqual as _}from"assert";import{basename as te,dirname as v,extname as ne,join as re,normalize as ie,relative as y,resolve as b}from"path";import{readFileSync as x,readdirSync as ae,statSync as S,writeFile as oe}from"fs";import{format as se,inspect as ce}from"util";import{fileURLToPath as le}from"url";import{readFileSync as ue,readdirSync as de}from"node:fs";const fe={right:ge,center:_e};var pe=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=fe[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+=me(e[a],c,`| `),i+=c,i+=me(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=>{!$t.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=>{$t.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){M(`<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)):(k(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){M(`<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=Qt(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=Bt(o,t=>!e[t]),c=Bt(c,t=>!e[t]),a};let l=[];return a.freeze=function(){l.push({implied:o,conflicting:c})},a.unfreeze=function(){let e=l.pop();k(e,void 0,n),{implied:o,conflicting:c}=e},a}let tn=[],nn;function rn(e,t,n,r){nn=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=on(t,e.extends);else try{o=import.meta.resolve(e.extends)}catch{return e}an(o),tn.push(o),i=a?JSON.parse(nn.readFileSync(o,`utf8`)):r.require(e.extends),delete e.extends,i=rn(i,nn.path.dirname(o),n,nn)}return tn=[],n?sn(i,e):Object.assign({},i,e)}function an(e){if(tn.indexOf(e)>-1)throw new j(`Circular extended configurations: '${e}'.`)}function on(e,t){return nn.path.resolve(e,t)}function sn(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]=sn(e[i],t[i]):n[i]=t[i];return n}var N=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},P=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)},F,cn,ln,I,L,un,R,dn,fn,z,pn,B,V,H,U,mn,hn,W,G,gn,_n,K,vn,yn,bn,q,xn,J,Sn,Cn,wn,Y,Tn,X,Z;function En(e){return(t=[],n=e.process.cwd(),r)=>{let i=new cr(t,n,r,e);return Object.defineProperty(i,`argv`,{get:()=>i.parse(),enumerable:!0}),i.help(),i.version(),i}}const Dn=Symbol(`copyDoubleDash`),On=Symbol(`copyDoubleDash`),kn=Symbol(`deleteFromParserHintObject`),An=Symbol(`emitWarning`),jn=Symbol(`freeze`),Mn=Symbol(`getDollarZero`),Nn=Symbol(`getParserConfiguration`),Pn=Symbol(`getUsageConfiguration`),Fn=Symbol(`guessLocale`),In=Symbol(`guessVersion`),Ln=Symbol(`parsePositionalNumbers`),Rn=Symbol(`pkgUp`),Q=Symbol(`populateParserHintArray`),zn=Symbol(`populateParserHintSingleValueDictionary`),Bn=Symbol(`populateParserHintArrayDictionary`),Vn=Symbol(`populateParserHintDictionary`),Hn=Symbol(`sanitizeKey`),Un=Symbol(`setKey`),Wn=Symbol(`unfreeze`),Gn=Symbol(`validateAsync`),Kn=Symbol(`getCommandInstance`),qn=Symbol(`getContext`),Jn=Symbol(`getHasOutput`),Yn=Symbol(`getLoggerInstance`),Xn=Symbol(`getParseContext`),Zn=Symbol(`getUsageInstance`),Qn=Symbol(`getValidationInstance`),$n=Symbol(`hasParseCallback`),er=Symbol(`isGlobalContext`),tr=Symbol(`postProcess`),nr=Symbol(`rebase`),rr=Symbol(`reset`),ir=Symbol(`runYargsParserAndExecuteCommands`),ar=Symbol(`runValidation`),or=Symbol(`setHasOutput`),sr=Symbol(`kTrackManuallySetKeys`);var cr=class{constructor(e=[],t,n,r){this.customScriptName=!1,this.parsed=!1,F.set(this,void 0),cn.set(this,void 0),ln.set(this,{commands:[],fullCommands:[]}),I.set(this,null),L.set(this,null),un.set(this,`show-hidden`),R.set(this,null),dn.set(this,!0),fn.set(this,{}),z.set(this,!0),pn.set(this,[]),B.set(this,void 0),V.set(this,{}),H.set(this,!1),U.set(this,null),mn.set(this,!0),hn.set(this,void 0),W.set(this,``),G.set(this,void 0),gn.set(this,void 0),_n.set(this,{}),K.set(this,null),vn.set(this,null),yn.set(this,{}),bn.set(this,{}),q.set(this,void 0),xn.set(this,!1),J.set(this,void 0),Sn.set(this,!1),Cn.set(this,!1),wn.set(this,!1),Y.set(this,void 0),Tn.set(this,{}),X.set(this,null),Z.set(this,void 0),N(this,J,r,`f`),N(this,q,e,`f`),N(this,cn,t,`f`),N(this,gn,n,`f`),N(this,B,new Dt(this),`f`),this.$0=this[Mn](),this[rr](),N(this,F,P(this,F,`f`),`f`),N(this,Y,P(this,Y,`f`),`f`),N(this,Z,P(this,Z,`f`),`f`),N(this,G,P(this,G,`f`),`f`),P(this,G,`f`).showHiddenOpt=P(this,un,`f`),N(this,hn,this[On](),`f`),P(this,J,`f`).y18n.setLocale(`en_US`)}addHelpOpt(e,t){return M(`[string|boolean] [string]`,[e,t],arguments.length),P(this,U,`f`)&&(this[kn](P(this,U,`f`)),N(this,U,null,`f`)),e===!1&&t===void 0?this:(N(this,U,typeof e==`string`?e:`help`,`f`),this.boolean(P(this,U,`f`)),this.describe(P(this,U,`f`),t||P(this,Y,`f`).deferY18nLookup(`Show help`)),this)}help(e,t){return this.addHelpOpt(e,t)}addShowHiddenOpt(e,t){if(M(`[string|boolean] [string]`,[e,t],arguments.length),e===!1&&t===void 0)return this;let n=typeof e==`string`?e:P(this,un,`f`);return this.boolean(n),this.describe(n,t||P(this,Y,`f`).deferY18nLookup(`Show hidden options`)),P(this,G,`f`).showHiddenOpt=n,this}showHidden(e,t){return this.addShowHiddenOpt(e,t)}alias(e,t){return M(`<object|string|array> [string|array]`,[e,t],arguments.length),this[Bn](this.alias.bind(this),`alias`,e,t),this}array(e){return M(`<array|string>`,[e],arguments.length),this[Q](`array`,e),this[sr](e),this}boolean(e){return M(`<array|string>`,[e],arguments.length),this[Q](`boolean`,e),this[sr](e),this}check(e,t){return M(`<function> [boolean]`,[e,t],arguments.length),this.middleware((t,n)=>At(()=>e(t,n.getOptions()),n=>(n?(typeof n==`string`||n instanceof Error)&&P(this,Y,`f`).fail(n.toString(),n):P(this,Y,`f`).fail(P(this,J,`f`).y18n.__(`Argument check failed: %s`,e.toString())),t),e=>(P(this,Y,`f`).fail(e.message?e.message:e.toString(),e),t)),!1,t),this}choices(e,t){return M(`<object|string|array> [string|array]`,[e,t],arguments.length),this[Bn](this.choices.bind(this),`choices`,e,t),this}coerce(e,t){if(M(`<object|string|array> [function]`,[e,t],arguments.length),Array.isArray(e)){if(!t)throw new j(`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 j(`coerce callback must be provided`);let n=e;return P(this,G,`f`).key[n]=!0,P(this,B,`f`).addCoerceMiddleware((e,r)=>{let i=[n,...r.getAliases()[n]??[]].filter(t=>Object.prototype.hasOwnProperty.call(e,t));return i.length===0?e:At(()=>t(e[i[0]]),t=>(i.forEach(n=>{e[n]=t}),e),e=>{throw new j(e.message)})},n),this}conflicts(e,t){return M(`<string|object> [string|array]`,[e,t],arguments.length),P(this,Z,`f`).conflicts(e,t),this}config(e=`config`,t,n){return M(`[object|string] [string|function] [function]`,[e,t,n],arguments.length),typeof e==`object`&&!Array.isArray(e)?(e=rn(e,P(this,cn,`f`),this[Nn]()[`deep-merge-config`]||!1,P(this,J,`f`)),P(this,G,`f`).configObjects=(P(this,G,`f`).configObjects||[]).concat(e),this):(typeof t==`function`&&(n=t,t=void 0),this.describe(e,t||P(this,Y,`f`).deferY18nLookup(`Path to JSON config file`)),(Array.isArray(e)?e:[e]).forEach(e=>{P(this,G,`f`).config[e]=n||!0}),this)}completion(e,t,n){return M(`[string] [string|boolean|function] [function]`,[e,t,n],arguments.length),typeof t==`function`&&(n=t,t=void 0),N(this,L,e||P(this,L,`f`)||`completion`,`f`),!t&&t!==!1&&(t=`generate completion script`),this.command(P(this,L,`f`),t),n&&P(this,I,`f`).registerFunction(n),this}command(e,t,n,r,i,a){return M(`<string|array|object> [string|boolean] [function|object] [function] [array] [boolean|string]`,[e,t,n,r,i,a],arguments.length),P(this,F,`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){M(`<string> [object]`,[e,t],arguments.length);let n=P(this,gn,`f`)||P(this,J,`f`).require;return P(this,F,`f`).addDirectory(e,n,P(this,J,`f`).getCallerFile(),t),this}count(e){return M(`<array|string>`,[e],arguments.length),this[Q](`count`,e),this[sr](e),this}default(e,t,n){return M(`<object|string|array> [*] [string]`,[e,t,n],arguments.length),n&&(xt(e,P(this,J,`f`)),P(this,G,`f`).defaultDescription[e]=n),typeof t==`function`&&(xt(e,P(this,J,`f`)),P(this,G,`f`).defaultDescription[e]||(P(this,G,`f`).defaultDescription[e]=P(this,Y,`f`).functionDescription(t)),t=t.call()),this[zn](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 M(`[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),P(this,G,`f`).demandedCommands._={min:e,max:t,minMsg:n,maxMsg:r},this}demand(e,t,n){return Array.isArray(t)?(t.forEach(e=>{k(n,!0,P(this,J,`f`)),this.demandOption(e,n)}),t=1/0):typeof t!=`number`&&(n=t,t=1/0),typeof e==`number`?(k(n,!0,P(this,J,`f`)),this.demandCommand(e,t,n,n)):Array.isArray(e)?e.forEach(e=>{k(n,!0,P(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 M(`<object|string|array> [string]`,[e,t],arguments.length),this[zn](this.demandOption.bind(this),`demandedOptions`,e,t),this}deprecateOption(e,t){return M(`<string> [string|boolean]`,[e,t],arguments.length),P(this,G,`f`).deprecatedOptions[e]=t,this}describe(e,t){return M(`<object|string|array> [string]`,[e,t],arguments.length),this[Un](e,!0),P(this,Y,`f`).describe(e,t),this}detectLocale(e){return M(`<boolean>`,[e],arguments.length),N(this,dn,e,`f`),this}env(e){return M(`[string|boolean]`,[e],arguments.length),e===!1?delete P(this,G,`f`).envPrefix:P(this,G,`f`).envPrefix=e||``,this}epilogue(e){return M(`<string>`,[e],arguments.length),P(this,Y,`f`).epilog(e),this}epilog(e){return this.epilogue(e)}example(e,t){return M(`<string|array> [string]`,[e,t],arguments.length),Array.isArray(e)?e.forEach(e=>this.example(...e)):P(this,Y,`f`).example(e,t),this}exit(e,t){N(this,H,!0,`f`),N(this,R,t,`f`),P(this,z,`f`)&&P(this,J,`f`).process.exit(e)}exitProcess(e=!0){return M(`[boolean]`,[e],arguments.length),N(this,z,e,`f`),this}fail(e){if(M(`<function|boolean>`,[e],arguments.length),typeof e==`boolean`&&e!==!1)throw new j(`Invalid first argument. Expected function or boolean 'false'`);return P(this,Y,`f`).failFn(e),this}getAliases(){return this.parsed?this.parsed.aliases:{}}async getCompletion(e,t){return M(`<array> [function]`,[e,t],arguments.length),t?P(this,I,`f`).getCompletion(e,t):new Promise((t,n)=>{P(this,I,`f`).getCompletion(e,(e,r)=>{e?n(e):t(r)})})}getDemandedOptions(){return M([],0),P(this,G,`f`).demandedOptions}getDemandedCommands(){return M([],0),P(this,G,`f`).demandedCommands}getDeprecatedOptions(){return M([],0),P(this,G,`f`).deprecatedOptions}getDetectLocale(){return P(this,dn,`f`)}getExitProcess(){return P(this,z,`f`)}getGroups(){return Object.assign({},P(this,V,`f`),P(this,bn,`f`))}getHelp(){if(N(this,H,!0,`f`),!P(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let e=this[ir](P(this,q,`f`),void 0,void 0,0,!0);if(A(e))return e.then(()=>P(this,Y,`f`).help())}let e=P(this,F,`f`).runDefaultBuilderOn(this);if(A(e))return e.then(()=>P(this,Y,`f`).help())}return Promise.resolve(P(this,Y,`f`).help())}getOptions(){return P(this,G,`f`)}getStrict(){return P(this,Sn,`f`)}getStrictCommands(){return P(this,Cn,`f`)}getStrictOptions(){return P(this,wn,`f`)}global(e,t){return M(`<string|array> [boolean]`,[e,t],arguments.length),e=[].concat(e),t===!1?e.forEach(e=>{P(this,G,`f`).local.includes(e)||P(this,G,`f`).local.push(e)}):P(this,G,`f`).local=P(this,G,`f`).local.filter(t=>e.indexOf(t)===-1),this}group(e,t){M(`<string|array> <string>`,[e,t],arguments.length);let n=P(this,bn,`f`)[t]||P(this,V,`f`)[t];P(this,bn,`f`)[t]&&delete P(this,bn,`f`)[t];let r={};return P(this,V,`f`)[t]=(n||[]).concat(e).filter(e=>r[e]?!1:r[e]=!0),this}hide(e){return M(`<string>`,[e],arguments.length),P(this,G,`f`).hiddenOptions.push(e),this}implies(e,t){return M(`<string|object> [number|string|array]`,[e,t],arguments.length),P(this,Z,`f`).implies(e,t),this}locale(e){return M(`[string]`,[e],arguments.length),e===void 0?(this[Fn](),P(this,J,`f`).y18n.getLocale()):(N(this,dn,!1,`f`),P(this,J,`f`).y18n.setLocale(e),this)}middleware(e,t,n){return P(this,B,`f`).addMiddleware(e,!!t,n)}nargs(e,t){return M(`<string|object|array> [number]`,[e,t],arguments.length),this[zn](this.nargs.bind(this),`narg`,e,t),this}normalize(e){return M(`<array|string>`,[e],arguments.length),this[Q](`normalize`,e),this}number(e){return M(`<array|string>`,[e],arguments.length),this[Q](`number`,e),this[sr](e),this}option(e,t){if(M(`<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[sr](e),P(this,X,`f`)&&(e===`version`||t?.alias===`version`)&&this[An]([`"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`),P(this,G,`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&&(P(this,G,`f`).defaultDescription[e]=t.defaultDescription),t.skipValidation&&this.skipValidation(e);let i=t.describe||t.description||t.desc,a=P(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){M(`[string|array] [function|boolean|object] [function]`,[e,t,n],arguments.length),this[jn](),e===void 0&&(e=P(this,q,`f`)),typeof t==`object`&&(N(this,vn,t,`f`),t=n),typeof t==`function`&&(N(this,K,t,`f`),t=!1),t||N(this,q,e,`f`),P(this,K,`f`)&&N(this,z,!1,`f`);let r=this[ir](e,!!t),i=this.parsed;return P(this,I,`f`).setParsed(this.parsed),A(r)?r.then(e=>(P(this,K,`f`)&&P(this,K,`f`).call(this,P(this,R,`f`),e,P(this,W,`f`)),e)).catch(e=>{throw P(this,K,`f`)&&P(this,K,`f`)(e,this.parsed.argv,P(this,W,`f`)),e}).finally(()=>{this[Wn](),this.parsed=i}):(P(this,K,`f`)&&P(this,K,`f`).call(this,P(this,R,`f`),r,P(this,W,`f`)),this[Wn](),this.parsed=i,r)}parseAsync(e,t,n){let r=this.parse(e,t,n);return A(r)?r:Promise.resolve(r)}parseSync(e,t,n){let r=this.parse(e,t,n);if(A(r))throw new j(`.parseSync() must not be used with asynchronous builders, handlers, or middleware`);return r}parserConfiguration(e){return M(`<object>`,[e],arguments.length),N(this,_n,e,`f`),this}pkgConf(e,t){M(`<string> [string]`,[e,t],arguments.length);let n=null,r=this[Rn](t||P(this,cn,`f`));return r[e]&&typeof r[e]==`object`&&(n=rn(r[e],t||P(this,cn,`f`),this[Nn]()[`deep-merge-config`]||!1,P(this,J,`f`)),P(this,G,`f`).configObjects=(P(this,G,`f`).configObjects||[]).concat(n)),this}positional(e,t){M(`<string> <object>`,[e,t],arguments.length);let n=[`default`,`defaultDescription`,`implies`,`normalize`,`choices`,`conflicts`,`coerce`,`type`,`describe`,`desc`,`description`,`alias`];t=Bt(t,(e,t)=>e===`type`&&![`string`,`number`,`boolean`].includes(t)?!1:n.includes(e));let r=P(this,ln,`f`).fullCommands[P(this,ln,`f`).fullCommands.length-1],i=r?P(this,F,`f`).cmdToParseOptions(r):{array:[],alias:{},default:{},demand:{}};return St(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,P(this,Y,`f`).getPositionalGroupName()),this.option(e,t)}recommendCommands(e=!0){return M(`[boolean]`,[e],arguments.length),N(this,xn,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 M(`<array|string|object> [number]`,[e],arguments.length),typeof e==`string`&&P(this,G,`f`).narg[e]||this[zn](this.requiresArg.bind(this),`narg`,e,NaN),this}showCompletionScript(e,t){return M(`[string] [string]`,[e,t],arguments.length),e||=this.$0,P(this,hn,`f`).log(P(this,I,`f`).generateCompletionScript(e,t||P(this,L,`f`)||`completion`)),this}showHelp(e){if(M(`[string|function]`,[e],arguments.length),N(this,H,!0,`f`),!P(this,Y,`f`).hasCachedHelpMessage()){if(!this.parsed){let t=this[ir](P(this,q,`f`),void 0,void 0,0,!0);if(A(t))return t.then(()=>{P(this,Y,`f`).showHelp(e)}),this}let t=P(this,F,`f`).runDefaultBuilderOn(this);if(A(t))return t.then(()=>{P(this,Y,`f`).showHelp(e)}),this}return P(this,Y,`f`).showHelp(e),this}scriptName(e){return this.customScriptName=!0,this.$0=e,this}showHelpOnFail(e,t){return M(`[boolean|string] [string]`,[e,t],arguments.length),P(this,Y,`f`).showHelpOnFail(e,t),this}showVersion(e){return M(`[string|function]`,[e],arguments.length),P(this,Y,`f`).showVersion(e),this}skipValidation(e){return M(`<array|string>`,[e],arguments.length),this[Q](`skipValidation`,e),this}strict(e){return M(`[boolean]`,[e],arguments.length),N(this,Sn,e!==!1,`f`),this}strictCommands(e){return M(`[boolean]`,[e],arguments.length),N(this,Cn,e!==!1,`f`),this}strictOptions(e){return M(`[boolean]`,[e],arguments.length),N(this,wn,e!==!1,`f`),this}string(e){return M(`<array|string>`,[e],arguments.length),this[Q](`string`,e),this[sr](e),this}terminalWidth(){return M([],0),P(this,J,`f`).process.stdColumns}updateLocale(e){return this.updateStrings(e)}updateStrings(e){return M(`<object>`,[e],arguments.length),N(this,dn,!1,`f`),P(this,J,`f`).y18n.updateLocale(e),this}usage(e,t,n,r){if(M(`<string|null|undefined> [string|boolean] [function|object] [function]`,[e,t,n,r],arguments.length),t!==void 0){if(k(e,null,P(this,J,`f`)),(e||``).match(/^\$0( |$)/))return this.command(e,t,n,r);throw new j(`.usage() description must start with $0 if being used as alias for .command()`)}else return P(this,Y,`f`).usage(e),this}usageConfiguration(e){return M(`<object>`,[e],arguments.length),N(this,Tn,e,`f`),this}version(e,t,n){let r=`version`;if(M(`[boolean|string] [string] [string]`,[e,t,n],arguments.length),P(this,X,`f`)&&(this[kn](P(this,X,`f`)),P(this,Y,`f`).version(void 0),N(this,X,null,`f`)),arguments.length===0)n=this[In](),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 N(this,X,typeof e==`string`?e:r,`f`),t||=P(this,Y,`f`).deferY18nLookup(`Show version number`),P(this,Y,`f`).version(n||void 0),this.boolean(P(this,X,`f`)),this.describe(P(this,X,`f`),t),this}wrap(e){return M(`<number|null|undefined>`,[e],arguments.length),P(this,Y,`f`).wrap(e),this}[(F=new WeakMap,cn=new WeakMap,ln=new WeakMap,I=new WeakMap,L=new WeakMap,un=new WeakMap,R=new WeakMap,dn=new WeakMap,fn=new WeakMap,z=new WeakMap,pn=new WeakMap,B=new WeakMap,V=new WeakMap,H=new WeakMap,U=new WeakMap,mn=new WeakMap,hn=new WeakMap,W=new WeakMap,G=new WeakMap,gn=new WeakMap,_n=new WeakMap,K=new WeakMap,vn=new WeakMap,yn=new WeakMap,bn=new WeakMap,q=new WeakMap,xn=new WeakMap,J=new WeakMap,Sn=new WeakMap,Cn=new WeakMap,wn=new WeakMap,Y=new WeakMap,Tn=new WeakMap,X=new WeakMap,Z=new WeakMap,Dn)](e){if(!e._||!e[`--`])return e;e._.push.apply(e._,e[`--`]);try{delete e[`--`]}catch{}return e}[On](){return{log:(...e)=>{this[$n]()||console.log(...e),N(this,H,!0,`f`),P(this,W,`f`).length&&N(this,W,P(this,W,`f`)+`
|
|
97
97
|
`,`f`),N(this,W,P(this,W,`f`)+e.join(` `),`f`)},error:(...e)=>{this[$n]()||console.error(...e),N(this,H,!0,`f`),P(this,W,`f`).length&&N(this,W,P(this,W,`f`)+`
|
|
98
|
-
`,`f`),N(this,W,P(this,W,`f`)+e.join(` `),`f`)}}}[kn](e){St(P(this,G,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=P(this,G,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete P(this,Y,`f`).getDescriptions()[e]}[An](e,t,n){P(this,fn,`f`)[n]||(P(this,J,`f`).process.emitWarning(e,t),P(this,fn,`f`)[n]=!0)}[jn](){P(this,pn,`f`).push({options:P(this,G,`f`),configObjects:P(this,G,`f`).configObjects.slice(0),exitProcess:P(this,z,`f`),groups:P(this,V,`f`),strict:P(this,Sn,`f`),strictCommands:P(this,Cn,`f`),strictOptions:P(this,wn,`f`),completionCommand:P(this,L,`f`),output:P(this,W,`f`),exitError:P(this,R,`f`),hasOutput:P(this,H,`f`),parsed:this.parsed,parseFn:P(this,K,`f`),parseContext:P(this,vn,`f`)}),P(this,Y,`f`).freeze(),P(this,Z,`f`).freeze(),P(this,F,`f`).freeze(),P(this,B,`f`).freeze()}[Mn](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(P(this,J,`f`).process.argv()[0])?P(this,J,`f`).process.argv().slice(1,2):P(this,J,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[nr](P(this,cn,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),P(this,J,`f`).getEnv(`_`)&&P(this,J,`f`).getProcessArgvBin()===P(this,J,`f`).getEnv(`_`)&&(e=P(this,J,`f`).getEnv(`_`).replace(`${P(this,J,`f`).path.dirname(P(this,J,`f`).process.execPath())}/`,``)),e}[Nn](){return P(this,_n,`f`)}[Pn](){return P(this,Tn,`f`)}[Fn](){if(!P(this,dn,`f`))return;let e=P(this,J,`f`).getEnv(`LC_ALL`)||P(this,J,`f`).getEnv(`LC_MESSAGES`)||P(this,J,`f`).getEnv(`LANG`)||P(this,J,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[In](){return this[Rn]().version||`unknown`}[Ln](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)P(this,J,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Rn](e){let t=e||`*`;if(P(this,yn,`f`)[t])return P(this,yn,`f`)[t];let n={};try{let t=e||P(this,J,`f`).mainFilename;P(this,J,`f`).path.extname(t)&&(t=P(this,J,`f`).path.dirname(t));let r=P(this,J,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});k(r,void 0,P(this,J,`f`)),n=JSON.parse(P(this,J,`f`).readFileSync(r,`utf8`))}catch{}return P(this,yn,`f`)[t]=n||{},P(this,yn,`f`)[t]}[Q](e,t){t=[].concat(t),t.forEach(t=>{t=this[Hn](t),P(this,G,`f`)[e].push(t)})}[zn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=n})}[Bn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=(P(this,G,`f`)[e][t]||[]).concat(n)})}[Vn](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 St(n))e(t,n[t]);else i(t,this[Hn](n),r)}[Hn](e){return e===`__proto__`?`___proto___`:e}[Un](e,t){return this[zn](this[Un].bind(this),`key`,e,t),this}[Wn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=P(this,pn,`f`).pop();k(f,void 0,P(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){N(e,G,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){N(t,z,e,`f`)}}.value,groups:{set value(e){N(n,V,e,`f`)}}.value,output:{set value(e){N(r,W,e,`f`)}}.value,exitError:{set value(e){N(i,R,e,`f`)}}.value,hasOutput:{set value(e){N(a,H,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){N(o,Sn,e,`f`)}}.value,strictCommands:{set value(e){N(s,Cn,e,`f`)}}.value,strictOptions:{set value(e){N(c,wn,e,`f`)}}.value,completionCommand:{set value(e){N(l,L,e,`f`)}}.value,parseFn:{set value(e){N(u,K,e,`f`)}}.value,parseContext:{set value(e){N(d,vn,e,`f`)}}.value}=f,P(this,G,`f`).configObjects=p,P(this,Y,`f`).unfreeze(),P(this,Z,`f`).unfreeze(),P(this,F,`f`).unfreeze(),P(this,B,`f`).unfreeze()}[Gn](e,t){return At(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Kn].bind(this),getContext:this[qn].bind(this),getHasOutput:this[Jn].bind(this),getLoggerInstance:this[Yn].bind(this),getParseContext:this[Xn].bind(this),getParserConfiguration:this[Nn].bind(this),getUsageConfiguration:this[Pn].bind(this),getUsageInstance:this[Zn].bind(this),getValidationInstance:this[Qn].bind(this),hasParseCallback:this[$n].bind(this),isGlobalContext:this[er].bind(this),postProcess:this[tr].bind(this),reset:this[rr].bind(this),runValidation:this[ar].bind(this),runYargsParserAndExecuteCommands:this[ir].bind(this),setHasOutput:this[or].bind(this)}}[Kn](){return P(this,F,`f`)}[qn](){return P(this,ln,`f`)}[Jn](){return P(this,H,`f`)}[Yn](){return P(this,hn,`f`)}[Xn](){return P(this,vn,`f`)||{}}[Zn](){return P(this,Y,`f`)}[Qn](){return P(this,Z,`f`)}[$n](){return!!P(this,K,`f`)}[er](){return P(this,mn,`f`)}[tr](e,t,n,r){return n||A(e)?e:(t||(e=this[Dn](e)),(this[Nn]()[`parse-positional-numbers`]||this[Nn]()[`parse-positional-numbers`]===void 0)&&(e=this[Ln](e)),r&&(e=kt(e,this,P(this,B,`f`).getMiddleware(),!1)),e)}[rr](e={}){N(this,G,P(this,G,`f`)||{},`f`);let t={};t.local=P(this,G,`f`).local||[],t.configObjects=P(this,G,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(P(this,bn,`f`),Object.keys(P(this,V,`f`)).reduce((e,t)=>{let r=P(this,V,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),N(this,V,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(P(this,G,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=Bt(P(this,G,`f`)[e],e=>!n[e])}),t.envPrefix=P(this,G,`f`).envPrefix,N(this,G,t,`f`),N(this,Y,P(this,Y,`f`)?P(this,Y,`f`).reset(n):Ut(this,P(this,J,`f`)),`f`),N(this,Z,P(this,Z,`f`)?P(this,Z,`f`).reset(n):en(this,P(this,Y,`f`),P(this,J,`f`)),`f`),N(this,F,P(this,F,`f`)?P(this,F,`f`).reset():Pt(P(this,Y,`f`),P(this,Z,`f`),P(this,B,`f`),P(this,J,`f`)),`f`),P(this,I,`f`)||N(this,I,Yt(this,P(this,Y,`f`),P(this,F,`f`),P(this,J,`f`)),`f`),P(this,B,`f`).reset(),N(this,L,null,`f`),N(this,W,``,`f`),N(this,R,null,`f`),N(this,H,!1,`f`),this.parsed=!1,this}[nr](e,t){return P(this,J,`f`).path.relative(e,t)}[ir](e,t,n,r=0,i=!1){let a=!!n||i;e||=P(this,q,`f`),P(this,G,`f`).__=P(this,J,`f`).y18n.__,P(this,G,`f`).configuration=this[Nn]();let o=!!P(this,G,`f`).configuration[`populate--`],s=Object.assign({},P(this,G,`f`).configuration,{"populate--":!0}),c=P(this,J,`f`).Parser.detailed(e,Object.assign({},P(this,G,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,P(this,vn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===P(this,U,`f`)&&l[e]?f=!0:e===P(this,X,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&P(this,Y,`f`).clearCachedHelpMessage();try{if(this[Fn](),t)return this[tr](l,o,!!n,!1);P(this,U,`f`)&&[P(this,U,`f`)].concat(d[P(this,U,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),N(this,mn,!1,`f`);let s=P(this,F,`f`).getCommands(),m=P(this,I,`f`)?.completionKey?[P(this,I,`f`)?.completionKey,...this.getAliases()[P(this,I,`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!==P(this,L,`f`)){let e=P(this,F,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[tr](e,o,!!n,!1)}else if(!e&&a!==P(this,L,`f`)){e=a;break}!P(this,F,`f`).hasDefaultCommand()&&P(this,xn,`f`)&&e&&!h&&P(this,Z,`f`).recommendCommands(e,s)}P(this,L,`f`)&&l._.includes(P(this,L,`f`))&&!m&&(P(this,z,`f`)&&Vt(!0),this.showCompletionScript(),this.exit(0))}if(P(this,F,`f`).hasDefaultCommand()&&!h){let e=P(this,F,`f`).runCommand(null,this,c,0,i,f||p||i);return this[tr](e,o,!!n,!1)}if(m){P(this,z,`f`)&&Vt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${P(this,I,`f`).completionKey}`)+1);return P(this,I,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{P(this,hn,`f`).log(e)}),this.exit(0)}),this[tr](l,!o,!!n,!1)}if(P(this,H,`f`)||(f?(P(this,z,`f`)&&Vt(!0),a=!0,this.showHelp(e=>{P(this,hn,`f`).log(e),this.exit(0)})):p&&(P(this,z,`f`)&&Vt(!0),a=!0,P(this,Y,`f`).showVersion(`log`),this.exit(0))),!a&&P(this,G,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>P(this,G,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[ar](d,{},c.error);n||(u=kt(l,this,P(this,B,`f`).getMiddleware(),!0)),u=this[Gn](e,u??l),A(u)&&!n&&(u=u.then(()=>kt(l,this,P(this,B,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)P(this,Y,`f`).fail(e.message,e);else throw e}return this[tr](u??l,o,!!n,!0)}[ar](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);P(this,Z,`f`).nonOptionCount(a),P(this,Z,`f`).requiredArguments(a,i);let o=!1;P(this,Cn,`f`)&&(o=P(this,Z,`f`).unknownCommands(a)),P(this,Sn,`f`)&&!o?P(this,Z,`f`).unknownArguments(a,e,t,!!r):P(this,wn,`f`)&&P(this,Z,`f`).unknownArguments(a,e,{},!1,!1),P(this,Z,`f`).limitedChoices(a),P(this,Z,`f`).implications(a),P(this,Z,`f`).conflicting(a)}}[or](){N(this,H,!0,`f`)}[sr](e){if(typeof e==`string`)P(this,G,`f`).key[e]=!0;else for(let t of e)P(this,G,`f`).key[t]=!0}};function lr(e){return!!e&&typeof e.getInternalMethods==`function`}const ur=En(bt);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 dr=[{command:$(`abuse-reports`,`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,()=>import(`./abuse-reports-DnNvw2gG.mjs`)),hideCommand:!0},{command:$(`access`,`access`,()=>import(`./access-RbqBFrSC.mjs`)),hideCommand:!0},{command:$(`account`,`account`,()=>import(`./account-D7xvYqDx.mjs`)),hideCommand:!1},{command:$(`account-tags`,`account-tags`,()=>import(`./account-tags-CKRh1jra.mjs`)),hideCommand:!0},{command:$(`accounts`,`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,()=>import(`./accounts-2pGhN4s8.mjs`)),hideCommand:!1},{command:$(`acm`,`acm`,()=>import(`./acm-Szq4CoQN.mjs`)),hideCommand:!0},{command:$(`addressing`,`addressing`,()=>import(`./addressing-CgTTbuCF.mjs`)),hideCommand:!0},{command:$(`agent-memory`,`agent-memory`,()=>import(`./agent-memory-C8pT01pR.mjs`)),hideCommand:!1},{command:$(`ai`,`ai`,()=>import(`./ai-Cn0BniR4.mjs`)),hideCommand:!1},{command:$(`ai-audit`,`ai-audit`,()=>import(`./ai-audit-CCygMmsh.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-D4tATNRV.mjs`)),hideCommand:!1},{command:$(`ai-search`,`Managed search-as-a-service: crawl, index, and query content with AI-powered relevance and chat completions`,()=>import(`./ai-search-2xP8FP_W.mjs`)),hideCommand:!1},{command:$(`ai-security`,`Detect prompt injection, PII, and unsafe topics in traffic to your AI applications`,()=>import(`./ai-security-AUfzagSE.mjs`)),hideCommand:!0},{command:$(`alerting`,`alerting`,()=>import(`./alerting-DbXVpGv3.mjs`)),hideCommand:!0},{command:$(`alerts`,`alerts`,()=>import(`./alerts-B85uj2Vx.mjs`)),hideCommand:!0},{command:$(`analytics`,`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,()=>import(`./analytics-UQrIx99t.mjs`)),hideCommand:!1},{command:$(`analytics_engine`,`analytics_engine`,()=>import(`./analytics_engine-B_bMbfxW.mjs`)),hideCommand:!0},{command:$(`api-security`,`api-security`,()=>import(`./api-security-pSJdgmtK.mjs`)),hideCommand:!0},{command:$(`argo`,`argo`,()=>import(`./argo-Br60zF3y.mjs`)),hideCommand:!0},{command:$(`artifacts`,`artifacts`,()=>import(`./artifacts-D8HMRQmb.mjs`)),hideCommand:!0},{command:$(`audit-logs`,`audit-logs`,()=>import(`./audit-logs-BIHP5-rk.mjs`)),hideCommand:!0},{command:$(`autorag`,`autorag`,()=>import(`./autorag-Do9l_LyY.mjs`)),hideCommand:!0},{command:$(`billing`,`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,()=>import(`./billing-0RNCYBJM.mjs`)),hideCommand:!1},{command:$(`bot-management`,`bot-management`,()=>import(`./bot-management-uhBRnSPl.mjs`)),hideCommand:!0},{command:$(`botnet-feed`,`botnet-feed`,()=>import(`./botnet-feed-DEbMknrE.mjs`)),hideCommand:!0},{command:$(`brand-protection`,`brand-protection`,()=>import(`./brand-protection-DY2qPL8d.mjs`)),hideCommand:!0},{command:$(`brands`,`brands`,()=>import(`./brands-DateHCdd.mjs`)),hideCommand:!0},{command:$(`browser-extension`,`browser-extension`,()=>import(`./browser-extension-DBsmLCUj.mjs`)),hideCommand:!1},{command:$(`browser-run`,`browser-run`,()=>import(`./browser-run-C5pYOwtf.mjs`)),hideCommand:!0},{command:$(`cache`,`cache`,()=>import(`./cache-BgRIDcFJ.mjs`)),hideCommand:!1},{command:$(`calls`,`Real-time audio/video communication infrastructure — SFU apps for WebRTC and TURN relay keys`,()=>import(`./calls-JrRne0U0.mjs`)),hideCommand:!0},{command:$(`certificate-authorities`,`certificate-authorities`,()=>import(`./certificate-authorities-BJ7W8GGQ.mjs`)),hideCommand:!0},{command:$(`clear`,`clear`,()=>import(`./clear-CB2kgcEB.mjs`)),hideCommand:!0},{command:$(`client-certificates`,`client-certificates`,()=>import(`./client-certificates-6xxvcOgI.mjs`)),hideCommand:!0},{command:$(`client-side-security`,`Client-Side Security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks`,()=>import(`./client-side-security-cU0Z1tql.mjs`)),hideCommand:!0},{command:$(`cloud-connector`,`Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers`,()=>import(`./cloud-connector-DFooSAcn.mjs`)),hideCommand:!1},{command:$(`cloudforce-one`,`Detection rule management APIs`,()=>import(`./cloudforce-one-Cp4bQmrG.mjs`)),hideCommand:!1},{command:$(`connector-interrupts`,`connector-interrupts`,()=>import(`./connector-interrupts-BR47snkh.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-events`,`connector-telemetry-events`,()=>import(`./connector-telemetry-events-CTMmX2BA.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-snapshots`,`connector-telemetry-snapshots`,()=>import(`./connector-telemetry-snapshots-5Y7m8Cw8.mjs`)),hideCommand:!0},{command:$(`connectors`,`connectors`,()=>import(`./connectors-BRCQSsos.mjs`)),hideCommand:!0},{command:$(`containers`,`Deploy and manage Containers applications on Cloudflare's global network`,()=>import(`./containers-CfKOM_f5.mjs`)),hideCommand:!1},{command:$(`content-scan`,`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,()=>import(`./content-scan-CB4xHGv1.mjs`)),hideCommand:!0},{command:$(`csamScanner`,`csamScanner`,()=>import(`./csamScanner-AQo_QTlq.mjs`)),hideCommand:!0},{command:$(`ct-alerting`,`ct-alerting`,()=>import(`./ct-alerting-Bai-1Z3k.mjs`)),hideCommand:!0},{command:$(`custom-certificates`,`custom-certificates`,()=>import(`./custom-certificates-D6aQIGu2.mjs`)),hideCommand:!0},{command:$(`custom-csrs`,`custom-csrs`,()=>import(`./custom-csrs-D0zBkQT5.mjs`)),hideCommand:!0},{command:$(`custom-hostnames`,`custom-hostnames`,()=>import(`./custom-hostnames-BiOVGwnR.mjs`)),hideCommand:!0},{command:$(`custom-nameservers`,`custom-nameservers`,()=>import(`./custom-nameservers-G2MWpRwY.mjs`)),hideCommand:!0},{command:$(`custom-pages`,`Custom error and challenge pages (1000s, WAF blocks, captchas) for zones and accounts`,()=>import(`./custom-pages-BINNZTds.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-FmAh7T7l.mjs`)),hideCommand:!0},{command:$(`data-security`,`data-security`,()=>import(`./data-security-2fmzF_Me.mjs`)),hideCommand:!1},{command:$(`dcv-delegation`,`dcv-delegation`,()=>import(`./dcv-delegation-Cmxxgi9V.mjs`)),hideCommand:!0},{command:$(`diagnostics`,`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,()=>import(`./diagnostics-Ca6r_972.mjs`)),hideCommand:!0},{command:$(`directory`,`directory`,()=>import(`./directory-CGNWfVQc.mjs`)),hideCommand:!0},{command:$(`dispatch-namespaces`,`dispatch-namespaces`,()=>import(`./dispatch-namespaces-CBo5kuf7.mjs`)),hideCommand:!0},{command:$(`dls`,`dls`,()=>import(`./dls-CobKlH4N.mjs`)),hideCommand:!0},{command:$(`dns`,`dns`,()=>import(`./dns-OfJXNYkK.mjs`)),hideCommand:!1},{command:$(`dns-firewall`,`dns-firewall`,()=>import(`./dns-firewall-DZ2ij-nX.mjs`)),hideCommand:!0},{command:$(`domain-info`,`domain-info`,()=>import(`./domain-info-DJHEt8JJ.mjs`)),hideCommand:!0},{command:$(`durable-objects`,`durable-objects`,()=>import(`./durable-objects-Cw_y37WB.mjs`)),hideCommand:!0},{command:$(`email`,`email`,()=>import(`./email-CGOC_evd.mjs`)),hideCommand:!0},{command:$(`email-auth`,`email-auth`,()=>import(`./email-auth-DuJHdiwN.mjs`)),hideCommand:!0},{command:$(`email-routing`,`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,()=>import(`./email-routing-CRvIUSFm.mjs`)),hideCommand:!0},{command:$(`email-security`,`Cloud email security — investigate threats, manage allow/block policies, and detect phishing`,()=>import(`./email-security-D-P8ln2L.mjs`)),hideCommand:!0},{command:$(`email-sending`,`Send emails and manage sending subdomains`,()=>import(`./email-sending-BwRN8PMW.mjs`)),hideCommand:!1},{command:$(`filters`,`Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations`,()=>import(`./filters-DczM8qpH.mjs`)),hideCommand:!0},{command:$(`firewall`,`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,()=>import(`./firewall-BMiETRmM.mjs`)),hideCommand:!0},{command:$(`flagship`,`flagship`,()=>import(`./flagship-CPkQMist.mjs`)),hideCommand:!0},{command:$(`fraud`,`fraud`,()=>import(`./fraud-BhX0QNUl.mjs`)),hideCommand:!0},{command:$(`google-tag-gateway`,`Google Tag Gateway operations`,()=>import(`./google-tag-gateway-CDtRxao4.mjs`)),hideCommand:!0},{command:$(`health`,`health`,()=>import(`./health-buY5f5pp.mjs`)),hideCommand:!0},{command:$(`healthchecks`,`Standalone health checks that monitor origin server availability from Cloudflare's edge`,()=>import(`./healthchecks-D2WwALvQ.mjs`)),hideCommand:!0},{command:$(`hostnames`,`hostnames`,()=>import(`./hostnames-CGAFkYT1.mjs`)),hideCommand:!0},{command:$(`hyperdrive`,`Accelerate access to existing databases by caching queries and pooling connections at the edge`,()=>import(`./hyperdrive-zLFPWFQj.mjs`)),hideCommand:!1},{command:$(`iam`,`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,()=>import(`./iam-Su_hpatD.mjs`)),hideCommand:!0},{command:$(`images`,`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,()=>import(`./images-D2ZflvBi.mjs`)),hideCommand:!1},{command:$(`intel`,`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,()=>import(`./intel-DPGzVovJ.mjs`)),hideCommand:!1},{command:$(`internal`,`internal`,()=>import(`./internal-CwyoJUHh.mjs`)),hideCommand:!0},{command:$(`ips`,`ips`,()=>import(`./ips-C5-NH1b0.mjs`)),hideCommand:!0},{command:$(`keyless-certificates`,`keyless-certificates`,()=>import(`./keyless-certificates-Xx-oAN3Z.mjs`)),hideCommand:!0},{command:$(`keys`,`keys`,()=>import(`./keys-B0FBtlOD.mjs`)),hideCommand:!0},{command:$(`kv`,`kv`,()=>import(`./kv-BbZ9st5o.mjs`)),hideCommand:!0},{command:$(`leaked-credential-checks`,`Detect compromised credentials in login requests by checking against known breach databases`,()=>import(`./leaked-credential-checks-Vonw4inx.mjs`)),hideCommand:!0},{command:$(`live`,`live`,()=>import(`./live-wEpA5V_n.mjs`)),hideCommand:!0},{command:$(`load-balancers`,`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,()=>import(`./load-balancers-Ct5cyyF9.mjs`)),hideCommand:!0},{command:$(`logexplorer`,`logexplorer`,()=>import(`./logexplorer-BhsAWxCr.mjs`)),hideCommand:!0},{command:$(`logo-matches`,`logo-matches`,()=>import(`./logo-matches-oHYc8Xaz.mjs`)),hideCommand:!0},{command:$(`logos`,`logos`,()=>import(`./logos-DS0krPAz.mjs`)),hideCommand:!0},{command:$(`logpush`,`logpush`,()=>import(`./logpush-CFQBi88z.mjs`)),hideCommand:!0},{command:$(`logs`,`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,()=>import(`./logs-C07M9zn-.mjs`)),hideCommand:!0},{command:$(`magic-cloud-networking`,`magic-cloud-networking`,()=>import(`./magic-cloud-networking-ZPEK7O5I.mjs`)),hideCommand:!0},{command:$(`magic-network-monitoring`,`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,()=>import(`./magic-network-monitoring-CY3CHSpX.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-CgPZ8iMn.mjs`)),hideCommand:!0},{command:$(`managed-transforms`,`managed-transforms`,()=>import(`./managed-transforms-2XyQ14s3.mjs`)),hideCommand:!0},{command:$(`matches`,`matches`,()=>import(`./matches-CIaCrdrs.mjs`)),hideCommand:!0},{command:$(`mcp`,`mcp`,()=>import(`./mcp-D2afM8MD.mjs`)),hideCommand:!0},{command:$(`media`,`media`,()=>import(`./media-CnxgOViL.mjs`)),hideCommand:!1},{command:$(`mesh`,`mesh`,()=>import(`./mesh-DLNLi3UT.mjs`)),hideCommand:!0},{command:$(`moq`,`MoQ relays: provision a relay, then issue tokens for publishers and subscribers`,()=>import(`./moq-BBQVNGo1.mjs`)),hideCommand:!1},{command:$(`mtls-certificates`,`mtls-certificates`,()=>import(`./mtls-certificates-C5j0Gn65.mjs`)),hideCommand:!0},{command:$(`network`,`network`,()=>import(`./network-CmuJqtFJ.mjs`)),hideCommand:!0},{command:$(`network-interconnects`,`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,()=>import(`./network-interconnects-BlajBQqs.mjs`)),hideCommand:!0},{command:$(`oauth-clients`,`oauth-clients`,()=>import(`./oauth-clients-BSthfZP-.mjs`)),hideCommand:!0},{command:$(`oauth-scopes`,`oauth-scopes`,()=>import(`./oauth-scopes-ByUp5bLU.mjs`)),hideCommand:!0},{command:$(`observability`,`observability`,()=>import(`./observability-B5p3iwrq.mjs`)),hideCommand:!1},{command:$(`organization`,`organization`,()=>import(`./organization-DQIfNVCT.mjs`)),hideCommand:!1},{command:$(`organizations`,`Multi-user organizations that group accounts, members, and shared settings under a single entity`,()=>import(`./organizations-L_ycAy6r.mjs`)),hideCommand:!1},{command:$(`origin-ca-certificates`,`origin-ca-certificates`,()=>import(`./origin-ca-certificates-opIcs3_Q.mjs`)),hideCommand:!0},{command:$(`origin-post-quantum-encryption`,`origin-post-quantum-encryption`,()=>import(`./origin-post-quantum-encryption-TSMXzoEL.mjs`)),hideCommand:!0},{command:$(`origin-tls-client-auth`,`origin-tls-client-auth`,()=>import(`./origin-tls-client-auth-5CtcPUR6.mjs`)),hideCommand:!0},{command:$(`page-rules`,`page-rules`,()=>import(`./page-rules-DPd1Y3IL.mjs`)),hideCommand:!0},{command:$(`pages`,`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,()=>import(`./pages-CskAn5mR.mjs`)),hideCommand:!0},{command:$(`pay-per-crawl`,`pay-per-crawl`,()=>import(`./pay-per-crawl-BMa_V40s.mjs`)),hideCommand:!1},{command:$(`pipelines`,`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,()=>import(`./pipelines-BbJjj1ZQ.mjs`)),hideCommand:!1},{command:$(`precursor`,`Precursor settings for a zone`,()=>import(`./precursor-DgRWBN9_.mjs`)),hideCommand:!0},{command:$(`queries`,`queries`,()=>import(`./queries-DrqcK0ZX.mjs`)),hideCommand:!0},{command:$(`queues`,`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,()=>import(`./queues-CutvMZcc.mjs`)),hideCommand:!0},{command:$(`r2`,`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,()=>import(`./r2-sFI62vhq.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-3vzU6FE1.mjs`)),hideCommand:!0},{command:$(`radar`,`Internet-wide traffic intelligence — BGP, DNS, HTTP trends, attack data, and network quality insights`,()=>import(`./radar-Cu9rsTw_.mjs`)),hideCommand:!0},{command:$(`rate-limit-analytics`,`rate-limit-analytics`,()=>import(`./rate-limit-analytics-Bf1uT0lT.mjs`)),hideCommand:!1},{command:$(`rate-limits`,`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,()=>import(`./rate-limits-HRZ8zMSl.mjs`)),hideCommand:!0},{command:$(`ready`,`ready`,()=>import(`./ready-CBSCPiHE.mjs`)),hideCommand:!0},{command:$(`realtimekit`,`SDK-backed meetings, participants, recordings, livestreams, and webhooks`,()=>import(`./realtimekit-msnGHBbf.mjs`)),hideCommand:!1},{command:$(`recent-submissions`,`recent-submissions`,()=>import(`./recent-submissions-Dpmq1f7z.mjs`)),hideCommand:!0},{command:$(`refute`,`refute`,()=>import(`./refute-u7ZPQJZy.mjs`)),hideCommand:!0},{command:$(`registrar`,`registrar`,()=>import(`./registrar-C0EsXf83.mjs`)),hideCommand:!0},{command:$(`registrar-sandbox`,`registrar-sandbox`,()=>import(`./registrar-sandbox-CR9Rr7jV.mjs`)),hideCommand:!0},{command:$(`reporting`,`reporting`,()=>import(`./reporting-BB6sqe6r.mjs`)),hideCommand:!1},{command:$(`request-tracers`,`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,()=>import(`./request-tracers-BrsM3zXZ.mjs`)),hideCommand:!0},{command:$(`resource-sharing`,`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,()=>import(`./resource-sharing-CusU3kiy.mjs`)),hideCommand:!1},{command:$(`resource-tagging`,`resource-tagging`,()=>import(`./resource-tagging-wXAcblmz.mjs`)),hideCommand:!0},{command:$(`rules`,`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,()=>import(`./rules-C2BxykEe.mjs`)),hideCommand:!0},{command:$(`rulesets`,`rulesets`,()=>import(`./rulesets-BHvhAeG_.mjs`)),hideCommand:!0},{command:$(`rum`,`Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics`,()=>import(`./rum-Dyno5zj3.mjs`)),hideCommand:!0},{command:$(`scan-logo`,`scan-logo`,()=>import(`./scan-logo-Ba8WZAyp.mjs`)),hideCommand:!0},{command:$(`scan-page`,`scan-page`,()=>import(`./scan-page-Bcq3Ei86.mjs`)),hideCommand:!0},{command:$(`scim`,`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,()=>import(`./scim-Bb2xHpIz.mjs`)),hideCommand:!0},{command:$(`search`,`search`,()=>import(`./search-D9WDwnV4.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-BMhjbceW.mjs`)),hideCommand:!0},{command:$(`security-center`,`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,()=>import(`./security-center-DRC4Mf3R.mjs`)),hideCommand:!1},{command:$(`security-txt`,`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,()=>import(`./security-txt-Bh_2gymk.mjs`)),hideCommand:!0},{command:$(`share`,`share`,()=>import(`./share-DfTpOxhk.mjs`)),hideCommand:!1},{command:$(`signed-url`,`signed-url`,()=>import(`./signed-url-CjPbG5zV.mjs`)),hideCommand:!0},{command:$(`smart-shield`,`smart-shield`,()=>import(`./smart-shield-rHn-Lckq.mjs`)),hideCommand:!0},{command:$(`snippets`,`snippets`,()=>import(`./snippets-nSLwH8uJ.mjs`)),hideCommand:!1},{command:$(`spectrum`,`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,()=>import(`./spectrum-DuhSUTZI.mjs`)),hideCommand:!0},{command:$(`speed`,`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,()=>import(`./speed-Dgby_e1J.mjs`)),hideCommand:!0},{command:$(`ssl`,`SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations`,()=>import(`./ssl-BsxTHasY.mjs`)),hideCommand:!0},{command:$(`stream`,`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,()=>import(`./stream-CkEOX5Ko.mjs`)),hideCommand:!1},{command:$(`submission-info`,`submission-info`,()=>import(`./submission-info-Z9hhp9Rq.mjs`)),hideCommand:!0},{command:$(`submit`,`submit`,()=>import(`./submit-BjdywxTq.mjs`)),hideCommand:!0},{command:$(`tags`,`tags`,()=>import(`./tags-CFAw_Sce.mjs`)),hideCommand:!0},{command:$(`tenant`,`tenant`,()=>import(`./tenant-C66iOy5O.mjs`)),hideCommand:!1},{command:$(`tenant-custom-nameservers`,`tenant-custom-nameservers`,()=>import(`./tenant-custom-nameservers-CyJZ_AB0.mjs`)),hideCommand:!0},{command:$(`total-queries`,`total-queries`,()=>import(`./total-queries-aKAYX1iX.mjs`)),hideCommand:!0},{command:$(`tracked-domains`,`tracked-domains`,()=>import(`./tracked-domains-Ck7Jm4Kn.mjs`)),hideCommand:!0},{command:$(`tunnel`,`tunnel`,()=>import(`./tunnel-BatkLdds.mjs`)),hideCommand:!0},{command:$(`tunnels`,`tunnels`,()=>import(`./tunnels-CstoXOoq.mjs`)),hideCommand:!0},{command:$(`turnstile`,`turnstile`,()=>import(`./turnstile-IoRtama4.mjs`)),hideCommand:!0},{command:$(`url-info`,`url-info`,()=>import(`./url-info-Hjhwr2la.mjs`)),hideCommand:!0},{command:$(`url-normalization`,`url-normalization`,()=>import(`./url-normalization-C2BP_Kl0.mjs`)),hideCommand:!0},{command:$(`url-scanner`,`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,()=>import(`./url-scanner-DmYVTdAE.mjs`)),hideCommand:!0},{command:$(`user`,`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,()=>import(`./user-CVHm-cnB.mjs`)),hideCommand:!1},{command:$(`values`,`values`,()=>import(`./values-Cmlw5wGZ.mjs`)),hideCommand:!0},{command:$(`vectorize`,`vectorize`,()=>import(`./vectorize-BQtIqiNO.mjs`)),hideCommand:!0},{command:$(`verify`,`verify`,()=>import(`./verify-2yi0H93r.mjs`)),hideCommand:!0},{command:$(`waiting-rooms`,`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,()=>import(`./waiting-rooms-ku9UsAr9.mjs`)),hideCommand:!0},{command:$(`web-assets`,`web-assets`,()=>import(`./web-assets-DmSKaxzf.mjs`)),hideCommand:!0},{command:$(`web3`,`web3`,()=>import(`./web3-DVv4jNul.mjs`)),hideCommand:!0},{command:$(`workers`,`workers`,()=>import(`./workers-D8czeT64.mjs`)),hideCommand:!0},{command:$(`workers-builds`,`Automated build and deployment pipeline for Workers — track builds, logs, and repo connections`,()=>import(`./workers-builds-DgrejrUc.mjs`)),hideCommand:!0},{command:$(`workflows`,`Durable, multi-step workflows that run on Workers with automatic retries and state persistence`,()=>import(`./workflows-BOi5MTEN.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-CGSSFJng.mjs`)),hideCommand:!0},{command:$(`zero-trust`,`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,()=>import(`./zero-trust-BmA0VkgF.mjs`)),hideCommand:!0},{command:$(`zone`,`zone`,()=>import(`./zone-Bx5ElO9U.mjs`)),hideCommand:!1},{command:$(`zone-tags`,`zone-tags`,()=>import(`./zone-tags-izd3WWmy.mjs`)),hideCommand:!0},{command:$(`zones`,`Zones are domains on Cloudflare — list, create, and configure domain settings`,()=>import(`./zones-_SnlZMiM.mjs`)),hideCommand:!1}];function fr(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function pr(e){if(s(n),e instanceof c){let t=d(),n=e.statusCode,r=e.body,i=n===void 0?`Envelope Error`:hr(n),a=[];if(r){let e=r;Array.isArray(e.errors)&&(a=e.errors)}let o=e.rawResponse?.url?`HTTP ${fr(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`),N(this,W,P(this,W,`f`)+e.join(` `),`f`)}}}[kn](e){St(P(this,G,`f`)).forEach(t=>{if((e=>e===`configObjects`)(t))return;let n=P(this,G,`f`)[t];Array.isArray(n)?n.includes(e)&&n.splice(n.indexOf(e),1):typeof n==`object`&&delete n[e]}),delete P(this,Y,`f`).getDescriptions()[e]}[An](e,t,n){P(this,fn,`f`)[n]||(P(this,J,`f`).process.emitWarning(e,t),P(this,fn,`f`)[n]=!0)}[jn](){P(this,pn,`f`).push({options:P(this,G,`f`),configObjects:P(this,G,`f`).configObjects.slice(0),exitProcess:P(this,z,`f`),groups:P(this,V,`f`),strict:P(this,Sn,`f`),strictCommands:P(this,Cn,`f`),strictOptions:P(this,wn,`f`),completionCommand:P(this,L,`f`),output:P(this,W,`f`),exitError:P(this,R,`f`),hasOutput:P(this,H,`f`),parsed:this.parsed,parseFn:P(this,K,`f`),parseContext:P(this,vn,`f`)}),P(this,Y,`f`).freeze(),P(this,Z,`f`).freeze(),P(this,F,`f`).freeze(),P(this,B,`f`).freeze()}[Mn](){let e=``,t;return t=/\b(node|iojs|electron)(\.exe)?$/.test(P(this,J,`f`).process.argv()[0])?P(this,J,`f`).process.argv().slice(1,2):P(this,J,`f`).process.argv().slice(0,1),e=t.map(e=>{let t=this[nr](P(this,cn,`f`),e);return e.match(/^(\/|([a-zA-Z]:)?\\)/)&&t.length<e.length?t:e}).join(` `).trim(),P(this,J,`f`).getEnv(`_`)&&P(this,J,`f`).getProcessArgvBin()===P(this,J,`f`).getEnv(`_`)&&(e=P(this,J,`f`).getEnv(`_`).replace(`${P(this,J,`f`).path.dirname(P(this,J,`f`).process.execPath())}/`,``)),e}[Nn](){return P(this,_n,`f`)}[Pn](){return P(this,Tn,`f`)}[Fn](){if(!P(this,dn,`f`))return;let e=P(this,J,`f`).getEnv(`LC_ALL`)||P(this,J,`f`).getEnv(`LC_MESSAGES`)||P(this,J,`f`).getEnv(`LANG`)||P(this,J,`f`).getEnv(`LANGUAGE`)||`en_US`;this.locale(e.replace(/[.:].*/,``))}[In](){return this[Rn]().version||`unknown`}[Ln](e){let t=e[`--`]?e[`--`]:e._;for(let e=0,n;(n=t[e])!==void 0;e++)P(this,J,`f`).Parser.looksLikeNumber(n)&&Number.isSafeInteger(Math.floor(parseFloat(`${n}`)))&&(t[e]=Number(n));return e}[Rn](e){let t=e||`*`;if(P(this,yn,`f`)[t])return P(this,yn,`f`)[t];let n={};try{let t=e||P(this,J,`f`).mainFilename;P(this,J,`f`).path.extname(t)&&(t=P(this,J,`f`).path.dirname(t));let r=P(this,J,`f`).findUp(t,(e,t)=>{if(t.includes(`package.json`))return`package.json`});k(r,void 0,P(this,J,`f`)),n=JSON.parse(P(this,J,`f`).readFileSync(r,`utf8`))}catch{}return P(this,yn,`f`)[t]=n||{},P(this,yn,`f`)[t]}[Q](e,t){t=[].concat(t),t.forEach(t=>{t=this[Hn](t),P(this,G,`f`)[e].push(t)})}[zn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=n})}[Bn](e,t,n,r){this[Vn](e,t,n,r,(e,t,n)=>{P(this,G,`f`)[e][t]=(P(this,G,`f`)[e][t]||[]).concat(n)})}[Vn](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 St(n))e(t,n[t]);else i(t,this[Hn](n),r)}[Hn](e){return e===`__proto__`?`___proto___`:e}[Un](e,t){return this[zn](this[Un].bind(this),`key`,e,t),this}[Wn](){var e,t,n,r,i,a,o,s,c,l,u,d;let f=P(this,pn,`f`).pop();k(f,void 0,P(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){N(e,G,t,`f`)}}.value,configObjects:p,exitProcess:{set value(e){N(t,z,e,`f`)}}.value,groups:{set value(e){N(n,V,e,`f`)}}.value,output:{set value(e){N(r,W,e,`f`)}}.value,exitError:{set value(e){N(i,R,e,`f`)}}.value,hasOutput:{set value(e){N(a,H,e,`f`)}}.value,parsed:this.parsed,strict:{set value(e){N(o,Sn,e,`f`)}}.value,strictCommands:{set value(e){N(s,Cn,e,`f`)}}.value,strictOptions:{set value(e){N(c,wn,e,`f`)}}.value,completionCommand:{set value(e){N(l,L,e,`f`)}}.value,parseFn:{set value(e){N(u,K,e,`f`)}}.value,parseContext:{set value(e){N(d,vn,e,`f`)}}.value}=f,P(this,G,`f`).configObjects=p,P(this,Y,`f`).unfreeze(),P(this,Z,`f`).unfreeze(),P(this,F,`f`).unfreeze(),P(this,B,`f`).unfreeze()}[Gn](e,t){return At(t,t=>(e(t),t))}getInternalMethods(){return{getCommandInstance:this[Kn].bind(this),getContext:this[qn].bind(this),getHasOutput:this[Jn].bind(this),getLoggerInstance:this[Yn].bind(this),getParseContext:this[Xn].bind(this),getParserConfiguration:this[Nn].bind(this),getUsageConfiguration:this[Pn].bind(this),getUsageInstance:this[Zn].bind(this),getValidationInstance:this[Qn].bind(this),hasParseCallback:this[$n].bind(this),isGlobalContext:this[er].bind(this),postProcess:this[tr].bind(this),reset:this[rr].bind(this),runValidation:this[ar].bind(this),runYargsParserAndExecuteCommands:this[ir].bind(this),setHasOutput:this[or].bind(this)}}[Kn](){return P(this,F,`f`)}[qn](){return P(this,ln,`f`)}[Jn](){return P(this,H,`f`)}[Yn](){return P(this,hn,`f`)}[Xn](){return P(this,vn,`f`)||{}}[Zn](){return P(this,Y,`f`)}[Qn](){return P(this,Z,`f`)}[$n](){return!!P(this,K,`f`)}[er](){return P(this,mn,`f`)}[tr](e,t,n,r){return n||A(e)?e:(t||(e=this[Dn](e)),(this[Nn]()[`parse-positional-numbers`]||this[Nn]()[`parse-positional-numbers`]===void 0)&&(e=this[Ln](e)),r&&(e=kt(e,this,P(this,B,`f`).getMiddleware(),!1)),e)}[rr](e={}){N(this,G,P(this,G,`f`)||{},`f`);let t={};t.local=P(this,G,`f`).local||[],t.configObjects=P(this,G,`f`).configObjects||[];let n={};return t.local.forEach(t=>{n[t]=!0,(e[t]||[]).forEach(e=>{n[e]=!0})}),Object.assign(P(this,bn,`f`),Object.keys(P(this,V,`f`)).reduce((e,t)=>{let r=P(this,V,`f`)[t].filter(e=>!(e in n));return r.length>0&&(e[t]=r),e},{})),N(this,V,{},`f`),[`array`,`boolean`,`string`,`skipValidation`,`count`,`normalize`,`number`,`hiddenOptions`].forEach(e=>{t[e]=(P(this,G,`f`)[e]||[]).filter(e=>!n[e])}),[`narg`,`key`,`alias`,`default`,`defaultDescription`,`config`,`choices`,`demandedOptions`,`demandedCommands`,`deprecatedOptions`].forEach(e=>{t[e]=Bt(P(this,G,`f`)[e],e=>!n[e])}),t.envPrefix=P(this,G,`f`).envPrefix,N(this,G,t,`f`),N(this,Y,P(this,Y,`f`)?P(this,Y,`f`).reset(n):Ut(this,P(this,J,`f`)),`f`),N(this,Z,P(this,Z,`f`)?P(this,Z,`f`).reset(n):en(this,P(this,Y,`f`),P(this,J,`f`)),`f`),N(this,F,P(this,F,`f`)?P(this,F,`f`).reset():Pt(P(this,Y,`f`),P(this,Z,`f`),P(this,B,`f`),P(this,J,`f`)),`f`),P(this,I,`f`)||N(this,I,Yt(this,P(this,Y,`f`),P(this,F,`f`),P(this,J,`f`)),`f`),P(this,B,`f`).reset(),N(this,L,null,`f`),N(this,W,``,`f`),N(this,R,null,`f`),N(this,H,!1,`f`),this.parsed=!1,this}[nr](e,t){return P(this,J,`f`).path.relative(e,t)}[ir](e,t,n,r=0,i=!1){let a=!!n||i;e||=P(this,q,`f`),P(this,G,`f`).__=P(this,J,`f`).y18n.__,P(this,G,`f`).configuration=this[Nn]();let o=!!P(this,G,`f`).configuration[`populate--`],s=Object.assign({},P(this,G,`f`).configuration,{"populate--":!0}),c=P(this,J,`f`).Parser.detailed(e,Object.assign({},P(this,G,`f`),{configuration:{"parse-positional-numbers":!1,...s}})),l=Object.assign(c.argv,P(this,vn,`f`)),u,d=c.aliases,f=!1,p=!1;Object.keys(l).forEach(e=>{e===P(this,U,`f`)&&l[e]?f=!0:e===P(this,X,`f`)&&l[e]&&(p=!0)}),l.$0=this.$0,this.parsed=c,r===0&&P(this,Y,`f`).clearCachedHelpMessage();try{if(this[Fn](),t)return this[tr](l,o,!!n,!1);P(this,U,`f`)&&[P(this,U,`f`)].concat(d[P(this,U,`f`)]||[]).filter(e=>e.length>1).includes(``+l._[l._.length-1])&&(l._.pop(),f=!0),N(this,mn,!1,`f`);let s=P(this,F,`f`).getCommands(),m=P(this,I,`f`)?.completionKey?[P(this,I,`f`)?.completionKey,...this.getAliases()[P(this,I,`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!==P(this,L,`f`)){let e=P(this,F,`f`).runCommand(a,this,c,t+1,i,f||p||i);return this[tr](e,o,!!n,!1)}else if(!e&&a!==P(this,L,`f`)){e=a;break}!P(this,F,`f`).hasDefaultCommand()&&P(this,xn,`f`)&&e&&!h&&P(this,Z,`f`).recommendCommands(e,s)}P(this,L,`f`)&&l._.includes(P(this,L,`f`))&&!m&&(P(this,z,`f`)&&Vt(!0),this.showCompletionScript(),this.exit(0))}if(P(this,F,`f`).hasDefaultCommand()&&!h){let e=P(this,F,`f`).runCommand(null,this,c,0,i,f||p||i);return this[tr](e,o,!!n,!1)}if(m){P(this,z,`f`)&&Vt(!0),e=[].concat(e);let t=e.slice(e.indexOf(`--${P(this,I,`f`).completionKey}`)+1);return P(this,I,`f`).getCompletion(t,(e,t)=>{if(e)throw new j(e.message);(t||[]).forEach(e=>{P(this,hn,`f`).log(e)}),this.exit(0)}),this[tr](l,!o,!!n,!1)}if(P(this,H,`f`)||(f?(P(this,z,`f`)&&Vt(!0),a=!0,this.showHelp(e=>{P(this,hn,`f`).log(e),this.exit(0)})):p&&(P(this,z,`f`)&&Vt(!0),a=!0,P(this,Y,`f`).showVersion(`log`),this.exit(0))),!a&&P(this,G,`f`).skipValidation.length>0&&(a=Object.keys(l).some(e=>P(this,G,`f`).skipValidation.indexOf(e)>=0&&l[e]===!0)),!a){if(c.error)throw new j(c.error.message);if(!m){let e=this[ar](d,{},c.error);n||(u=kt(l,this,P(this,B,`f`).getMiddleware(),!0)),u=this[Gn](e,u??l),A(u)&&!n&&(u=u.then(()=>kt(l,this,P(this,B,`f`).getMiddleware(),!1)))}}}catch(e){if(e instanceof j)P(this,Y,`f`).fail(e.message,e);else throw e}return this[tr](u??l,o,!!n,!0)}[ar](e,t,n,r){let i={...this.getDemandedOptions()};return a=>{if(n)throw new j(n.message);P(this,Z,`f`).nonOptionCount(a),P(this,Z,`f`).requiredArguments(a,i);let o=!1;P(this,Cn,`f`)&&(o=P(this,Z,`f`).unknownCommands(a)),P(this,Sn,`f`)&&!o?P(this,Z,`f`).unknownArguments(a,e,t,!!r):P(this,wn,`f`)&&P(this,Z,`f`).unknownArguments(a,e,{},!1,!1),P(this,Z,`f`).limitedChoices(a),P(this,Z,`f`).implications(a),P(this,Z,`f`).conflicting(a)}}[or](){N(this,H,!0,`f`)}[sr](e){if(typeof e==`string`)P(this,G,`f`).key[e]=!0;else for(let t of e)P(this,G,`f`).key[t]=!0}};function lr(e){return!!e&&typeof e.getInternalMethods==`function`}const ur=En(bt);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 dr=[{command:$(`abuse-reports`,`Submit and track abuse reports for phishing, malware, and other policy violations on Cloudflare-proxied sites`,()=>import(`./abuse-reports-CzDAjFpo.mjs`)),hideCommand:!0},{command:$(`access`,`access`,()=>import(`./access-CxyW_sIW.mjs`)),hideCommand:!0},{command:$(`account`,`account`,()=>import(`./account-Dd4-tDYJ.mjs`)),hideCommand:!1},{command:$(`account-tags`,`account-tags`,()=>import(`./account-tags-65fAlHrf.mjs`)),hideCommand:!0},{command:$(`accounts`,`Account settings, members, roles, subscriptions, and API tokens for your Cloudflare account`,()=>import(`./accounts-Bp5KGc6r.mjs`)),hideCommand:!1},{command:$(`acm`,`acm`,()=>import(`./acm-CHacxa3s.mjs`)),hideCommand:!0},{command:$(`addressing`,`addressing`,()=>import(`./addressing-BnqNmmYN.mjs`)),hideCommand:!0},{command:$(`agent-memory`,`agent-memory`,()=>import(`./agent-memory-D--BQS0W.mjs`)),hideCommand:!1},{command:$(`ai`,`ai`,()=>import(`./ai-BnVlQDiI.mjs`)),hideCommand:!1},{command:$(`ai-audit`,`ai-audit`,()=>import(`./ai-audit-CfpDKXkD.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-oG4j_oYN.mjs`)),hideCommand:!1},{command:$(`ai-search`,`Managed search-as-a-service: crawl, index, and query content with AI-powered relevance and chat completions`,()=>import(`./ai-search-B2l3B_jn.mjs`)),hideCommand:!1},{command:$(`ai-security`,`Detect prompt injection, PII, and unsafe topics in traffic to your AI applications`,()=>import(`./ai-security-byjIIrfl.mjs`)),hideCommand:!0},{command:$(`alerting`,`alerting`,()=>import(`./alerting-qa8SkXlD.mjs`)),hideCommand:!0},{command:$(`alerts`,`alerts`,()=>import(`./alerts-B85uj2Vx.mjs`)),hideCommand:!0},{command:$(`analytics`,`Zone-level traffic analytics — dashboard summaries, per-colo breakdowns, and Argo latency metrics`,()=>import(`./analytics-DeIKjC9n.mjs`)),hideCommand:!1},{command:$(`analytics_engine`,`analytics_engine`,()=>import(`./analytics_engine-BnECMIWJ.mjs`)),hideCommand:!0},{command:$(`api-security`,`api-security`,()=>import(`./api-security-MfHbfZyf.mjs`)),hideCommand:!0},{command:$(`argo`,`argo`,()=>import(`./argo-DFerMyXF.mjs`)),hideCommand:!0},{command:$(`artifacts`,`artifacts`,()=>import(`./artifacts-CtyEYYDa.mjs`)),hideCommand:!0},{command:$(`audit-logs`,`audit-logs`,()=>import(`./audit-logs-retFtvow.mjs`)),hideCommand:!0},{command:$(`autorag`,`autorag`,()=>import(`./autorag-Do9l_LyY.mjs`)),hideCommand:!0},{command:$(`billing`,`Account billing profiles and usage data for Cloudflare subscriptions and add-on services`,()=>import(`./billing-CxQVqpGZ.mjs`)),hideCommand:!1},{command:$(`bot-management`,`bot-management`,()=>import(`./bot-management-Rli7v7tg.mjs`)),hideCommand:!0},{command:$(`botnet-feed`,`botnet-feed`,()=>import(`./botnet-feed-Cw6XSEf8.mjs`)),hideCommand:!0},{command:$(`brand-protection`,`brand-protection`,()=>import(`./brand-protection-CTvnHGfV.mjs`)),hideCommand:!0},{command:$(`brands`,`brands`,()=>import(`./brands-DateHCdd.mjs`)),hideCommand:!0},{command:$(`browser-extension`,`browser-extension`,()=>import(`./browser-extension-q79xHrVW.mjs`)),hideCommand:!1},{command:$(`browser-run`,`browser-run`,()=>import(`./browser-run-FwtwnBzA.mjs`)),hideCommand:!0},{command:$(`cache`,`cache`,()=>import(`./cache-Cl7vKJwH.mjs`)),hideCommand:!1},{command:$(`calls`,`Real-time audio/video communication infrastructure — SFU apps for WebRTC and TURN relay keys`,()=>import(`./calls-DtK_ANxq.mjs`)),hideCommand:!0},{command:$(`certificate-authorities`,`certificate-authorities`,()=>import(`./certificate-authorities-DZP1RzAs.mjs`)),hideCommand:!0},{command:$(`clear`,`clear`,()=>import(`./clear-CB2kgcEB.mjs`)),hideCommand:!0},{command:$(`client-certificates`,`client-certificates`,()=>import(`./client-certificates-BtPU9GsQ.mjs`)),hideCommand:!0},{command:$(`client-side-security`,`Client-Side Security — monitor JavaScript, connections, and cookies on your pages for supply-chain attacks`,()=>import(`./client-side-security-DAn-3jwp.mjs`)),hideCommand:!0},{command:$(`cloud-connector`,`Route traffic from Cloudflare directly to cloud provider services (AWS, Azure, GCP) without origin servers`,()=>import(`./cloud-connector-BpVcvhjZ.mjs`)),hideCommand:!1},{command:$(`cloudforce-one`,`Detection rule management APIs`,()=>import(`./cloudforce-one-2PecncfX.mjs`)),hideCommand:!1},{command:$(`connector-interrupts`,`connector-interrupts`,()=>import(`./connector-interrupts-ollUcksZ.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-events`,`connector-telemetry-events`,()=>import(`./connector-telemetry-events-D5_3X7XW.mjs`)),hideCommand:!0},{command:$(`connector-telemetry-snapshots`,`connector-telemetry-snapshots`,()=>import(`./connector-telemetry-snapshots-CJ9gLRFR.mjs`)),hideCommand:!0},{command:$(`connectors`,`connectors`,()=>import(`./connectors-Bo6ZT8PT.mjs`)),hideCommand:!0},{command:$(`containers`,`Deploy and manage Containers applications on Cloudflare's global network`,()=>import(`./containers-Bog7j0Hw.mjs`)),hideCommand:!1},{command:$(`content-scan`,`Malicious uploads detection, scan uploaded content in HTTP requests for malware and malicious payloads`,()=>import(`./content-scan-D03UfK2X.mjs`)),hideCommand:!0},{command:$(`csamScanner`,`csamScanner`,()=>import(`./csamScanner-DgS-7ADh.mjs`)),hideCommand:!0},{command:$(`ct-alerting`,`ct-alerting`,()=>import(`./ct-alerting-8AKtNnUg.mjs`)),hideCommand:!0},{command:$(`custom-certificates`,`custom-certificates`,()=>import(`./custom-certificates-4y35UC1X.mjs`)),hideCommand:!0},{command:$(`custom-csrs`,`custom-csrs`,()=>import(`./custom-csrs-DwBrLh-H.mjs`)),hideCommand:!0},{command:$(`custom-hostnames`,`custom-hostnames`,()=>import(`./custom-hostnames-CDIAnsRa.mjs`)),hideCommand:!0},{command:$(`custom-nameservers`,`custom-nameservers`,()=>import(`./custom-nameservers-stk7ymnP.mjs`)),hideCommand:!0},{command:$(`custom-pages`,`Custom error and challenge pages (1000s, WAF blocks, captchas) for zones and accounts`,()=>import(`./custom-pages-vfDxrXbt.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-Cllm-iTT.mjs`)),hideCommand:!0},{command:$(`data-security`,`data-security`,()=>import(`./data-security-rnoSCEdL.mjs`)),hideCommand:!1},{command:$(`dcv-delegation`,`dcv-delegation`,()=>import(`./dcv-delegation-DCRCOL6l.mjs`)),hideCommand:!0},{command:$(`diagnostics`,`Network diagnostic tools — traceroutes from Cloudflare's edge and endpoint health checks`,()=>import(`./diagnostics-D5Yo2xqx.mjs`)),hideCommand:!0},{command:$(`directory`,`directory`,()=>import(`./directory-CCndFkbQ.mjs`)),hideCommand:!0},{command:$(`dispatch-namespaces`,`dispatch-namespaces`,()=>import(`./dispatch-namespaces-C48JQ9EA.mjs`)),hideCommand:!0},{command:$(`dls`,`dls`,()=>import(`./dls-BBq99pjI.mjs`)),hideCommand:!0},{command:$(`dns`,`dns`,()=>import(`./dns-DdQYtenF.mjs`)),hideCommand:!1},{command:$(`dns-firewall`,`dns-firewall`,()=>import(`./dns-firewall-DdwVtm12.mjs`)),hideCommand:!0},{command:$(`domain-info`,`domain-info`,()=>import(`./domain-info-DJHEt8JJ.mjs`)),hideCommand:!0},{command:$(`durable-objects`,`durable-objects`,()=>import(`./durable-objects-BvxXBht_.mjs`)),hideCommand:!0},{command:$(`email`,`email`,()=>import(`./email-CGOC_evd.mjs`)),hideCommand:!0},{command:$(`email-auth`,`email-auth`,()=>import(`./email-auth-DFvXKSkg.mjs`)),hideCommand:!0},{command:$(`email-routing`,`Route incoming emails to destination addresses using custom rules, catch-all handlers, and DNS configuration`,()=>import(`./email-routing-QBRPBlyl.mjs`)),hideCommand:!0},{command:$(`email-security`,`Cloud email security — investigate threats, manage allow/block policies, and detect phishing`,()=>import(`./email-security-BFagcRPP.mjs`)),hideCommand:!0},{command:$(`email-sending`,`Send emails and manage sending subdomains`,()=>import(`./email-sending-Ddhe7xjN.mjs`)),hideCommand:!1},{command:$(`filters`,`Filter expressions used by legacy firewall rules to match requests — prefer Rulesets for new configurations`,()=>import(`./filters-CGisPGD1.mjs`)),hideCommand:!0},{command:$(`firewall`,`Legacy firewall rules, zone lockdowns, access rules, user-agent blocking, and WAF packages`,()=>import(`./firewall-DD8U-Brd.mjs`)),hideCommand:!0},{command:$(`flagship`,`flagship`,()=>import(`./flagship-FJHc4mFi.mjs`)),hideCommand:!0},{command:$(`fraud`,`fraud`,()=>import(`./fraud-AH47n-wL.mjs`)),hideCommand:!0},{command:$(`google-tag-gateway`,`Google Tag Gateway operations`,()=>import(`./google-tag-gateway-149kbuG_.mjs`)),hideCommand:!0},{command:$(`health`,`health`,()=>import(`./health-buY5f5pp.mjs`)),hideCommand:!0},{command:$(`healthchecks`,`Standalone health checks that monitor origin server availability from Cloudflare's edge`,()=>import(`./healthchecks-DfEUG007.mjs`)),hideCommand:!0},{command:$(`hostnames`,`hostnames`,()=>import(`./hostnames-DQUiD3Vr.mjs`)),hideCommand:!0},{command:$(`hyperdrive`,`Accelerate access to existing databases by caching queries and pooling connections at the edge`,()=>import(`./hyperdrive-RyQboMWI.mjs`)),hideCommand:!1},{command:$(`iam`,`Identity and access management — permission groups, resource groups, user groups, and SSO connectors`,()=>import(`./iam-BhHYhMXO.mjs`)),hideCommand:!0},{command:$(`images`,`Store, resize, and deliver optimized images globally — variants, signing keys, and direct uploads`,()=>import(`./images-CDViyKtZ.mjs`)),hideCommand:!1},{command:$(`intel`,`Threat intelligence lookups — IP reputation, domain info, ASN details, WHOIS, and indicator feeds`,()=>import(`./intel-YHZbPlS3.mjs`)),hideCommand:!1},{command:$(`internal`,`internal`,()=>import(`./internal-CwyoJUHh.mjs`)),hideCommand:!0},{command:$(`ips`,`ips`,()=>import(`./ips-BpCdldFx.mjs`)),hideCommand:!0},{command:$(`keyless-certificates`,`keyless-certificates`,()=>import(`./keyless-certificates-oNu5jWKF.mjs`)),hideCommand:!0},{command:$(`keys`,`keys`,()=>import(`./keys-yYtv7Ztr.mjs`)),hideCommand:!0},{command:$(`kv`,`kv`,()=>import(`./kv-Bi9B4E0A.mjs`)),hideCommand:!0},{command:$(`leaked-credential-checks`,`Detect compromised credentials in login requests by checking against known breach databases`,()=>import(`./leaked-credential-checks-DKRjBLcr.mjs`)),hideCommand:!0},{command:$(`live`,`live`,()=>import(`./live-wEpA5V_n.mjs`)),hideCommand:!0},{command:$(`load-balancers`,`Distribute traffic across origin pools with health monitoring, geo-steering, and failover`,()=>import(`./load-balancers-jRCN75mX.mjs`)),hideCommand:!0},{command:$(`logexplorer`,`logexplorer`,()=>import(`./logexplorer-kO8CULiK.mjs`)),hideCommand:!0},{command:$(`logo-matches`,`logo-matches`,()=>import(`./logo-matches-LyDAYPbI.mjs`)),hideCommand:!0},{command:$(`logos`,`logos`,()=>import(`./logos-O9f5bGSB.mjs`)),hideCommand:!0},{command:$(`logpush`,`logpush`,()=>import(`./logpush-dtXLu3Ck.mjs`)),hideCommand:!0},{command:$(`logs`,`Log control, retention, and raw log access — CMB config, ray ID lookups, and received fields`,()=>import(`./logs-DmWWL5f9.mjs`)),hideCommand:!0},{command:$(`magic-cloud-networking`,`magic-cloud-networking`,()=>import(`./magic-cloud-networking-XbTa6P52.mjs`)),hideCommand:!0},{command:$(`magic-network-monitoring`,`Flow-based network traffic monitoring with configurable alerting rules and VPC flow ingestion`,()=>import(`./magic-network-monitoring-CpfkgZMp.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-DwgZeIj-.mjs`)),hideCommand:!0},{command:$(`managed-transforms`,`managed-transforms`,()=>import(`./managed-transforms-DCmogkxv.mjs`)),hideCommand:!0},{command:$(`matches`,`matches`,()=>import(`./matches-BAeN8VM1.mjs`)),hideCommand:!0},{command:$(`mcp`,`mcp`,()=>import(`./mcp-DKZ2D050.mjs`)),hideCommand:!0},{command:$(`media`,`media`,()=>import(`./media-CnxgOViL.mjs`)),hideCommand:!1},{command:$(`mesh`,`mesh`,()=>import(`./mesh-CzIPtuaM.mjs`)),hideCommand:!0},{command:$(`moq`,`MoQ relays: provision a relay, then issue tokens for publishers and subscribers`,()=>import(`./moq-CJpE-eNj.mjs`)),hideCommand:!1},{command:$(`mtls-certificates`,`mtls-certificates`,()=>import(`./mtls-certificates-Bbm_1lQI.mjs`)),hideCommand:!0},{command:$(`network`,`network`,()=>import(`./network-D2WRXCDe.mjs`)),hideCommand:!0},{command:$(`network-interconnects`,`Physical and virtual private interconnects between your infrastructure and Cloudflare's network`,()=>import(`./network-interconnects-Clq4X1U8.mjs`)),hideCommand:!0},{command:$(`oauth-clients`,`oauth-clients`,()=>import(`./oauth-clients-hilWfAlm.mjs`)),hideCommand:!0},{command:$(`oauth-scopes`,`oauth-scopes`,()=>import(`./oauth-scopes-CmbgsPYd.mjs`)),hideCommand:!0},{command:$(`observability`,`observability`,()=>import(`./observability-DXYgDdU5.mjs`)),hideCommand:!1},{command:$(`organization`,`organization`,()=>import(`./organization-D41rIvJa.mjs`)),hideCommand:!1},{command:$(`organizations`,`Multi-user organizations that group accounts, members, and shared settings under a single entity`,()=>import(`./organizations-eNzfOwlP.mjs`)),hideCommand:!1},{command:$(`origin-ca-certificates`,`origin-ca-certificates`,()=>import(`./origin-ca-certificates-DaiAmw45.mjs`)),hideCommand:!0},{command:$(`origin-post-quantum-encryption`,`origin-post-quantum-encryption`,()=>import(`./origin-post-quantum-encryption-7YztBged.mjs`)),hideCommand:!0},{command:$(`origin-tls-client-auth`,`origin-tls-client-auth`,()=>import(`./origin-tls-client-auth-DRwURM8s.mjs`)),hideCommand:!0},{command:$(`page-rules`,`page-rules`,()=>import(`./page-rules-B2Csdc4h.mjs`)),hideCommand:!0},{command:$(`pages`,`Full-stack application hosting with Git-integrated builds, preview deployments, and custom domains`,()=>import(`./pages-BAL6Q7OY.mjs`)),hideCommand:!0},{command:$(`pay-per-crawl`,`pay-per-crawl`,()=>import(`./pay-per-crawl-C-1-ZAtn.mjs`)),hideCommand:!1},{command:$(`pipelines`,`Ingest, transform, and route event streams into R2, analytics, or other destinations in real time`,()=>import(`./pipelines-cyQOuFLb.mjs`)),hideCommand:!1},{command:$(`precursor`,`Precursor settings for a zone`,()=>import(`./precursor-BrweY39h.mjs`)),hideCommand:!0},{command:$(`queries`,`queries`,()=>import(`./queries-oM8uGZy5.mjs`)),hideCommand:!0},{command:$(`queues`,`Reliable message queuing between Workers — produce, consume, and batch-process messages at scale`,()=>import(`./queues-CTx04ZNw.mjs`)),hideCommand:!0},{command:$(`r2`,`S3-compatible object storage with zero egress fees — buckets, lifecycle rules, event notifications, and data migration`,()=>import(`./r2-CnlIUn7R.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-DLtf9d6o.mjs`)),hideCommand:!0},{command:$(`radar`,`Internet-wide traffic intelligence — BGP, DNS, HTTP trends, attack data, and network quality insights`,()=>import(`./radar-CGNgGh8v.mjs`)),hideCommand:!0},{command:$(`rate-limit-analytics`,`rate-limit-analytics`,()=>import(`./rate-limit-analytics-Bf1uT0lT.mjs`)),hideCommand:!1},{command:$(`rate-limits`,`Legacy per-zone rate limiting rules — prefer Advanced Rate Limiting in Rulesets for new configurations`,()=>import(`./rate-limits-B1YjnGue.mjs`)),hideCommand:!0},{command:$(`ready`,`ready`,()=>import(`./ready-CBSCPiHE.mjs`)),hideCommand:!0},{command:$(`realtimekit`,`SDK-backed meetings, participants, recordings, livestreams, and webhooks`,()=>import(`./realtimekit-BPwzhNS9.mjs`)),hideCommand:!1},{command:$(`recent-submissions`,`recent-submissions`,()=>import(`./recent-submissions-Dpmq1f7z.mjs`)),hideCommand:!0},{command:$(`refute`,`refute`,()=>import(`./refute-u7ZPQJZy.mjs`)),hideCommand:!0},{command:$(`registrar`,`registrar`,()=>import(`./registrar-BEcb90RX.mjs`)),hideCommand:!0},{command:$(`registrar-sandbox`,`registrar-sandbox`,()=>import(`./registrar-sandbox-0i1T3zne.mjs`)),hideCommand:!0},{command:$(`reporting`,`reporting`,()=>import(`./reporting-CLbjHlnw.mjs`)),hideCommand:!1},{command:$(`request-tracers`,`Trace how a request would be processed through Cloudflare's rules and configuration pipeline`,()=>import(`./request-tracers-BcKpofP1.mjs`)),hideCommand:!0},{command:$(`resource-sharing`,`Share Cloudflare resources (zones, accounts) across organizations with granular access controls`,()=>import(`./resource-sharing-Ctdi9D-j.mjs`)),hideCommand:!1},{command:$(`resource-tagging`,`resource-tagging`,()=>import(`./resource-tagging-DGEyVTDN.mjs`)),hideCommand:!0},{command:$(`rules`,`Account-level IP lists, hostname lists, and other reusable lists referenced by firewall rules and rulesets`,()=>import(`./rules-CmuB5rIN.mjs`)),hideCommand:!0},{command:$(`rulesets`,`rulesets`,()=>import(`./rulesets-CGaMq8vG.mjs`)),hideCommand:!0},{command:$(`rum`,`Real User Measurement (Web Analytics) — track page loads, Core Web Vitals, and visitor metrics`,()=>import(`./rum-QT6EP4JK.mjs`)),hideCommand:!0},{command:$(`scan-logo`,`scan-logo`,()=>import(`./scan-logo-Ba8WZAyp.mjs`)),hideCommand:!0},{command:$(`scan-page`,`scan-page`,()=>import(`./scan-page-Bcq3Ei86.mjs`)),hideCommand:!0},{command:$(`scim`,`SCIM 2.0 provisioning — manage users, groups, and identity provider sync for your account`,()=>import(`./scim-BgGsmHrL.mjs`)),hideCommand:!0},{command:$(`search`,`search`,()=>import(`./search-D9WDwnV4.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-BCpFhYFv.mjs`)),hideCommand:!0},{command:$(`security-center`,`Security posture dashboard — view and manage security insights, misconfigurations, and vulnerabilities`,()=>import(`./security-center-BNm4uPVB.mjs`)),hideCommand:!1},{command:$(`security-txt`,`Manage the /.well-known/security.txt file that tells security researchers how to report vulnerabilities`,()=>import(`./security-txt-Be2Bif0z.mjs`)),hideCommand:!0},{command:$(`share`,`share`,()=>import(`./share-Bz2tFTUP.mjs`)),hideCommand:!1},{command:$(`signed-url`,`signed-url`,()=>import(`./signed-url-CjPbG5zV.mjs`)),hideCommand:!0},{command:$(`smart-shield`,`smart-shield`,()=>import(`./smart-shield-SODkOUyO.mjs`)),hideCommand:!0},{command:$(`snippets`,`snippets`,()=>import(`./snippets-B5jY8v_7.mjs`)),hideCommand:!1},{command:$(`spectrum`,`Proxy and protect arbitrary TCP/UDP applications through Cloudflare's network with DDoS mitigation`,()=>import(`./spectrum-BA0a42eM.mjs`)),hideCommand:!0},{command:$(`speed`,`Observatory speed tests — run Lighthouse audits, track performance trends, and schedule recurring tests`,()=>import(`./speed-mmOjxOzo.mjs`)),hideCommand:!0},{command:$(`ssl`,`SSL/TLS certificate management — certificate packs, Universal SSL, verification, and TLS mode recommendations`,()=>import(`./ssl-Yr6kELqg.mjs`)),hideCommand:!0},{command:$(`stream`,`Video encoding, storage, and delivery — upload, live-stream, clip, caption, and embed video at scale`,()=>import(`./stream-Cu0kYWbc.mjs`)),hideCommand:!1},{command:$(`submission-info`,`submission-info`,()=>import(`./submission-info-Z9hhp9Rq.mjs`)),hideCommand:!0},{command:$(`submit`,`submit`,()=>import(`./submit-Dl_27e0n.mjs`)),hideCommand:!0},{command:$(`tags`,`tags`,()=>import(`./tags-Cdo_Pwtr.mjs`)),hideCommand:!0},{command:$(`tenant`,`tenant`,()=>import(`./tenant-EX-ANl6X.mjs`)),hideCommand:!1},{command:$(`tenant-custom-nameservers`,`tenant-custom-nameservers`,()=>import(`./tenant-custom-nameservers-BPHUeckw.mjs`)),hideCommand:!0},{command:$(`total-queries`,`total-queries`,()=>import(`./total-queries-aKAYX1iX.mjs`)),hideCommand:!0},{command:$(`tracked-domains`,`tracked-domains`,()=>import(`./tracked-domains-Ck7Jm4Kn.mjs`)),hideCommand:!0},{command:$(`tunnel`,`tunnel`,()=>import(`./tunnel-CDYkWjnt.mjs`)),hideCommand:!0},{command:$(`tunnels`,`tunnels`,()=>import(`./tunnels-CgyX8R2J.mjs`)),hideCommand:!0},{command:$(`turnstile`,`turnstile`,()=>import(`./turnstile-BUtzlW-0.mjs`)),hideCommand:!0},{command:$(`url-info`,`url-info`,()=>import(`./url-info-CJsa1Oc9.mjs`)),hideCommand:!0},{command:$(`url-normalization`,`url-normalization`,()=>import(`./url-normalization-BeKkOZz7.mjs`)),hideCommand:!0},{command:$(`url-scanner`,`Scan URLs for phishing, malware, and other threats — submit scans and retrieve detailed results`,()=>import(`./url-scanner-Cz-yl0_3.mjs`)),hideCommand:!0},{command:$(`user`,`Your Cloudflare user profile, invitations, organizations, billing, and personal API tokens`,()=>import(`./user-BxHjEqpd.mjs`)),hideCommand:!1},{command:$(`values`,`values`,()=>import(`./values-C43NurfT.mjs`)),hideCommand:!0},{command:$(`vectorize`,`vectorize`,()=>import(`./vectorize-CjXfiFH4.mjs`)),hideCommand:!0},{command:$(`verify`,`verify`,()=>import(`./verify-2yi0H93r.mjs`)),hideCommand:!0},{command:$(`waiting-rooms`,`Virtual queues that throttle traffic to your site during peak demand with customizable waiting pages`,()=>import(`./waiting-rooms-C5jSQv_r.mjs`)),hideCommand:!0},{command:$(`web-assets`,`web-assets`,()=>import(`./web-assets-BzM5vVzy.mjs`)),hideCommand:!0},{command:$(`web3`,`web3`,()=>import(`./web3-Ctv9HGiR.mjs`)),hideCommand:!0},{command:$(`workers`,`workers`,()=>import(`./workers-D-YbIedB.mjs`)),hideCommand:!0},{command:$(`workers-builds`,`Automated build and deployment pipeline for Workers — track builds, logs, and repo connections`,()=>import(`./workers-builds-B44wc67O.mjs`)),hideCommand:!0},{command:$(`workflows`,`Durable, multi-step workflows that run on Workers with automatic retries and state persistence`,()=>import(`./workflows-rFuQWClt.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-BA6kY-b6.mjs`)),hideCommand:!0},{command:$(`zero-trust`,`Cloudflare's SASE platform — secure access, device posture, DLP, tunnels, gateway policies, and network segmentation`,()=>import(`./zero-trust-DOFLlUz1.mjs`)),hideCommand:!0},{command:$(`zone`,`zone`,()=>import(`./zone-B_rgejLV.mjs`)),hideCommand:!1},{command:$(`zone-tags`,`zone-tags`,()=>import(`./zone-tags-BWdza4rH.mjs`)),hideCommand:!0},{command:$(`zones`,`Zones are domains on Cloudflare — list, create, and configure domain settings`,()=>import(`./zones-DTWO7Vvn.mjs`)),hideCommand:!1}];function fr(e){try{let t=new URL(e);return`${t.pathname.replace(/^\/client\/v\d+/,``)}${t.search}`}catch{return e}}function pr(e){if(s(n),e instanceof c){let t=d(),n=e.statusCode,r=e.body,i=n===void 0?`Envelope Error`:hr(n),a=[];if(r){let e=r;Array.isArray(e.errors)&&(a=e.errors)}let o=e.rawResponse?.url?`HTTP ${fr(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?mr(e.stack):void 0;return console.error(p(e.message,t)),e}return console.error(p(`An unexpected error occurred`,String(e))),e}function mr(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function hr(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 gr=$(`auth`,`Manage authentication and profiles`,()=>import(`./auth-
|
|
106
|
+
`+m(`Check your API token permissions`)),e}if(e instanceof Error){let t=process.env.DEBUG&&e.stack?mr(e.stack):void 0;return console.error(p(e.message,t)),e}return console.error(p(`An unexpected error occurred`,String(e))),e}function mr(e){return e.replace(/[A-Za-z0-9_-]{40,}/g,`[REDACTED]`)}function hr(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 gr=$(`auth`,`Manage authentication and profiles`,()=>import(`./auth-aazs91XL.mjs`)),_r=$(`complete [shell]`,`Generate and handle shell completions`,()=>import(`./completions-BHE4pRjB.mjs`)),vr=$(`schema [command..]`,`Show API schema details for a command`,()=>import(`./schema-BeXPWeK9.mjs`)),yr=$(`agent-context [product]`,`Output agent context and tool definitions`,()=>import(`./agent-context-Bu6yvDqA.mjs`)),br=$(`tools`,!1,()=>import(`./tools-D2Xxfkrc.mjs`)),xr=$(`dev [implArgs..]`,`Run the project's Cloudflare dev server`,()=>import(`./dev-BbLV0Ti-.mjs`)),Sr=$(`build`,`Build a project for Cloudflare`,()=>import(`./build-Dji9BYmV.mjs`).then(e=>e.t)),Cr=$(`deploy`,`Deploy a project to Cloudflare`,()=>import(`./deploy-DGlmjPTS.mjs`)),wr=$(`triggers`,`Manage triggers (Routes, Workflows, Cron triggers etc.)`,()=>import(`./triggers-Bf9hbP3h.mjs`)),Tr=$(`versions`,`Manage Worker Versions`,()=>import(`./versions-BFbc90Wu.mjs`)),Er=new Set([`auth`,`build`,`complete`,`deploy`,`dev`,`triggers`,`versions`,`schema`,`agent-context`,`tools`]);function Dr(e){return e.includes(`--quiet`)||e.includes(`-q`)}function Or(){process.stderr.isTTY&&(Dr(process.argv.slice(2))||process.argv.slice(2).find(e=>!e.startsWith(`-`))!==`complete`&&import(`./state-DZC531l2.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 kr(){let e=process.argv.slice(2);return!e.includes(`--version`)&&!e.includes(`-v`)?!1:(console.log(a(n)),!0)}function Ar(){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
107
|
`)),!0}function jr(){let e=process.argv.slice(2);e.length!==0&&(e.includes(`--version`)||e.includes(`-v`)||e.find(e=>!e.startsWith(`-`))!==`complete`&&s(n,{quiet:Dr(e)}))}function Mr(e){let t=e=>u.brand(e),i=e.indexOf(`--`),a=(i===-1?e:e.slice(0,i)).some(e=>e===`--local`||e===`--no-local`||e.startsWith(`--local=`)),o=ur(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:`Use local resource simulations`,global:!0,default:!1}).option(`persist-to`,{type:`string`,description:`Directory holding local persisted state (default: ~/.config/cloudflare/state)`,requiresArg:!0,global:!0}).group([`quiet`,`zone`,`profile`,`local`,`persist-to`,`help`,`version`],t(`Global flags`)).command(gr).command(Sr).command(_r).command(Cr).command(xr).command(wr).command(Tr).command(vr).command(yr).command(br);for(let e of dr)e.hideCommand?o.command({...e.command,describe:!1}):o.command(e.command);return o.middleware(async e=>{let t=String(e._[0]??``);if(!e.help&&(t===`dev`&&a||e.local&&Er.has(t)))throw Error(`--local is not supported by cf ${t}.`);if(e.persistTo===``)throw Error(`--persist-to requires a non-empty directory.`);if(e.persistTo!==void 0&&!e.local)throw Error(`--persist-to can only be used with --local.`);if(!e.local){let{resolveProfile:t}=await import(`./oauth-
|
|
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:`Use local resource simulations`,global:!0,default:!1}).option(`persist-to`,{type:`string`,description:`Directory holding local persisted state (default: ~/.config/cloudflare/state)`,requiresArg:!0,global:!0}).group([`quiet`,`zone`,`profile`,`local`,`persist-to`,`help`,`version`],t(`Global flags`)).command(gr).command(Sr).command(_r).command(Cr).command(xr).command(wr).command(Tr).command(vr).command(yr).command(br);for(let e of dr)e.hideCommand?o.command({...e.command,describe:!1}):o.command(e.command);return o.middleware(async e=>{let t=String(e._[0]??``);if(!e.help&&(t===`dev`&&a||e.local&&Er.has(t)))throw Error(`--local is not supported by cf ${t}.`);if(e.persistTo===``)throw Error(`--persist-to requires a non-empty directory.`);if(e.persistTo!==void 0&&!e.local)throw Error(`--persist-to can only be used with --local.`);if(!e.local){let{resolveProfile:t}=await import(`./oauth-BPizUUqP.mjs`).then(e=>e.l);r(t(e.profile))}}).demandCommand(1,`You need to specify a command`).strictCommands().strictOptions().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)}),o}var Nr=class extends Error{constructor(e){super(`CliExit(${e})`),this.code=e,this.name=`CliExit`}};async function Pr(e){let t=process.argv;process.argv=[`node`,`cf`,...e];try{await Fr()}finally{process.argv=t}}async function Fr(){if(kr()||Ar())throw new Nr(0);jr();let e=Mr(ut(process.argv));Or();try{await e.parse(ut(process.argv))}catch(e){throw e instanceof Nr?e:pr(e)}finally{await h()}}export{Pr as i,Mr as n,Fr as r,Nr as t};
|