cf 0.15.0 → 1.0.0-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE-APACHE +176 -0
- package/LICENSE-MIT +25 -0
- package/README.md +6 -7
- package/dist/{abuse-reports-BAQR1w79.mjs → abuse-reports-BwsJLiPN.mjs} +1 -1
- package/dist/{access-C8KMplzp.mjs → access-BVbIajYr.mjs} +1 -1
- package/dist/{account-B-KQSR0L.mjs → account-DBLarar2.mjs} +1 -1
- package/dist/{account-tags-EncLJpLc.mjs → account-tags-BNrSShjj.mjs} +1 -1
- package/dist/{accounts-BA4Mp3A_.mjs → accounts-CCAnDjFk.mjs} +1 -1
- package/dist/{acm-ByxUJcqF.mjs → acm-ZPYQbZQr.mjs} +1 -1
- package/dist/{addressing-C-ym0h0G.mjs → addressing-BFpzLfTn.mjs} +1 -1
- package/dist/{agent-memory-CkPSiZDI.mjs → agent-memory-DEvy2dLU.mjs} +1 -1
- package/dist/{ai-DkE_Q64s.mjs → ai-BF0_0NtS.mjs} +1 -1
- package/dist/{ai-audit-pPcjYWI5.mjs → ai-audit-Dn03zntn.mjs} +1 -1
- package/dist/{ai-gateway-DtrwF1lQ.mjs → ai-gateway-CVABbCjv.mjs} +1 -1
- package/dist/{ai-search-DLD_kDS1.mjs → ai-search-g0tR8Cut.mjs} +1 -1
- package/dist/{ai-security-jyZcBl9g.mjs → ai-security-BXXA0Jnk.mjs} +1 -1
- package/dist/{alerting-DOROjm8E.mjs → alerting-Bst10SOG.mjs} +1 -1
- package/dist/{analytics-rQ-h-plT.mjs → analytics-DgEaxta8.mjs} +1 -1
- package/dist/{analytics_engine-Cg9gCAMt.mjs → analytics_engine-B4DvcYmB.mjs} +1 -1
- package/dist/{api-security-B8p8vp8u.mjs → api-security-Dkx1Codr.mjs} +1 -1
- package/dist/{argo-g8SjUb_t.mjs → argo-BvswWPlP.mjs} +1 -1
- package/dist/{artifacts-B1PaeF5h.mjs → artifacts-D8kZKJq0.mjs} +1 -1
- package/dist/{audit-logs-DmU_PHy_.mjs → audit-logs-Bp_yQpXJ.mjs} +1 -1
- package/dist/{auth-CZqics6E.mjs → auth-B9w55oRg.mjs} +1 -1
- package/dist/{auth-Cp7gT-AF.mjs → auth-C80y97yu.mjs} +1 -1
- package/dist/{billing-CvTbUg-H.mjs → billing-Cqj64fqz.mjs} +1 -1
- package/dist/{bot-management-z53tbcbH.mjs → bot-management-CzZx_aml.mjs} +1 -1
- package/dist/{botnet-feed-CSBbJdr_.mjs → botnet-feed-Co0c8Xdj.mjs} +1 -1
- package/dist/{brand-protection-DzV211IQ.mjs → brand-protection-CDsGaPIl.mjs} +1 -1
- package/dist/{browser-extension-C0Hi9CHX.mjs → browser-extension-BRHJm3Qf.mjs} +1 -1
- package/dist/{browser-run-DYQvMAyo.mjs → browser-run-DFrohJ1p.mjs} +1 -1
- package/dist/{build-BPIp8J5F.mjs → build-BbjcJxKq.mjs} +1 -1
- package/dist/build-DQh5-KK4.mjs +2 -0
- package/dist/{builds-CwKRqjQ5.mjs → builds-CamhClyb.mjs} +1 -1
- package/dist/{cache-CugNPPsJ.mjs → cache-BiTk4-Zc.mjs} +1 -1
- package/dist/{certificate-authorities-DaEnJYge.mjs → certificate-authorities-Dal9DNjW.mjs} +1 -1
- package/dist/{client-certificates-DZUIqBTB.mjs → client-certificates-DDisXoTE.mjs} +1 -1
- package/dist/{client-side-security-Dk6F1ENG.mjs → client-side-security-CIO_YPtN.mjs} +1 -1
- package/dist/{cloud-connector-avpf86kG.mjs → cloud-connector-vwdixea0.mjs} +1 -1
- package/dist/{cloudforce-one-DNRhUD8z.mjs → cloudforce-one-C1cFVBGK.mjs} +1 -1
- package/dist/{command-B2Qe-WUa.mjs → command-BP7ldws1.mjs} +1 -1
- package/dist/{command-DIvPLK8x.mjs → command-BtNRBTP6.mjs} +1 -1
- package/dist/{command-D45NW-R3.mjs → command-Ck9rbHA4.mjs} +1 -1
- package/dist/{connector-interrupts-BSztJ-Ko.mjs → connector-interrupts-DQ5T-HMN.mjs} +1 -1
- package/dist/{connector-telemetry-events-_M8CCK6_.mjs → connector-telemetry-events-DWam38_9.mjs} +1 -1
- package/dist/{connector-telemetry-snapshots-DySvmR9a.mjs → connector-telemetry-snapshots-DX6AJf9Q.mjs} +1 -1
- package/dist/{connectors-BSmhzNB7.mjs → connectors-CBhLWVd-.mjs} +1 -1
- package/dist/{containers-CFzvhmyz.mjs → containers-Bx_44bmJ.mjs} +1 -1
- package/dist/{containers-B5vDcFzo.mjs → containers-C7blN-pe.mjs} +1 -1
- package/dist/{content-scan-CeLZAcbT.mjs → content-scan-CC91dAlv.mjs} +1 -1
- package/dist/{cps-BlI_Od72.mjs → cps-D9a4N_bH.mjs} +1 -1
- package/dist/{csamScanner-Cn7d0HWS.mjs → csamScanner-T7nbCnep.mjs} +1 -1
- package/dist/{ct-alerting-lhgFPu-y.mjs → ct-alerting-CkjNJlla.mjs} +1 -1
- package/dist/{custom-certificates-Ba4Do5qt.mjs → custom-certificates-DnWnt9oJ.mjs} +1 -1
- package/dist/{custom-csrs-MNUIx8yX.mjs → custom-csrs-Db2pF9Ib.mjs} +1 -1
- package/dist/{custom-hostnames-Dj1SBd0J.mjs → custom-hostnames-B_N-uSIa.mjs} +1 -1
- package/dist/{custom-nameservers-C7nzhNzV.mjs → custom-nameservers-DPA_sFY8.mjs} +1 -1
- package/dist/{custom-pages-BgfhGksj.mjs → custom-pages-D6fxEBoh.mjs} +1 -1
- package/dist/{d1-P2kWbdID.mjs → d1-DXs1xVmH.mjs} +1 -1
- package/dist/{data-security-pBIozmRL.mjs → data-security-CVZAIzhe.mjs} +1 -1
- package/dist/{dcv-delegation-Bpy9WnKZ.mjs → dcv-delegation-as1ue_wx.mjs} +1 -1
- package/dist/{deploy-CVYdt3NK.mjs → deploy-D2XXCkqk.mjs} +1 -1
- package/dist/{deploy-input-DpOgndz4.mjs → deploy-input-BCYyKXpp.mjs} +1 -1
- package/dist/{dev-PPUBjWcm.mjs → dev-nsNxyg2D.mjs} +1 -1
- package/dist/{diagnostics-C62habGQ.mjs → diagnostics-BKH1Oh-C.mjs} +1 -1
- package/dist/{dialog-C_ccBiZp.mjs → dialog-Dx4rRcKM.mjs} +1 -1
- package/dist/{dist-B4pQ4CXK.mjs → dist-BDOzKthe.mjs} +1 -1
- package/dist/{dls-CpkcyQ8C.mjs → dls-C5kAQsN6.mjs} +1 -1
- package/dist/{dns-DG1X4Wap.mjs → dns-CYwXrdJO.mjs} +1 -1
- package/dist/{dns-firewall-B1gGHEDo.mjs → dns-firewall-BEw4QcXj.mjs} +1 -1
- package/dist/{durable-objects-D214VhxH.mjs → durable-objects-3jvUgzKd.mjs} +1 -1
- package/dist/{email-auth-Ba4ONan2.mjs → email-auth-B3MD8FrJ.mjs} +1 -1
- package/dist/{email-routing-BlqKnqNM.mjs → email-routing-C4YhZGPw.mjs} +1 -1
- package/dist/{email-security-Dl1E1Dko.mjs → email-security-BcFyWNby.mjs} +1 -1
- package/dist/{email-sending-DIRSSRIz.mjs → email-sending-BO1GOAho.mjs} +1 -1
- package/dist/{fieldExtractors-zqYKMCEn.mjs → fieldExtractors-BJDnzNCN.mjs} +1 -1
- package/dist/{firewall-DdsDh8GD.mjs → firewall-BSMa9aH3.mjs} +1 -1
- package/dist/{flagship-CkUIVW7c.mjs → flagship-BJYMb7hb.mjs} +1 -1
- package/dist/{fraud-BUpZgvQT.mjs → fraud-C7kS7kP9.mjs} +1 -1
- package/dist/{google-tag-gateway-Bi1uLnEU.mjs → google-tag-gateway-8VR-j0sa.mjs} +1 -1
- package/dist/{healthchecks-DjQWb3EM.mjs → healthchecks-BJleItOD.mjs} +1 -1
- package/dist/{hostnames-ClBLPbct.mjs → hostnames-CHajvoHa.mjs} +1 -1
- package/dist/{hyperdrive-U54xZsWU.mjs → hyperdrive-DlxQrok-.mjs} +1 -1
- package/dist/{iam-T-wWmOep.mjs → iam-B7oTr6vW.mjs} +1 -1
- package/dist/{images-ia5UG1GW.mjs → images-xLAYe436.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{intel-BhswZLMI.mjs → intel-DwZXY1YE.mjs} +1 -1
- package/dist/{ips-Dad_EvhM.mjs → ips-BC_9nKE7.mjs} +1 -1
- package/dist/{keyless-certificates-BhHaxLjM.mjs → keyless-certificates-CtsCsbZ2.mjs} +1 -1
- package/dist/{keys-DjIPvqj4.mjs → keys-K-GFzhku.mjs} +1 -1
- package/dist/{kv-DzXVnK94.mjs → kv-Bfwz_ULu.mjs} +1 -1
- package/dist/{leaked-credential-checks-B9G_ZTNH.mjs → leaked-credential-checks-D8UuxztO.mjs} +1 -1
- package/dist/{load-balancers-3wGHPsYz.mjs → load-balancers-B0XeGLhT.mjs} +1 -1
- package/dist/{login-DEWvGuaU.mjs → login-CAsRUF4c.mjs} +1 -1
- package/dist/{login-CEQbOgBM.mjs → login-DaglE6WA.mjs} +1 -1
- package/dist/{logo-matches-YGRPstPi.mjs → logo-matches-DWg5ezsM.mjs} +1 -1
- package/dist/{logos-BirufUgo.mjs → logos-6A6gJC5C.mjs} +1 -1
- package/dist/{logpush-BlNbUHyV.mjs → logpush-DwehajAw.mjs} +1 -1
- package/dist/{logs-DmFlVF9q.mjs → logs-BWg7YymF.mjs} +1 -1
- package/dist/{magic-cloud-networking-B3Wj2dhJ.mjs → magic-cloud-networking--14hNj2F.mjs} +1 -1
- package/dist/{magic-network-monitoring-ry63w2Rw.mjs → magic-network-monitoring-Dzo4L6kd.mjs} +1 -1
- package/dist/{magic-transit-CBVOK2aa.mjs → magic-transit-DDO0A5v4.mjs} +1 -1
- package/dist/{managed-defense-BdW6s483.mjs → managed-defense-DQ0iwWdG.mjs} +1 -1
- package/dist/{managed-transforms-BIeiofIS.mjs → managed-transforms-DDIdcPG0.mjs} +1 -1
- package/dist/{matches-CAnwci0P.mjs → matches-D6ahHNaP.mjs} +1 -1
- package/dist/{mcp-BfhOMGFE.mjs → mcp-BcIrLbRv.mjs} +1 -1
- package/dist/{mesh-CxUL2Wf-.mjs → mesh-wLiPcWyN.mjs} +1 -1
- package/dist/{mtls-certificates-CzmTw4zs.mjs → mtls-certificates-AEuNOERQ.mjs} +1 -1
- package/dist/{network-C68psMbz.mjs → network-DZsrs_sw.mjs} +1 -1
- package/dist/{network-interconnects-CLsMrTuk.mjs → network-interconnects-Cjbu4EMv.mjs} +1 -1
- package/dist/{oauth-D4bkeMAw.mjs → oauth-C-QCVfWz.mjs} +1 -1
- package/dist/{oauth-DouM-qz0.mjs → oauth-Cu1twz9z.mjs} +1 -1
- package/dist/{oauth-clients-DbUmVE_5.mjs → oauth-clients-DR0hzakz.mjs} +1 -1
- package/dist/{oauth-scopes-CQ18rwBg.mjs → oauth-scopes-BDNpJJ32.mjs} +1 -1
- package/dist/{observability-DpYxkFeZ.mjs → observability-BnHy2M6p.mjs} +1 -1
- package/dist/{organization-Dg55Xfz7.mjs → organization-iasRm69J.mjs} +1 -1
- package/dist/{organizations-QnyzGjB2.mjs → organizations-CUzCIKXV.mjs} +1 -1
- package/dist/{origin-ca-certificates-Co5lqIGL.mjs → origin-ca-certificates-iQXSqBI0.mjs} +1 -1
- package/dist/{origin-post-quantum-encryption-Cz8JZamC.mjs → origin-post-quantum-encryption-DcMDK6Tz.mjs} +1 -1
- package/dist/{origin-tls-client-auth-Dd0T1Kfv.mjs → origin-tls-client-auth-D1X26X7y.mjs} +1 -1
- package/dist/{page-rules--D3eXrCf.mjs → page-rules-CXa8EYcP.mjs} +1 -1
- package/dist/{pages-Ce8DDgNr.mjs → pages-Cu0m9GSH.mjs} +1 -1
- package/dist/{pay-per-crawl-CpkEbasz.mjs → pay-per-crawl-DmF8xlm_.mjs} +1 -1
- package/dist/{pay-per-use-fyM1DWgY.mjs → pay-per-use-DIp2fwJU.mjs} +1 -1
- package/dist/{pipelines-CAqCgBLh.mjs → pipelines-MmXlsxYO.mjs} +1 -1
- package/dist/{precursor-DBnn4Q35.mjs → precursor-jqeEG_mJ.mjs} +1 -1
- package/dist/{previews-y_nSqWK5.mjs → previews-Cg6lc24N.mjs} +1 -1
- package/dist/{progress-Bi02B6v4.mjs → progress-Bpp73hIu.mjs} +1 -1
- package/dist/{prompt-Bx2PB-tt.mjs → prompt-CpZztV8c.mjs} +1 -1
- package/dist/{queries-dg-CVXjf.mjs → queries-VzdcSR5H.mjs} +1 -1
- package/dist/{queues-C_ilLbRI.mjs → queues-BZYl2emH.mjs} +1 -1
- package/dist/{r2-data-catalog-DGv6aROr.mjs → r2-data-catalog-DISnPFPY.mjs} +1 -1
- package/dist/{r2-hZAkra-l.mjs → r2-omcKF8_A.mjs} +1 -1
- package/dist/{radar-BO9b0aZy.mjs → radar-JzBTD249.mjs} +1 -1
- package/dist/{raw-fetch-DNTQkXbg.mjs → raw-fetch-DxGs_eRm.mjs} +1 -1
- package/dist/{realtime-eSavuSeE.mjs → realtime-yIdAJ0Yf.mjs} +1 -1
- package/dist/{registrar-Ct30kOXZ.mjs → registrar-D-Li9gNk.mjs} +1 -1
- package/dist/{registrar-sandbox-Dmn9zGUk.mjs → registrar-sandbox-CKSSHAyv.mjs} +1 -1
- package/dist/{reporting-B-F5aWUJ.mjs → reporting-Cf-pnw6h.mjs} +1 -1
- package/dist/{request-headers-Dnbzv6RZ.mjs → request-headers-DaXBfmVn.mjs} +1 -1
- package/dist/{request-tracers-CaubpUFV.mjs → request-tracers-BegIQTzt.mjs} +1 -1
- package/dist/{resource-sharing-6Snv-b69.mjs → resource-sharing-DEVgiYzM.mjs} +1 -1
- package/dist/{resource-tagging-W_LFiX2J.mjs → resource-tagging-Cm2yJkU9.mjs} +1 -1
- package/dist/{rules-C26eyeA5.mjs → rules-DDCa7cYF.mjs} +1 -1
- package/dist/{rulesets-BKzIwVtJ.mjs → rulesets-BhS7Hvtu.mjs} +1 -1
- package/dist/{rum-Xdw5hyWY.mjs → rum-EIj9ViSn.mjs} +1 -1
- package/dist/run-CSFE1qVX.mjs +2 -0
- package/dist/{run-BBBMrSrs.mjs → run-ChM_YpZ0.mjs} +1 -1
- package/dist/{schema-DqtYndhB.mjs → schema-DCBb3Fcs.mjs} +1 -1
- package/dist/{schema-flags-CebDI0f1.mjs → schema-flags--GosoCMU.mjs} +1 -1
- package/dist/{scim-odJTXiIe.mjs → scim-DA83eNe-.mjs} +1 -1
- package/dist/{secrets-store-RYpWWzaw.mjs → secrets-store-BTd3eGIB.mjs} +1 -1
- package/dist/{security-center-B3D95vCa.mjs → security-center-DbH_7h-T.mjs} +1 -1
- package/dist/{security-txt-BSytVv-9.mjs → security-txt-DSrHhVEN.mjs} +1 -1
- package/dist/{shared-D67owd9x.mjs → shared-CtBkOWGN.mjs} +1 -1
- package/dist/{smart-shield-C83Sfnf4.mjs → smart-shield-DnSTo-OI.mjs} +1 -1
- package/dist/{snippets-B6oE9WIa.mjs → snippets-An5kQs33.mjs} +1 -1
- package/dist/{spawn-CKqJ9J4_.mjs → spawn-7IW1UyoH.mjs} +1 -1
- package/dist/{spectrum-CfxY--X_.mjs → spectrum-Ci79n7fd.mjs} +1 -1
- package/dist/{speed-DzK-kiWt.mjs → speed-BBL7LrLn.mjs} +1 -1
- package/dist/{src-B3h6tKMt.mjs → src-CNHNCZpy.mjs} +5 -5
- package/dist/{ssl-dnjzPcSB.mjs → ssl-B2psFIRm.mjs} +1 -1
- package/dist/{stream-oFyhS4Wi.mjs → stream-Du0Q7UOh.mjs} +1 -1
- package/dist/{submit-4f-ravmC.mjs → submit-CU8S2jBT.mjs} +1 -1
- package/dist/{tags-DrIP6Uiq.mjs → tags-C3l5aZSi.mjs} +1 -1
- package/dist/telemetry-CNt8H3aA.mjs +2 -0
- package/dist/{telemetry-Ds4epd3D.mjs → telemetry-PHe8XxA2.mjs} +1 -1
- package/dist/{tenant-C-gc3NWv.mjs → tenant-BZ0ysR9L.mjs} +1 -1
- package/dist/{tenant-custom-nameservers-DduTQIwh.mjs → tenant-custom-nameservers-DtKeyM5J.mjs} +1 -1
- package/dist/{tunnels-D0QYsskp.mjs → tunnels-D1tRWQQi.mjs} +1 -1
- package/dist/{turnstile-C6Q3spRB.mjs → turnstile-DBa4_Vyz.mjs} +1 -1
- package/dist/{update-check-CTLoakFV.mjs → update-check-AAn7EXw8.mjs} +1 -1
- package/dist/update-check-BbIXBq1o.mjs +2 -0
- package/dist/update-check-worker.mjs +1 -1
- package/dist/{url-info-Cs0V89qq.mjs → url-info-BRA0XGT2.mjs} +1 -1
- package/dist/{url-normalization-DaEQYy5h.mjs → url-normalization-B6N2m5s6.mjs} +1 -1
- package/dist/{url-scanner-C4YVeQ4v.mjs → url-scanner-CeKkzkhe.mjs} +1 -1
- package/dist/{user-BV1VY3Kl.mjs → user-CftksgmF.mjs} +1 -1
- package/dist/{values-qDS63E43.mjs → values-m7w9PX3o.mjs} +1 -1
- package/dist/{vectorize-NFzD3mP5.mjs → vectorize-BWBEtsgZ.mjs} +1 -1
- package/dist/version-cPq-WKL8.mjs +2 -0
- package/dist/{waiting-rooms-Y9YGj3ih.mjs → waiting-rooms-BVZSYTNJ.mjs} +1 -1
- package/dist/{web-assets-Gd6z8dbt.mjs → web-assets-CLU5vAgP.mjs} +1 -1
- package/dist/{web3-DCJx4NRp.mjs → web3-Dkd4XRNH.mjs} +1 -1
- package/dist/{workers-B-j-1ygi.mjs → workers-BQi4_SBS.mjs} +1 -1
- package/dist/{workers-builds-DPrNKjZW.mjs → workers-builds-BgtPSDYJ.mjs} +1 -1
- package/dist/{workers-for-platforms-BjKAhMLA.mjs → workers-for-platforms-actLCM6Q.mjs} +1 -1
- package/dist/{workers-vpc-C5YoCnQK.mjs → workers-vpc-DjGfJgQn.mjs} +1 -1
- package/dist/{workflows-C2KKIJjl.mjs → workflows-Cm7WsAgB.mjs} +1 -1
- package/dist/{zaraz-CVLCs1IX.mjs → zaraz-DurWe32F.mjs} +1 -1
- package/dist/{zero-trust-BtJi4OXF.mjs → zero-trust-D8SVU8YZ.mjs} +1 -1
- package/dist/{zone-hKgt0WzO.mjs → zone-B3AEAfcd.mjs} +1 -1
- package/dist/{zones-CCNyaD3J.mjs → zones-DiX5LoSU.mjs} +1 -1
- package/package.json +15 -3
- package/dist/build-OC77a1zq.mjs +0 -2
- package/dist/run-BRucX7Rz.mjs +0 -2
- package/dist/telemetry-mKEb8lYB.mjs +0 -2
- package/dist/update-check-BBS1K1jt.mjs +0 -2
- package/dist/version-W6_TN_kN.mjs +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 mesh nodes configurations get <tunnel-id>
|
|
3
3
|
|
|
4
4
|
Gets the high-availability configuration for a WARP Connector tunnel.`).positional(`tunnel-id`,{type:`string`,description:`UUID of the tunnel.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <tunnel-id>`,describe:`Get WARP Connector HA configuration`,builder:h,handler:async c=>s({command:`mesh nodes configurations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mesh nodes configurations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/warp_connector/${c[`tunnel-id`]==null?`<tunnel-id>`:encodeURIComponent(String(c[`tunnel-id`]))}/configurations`,pathParams:{"tunnel-id":String(c[`tunnel-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mesh.nodes.configurations.get({account_id:l,tunnel_id:c[`tunnel-id`]})),{successLabel:`Loaded`})})};function _(e){return e.usage(`$0 mesh nodes configurations update <tunnel-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-CpZztV8c.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 mtls-certificates associations get <mtls-certificate-id>
|
|
3
3
|
|
|
4
4
|
Lists all active associations between the certificate and Cloudflare services.`).positional(`mtls-certificate-id`,{type:`string`,description:`Identifier.`,demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const h={command:`get <mtls-certificate-id>`,describe:`List mTLS certificate associations`,builder:m,handler:async c=>s({command:`mtls-certificates associations get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{if(c.dryRun){a({command:`cf mtls-certificates associations get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/mtls_certificates/${c[`mtls-certificate-id`]==null?`<mtls-certificate-id>`:encodeURIComponent(String(c[`mtls-certificate-id`]))}/associations`,pathParams:{"mtls-certificate-id":String(c[`mtls-certificate-id`]??``)},bodyKind:`none`});return}let s=await r(c),l=c.local?e:await t();c.accountId=l,i(await o(`Loading`,async()=>s.mtlsCertificates.associations.get({account_id:l,mtls_certificate_id:c[`mtls-certificate-id`]})),{successLabel:`Loaded`})})},g={command:`associations`,describe:`Operations for associations`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 mtls-certificates create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-CpZztV8c.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 network routes cidr create
|
|
3
3
|
|
|
4
4
|
Routes a private network through a Cloudflare Tunnel.`).option(`comment`,{type:`string`,description:`Optional remark describing the route.`,default:``}).option(`network`,{type:`string`,description:`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`}).option(`virtual-network-id`,{type:`string`,description:`UUID of the virtual network.`}).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 ee={command:`create`,describe:`Create a tunnel route`,builder:m,handler:async f=>s({command:`network routes cidr create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf network routes cidr create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/teamnet/routes`,pathParams:{},bodyKind:`json`,body:f.body===void 0?l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.network.routes.cidr.create({...e,account_id:p})),{successLabel:`Created`});return}f.network===void 0&&(f.network=await d(`network`,`The private IPv4 or IPv6 range connected by the route, in CIDR notation.`));let m=l({comment:u(f.comment,`comment`,`text`),network:u(f.network,`network`,`text`),virtual_network_id:u(f[`virtual-network-id`],`virtual-network-id`,`text`)});i(await o(`Creating`,async()=>s.network.routes.cidr.create({...m,account_id:p})),{successLabel:`Created`})})};function h(e){return e.usage(`$0 network routes cidr delete <route-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-CpZztV8c.mjs";function p(e){return e.usage(`$0 network-interconnects cnis create
|
|
3
3
|
|
|
4
4
|
Creates a new Cloud Network Interconnect (CNI) for private network connectivity between Cloudflare and your infrastructure. CNIs enable dedicated, high-performance network links.`).option(`account`,{type:`string`,description:`Customer account tag`}).option(`bgp-customer-asn`,{type:`number`,description:`ASN used on the customer end of the BGP session`}).option(`bgp-extra-prefixes`,{type:`string`,array:!0,description:`Extra set of static prefixes to advertise to the customer's end of the session`}).option(`bgp-md5-key`,{type:`string`,description:`MD5 key to use for session authentication.
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,t}from"./src-
|
|
2
|
+
import{a as e,t}from"./src-CNHNCZpy.mjs";import{n,t as r}from"./version-cPq-WKL8.mjs";import{i,r as a}from"./project-settings-DSXevRvj.mjs";import{a as o,n as s,t as c}from"./cf-oadujOtC.mjs";import{n as l}from"./resolve-CUDKxUrW.mjs";import{M as u,n as d}from"./interactive-B6woOLo-.mjs";import{i as f,o as p}from"./dist-BpadEMNY.mjs";function m(e,t){if(t)return{value:t,source:`flag`};let n=process.env[e];if(n)return{value:n,source:`env`}}async function h(e={}){let t=process.env.CLOUDFLARE_ACCOUNT_ID;if(t)return{value:t,source:`env`};let n=a(void 0,e),r=n===void 0?await i(void 0,e):n;if(r?.settings?.accountId)return{value:r.settings.accountId,source:`settings`,path:r.path}}async function g(){let e=await h();if(e)return e.value;let{getActiveAccountId:t}=await import(`./oauth-Cu1twz9z.mjs`);try{return t()}catch{return}}async function _(e){let t=await h(e);t&&v(t.value,D(t,`accountId`));let{getOrSelectAccountId:n}=await import(`./oauth-Cu1twz9z.mjs`);return n(t?.value,e)}function v(e,t){if(!process.env.DEBUG)return;let n=e.length>12?e.slice(0,12)+`…`:e;process.stderr.write(`Using account: ${n} (${t})\n`)}async function y(e,t,n){if(e?.zoneId)return b(e.zoneId,t);let r=m(`CLOUDFLARE_ZONE_ID`,e?.zone);if(r){if(!n?.quiet&&r.source!==`flag`){let e=D(r);console.error(`Using zone: ${r.value} (from ${e})`)}return b(r.value,t)}throw Error(`No zone specified.
|
|
3
3
|
|
|
4
4
|
Please provide one of the following:
|
|
5
5
|
1. Zone as a positional argument: cf dns records list <zone>
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,f as t,n}from"./oauth-
|
|
2
|
+
import{a as e,f as t,n}from"./oauth-C-QCVfWz.mjs";export{n as getActiveAccountId,e as getOrSelectAccountId,t as resolveProfile};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-CpZztV8c.mjs";function m(e){return e.usage(`$0 oauth-clients create
|
|
3
3
|
|
|
4
4
|
Create a new OAuth client for an account.`).option(`allowed-cors-origins`,{type:`string`,array:!0,description:`Array of allowed CORS origins.`}).option(`client-name`,{type:`string`,description:`Human-readable name of the OAuth client.`}).option(`client-uri`,{type:`string`,description:`URL of the home page of the client.`}).option(`grant-types`,{type:`string`,array:!0,description:"Array of OAuth grant types the client is allowed to use. `authorization_code` is required; `refresh_token` may be included optionally."}).option(`logo-uri`,{type:`string`,description:`URL of the client's logo.`}).option(`optional-scopes`,{type:`string`,array:!0,description:"Scopes that the authorizing user may decline during consent. Each value must also appear in `scopes`. The scopes `openid`, `offline`, and `offline_access` cannot be optional."}).option(`policy-uri`,{type:`string`,description:`URL that points to a privacy policy document.`}).option(`post-logout-redirect-uris`,{type:`string`,array:!0,description:`Array of allowed post-logout redirect URIs.`}).option(`redirect-uris`,{type:`string`,array:!0,description:`Array of allowed redirect URIs for the client.`}).option(`response-types`,{type:`string`,array:!0,description:`Array of OAuth response types the client is allowed to use.`}).option(`scopes`,{type:`string`,array:!0,description:"Array of OAuth scopes the client is allowed to request. Colon-delimited scopes are not accepted. Dot-delimited scopes are validated against available OAuth API scopes; simple identity scopes are allowed. Protocol scopes `offline_access` and `openid` are added or removed automatically based on `grant_types` and `response_types`."}).option(`token-endpoint-auth-method`,{type:`string`,description:`The authentication method the client uses at the token endpoint.`,choices:[`none`,`client_secret_basic`,`client_secret_post`]}).option(`tos-uri`,{type:`string`,description:`URL that points to a terms of service document.`}).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:`Create OAuth Client`,builder:m,handler:async p=>s({command:`oauth-clients create`,classification:{safeFlags:[`token-endpoint-auth-method`,`dry-run`]}},p,async()=>{if(p.dryRun){a({command:`cf oauth-clients create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/oauth_clients`,pathParams:{},bodyKind:`json`,body:p.body===void 0?l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)}):c(p.body)});return}let s=await r(p),m=p.local?e:await t();if(p.accountId=m,p.body){let e=c(p.body);i(await o(`Creating`,async()=>s.oauthClients.create({...e,account_id:m})),{successLabel:`Created`});return}if(p[`client-name`]===void 0&&(p[`client-name`]=await d(`client-name`,`Human-readable name of the OAuth client.`)),p[`grant-types`]===void 0)throw Error(`--grant-types is required (or pass --body with this field set).`);if(p[`redirect-uris`]===void 0)throw Error(`--redirect-uris is required (or pass --body with this field set).`);if(p[`response-types`]===void 0)throw Error(`--response-types is required (or pass --body with this field set).`);if(p.scopes===void 0)throw Error(`--scopes is required (or pass --body with this field set).`);p[`token-endpoint-auth-method`]===void 0&&(p[`token-endpoint-auth-method`]=await f(`token-endpoint-auth-method`,`The authentication method the client uses at the token endpoint.`,[`none`,`client_secret_basic`,`client_secret_post`]));let h=l({allowed_cors_origins:p[`allowed-cors-origins`],client_name:u(p[`client-name`],`client-name`,`text`),client_uri:u(p[`client-uri`],`client-uri`,`text`),grant_types:p[`grant-types`],logo_uri:u(p[`logo-uri`],`logo-uri`,`text`),optional_scopes:p[`optional-scopes`],policy_uri:u(p[`policy-uri`],`policy-uri`,`text`),post_logout_redirect_uris:p[`post-logout-redirect-uris`],redirect_uris:p[`redirect-uris`],response_types:p[`response-types`],scopes:p.scopes,token_endpoint_auth_method:u(p[`token-endpoint-auth-method`],`token-endpoint-auth-method`,`text`),tos_uri:u(p[`tos-uri`],`tos-uri`,`text`)});i(await o(`Creating`,async()=>s.oauthClients.create({...h,account_id:m})),{successLabel:`Created`})})};function g(e){return e.usage(`$0 oauth-clients delete-rotated-secret <oauth-client-id>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-C80y97yu.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bpp73hIu.mjs";import{t as i}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";function a(e){return e.usage(`$0 oauth-scopes list
|
|
3
3
|
|
|
4
4
|
List all available OAuth scopes. This endpoint requires authentication but has no authorization role requirements.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const o={command:`list`,describe:`List OAuth Scopes`,builder:a,handler:async a=>i({command:`oauth-scopes list`,classification:{safeFlags:[`dry-run`]}},a,async()=>{if(a.dryRun){n({command:`cf oauth-scopes list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/oauth/scopes`,pathParams:{},bodyKind:`none`});return}let i=await e(a);t(await r(`Loading`,async()=>i.oauthScopes.list()),{successLabel:`Loaded`})})},s={command:`oauth-scopes`,describe:`oauth-scopes`,builder:e=>e.command(o).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{s as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";import{t as g}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 observability destinations create
|
|
3
3
|
|
|
4
4
|
Create a new Workers Observability Telemetry Destination.`).option(`configuration-type`,{type:`string`,description:`The configuration.type field`,choices:[`logpush`]}).option(`configuration-url`,{type:`string`,description:`The configuration.url field`}).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`name`,{type:`string`,description:`The name field`}).option(`skip-preflight-check`,{type:`boolean`,description:`The skipPreflightCheck field`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const te={command:`create`,describe:`Create Destination`,builder:ee,handler:async t=>c({command:`observability destinations create`,classification:{safeFlags:[`configuration-type`,`enabled`,`skip-preflight-check`,`dry-run`]}},t,async()=>{if(t.dryRun){o({command:`cf observability destinations create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await r()??`<account-id>`}/workers/observability/destinations`,pathParams:{},bodyKind:`json`,body:t.body===void 0?d({configuration:{type:f(t[`configuration-type`],`configuration-type`,`text`),url:f(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:f(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]}):l(t.body)});return}let c=await i(t),u=t.local?e:await n();if(t.accountId=u,t.body){let e=l(t.body);a(await s(`Creating`,async()=>c.observability.destinations.create({...e,account_id:u})),{successLabel:`Created`});return}if(t[`configuration-type`]===void 0&&(t[`configuration-type`]=await m(`configuration-type`,`The configuration.type field`,[`logpush`])),t[`configuration-url`]===void 0&&(t[`configuration-url`]=await p(`configuration-url`,`The configuration.url field`)),t.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);t.name===void 0&&(t.name=await p(`name`,`The name field`));let h=d({configuration:{type:f(t[`configuration-type`],`configuration-type`,`text`),url:f(t[`configuration-url`],`configuration-url`,`text`)},enabled:t.enabled,name:f(t.name,`name`,`text`),skipPreflightCheck:t[`skip-preflight-check`]});a(await s(`Creating`,async()=>c.observability.destinations.create({...h,account_id:u})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 observability destinations delete <slug>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-C80y97yu.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bpp73hIu.mjs";import{t as i}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as a,r as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{a as l,i as u,n as d}from"./prompt-CpZztV8c.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 organization account list
|
|
3
3
|
|
|
4
4
|
Retrieve a list of accounts that belong to a specific organization. (Currently in Public Beta - see https://developers.cloudflare.com/fundamentals/organizations/)`).option(`organization-id`,{type:`string`,description:`The ID of the organization to retrieve a list of accounts for.`,demandOption:!0}).option(`account-pubname`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname is equal to
|
|
5
5
|
a particular string.`}).option(`account-pubname-starts-with`,{type:`string`,description:`(case-insensitive) Filter the list of accounts to where the account_pubname starts with
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-C80y97yu.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bpp73hIu.mjs";import{t as i}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{t as a}from"./cli-types-tt_LZMbn.mjs";function o(e){return e.usage("$0 organizations billing usage get <organization-id>\n\nReturns cost and usage data for all accounts within an organization, aligned with the [FinOps FOCUS v1.3](https://focus.finops.org/focus-specification/v1-3/) Cost and Usage dataset specification. Each record represents one billable metric for one account on one day. This includes all metered usage, including usage that falls within free-tier allowances and may result in zero cost. The response includes usage for every account belonging to the specified organization. **Note:** Cost and pricing fields are not yet populated and will be absent from responses until billing integration is complete. When `from` and `to` are omitted, defaults to the start of the current month through today. The maximum date range is 31 days. An organization with no accounts, or an organization ID that does not exist, returns a successful response with an empty result set rather than an error.").positional(`organization-id`,{type:`string`,description:`Identifies the Cloudflare organization.`,demandOption:!0}).option(`from`,{type:`string`,description:"Start date for the usage query (ISO 8601). Required if `to` is set. When omitted along with `to`, defaults to the start of the current month. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`to`,{type:`string`,description:"End date for the usage query (ISO 8601). Required if `from` is set. When omitted along with `from`, defaults to today. Filters by charge period (when consumption happened), not billing period. The maximum date range is 31 days."}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const s={command:`get <organization-id>`,describe:`Get Organization Usage (Version 2, Alpha, Restricted)`,builder:o,handler:async a=>i({command:`organizations billing usage get`,classification:{safeFlags:[`dry-run`]}},a,async()=>{let i={from:a.from,to:a.to};if(a.dryRun){n({command:`cf organizations billing usage get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/billable/usage`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.billing.usage.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})},c={command:`usage`,describe:`Operations for billing.usage`,builder:e=>e.command(s).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},l={command:`billing`,describe:`Operations for billing`,builder:e=>e.command(c).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function u(e){return e.usage(`$0 organizations logs audit get <organization-id>
|
|
3
3
|
|
|
4
4
|
Gets a list of audit logs for an organization.`).positional(`organization-id`,{type:`string`,description:`The unique id that identifies the organization.`,demandOption:!0}).option(`action-result`,{type:`string`,description:`Filters by whether the action was successful or not.`}).option(`action-type`,{type:`string`,description:`Filters by the action type.`}).option(`actor-context`,{type:`string`,description:"Filters by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email`,{type:`string`,description:`Filters by the actor's email address.`}).option(`actor-id`,{type:`string`,description:`Filters by the actor's user ID.`}).option(`actor-ip-address`,{type:`string`,description:`The IP address where the action was initiated.`}).option(`actor-token-id`,{type:`string`,description:`Filters by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name`,{type:`string`,description:`Filters by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type`,{type:`string`,description:`Filters by the actor type.`}).option(`id`,{type:`string`,description:`Finds a specific log by its ID.`}).option(`raw-cf-ray-id`,{type:`string`,description:`Filters by the response CF Ray ID.`}).option(`raw-method`,{type:`string`,description:`The HTTP method for the API call.`}).option(`raw-status-code`,{type:`string`,description:`The response status code that was returned.`}).option(`raw-uri`,{type:`string`,description:`Filters by the request URI.`}).option(`resource-id`,{type:`string`,description:`Filters by the resource ID.`}).option(`resource-product`,{type:`string`,description:`Filters audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type`,{type:`string`,description:`Filters audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope`,{type:`string`,description:`Filters by the resource scope, specifying whether the resource is associated with an organization.`}).option(`action-result-not`,{type:`string`,description:`Filters out audit logs by whether the action was successful or not.`}).option(`action-type-not`,{type:`string`,description:`Filters out audit logs by the action type.`}).option(`actor-context-not`,{type:`string`,description:"Filters out audit logs by the actor context.\n- `api`: The action was performed through the API. The specific credential type was not recorded.\n- `api_key`: The action was authenticated with a Cloudflare Global API Key.\n- `api_token`: The action was authenticated with an API token.\n- `dash`: The action was performed through the Cloudflare dashboard.\n- `oauth`: The action was authenticated with an OAuth token.\n- `origin_ca_key`: The action was authenticated with an Origin CA key."}).option(`actor-email-not`,{type:`string`,description:`Filters out audit logs by the actor's email address.`}).option(`actor-id-not`,{type:`string`,description:`Filters out audit logs by the actor's user ID.`}).option(`actor-ip-address-not`,{type:`string`,description:`Filters out audit logs IP address where the action was initiated.`}).option(`actor-token-id-not`,{type:`string`,description:`Filters out audit logs by the API token ID when the actor context is an api_token or oauth.`}).option(`actor-token-name-not`,{type:`string`,description:`Filters out audit logs by the API token name when the actor context is an api_token or oauth.`}).option(`actor-type-not`,{type:`string`,description:`Filters out audit logs by the actor type.`}).option(`id-not`,{type:`string`,description:`Filters out audit logs by their IDs.`}).option(`raw-cf-ray-id-not`,{type:`string`,description:`Filters out audit logs by the response CF Ray ID.`}).option(`raw-method-not`,{type:`string`,description:`Filters out audit logs by the HTTP method for the API call.`}).option(`raw-status-code-not`,{type:`string`,description:`Filters out audit logs by the response status code that was returned.`}).option(`raw-uri-not`,{type:`string`,description:`Filters out audit logs by the request URI.`}).option(`resource-id-not`,{type:`string`,description:`Filters out audit logs by the resource ID.`}).option(`resource-product-not`,{type:`string`,description:`Filters out audit logs by the Cloudflare product associated with the changed resource.`}).option(`resource-type-not`,{type:`string`,description:`Filters out audit logs based on the unique type of resource changed by the action.`}).option(`resource-scope-not`,{type:`string`,description:`Filters out audit logs by the resource scope, specifying whether the resource is associated with an organization.`}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get <organization-id>`,describe:`Get organization audit logs (Version 2)`,builder:a(u),handler:async a=>i({command:`organizations logs audit get`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_result:a[`action-result`],action_type:a[`action-type`],actor_context:a[`actor-context`],actor_email:a[`actor-email`],actor_id:a[`actor-id`],actor_ip_address:a[`actor-ip-address`],actor_token_id:a[`actor-token-id`],actor_token_name:a[`actor-token-name`],actor_type:a[`actor-type`],id:a.id,raw_cf_ray_id:a[`raw-cf-ray-id`],raw_method:a[`raw-method`],raw_status_code:a[`raw-status-code`],raw_uri:a[`raw-uri`],resource_id:a[`resource-id`],resource_product:a[`resource-product`],resource_type:a[`resource-type`],resource_scope:a[`resource-scope`],"action_result.not":a[`action-result-not`],"action_type.not":a[`action-type-not`],"actor_context.not":a[`actor-context-not`],"actor_email.not":a[`actor-email-not`],"actor_id.not":a[`actor-id-not`],"actor_ip_address.not":a[`actor-ip-address-not`],"actor_token_id.not":a[`actor-token-id-not`],"actor_token_name.not":a[`actor-token-name-not`],"actor_type.not":a[`actor-type-not`],"id.not":a[`id-not`],"raw_cf_ray_id.not":a[`raw-cf-ray-id-not`],"raw_method.not":a[`raw-method-not`],"raw_status_code.not":a[`raw-status-code-not`],"raw_uri.not":a[`raw-uri-not`],"resource_id.not":a[`resource-id-not`],"resource_product.not":a[`resource-product-not`],"resource_type.not":a[`resource-type-not`],"resource_scope.not":a[`resource-scope-not`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit`,pathParams:{"organization-id":String(a[`organization-id`]??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.get({organization_id:a[`organization-id`],...i})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 organizations logs audit history <id>\n\nReturns the chronological change history for the resource identified by the given organization-scoped audit log entry. The endpoint first locates the source audit log entry by `id` (using `action_time` to narrow the lookup window), derives identifying filters from that entry, and then returns matching audit logs within the `since`/`before` window. The `result_info.history_status` field indicates the quality of the resource identification used: - `exact`: Resource was identified by the resource URI. - `approximate`: Resource was identified without the resource URI. - `unavailable`: The source audit log entry did not contain enough information to identify the resource; an empty result is returned.").positional(`id`,{type:`string`,description:`The ID of the audit log to fetch resource history for.`,demandOption:!0}).option(`organization-id`,{type:`string`,description:`The unique ID that identifies the organization.`,demandOption:!0}).option(`action-time`,{type:`string`,description:"RFC3339 timestamp of the source audit log entry's action time. Used to narrow the source-entry lookup window. Provide the `action.time` value from the audit log identified by `id`.",demandOption:!0}).option(`since`,{type:`string`,description:`Limits the returned results to logs newer than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`before`,{type:`string`,description:`Limits the returned results to logs older than the specified date. This can be a date string 2019-04-30 (interpreted in UTC) or an absolute timestamp that conforms to RFC3339.`,demandOption:!0}).option(`direction`,{type:`string`,description:`Sets sorting order.`,choices:[`desc`,`asc`]}).option(`limit`,{type:`number`,description:`The number limits the objects to return. The cursor attribute may be used to iterate over the next batch of objects if there are more than the limit.`}).option(`cursor`,{type:`string`,description:`The cursor is an opaque token used to paginate through large sets of records. It indicates the position from which to continue when requesting the next set of records. A valid cursor value can be obtained from the cursor object in the result_info structure of a previous response.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const p={command:`history <id>`,describe:`Get resource change history from an organization audit log entry (Version 2)`,builder:a(f),handler:async a=>i({command:`organizations logs audit history`,classification:{safeFlags:[`direction`,`dry-run`]}},a,async()=>{let i={action_time:a[`action-time`],since:a.since,before:a.before,direction:a.direction,limit:a.limit,cursor:a.cursor};if(a.dryRun){n({command:`cf organizations logs audit history`,method:`GET`,url:`https://api.cloudflare.com/client/v4/organizations/${a[`organization-id`]==null?`<organization-id>`:encodeURIComponent(String(a[`organization-id`]))}/logs/audit/${a.id==null?`<id>`:encodeURIComponent(String(a.id))}/history`,pathParams:{"organization-id":String(a[`organization-id`]??``),id:String(a.id??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.organizations.logs.audit.history({organization_id:a[`organization-id`],id:a.id,...i})),{successLabel:`Loaded`})})},m={command:`audit`,describe:`Operations for logs.audit`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},h={command:`logs`,describe:`Operations for logs`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}},g={command:`organizations`,describe:`Multi-user organizations that group accounts, members, and shared settings under a single entity`,builder:e=>e.command(l).command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{g as default};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-C80y97yu.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bpp73hIu.mjs";import{t as i}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as a,t as o}from"./body-parser-CUWbw_Tq.mjs";import{n as s}from"./input-validation-Ch4Vllrm.mjs";import{a as c,i as l,n as u}from"./prompt-CpZztV8c.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 origin-ca-certificates create
|
|
3
3
|
|
|
4
4
|
Create an Origin CA certificate. You can use an Origin CA Key as your User Service Key or an API token when calling this endpoint ([see above](#requests)).`).option(`csr`,{type:`string`,description:`The Certificate Signing Request (CSR). Must be newline-encoded.`}).option(`hostnames`,{type:`string`,array:!0,description:"Array of hostnames or wildcard names bound to the certificate.\nHostnames must be fully qualified domain names (FQDNs) belonging to zones on your account (e.g., `example.com` or `sub.example.com`). Wildcards are supported only as a `*.` prefix for a single level (e.g., `*.example.com`). Double wildcards (`*.*.example.com`) and interior wildcards (`foo.*.example.com`) are not allowed. The wildcard suffix must be a multi-label domain (`*.example.com` is valid, but `*.com` is not). Unicode/IDN hostnames are accepted and automatically converted to punycode."}).option(`request-type`,{type:`string`,description:`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,choices:[`origin-rsa`,`origin-ecc`,`keyless-certificate`]}).option(`requested-validity`,{type:`number`,description:`The number of days for which the certificate should be valid.`,default:5475}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const p={command:`create`,describe:`Create Certificate`,builder:f,handler:async u=>i({command:`origin-ca-certificates create`,classification:{safeFlags:[`request-type`,`dry-run`]}},u,async()=>{if(u.dryRun){n({command:`cf origin-ca-certificates create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/certificates`,pathParams:{},bodyKind:`json`,body:u.body===void 0?o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]}):a(u.body)});return}let i=await e(u);if(u.body){let e=a(u.body);t(await r(`Creating`,async()=>i.originCaCertificates.create({...e})),{successLabel:`Created`});return}if(u.csr===void 0&&(u.csr=await c(`csr`,`The Certificate Signing Request (CSR). Must be newline-encoded.`)),u.hostnames===void 0)throw Error(`--hostnames is required (or pass --body with this field set).`);u[`request-type`]===void 0&&(u[`request-type`]=await l(`request-type`,`Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).`,[`origin-rsa`,`origin-ecc`,`keyless-certificate`]));let d=o({csr:s(u.csr,`csr`,`text`),hostnames:u.hostnames,request_type:s(u[`request-type`],`request-type`,`text`),requested_validity:u[`requested-validity`]});t(await r(`Creating`,async()=>i.originCaCertificates.create({...d})),{successLabel:`Created`})})};function m(e){return e.usage(`$0 origin-ca-certificates delete <certificate-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,t as s}from"./body-parser-CUWbw_Tq.mjs";import{n as c}from"./input-validation-Ch4Vllrm.mjs";import{i as l}from"./prompt-CpZztV8c.mjs";function u(e){return e.usage(`$0 origin-post-quantum-encryption get
|
|
3
3
|
|
|
4
4
|
Instructs Cloudflare to use Post-Quantum (PQ) key agreement algorithms when connecting to your origin. Preferred instructs Cloudflare to opportunistically send a Post-Quantum keyshare in the first message to the origin (for fastest connections when the origin supports and prefers PQ), supported means that PQ algorithms are advertised but only used when requested by the origin, and off means that PQ algorithms are not advertised.`).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Origin Post-Quantum Encryption setting`,builder:u,handler:async o=>a({command:`origin-post-quantum-encryption get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf origin-post-quantum-encryption get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/cache/origin_post_quantum_encryption`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.originPostQuantumEncryption.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage(`$0 origin-post-quantum-encryption update
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{a as u,n as d}from"./prompt-CpZztV8c.mjs";import{t as f}from"./cli-types-tt_LZMbn.mjs";function p(e){return e.usage(`$0 origin-tls-client-auth hostname-associations list
|
|
3
3
|
|
|
4
4
|
List certificate ID - hostname associations for the given zone. Shows which hostnames are associated to which certificates for authenticated origin pulls.`).option(`page`,{type:`number`,description:`Page number of paginated results.`}).option(`per-page`,{type:`number`,description:`Number of associations per page.`}).option(`status`,{type:`string`,description:`Filter associations by status. Use comma-separated values to filter by multiple statuses, or "all" to include every status. Defaults to "active" if not provided.`,choices:[`active`,`pending_deployment`,`pending_deletion`,`deleted`,`deployment_timed_out`,`deletion_timed_out`,`all`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const m={command:`list`,describe:`List Hostname Associations`,builder:f(p),handler:async o=>a({command:`origin-tls-client-auth hostname-associations list`,classification:{safeFlags:[`status`,`dry-run`]}},o,async()=>{let a={page:o.page,per_page:o[`per-page`],status:o.status};if(o.dryRun){r({command:`cf origin-tls-client-auth hostname-associations list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/origin_tls_client_auth/hostnames`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},query:a,bodyKind:`none`});return}let s=await t(o),c=await e({zone:o.zone},s,{quiet:o.quiet});o.zoneId=c,n(await i(`Loading`,async()=>s.originTlsClientAuth.hostnameAssociations.list({zone_id:c,...a})),{successLabel:`Loaded`})})},h={command:`hostname-associations`,describe:`Operations for hostname-associations`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 origin-tls-client-auth hostname-certificates create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";import{n as u}from"./prompt-CpZztV8c.mjs";import{t as d}from"./cli-types-tt_LZMbn.mjs";function f(e){return e.usage(`$0 page-rules create
|
|
3
3
|
|
|
4
4
|
Creates a new Page Rule.`).option(`actions`,{type:`string`,description:`The set of actions to perform if the targets of this rule match the
|
|
5
5
|
request. Actions can redirect to another URL or override settings, but
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f,t as p}from"./input-validation-Ch4Vllrm.mjs";import{a as m,i as h,n as g}from"./prompt-CpZztV8c.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function _(e){return e.usage(`$0 pages projects connect-source <project-name>
|
|
3
3
|
|
|
4
4
|
Connect a Git repository source to an existing Pages project.`).positional(`project-name`,{type:`string`,description:`Name of the project.`,demandOption:!0}).option(`config-deployments-enabled`,{type:`boolean`,description:`Whether to enable automatic deployments when pushing to the source repository.
|
|
5
5
|
When disabled, no deployments (production or preview) will be triggered automatically.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{_ as t,m as n,v as r}from"./oauth-C-QCVfWz.mjs";import{r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,r as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p,i as m,n as h}from"./prompt-CpZztV8c.mjs";import{t as ee}from"./cli-types-tt_LZMbn.mjs";function te(e){return e.usage(`$0 pay-per-crawl config create
|
|
3
3
|
|
|
4
4
|
Creates the pay-per-crawl config for a zone.`).option(`enabled`,{type:`boolean`,description:`The enabled field`}).option(`price-usd-microcents`,{type:`number`,description:`Price in microcents 1 USD = 100,000,000 microcents. Must be 0 or a multiple of 100,000 $0.001. Range: $0.001–$9,999.999.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Data for fully replacing a pay-per-crawl zone configuration`})}const g={command:`create`,describe:`Creates pay-per-crawl config for a zone`,builder:te,handler:async e=>c({command:`pay-per-crawl config create`,classification:{safeFlags:[`enabled`,`dry-run`]}},e,async()=>{if(e.dryRun){o({command:`cf pay-per-crawl config create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/zones/${e.zone??e.zoneId??`<zone>`}/pay-per-crawl/configuration`,pathParams:{"zone-id":String(e.zone??e[`zone-id`]??``)},bodyKind:`json`,body:e.body===void 0?d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]}):l(e.body)});return}let n=await i(e),r=await t({zone:e.zone},n,{quiet:e.quiet});if(e.zoneId=r,e.body){let t=l(e.body);a(await s(`Creating`,async()=>n.payPerCrawl.config.create({...t,zone_id:r})),{successLabel:`Created`});return}if(e.enabled===void 0)throw Error(`--enabled is required (or pass --body with this field set).`);if(e[`price-usd-microcents`]===void 0)throw Error(`--price-usd-microcents is required (or pass --body with this field set).`);let c=d({enabled:e.enabled,price_usd_microcents:e[`price-usd-microcents`]});a(await s(`Creating`,async()=>n.payPerCrawl.config.create({...c,zone_id:r})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pay-per-crawl config edit
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as l,t as u}from"./input-validation-Ch4Vllrm.mjs";function d(e){return e.usage(`$0 pay-per-use enabled-domains list
|
|
3
3
|
|
|
4
4
|
Returns publisher domains associated with the requesting Pay Per Use operator through an accepted price agreement. License expiration is the earlier non-null boundary from the price agreement and publisher zone lifecycles. A future expiration remains active and is exposed to the operator. After expiration, the license remains listed as expired for one calendar month before it is omitted; an active agreement for the same domain takes precedence. The requesting account must be an active Pay Per Use operator.`).option(`cursor`,{type:`string`,description:`Opaque, account-bound cursor returned by the previous page. Cursors expire after one hour; restart pagination without a cursor after receiving a 400 response for an expired cursor.`}).option(`per-page`,{type:`number`,description:`Maximum number of domains to return`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const f={command:`list`,describe:`List enabled Pay Per Use domains`,builder:d,handler:async r=>c({command:`pay-per-use enabled-domains list`,classification:{safeFlags:[`dry-run`]}},r,async()=>{let c={cursor:r.cursor,per_page:r[`per-page`]};if(r.dryRun){o({command:`cf pay-per-use enabled-domains list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pay-per-use/enabled-domains`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.payPerUse.enabledDomains.list({account_id:u,...c})),{successLabel:`Loaded`})})},p={command:`enabled-domains`,describe:`Operations for enabled-domains`,builder:e=>e.command(f).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function m(e){return e.usage(`$0 pay-per-use usage-reports submit
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-CpZztV8c.mjs";function h(e){return e.usage(`$0 pipelines create
|
|
3
3
|
|
|
4
4
|
Create a new Pipeline.`).option(`name`,{type:`string`,description:`Specifies the name of the Pipeline.`}).option(`sql`,{type:`string`,description:`Specifies SQL for the Pipeline processing flow.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Raw JSON request body (bypasses individual flags)`})}const g={command:`create`,describe:`Create Pipeline`,builder:h,handler:async l=>s({command:`pipelines create`,classification:{safeFlags:[`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf pipelines create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/pipelines/v1/pipelines`,pathParams:{},bodyKind:`json`,body:l.body===void 0?u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)}):c(l.body)});return}let s=await r(l),p=l.local?e:await t();if(l.accountId=p,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.pipelines.create({...e,account_id:p})),{successLabel:`Created`});return}l.name===void 0&&(l.name=await f(`name`,`Specifies the name of the Pipeline.`)),l.sql===void 0&&(l.sql=await f(`sql`,`Specifies SQL for the Pipeline processing flow.`));let m=u({name:d(l.name,`name`,`text`),sql:d(l.sql,`sql`,`text`)});i(await o(`Creating`,async()=>s.pipelines.create({...m,account_id:p})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 pipelines delete <pipeline-id>
|
|
5
5
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{_ as e}from"./oauth-
|
|
2
|
+
import{_ as e}from"./oauth-C-QCVfWz.mjs";import{r as t}from"./auth-C80y97yu.mjs";import{t as n}from"./output-Bia1u2k5.mjs";import{t as r}from"./dry-run-CLX6Pbtq.mjs";import{t as i}from"./progress-Bpp73hIu.mjs";import{t as a}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as o,r as s,t as c}from"./body-parser-CUWbw_Tq.mjs";import{n as l}from"./input-validation-Ch4Vllrm.mjs";function u(e){return e.usage("$0 precursor get\n\nRetrieve a zone's Precursor configuration: the zone-level `default_mode` and the ordered list of `enforcement_rules`.").option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const d={command:`get`,describe:`Get Zone Precursor Config`,builder:u,handler:async o=>a({command:`precursor get`,classification:{safeFlags:[`dry-run`]}},o,async()=>{if(o.dryRun){r({command:`cf precursor get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/zones/${o.zone??o.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(o.zone??o[`zone-id`]??``)},bodyKind:`none`});return}let a=await t(o),s=await e({zone:o.zone},a,{quiet:o.quiet});o.zoneId=s,n(await i(`Loading`,async()=>a.precursor.get({zone_id:s})),{successLabel:`Loaded`})})};function f(e){return e.usage("$0 precursor update\n\nUpdates the Precursor configuration for a zone. `default_mode` sets the zone-level enforcement mode. `enforcement_rules` is the ordered list of rules that override enforcement for matching requests. This is a partial update: only the fields present in the request body are changed. - Sending an empty array (`[]`) clears all enforcement rules. - At least one of `default_mode` or `enforcement_rules` must be present; an empty body (`{}`) is rejected with `400`. - Rule `id` is read-only (assigned by Cloudflare) and ignored on input. - Rule `mode` must be `min-friction` or `max-security` (`off` is not a valid rule mode; use `default_mode` to disable enforcement). - Rule `expression` is limited to 4000 characters. The limit applies to each rule individually, not to the combined size of all rules.").option(`default-mode`,{type:`string`,description:`The zone-level Precursor enforcement mode applied to requests that do
|
|
3
3
|
not match a more specific enforcement rule.
|
|
4
4
|
`,choices:[`off`,`min-friction`,`max-security`]}).option(`enforcement-rules`,{type:`string`,description:`The ordered list of enforcement rules for the zone. Provide as a JSON array of objects or @path/to/file.json.`}).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:`update`,describe:`Update Zone Precursor Config`,builder:f,handler:async u=>a({command:`precursor update`,classification:{safeFlags:[`default-mode`,`dry-run`]}},u,async()=>{if(u.dryRun){r({command:`cf precursor update`,method:`PUT`,url:`https://api.cloudflare.com/client/v4/zones/${u.zone??u.zoneId??`<zone>`}/precursor`,pathParams:{"zone-id":String(u.zone??u[`zone-id`]??``)},bodyKind:`json`,body:u.body===void 0?c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)}):o(u.body)});return}let a=await t(u),d=await e({zone:u.zone},a,{quiet:u.quiet});if(u.zoneId=d,u.body){let e=o(u.body);n(await i(`Updating`,async()=>a.precursor.update({body:e,zone_id:d})),{successLabel:`Updated`});return}let f=c({default_mode:l(u[`default-mode`],`default-mode`,`text`),enforcement_rules:s(u[`enforcement-rules`],`enforcement-rules`)});n(await i(`Updating`,async()=>a.precursor.update({body:f,zone_id:d})),{successLabel:`Updated`})})},m={command:`precursor`,describe:`Precursor settings for a zone`,builder:e=>e.command(d).command(p).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{m as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{E as e,M as t}from"./dist-dc4E1u01.mjs";import{m as n}from"./oauth-
|
|
2
|
+
import{E as e,M as t}from"./dist-dc4E1u01.mjs";import{m as n}from"./oauth-C-QCVfWz.mjs";import{d as r,h as i}from"./interactive-B6woOLo-.mjs";import{i as a}from"./auth-C80y97yu.mjs";import{t as o}from"./output-Bia1u2k5.mjs";import{n as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{D as c,S as l,b as u,c as d,d as f,g as p,n as m,u as h,v as g}from"./dist-BDOzKthe.mjs";import{a as _,l as v,n as y,o as b,r as x,t as S}from"./containers-Bx_44bmJ.mjs";import{a as C,i as w,n as T,r as E}from"./build-BbjcJxKq.mjs";import{t as D}from"./deploy-input-BCYyKXpp.mjs";import{readBuildOutput as O}from"@cloudflare/build-output-utils";function k(e){return{getNormalizedContainerOptions:async t=>e.standard.normalized.map(e=>({...e,name:t.containers?.find(({class_name:t})=>t===e.class_name)?.name??e.name})),deployPreviewContainers:async(n,r,i,a,o)=>A(o.quiet,async()=>{let s=new Map;for(let e of Object.values(i.env??{}))e.type===`durable_object_namespace`&&e.class_name&&e.namespace_id&&e.script_name===void 0&&s.set(e.class_name,e.namespace_id);let c;for(let t of r){let r=s.get(t.class_name);if(r||=(c??=await g(n,a),c.find(e=>e.class===t.class_name&&e.preview?.id===i.preview_id)?.id),!r)throw Error(`Could not find a Preview Durable Object namespace for Container class "${t.class_name}".`);await d({imageRef:await j(t,e,i.id,a,n,o.localImageReferences?.get(t.class_name)),durable_object_namespace_id:r},t,n,a)}await h(e.standard.builtImages.filter(({container:e})=>!o.localImageReferences?.has(e.class_name)),t())})}}async function A(e,t){if(!e)return t();let n=r();i(`error`);try{return await t()}finally{i(n)}}async function j(e,n,r,i,a,o){if(o!==void 0)return l({pathToDocker:t(),sourceTag:o,targetTag:o,accountId:i,complianceConfig:a,containerConfig:`dockerfile`in e?e:void 0,cleanupSourceTag:!1});let s=n.standard.builtImages.find(({container:t})=>t.class_name===e.class_name);if(s)return u(s,r,t(),i,a);if(`image_uri`in e)return{newTag:e.image_uri};throw Error(`Container "${e.name}" has no Build Output image to deploy.`)}function M(e){return e.positional(`preview-name`,{type:`string`,description:`Preview name. Defaults to the current CI or Git branch; required if no branch is available.`}).option(`prebuilt`,{type:`boolean`,description:`Use existing Preview Build Output Specification files without building`,default:!1})}function N(e){return{type:`preview`,version:1,preview_id:e.preview.id,preview_name:e.preview.name,preview_slug:e.preview.slug,preview_urls:e.preview.urls,deployment_id:e.deployment.id,deployment_urls:e.deployment.urls}}async function P(t){let r=t[`preview-name`],i=r??_();if(!i||!r&&i===`HEAD`)throw Error(`We couldn't determine a Preview name from CI or Git. The name is optional when a branch is available. Otherwise, run:
|
|
3
3
|
|
|
4
4
|
cf previews deploy PREVIEW_NAME`);t.prebuilt||await T(t.mode,{output:t.quiet?`silent`:`stderr`},{isPreview:!0});let o=await O(process.cwd());x(o.rootConfig),w(t.mode,o.rootConfig.buildContext.mode,{requireRequestedMode:t.prebuilt});let s=o.workers.default,{wranglerConfig:l,builtConfig:u}=E(s,o.rootConfig),d=await a(),h=await n({isPreview:!0}),g=c(d);v({...g,logger:{...g.logger,log:()=>{},info:()=>{}}}),p({logger:{...g.logger,debug:()=>{},debugWithSanitization:()=>{},log:()=>{},info:()=>{}},fetchResult:g.fetchResult,fetchPagedListResult:g.fetchPagedListResult});let A=new Set(Object.values(u.exports??{}).filter(y).map(({container:e})=>e)),j=o.containers?.filter(({config:e})=>A.has(e.name))??[],M=S(j,l,{accountId:h}),N=M.source;if(N?.some(e=>e.scheduling_policy===`durable_object`))throw new C(`Preview deployments do not support Durable Object-managed Containers (schedulingPolicy: "durable-object").`);return N&&N.length>0&&f(h,d,e(l)),b(h,{name:i,json:!0},{workerConfig:u,rootConfig:o.rootConfig,containers:j.filter(({config:e})=>N?.some(({name:t})=>t===e.name)).map(({config:e})=>e),buildResult:s.bundleDir?D(s,u):void 0,assets:s.assetsDir?{directory:s.assetsDir}:void 0},{...k(M),verifyContainersScope:async()=>{await m.listApplications()}})}const F={command:`deploy [preview-name]`,describe:`Deploy a Worker Preview`,builder:M,handler:async e=>{o(N(await P(e)),{quiet:e.quiet})}},I={command:`previews`,describe:`Manage Worker Previews`,builder:e=>e.command(s(F,{command:`previews deploy`,classification:{safeFlags:[`prebuilt`]}})).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};export{I as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,o as t}from"./src-
|
|
2
|
+
import{a as e,o as t}from"./src-CNHNCZpy.mjs";import{n}from"./version-cPq-WKL8.mjs";import{r}from"./theme-BiIYWOed.mjs";import{a as i}from"./dist-BpadEMNY.mjs";const a={Hidden:0,Normal:1,Error:2,Indeterminate:3,Warning:4},o=new class{cleanupRegistered=!1;get isDisabled(){return process.env.CF_NO_OSC_PROGRESS===`1`||process.env.CF_QUIET===`1`||t()}get isSupported(){if(this.isDisabled||!process.stderr.isTTY)return!1;if(process.env.CF_FORCE_OSC_PROGRESS===`1`)return!0;let e=process.env.TERM_PROGRAM?.toLowerCase()??``;return!!(e.includes(`ghostty`)||e.includes(`iterm`)||e.includes(`wezterm`)||process.env.WT_SESSION||process.env.ConEmuANSI===`ON`)}setIndeterminate(){this.isSupported&&(this.ensureCleanup(),this.write(a.Indeterminate))}clear(){this.isSupported&&process.stderr.write(`\x1b]9;4;${a.Hidden};0\x07`)}ensureCleanup(){this.cleanupRegistered||(this.cleanupRegistered=!0,process.on(`exit`,()=>{this.clear()}))}write(e){this.isSupported&&process.stderr.write(`\x1b]9;4;${e};0\x07`)}},s=[`⠋`,`⠙`,`⠹`,`⠸`,`⠼`,`⠴`,`⠦`,`⠧`,`⠇`,`⠏`];function c(){return!(!r()||!process.stdout.isTTY||process.env.CF_QUIET===`1`)}async function l(t,r){if(!c())return r();e(n);let a=i({frames:[...s],indicator:`timer`,delay:80});o.setIndeterminate(),a.start(t);try{let e=await r();return o.clear(),a.stop(t),e}catch(e){throw o.clear(),a.error(t),e}}export{l as t};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e,t}from"./src-
|
|
2
|
+
import{a as e,t}from"./src-CNHNCZpy.mjs";import{n}from"./version-cPq-WKL8.mjs";import{n as r,t as i}from"./theme-BiIYWOed.mjs";import{M as a,n as o}from"./interactive-B6woOLo-.mjs";import{i as s,o as c,r as l,t as u}from"./dist-BpadEMNY.mjs";function d(e){return e.replace(/[\p{Cc}\p{Cf}\p{Zl}\p{Zp}]/gu,` `)}function f(){e(n)}async function p(){let e=[];for await(let t of process.stdin)e.push(Buffer.from(t));let t=Buffer.concat(e).toString(`utf-8`);return t.endsWith(`
|
|
3
3
|
`)?t.slice(0,-1):t}async function m(e,n,r){let i=r?.kind??`text`;if(o()){if(i===`secret`){let t=await p();if(t.length>0)return t;throw Error(`--${e} is required. Pipe the value via stdin, pass --${e} <value>, or run interactively.`)}throw Error(`--${e} is required. Pass --${e} <value> or run interactively.`)}let s=`Enter value for --${e}`,u=n||r?.question||s,d=e=>e&&e.length>0?r?.validate?.(e):`Value cannot be empty`;f();let m=i===`secret`?await l({message:u,mask:`•`,validate:d}):await c({message:u,validate:d});if(a(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function h(e,n,r,i={}){let c=d(e),l=r.map(d);if(o())throw Error(`--${c} is required (one of: ${l.join(`, `)}). Pass --${c} <value> or run interactively.`);let u=`Select value for --${c}`,p=d(n||u);f();let m=await s({message:p,options:r.map(e=>({value:e,label:d((Object.hasOwn(i,e)?i[e]:void 0)??e)}))});if(a(m)||typeof m!=`string`)throw new t(130,{cancelled:!0});return m}async function g(e,n){if(o())throw Error(`--${e} is required and must be true. Pass --${e} or run interactively.`);f();let r=await u({message:n||`Confirm --${e}`,initialValue:!1});if(a(r))throw new t(130,{cancelled:!0});return r===!0}async function _(e,{defaultValue:n=!0,fallbackValue:r=!0}={}){if(o())return process.stderr.write(`? ${e}\n Using fallback value in non-interactive context: ${r?`yes`:`no`}\n`),r;f();let i=await u({message:e,initialValue:n});if(a(i))throw new t(130,{cancelled:!0});return i===!0}async function v(e={}){if(e.force===!0)return!0;let n=e.message?`${e.message} Continue?`:`This permanently deletes the resource. Continue?`;if(o()){let e=r();return process.stderr.write(`${e.hex(i.warning)(`?`)} ${n}\n ${e.dim(`(non-interactive; pass --force to confirm)`)}\n`),!1}f();let s=await u({message:n,initialValue:!1});if(a(s))throw new t(130,{cancelled:!0});return s===!0}export{m as a,h as i,v as n,d as o,g as r,_ as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{n as f}from"./prompt-CpZztV8c.mjs";function p(e){return e.usage(`$0 queries bulk create
|
|
3
3
|
|
|
4
4
|
Return a success message after creating new saved string queries in bulk`).option(`queries`,{type:`string`,description:`The queries field. Provide as a JSON array of objects or @path/to/file.json.`}).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`,describe:`Create new saved string queries in bulk`,builder:p,handler:async d=>s({command:`queries bulk create`,classification:{safeFlags:[`dry-run`]}},d,async()=>{if(d.dryRun){a({command:`cf queries bulk create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/brand-protection/queries/bulk`,pathParams:{},bodyKind:`json`,body:d.body===void 0?u({queries:l(d.queries,`queries`)}):c(d.body)});return}let s=await r(d),f=d.local?e:await t();if(d.accountId=f,d.body){let e=c(d.body);i(await o(`Creating`,async()=>s.queries.bulk.create({...e,account_id:f})),{successLabel:`Created`});return}let p=u({queries:l(d.queries,`queries`)});i(await o(`Creating`,async()=>s.queries.bulk.create({...p,account_id:f})),{successLabel:`Created`})})},h={command:`bulk`,describe:`Operations for bulk`,builder:e=>e.command(m).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 queries create
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,r as l,t as u}from"./body-parser-CUWbw_Tq.mjs";import{n as d}from"./input-validation-Ch4Vllrm.mjs";import{a as f,i as p,n as m}from"./prompt-CpZztV8c.mjs";import{t as h}from"./cli-types-tt_LZMbn.mjs";function ee(e){return e.usage(`$0 queues consumers create <queue-id>
|
|
3
3
|
|
|
4
4
|
Creates a consumer for a Queue.`).positional(`queue-id`,{type:`string`,description:`A Resource identifier.`,demandOption:!0}).option(`dead-letter-queue`,{type:`string`,description:`The dead_letter_queue field`}).option(`script-name`,{type:`string`,description:`Name of a Worker`}).option(`settings-batch-size`,{type:`number`,description:`The maximum number of messages to include in a batch.`}).option(`settings-max-concurrency`,{type:`number`,description:"Maximum number of concurrent consumers that may consume from this Queue. Set to `null` to automatically opt in to the platform's maximum (recommended)."}).option(`settings-max-retries`,{type:`number`,description:`The maximum number of retries`}).option(`settings-max-wait-time-ms`,{type:`number`,description:`The number of milliseconds to wait for a batch to fill up before attempting to deliver it`}).option(`settings-retry-delay`,{type:`number`,description:`The number of seconds to delay before making the message available for another attempt.`}).option(`settings-visibility-timeout-ms`,{type:`number`,description:`The number of milliseconds that a message is exclusively leased. After the timeout, the message becomes available for another attempt.`}).option(`type`,{type:`string`,description:`The type field`,choices:[`worker`,`http_pull`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Request body for creating or updating a consumer`}).conflicts(`script-name`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-concurrency`,[`settings-visibility-timeout-ms`]).conflicts(`settings-max-wait-time-ms`,[`settings-visibility-timeout-ms`]).conflicts(`settings-visibility-timeout-ms`,[`script-name`,`settings-max-concurrency`,`settings-max-wait-time-ms`])}const g={command:`create <queue-id>`,describe:`Create a Queue Consumer`,builder:ee,handler:async l=>s({command:`queues consumers create`,classification:{safeFlags:[`type`,`dry-run`]}},l,async()=>{if(l.dryRun){a({command:`cf queues consumers create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/queues/${l[`queue-id`]==null?`<queue-id>`:encodeURIComponent(String(l[`queue-id`]))}/consumers`,pathParams:{"queue-id":String(l[`queue-id`]??``)},bodyKind:`json`,body:l.body===void 0?u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)}):c(l.body)});return}let s=await r(l),m=l.local?e:await t();if(l.accountId=m,l.body){let e=c(l.body);i(await o(`Creating`,async()=>s.queues.consumers.create({body:e,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`});return}l.type===void 0&&(l.type=await p(`type`,`The type field`,[`worker`,`http_pull`])),l.type===`worker`&&l[`script-name`]===void 0&&(l[`script-name`]=await f(`script-name`,`Name of a Worker`,{question:`Enter value for --script-name`}));let h=u({dead_letter_queue:d(l[`dead-letter-queue`],`dead-letter-queue`,`text`),script_name:d(l[`script-name`],`script-name`,`text`),settings:{batch_size:l[`settings-batch-size`],max_concurrency:l[`settings-max-concurrency`],max_retries:l[`settings-max-retries`],max_wait_time_ms:l[`settings-max-wait-time-ms`],retry_delay:l[`settings-retry-delay`],visibility_timeout_ms:l[`settings-visibility-timeout-ms`]},type:d(l.type,`type`,`text`)});i(await o(`Creating`,async()=>s.queues.consumers.create({body:h,account_id:m,queue_id:l[`queue-id`]})),{successLabel:`Created`})})};function _(e){return e.usage(`$0 queues consumers delete <consumer-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,n as f}from"./prompt-CpZztV8c.mjs";import{t as p}from"./cli-types-tt_LZMbn.mjs";function m(e){return e.usage(`$0 r2-data-catalog credentials create <bucket-name>
|
|
3
3
|
|
|
4
4
|
Store authentication credentials for a catalog. These credentials are used to authenticate with R2 storage when performing catalog operations.`).positional(`bucket-name`,{type:`string`,description:`Specifies the R2 bucket name.`,demandOption:!0}).option(`token`,{type:`string`,description:`Provides the Cloudflare API token for accessing R2.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`Contains request to store catalog credentials.`})}const h={command:`create <bucket-name>`,describe:`Store catalog credentials`,builder:m,handler:async f=>s({command:`r2-data-catalog credentials create`,classification:{safeFlags:[`dry-run`]}},f,async()=>{if(f.dryRun){a({command:`cf r2-data-catalog credentials create`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2-catalog/${f[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(f[`bucket-name`]))}/credential`,pathParams:{"bucket-name":String(f[`bucket-name`]??``)},bodyKind:`json`,body:f.body===void 0?l({token:u(f.token,`token`,`text`)}):c(f.body)});return}let s=await r(f),p=f.local?e:await t();if(f.accountId=p,f.body){let e=c(f.body);i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...e,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`});return}f.token===void 0&&(f.token=await d(`token`,`Provides the Cloudflare API token for accessing R2.`));let m=l({token:u(f.token,`token`,`text`)});i(await o(`Creating`,async()=>s.r2DataCatalog.credentials.create({...m,account_id:p,bucket_name:f[`bucket-name`]})),{successLabel:`Created`})})},g={command:`credentials`,describe:`Catalog access credentials for external query engines (Spark, Trino, etc.)`,builder:e=>e.command(h).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function _(e){return e.usage(`$0 r2-data-catalog delete <bucket-name>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as l,n as u,r as d,t as f}from"./body-parser-CUWbw_Tq.mjs";import{n as p,t as m}from"./input-validation-Ch4Vllrm.mjs";import{a as h,i as g,n as _}from"./prompt-CpZztV8c.mjs";import{n as ee,t as te}from"./raw-fetch-DxGs_eRm.mjs";function v(e){return e.usage(`$0 r2 buckets cors delete <bucket-name>
|
|
3
3
|
|
|
4
4
|
Delete the CORS policy for a bucket.`).positional(`bucket-name`,{type:`string`,description:`Name of the bucket.`,demandOption:!0}).option(`cf-r2-jurisdiction`,{type:`string`,description:`Jurisdiction where objects in this bucket are guaranteed to be stored.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip confirmation (useful in scripts and CI)`,default:!1})}const y={command:`delete <bucket-name>`,describe:`Delete Bucket CORS Policy`,builder:v,handler:async l=>c({command:`r2 buckets cors delete`,classification:{safeFlags:[`dry-run`,`force`],shortFlagAliases:{f:{canonical:`force`,type:`boolean`}}}},l,async()=>{let c={};if(l[`cf-r2-jurisdiction`]!==void 0&&(c[`cf-r2-jurisdiction`]=String(l[`cf-r2-jurisdiction`])),l.dryRun){o({command:`cf r2 buckets cors delete`,method:`DELETE`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/r2/buckets/${l[`bucket-name`]==null?`<bucket-name>`:encodeURIComponent(String(l[`bucket-name`]))}/cors`,pathParams:{"bucket-name":String(l[`bucket-name`]??``)},bodyKind:`none`});return}let u=await i(l),d=l.local?e:await t();if(l.accountId=d,!await _({force:!!l.force})){process.stderr.write(`Aborted.
|
|
5
5
|
`);return}a(await s(`Deleting`,async()=>r(u,`DELETE`,`/accounts/${d}/r2/buckets/${encodeURIComponent(String(l[`bucket-name`]))}/cors`,{headers:Object.keys(c).length>0?c:void 0})),{successLabel:`Deleted`})})};function b(e){return e.usage(`$0 r2 buckets cors get <bucket-name>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./auth-
|
|
2
|
+
import{r as e}from"./auth-C80y97yu.mjs";import{t}from"./output-Bia1u2k5.mjs";import{t as n}from"./dry-run-CLX6Pbtq.mjs";import{t as r}from"./progress-Bpp73hIu.mjs";import{t as i}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as a,t as o}from"./body-parser-CUWbw_Tq.mjs";import{t as s}from"./cli-types-tt_LZMbn.mjs";import{n as c,t as l}from"./raw-fetch-DxGs_eRm.mjs";function ee(e){return e.usage(`$0 radar agent-readiness summary <dimension>
|
|
3
3
|
|
|
4
4
|
Returns a summary of AI agent readiness scores across scanned domains, grouped by the specified dimension. Data is sourced from weekly bulk scans. All values are raw domain counts.`).positional(`dimension`,{type:`string`,description:`Specifies the agent readiness data dimension by which to group the results.`,demandOption:!0}).option(`date`,{type:`string`,description:`Filters results by the specified date.`}).option(`domain-category`,{type:`string`,description:`Filters results by domain category.`}).option(`name`,{type:`string`,description:`Array of names used to label the series in the response.`}).option(`format`,{type:`string`,description:`Format in which results will be returned.`,choices:[`JSON`,`CSV`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const te={command:`summary <dimension>`,describe:`Get agent readiness summary`,builder:s(ee),handler:async a=>i({command:`radar agent-readiness summary`,classification:{safeFlags:[`format`,`dry-run`]}},a,async()=>{let i={date:a.date,domainCategory:a[`domain-category`],name:a.name,format:a.format};if(a.dryRun){n({command:`cf radar agent-readiness summary`,method:`GET`,url:`https://api.cloudflare.com/client/v4/radar/agent_readiness/summary/${a.dimension==null?`<dimension>`:encodeURIComponent(String(a.dimension))}`,pathParams:{dimension:String(a.dimension??``)},query:i,bodyKind:`none`});return}let o=await e(a);t(await r(`Loading`,async()=>o.radar.agentReadiness.summary({dimension:a.dimension,...i})),{successLabel:`Loaded`})})},u={command:`agent-readiness`,describe:`Agent readiness summary statistics across the Cloudflare network`,builder:e=>e.command(te).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function d(e){return e.usage(`$0 radar ai bots timeseries-groups <dimension>
|
|
5
5
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{r as e}from"./sdk-CvIO3tWS.mjs";import{E as t}from"./dist-dc4E1u01.mjs";import{r as n}from"./local-B6b2OIBW.mjs";import{h as r}from"./oauth-
|
|
2
|
+
import{r as e}from"./sdk-CvIO3tWS.mjs";import{E as t}from"./dist-dc4E1u01.mjs";import{r as n}from"./local-B6b2OIBW.mjs";import{h as r}from"./oauth-C-QCVfWz.mjs";import{n as i}from"./request-headers-DaXBfmVn.mjs";import{i as a,t as o}from"./auth-C80y97yu.mjs";async function s(s,c={}){let{method:l=`GET`,local:u=!1}=c,d=t({compliance_region:await r()}),f=`${d.replace(/\/+$/,``)}${s}`,p={...i()};c.headers&&Object.assign(p,c.headers);let m=globalThis.fetch;u?m=n({persistTo:c.persistTo,apiBaseUrl:d}):p.Authorization=`Bearer ${await a()}`;let h,g=c.body;g!=null&&(g instanceof FormData?h=g:Buffer.isBuffer(g)||g instanceof Uint8Array||g instanceof ArrayBuffer?(h=g,p[`Content-Type`]??=c.contentType??`application/octet-stream`):typeof g==`string`?(h=g,c.contentType&&(p[`Content-Type`]??=c.contentType)):(h=JSON.stringify(g),p[`Content-Type`]??=c.contentType??`application/json`));let _=await m(f,{method:l,headers:p,...h===void 0?{}:{body:h},signal:AbortSignal.timeout(o)});if(!_.ok){let t=_.headers.get(`content-type`)??``,n;try{n=t.includes(`application/json`)?await _.json():await _.text()}catch{n=null}throw new e({statusCode:_.status,body:n,rawResponse:{status:_.status,statusText:_.statusText,url:_.url||f,headers:_.headers,redirected:_.redirected,type:_.type}})}let v=await _.arrayBuffer();return Buffer.from(v)}function c(e){process.stdout.write(e)}export{c as n,s as t};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{r}from"./auth-C80y97yu.mjs";import{t as i}from"./output-Bia1u2k5.mjs";import{t as a}from"./dry-run-CLX6Pbtq.mjs";import{t as o}from"./progress-Bpp73hIu.mjs";import{t as s}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{n as c,t as l}from"./body-parser-CUWbw_Tq.mjs";import{n as u}from"./input-validation-Ch4Vllrm.mjs";import{a as d,i as f,n as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage(`$0 realtime kit analytics livestreams daily get <app-id>
|
|
3
3
|
|
|
4
4
|
Returns day-wise livestream analytics for the specified time range.`).positional(`app-id`,{type:`string`,description:`The app identifier tag.`,demandOption:!0}).option(`start-time`,{type:`number`,description:`Specify the start time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`end-time`,{type:`number`,description:`Specify the end time as a Unix timestamp in seconds to access the livestream analytics.`}).option(`filters`,{type:`string`,description:`Optional filters for livestream analytics.`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const ee={command:`get <app-id>`,describe:`Fetch day-wise analytics data for your livestreams`,builder:h,handler:async c=>s({command:`realtime kit analytics livestreams daily get`,classification:{safeFlags:[`dry-run`]}},c,async()=>{let s={start_time:c[`start-time`],end_time:c[`end-time`],filters:c.filters};if(c.dryRun){a({command:`cf realtime kit analytics livestreams daily get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/realtime/kit/${c[`app-id`]==null?`<app-id>`:encodeURIComponent(String(c[`app-id`]))}/analytics/livestreams/daywise`,pathParams:{"app-id":String(c[`app-id`]??``)},query:s,bodyKind:`none`});return}let l=await r(c),u=c.local?e:await t();c.accountId=u,i(await o(`Loading`,async()=>l.realtime.kit.analytics.livestreams.daily.get({account_id:u,app_id:c[`app-id`],...s})),{successLabel:`Loaded`})})},te={command:`daily`,describe:`Daily livestream analytics for RealtimeKit applications`,builder:e=>e.command(ee).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function g(e){return e.usage(`$0 realtime kit analytics livestreams get <app-id>
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{a as e}from"./theme-BiIYWOed.mjs";import{n as t,t as n}from"./local-B6b2OIBW.mjs";import{m as r,v as i}from"./oauth-
|
|
2
|
+
import{a as e}from"./theme-BiIYWOed.mjs";import{n as t,t as n}from"./local-B6b2OIBW.mjs";import{m as r,v as i}from"./oauth-C-QCVfWz.mjs";import{a,o,r as s}from"./auth-C80y97yu.mjs";import{t as c}from"./output-Bia1u2k5.mjs";import{t as l}from"./dry-run-CLX6Pbtq.mjs";import{t as u}from"./progress-Bpp73hIu.mjs";import{n as d,t as f}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as p,n as m,r as h,t as g}from"./body-parser-CUWbw_Tq.mjs";import{n as _}from"./input-validation-Ch4Vllrm.mjs";import{a as v,i as y,n as ee,o as b,r as x}from"./prompt-CpZztV8c.mjs";import{t as S}from"./cli-types-tt_LZMbn.mjs";import{_ as C,a as w,c as T,d as E,g as D,h as O,i as k,m as A,o as j,p as M,r as N,s as te,t as ne,u as re}from"./schema-flags--GosoCMU.mjs";import{isDeepStrictEqual as ie}from"node:util";import{domainToASCII as ae}from"node:url";function oe(e){return e.usage("$0 registrar extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const se={command:`get <extension>`,describe:`Get extension`,builder:oe,handler:async e=>f({command:`registrar extensions get`,classification:{safeFlags:[`dry-run`]}},e,async()=>{if(e.dryRun){l({command:`cf registrar extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions/${e.extension==null?`<extension>`:encodeURIComponent(String(e.extension))}`,pathParams:{extension:String(e.extension??``)},bodyKind:`none`});return}let t=await s(e),a=e.local?n:await r();e.accountId=a,c(await u(`Loading`,async()=>t.registrar.extensions.get({account_id:a,extension:e.extension})),{successLabel:`Loaded`})})};function ce(e){return e.usage("$0 registrar extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
3
3
|
Pass this value to fetch the next page of results. Omit (or
|
|
4
4
|
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const le={command:`list`,describe:`List extensions`,builder:S(ce),handler:async e=>f({command:`registrar extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},e,async()=>{let t={name:e.name,cursor:e.cursor,per_page:e[`per-page`],direction:e.direction,sort_by:e[`sort-by`]};if(e.dryRun){l({command:`cf registrar extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await i()??`<account-id>`}/registrar/extensions`,pathParams:{},query:t,bodyKind:`none`});return}let a=await s(e),o=e.local?n:await r();e.accountId=o,c(await u(`Loading`,async()=>a.registrar.extensions.list({account_id:o,...t})),{successLabel:`Loaded`})})},ue={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(se).command(le).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};async function P(e,t,n){let r=b(n),i=ae(n.trim().replace(/\.$/,``)).toLowerCase(),a=await u(`Checking availability`,()=>e.registrar.registrations.check({account_id:t,domains:[n]})),o=i===``?[]:a.domains.filter(e=>e.name.toLowerCase()===i),s=o.length===1?o[0]:void 0;if(!s)throw Error(`The availability check returned no result for ${r}, so cf cannot safely register it.`);if(s.registrable!==!0&&s.reason===`domain_premium`)throw Error(`${r} is a premium domain (domain_premium). Premium registration is not supported by this API, so cf will not submit it.`);if(s.registrable!==!0){let e=s.reason===void 0?``:` (${b(s.reason)})`;throw Error(`${r} is not available for registration${e}.`)}if(s.tier===`premium`)throw Error(`${r} is a premium domain. Premium registration is not supported by this API, so cf will not submit it.`);if(s.tier!==`standard`)throw Error(`${r} is not confirmed as a standard domain. This API only supports standard registrations, so cf will not submit it.`);if(!s.pricing)throw Error(`The availability check returned no pricing for ${r}, so cf cannot safely register it.`);return s.pricing}const F=`registrar-extension-schema`;function de(e){let t=e.trim().toLowerCase().replace(/\.$/,``).split(`.`);return t.slice(1).map((e,n)=>t.slice(n+1).join(`.`))}async function fe(e,t,n,r){let i;try{i=r===void 0?await n.registrar.extensions.get({account_id:t,extension:e}):await n.registrar.extensions.get({account_id:t,extension:e},{timeoutInSeconds:r/1e3,maxRetries:0})}catch(e){return{ok:!1,reason:A(e)}}let a=O(i,`registration_schema`);return a?{ok:!0,extension:e,schema:a}:{ok:!1,reason:`the API returned no registration schema for .${e}`}}async function I(e,t,n,r,i){let a=t?[t]:de(e);if(a.length===0)return{ok:!1,reason:`'${e}' has no extension — pass a fully qualified domain name`};let o,s=`not found`;for(let e of a){let t=D(F,[n,e]);if(t)return{ok:!0,extension:e,schema:t};if(!o)try{o=await r()}catch(e){return{ok:!1,reason:A(e)}}let a;if(i!==void 0&&(a=i-Date.now(),a<=0))return{ok:!1,reason:`the request timed out`};let c=await fe(e,n,o,a);if(c.ok)return C(F,[n,e],c.schema),c;if(s=c.reason,!/not found/i.test(c.reason))return c}return{ok:!1,reason:a.length>1?`no registration schema for ${a.map(e=>`.${e}`).join(` or `)} (${s})`:s}}const pe=new Set([`domain_name`,`years`,`auto_renew`,`privacy_mode`]),me={acknowledgements:`Acknowledgements`,contact_extensions:`Registry Details`,contacts:`Contacts`};function L(e,t){return e!==void 0&&Object.hasOwn(e,t)?e[t]:void 0}function he(e){return e.replace(/([a-z0-9])([A-Z])/g,`$1 $2`).split(/[-_\s]+/).filter(Boolean).map(e=>`${e[0]?.toUpperCase()??``}${e.slice(1)}`).join(` `)}function R(e){return typeof e==`boolean`?e?`Yes`:`No`:e===null?`null`:typeof e==`string`||typeof e==`number`?String(e):JSON.stringify(e)??`undefined`}function z(e,t){return e.find(e=>e.path.length===t.length&&e.path.every((e,n)=>e===t[n]))}function ge(e,t,n){if(typeof t==`boolean`&&e.some(e=>e.includes(`acknowledgement`)))return t?`Accepted`:`Declined`;let r=z(n,e),i=R(t),a=L(r?.choiceLabels,i);if(a)return`${a} (${i})`;let o=(r?.schema.oneOf??r?.schema.anyOf)?.find(e=>e.title&&E(e,t).length===0);return o?.title?`${o.title} (${i})`:i}function _e(e,t){return e.map((n,r)=>r===e.length-1&&t?.schema.title?t.schema.title:L(me,n)??he(n)).join(` · `)}function B(e,t,n=[]){let r=[];for(let[i,a]of Object.entries(e)){if(n.length===0&&pe.has(i))continue;let e=[...n,i];if(typeof a==`object`&&a&&!Array.isArray(a)&&Object.keys(a).length>0){r.push(...B(a,t,e));continue}let o=z(t,e);r.push([_e(e,o),ge(e,a,t)])}return r.sort(([e],[t])=>e.localeCompare(t))}function V(e,t,n){if(Object.hasOwn(e,n))return R(e[n]);let r=ve(t,n);return r===void 0?`API default`:`${R(r)} (default)`}function H(e){return e===void 0?[]:[...e.default===void 0?[]:[e.default],...(e.allOf??[]).flatMap(H)]}function U(e,t){return e===void 0?[]:[...H(e.properties?.[t]),...(e.allOf??[]).flatMap(e=>U(e,t))]}function ve(e,t){let n=U(e,t),r=n[0];return n.length>0&&n.every(e=>ie(e,r))?r:void 0}function W(t){let n=t.map(([e,t])=>[b(e),b(t)]),r=Math.min(32,Math.max(...n.map(([e])=>e.length),0));return n.map(([t,n])=>`│ ${e.muted(t.padEnd(r))} ${e.bold(n)}`)}function ye(t){let n=[[`Domain`,t.domain],[`Account`,t.accountId],[`Registration term`,`${t.years} ${t.years===1?`year`:`years`}`],[`Due now`,t.quotedCost],[`Renewal price`,`${t.pricing.currency} ${t.pricing.renewal_cost} per year`],[`Auto-renew`,V(t.body,t.schema,`auto_renew`)],[`Privacy mode`,V(t.body,t.schema,`privacy_mode`)]],r=B(t.body,t.descriptors??[]);return[`│`,`${e.brand(`◇`)} ${e.bold(`Review registration`)}`,`│`,...W(n),...r.length>0?[`│`,`│ ${e.bold(`Registration details`)}`,...W(r)]:[],`│`].join(`
|
|
5
5
|
`)}const G=[`domain_name`],K=`Fully qualified domain name to register, e.g. example.travel`,q=[`domain-name`,`domainName`,`extension`,`force`,`f`,`prefer`,`contacts`];function be(e){return`/${e.map(e=>e.replace(/~/g,`~0`).replace(/\//g,`~1`)).join(`/`)}`}function xe(e,t,n){return t.some(t=>{if(t.path[0]!==e||t.path.length===1)return!1;let r=t.name.replace(/-([a-z0-9])/g,(e,t)=>t.toUpperCase());return Object.hasOwn(n,t.name)&&n[t.name]!==void 0||Object.hasOwn(n,r)&&n[r]!==void 0})}function Se(e){if(e.choices===void 0)return;let t=(e.schema.enum??(e.schema.oneOf??e.schema.anyOf)?.flatMap(e=>e.const===void 0?e.enum??[]:[e.const]))?.filter(e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`);return t?.length===e.choices.length?t:void 0}function Ce(e){let t=e.type===`boolean`&&e.schema.const===!0,n=e.schema.description,r=n===void 0?void 0:b(n);return{path:be(e.path),flag:`--${e.name}`,question:te(e),description:r,choices:Se(e)?.map(t=>{let n=String(t);return{value:t,label:b(e.choiceLabels!==void 0&&Object.hasOwn(e.choiceLabels,n)?e.choiceLabels[n]??n:n)}}),requiredValue:e.schema.const,acknowledgementText:t?r:void 0}}function we(e,t,n,r,i){let a=w(n,r);return a.length===0?!1:(c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. Additional registration input is required.`,domainName:e,extension:t,missingFields:a.map(Ce),validationErrors:i}),!0)}function Te(e){let t=/^(\d+)(?:\.(\d+))?$/.exec(e);if(!t)return;let n=t[2]??``;return{units:BigInt(`${t[1]}${n}`),scale:n.length}}function Ee(e,t){let n=Te(e.registration_cost),r=Te(e.renewal_cost);if(!n||!r)return;let i=Math.max(n.scale,r.scale),a=e=>10n**BigInt(e),o=n.units*a(i-n.scale)+r.units*a(i-r.scale)*BigInt(t-1);if(i===0)return o.toString();let s=a(i);return`${o/s}.${(o%s).toString().padStart(i,`0`)}`}function De(e,t){let n=Ee(e,t);if(!n||!/^[A-Z]{3}$/.test(e.currency))throw Error(`The availability check returned invalid pricing, so cf cannot safely confirm this registration.`);return`${e.currency} ${n}`}function J(e,t){return e.flatMap(e=>t.map(t=>[...e,...t]))}function Y(e,t,n,r=!1,i=[]){let a=e.properties?.[t],o=a!==void 0,s=[a===void 0?[]:[a]],c=e.if&&e.then&&N(e.if)&&E(e.if,n).length===0?[e.then]:[];for(let a of[...e.allOf??[],...c]){let e=Y(a,t,n,r,i);e.found&&(o=!0,s=J(s,e.bundles))}for(let a of[e.oneOf,e.anyOf]){if(!a?.length)continue;let e=r&&a.every(N)?a.filter(e=>je(e,t,n,i)):[],c=(e.length>0?e:a).map(e=>Y(e,t,n,r,i));c.some(e=>e.found)&&(o=!0,s=J(s,c.flatMap(e=>e.bundles)))}return{found:o,bundles:s}}function X(e,t){let n=e[t];return[...n===void 0?[]:[n],...(e.allOf??[]).flatMap(e=>X(e,t))]}function Z(e){return e.length===0?{}:e.length===1?e[0]??{}:{allOf:e}}function Oe(e){let t=[...typeof e.minimum==`number`?[e.exclusiveMinimum===!0?Math.floor(e.minimum)+1:Math.ceil(e.minimum)]:[],...typeof e.exclusiveMinimum==`number`?[Math.floor(e.exclusiveMinimum)+1]:[],...(e.allOf??[]).flatMap(e=>{let t=Oe(e);return t===void 0?[]:[t]})];return t.length>0?Math.max(1,...t):void 0}function ke(e){let t=X(e,`const`);if(t.length>0)return t.every(e=>Object.is(e,t[0]))?{found:!0,value:t[0]}:{found:!1};let n=X(e,`default`);if(n.length>0)return n.every(e=>Object.is(e,n[0]))?{found:!0,value:n[0]}:{found:!1};let r=Oe(e);return r===void 0?{found:!1}:{found:!0,value:r}}function Q(e){let{allOf:t,anyOf:n,oneOf:r,...i}=e,a=[Object.keys(i).length===0?[]:[i]];for(let e of t??[])a=J(a,Q(e).map(e=>[e]));for(let e of[r,n])e?.length&&(a=J(a,e.flatMap(e=>Q(e).map(e=>[e]))));return a.map(Z)}function Ae(e){return e.flatMap(e=>Q(e).map(t=>({schema:e,candidate:ke(t)})))}function je(e,t,n,r){let i=E(e,n);return Object.hasOwn(n,t)||i.length===0?i.length===0:r.some(r=>E(e,{...n,[t]:r}).length===0)}function Me(e,t){let n=Object.hasOwn(e,`years`),r=Y(t,`years`,e,!1);if(!r.found)throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let i=r.bundles.map(Z),a=Y(t,`years`,e,!0,n?[]:Ae(i).flatMap(({schema:e,candidate:t})=>t.found&&E(e,t.value).length===0?[t.value]:[]));if(!a.found||n&&a.bundles.some(e=>e.length===0))throw Error(`The extension schema returned no registration-term field, so cf cannot safely confirm this registration.`);let o=a.bundles.map(Z),s=o,c,l;if(n)l=e.years;else{let n=Ae(o).filter(({schema:e,candidate:t})=>{if(!t.found)return!0;let[n]=E(e,t.value);return n===void 0?!0:(c??=n,!1)});if(N(t)){let r=n.filter(({candidate:e})=>!e.found),i=n.filter(({candidate:n})=>n.found&&E(t,{...e,years:n.value}).length===0);i.length>0&&(n=[...r,...i])}s=n.map(({schema:e})=>e);let r=n.map(({candidate:e})=>e),[i]=r;l=i?.found===!0&&r.every(e=>e.found&&Object.is(e.value,i.value))?i.value:void 0}if(typeof l!=`number`||!Number.isInteger(l)||l<=0)throw!n&&s.length===0&&c?Error(`The extension schema returned an invalid default registration term: ${c}`):Error(n?`The requested registration term must be a positive whole number of years.`:`The extension schema returned no safe default registration term, so cf cannot safely confirm this registration.`);let u=n?E(o.length===1?o[0]??{}:{anyOf:o},l):s.flatMap(e=>E(e,l));if(u.length>0)throw Error(n?`The requested registration term is invalid: ${u[0]}`:`The extension schema returned an invalid default registration term: ${u[0]}`);return e.years=l,l}let Ne;function $(e){let t=_(e,`domain-name`,`text`);if(t!==void 0&&typeof t!=`string`)throw Error(`--domain-name must be a string`);return t}function Pe(e){return Ne=e,e.positional(`domain-name`,{type:`string`,description:`Fully qualified domain name, e.g. example.travel`}).option(`extension`,{type:`string`,description:`Extension whose registration schema to use (default: derived from the domain)`}).option(`prefer`,{type:`string`,description:"Set the Prefer header, e.g. `respond-async` to skip the synchronous wait"}).option(`force`,{type:`boolean`,alias:`f`,description:`Skip the registration confirmation prompt`,default:!1}).option(`contacts`,{type:`string`,description:`Registrant contacts as inline JSON or @path to a reusable JSON file`}).option(`body`,{type:`string`,description:`Raw JSON request body, or @path to a JSON file`}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).strictOptions(!1).help(!1).option(`help`,{type:`boolean`,alias:`h`,description:`Show help, including this extension's input flags`}).epilogue("Input flags depend on the extension: run `cf registrar registrations create <domain> --help`.\ncf rechecks availability and pricing before confirmation. Run `cf registrar registrations check --domains <domain>` to inspect them separately.")}async function Fe(t){Ne?.showHelp(`log`);let n=$(t[`domain-name`]);if(!n)return;let r=b(n);if(t.local){console.log(`\n${e.muted(`Registration fields are unavailable in local mode.`)}`);return}let i=Date.now()+M,a=await o(i);if(!a){console.log(`\n${e.muted(`Set \`CLOUDFLARE_ACCOUNT_ID\` or sign in with \`cf auth login\` to see the registration fields for ${r}.`)}`);return}let c=await I(n,t.extension,a,()=>s(t),i);console.log(c.ok?`\n${j(T(c.schema,{exclude:[G]}),`Registration fields for .${c.extension}`)}`:`\n${e.muted(`Could not load the registration fields for ${r}: ${b(c.reason)}.`)}`)}async function Ie(e,t,n){for(;;){let r=k(e,t,n);if(r.length===0)return!0;for(let e of r){let n=e.description??``,r=te(e);if(e.type===`boolean`&&e.schema.const===!0){let r=b(e.schema.description??n);if(!await x(e.name,r))return!1;t[e.name]=!0}else e.choices?.length?t[e.name]=await y(e.name,r,e.choices,e.choiceLabels):t[e.name]=await v(e.name,r,{validate:t=>re(e,t)})}}}function Le(e){let t=m(e);if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--body must contain a JSON object`);return t}function Re(e){let t;if(e.startsWith(`@`))t=_(e,`contacts`,`json`);else try{t=JSON.parse(e)}catch{throw Error(`--contacts must contain a JSON object or @path to a JSON file`)}if(typeof t!=`object`||!t||Array.isArray(t))throw Error(`--contacts must contain a JSON object or @path to a JSON file`);return t}var ze=d({command:`create [domain-name]`,describe:"Register a domain. Billable and non-refundable — input fields are extension-specific, see `create <domain> --help`",builder:Pe,handler:async e=>{if(e.help){await Fe(e);return}if(e.local)throw Error(t);let n={};e.prefer!==void 0&&(n.Prefer=String(e.prefer));let o;if(e.body!==void 0){let t=ne([],e,{reserved:q}).errors.some(e=>e.startsWith(`Unknown flag`));if(e.contacts!==void 0||t)throw Error(`--body cannot be combined with registration field flags. Pass one or the other.`);o=Le(e.body)}let d=e.contacts===void 0?void 0:Re(e.contacts),f=$(e[`domain-name`]),p=o?.domain_name;if(p!==void 0&&typeof p!=`string`)throw Error(`--body field domain_name must be a string`);if(f!==void 0&&p!==void 0&&f!==p)throw Error(`The positional domain '${b(f)}' does not match --body domain_name '${b(p)}'`);let m=f??p;if(!m){if(o!==void 0){c({submitted:!1,reason:`registration_input_required`,message:`Not submitted. A domain is required to determine the registration schema.`,missingFields:[{path:`/domain_name`,flag:`--domain-name`,question:K}],validationErrors:["`/domain_name` is required"]});return}m=await v(`domain-name`,K)}let h=b(m);o&&(o.domain_name=m);let g=e.dryRun?await i()??`<account-id>`:await r(),_,y=async()=>(_||=await s(e),_);e.dryRun||await P(await y(),g,m);let x=await I(m,e.extension,g,y);if(!x.ok)throw Error(`Could not load the registration schema for ${h}: ${b(x.reason)}.`);let S=b(x.extension),C=x.schema,w=T(x.schema,{exclude:[G]});if(!o){if(d!==void 0&&xe(`contacts`,w,e))throw Error(`--contacts cannot be combined with --contacts-* fields. Pass one or the other.`);let t={...e},n=d===void 0?void 0:{contacts:d};if(n!==void 0&&delete t.contacts,!await Ie(w,t,n))return;let r=ne(w,t,{reserved:q,baseBody:n});if(r.errors.length>0)throw Error(`${r.errors.join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-
|
|
2
|
+
import{t as e}from"./local-B6b2OIBW.mjs";import{m as t,v as n}from"./oauth-C-QCVfWz.mjs";import{a as r,r as i}from"./auth-C80y97yu.mjs";import{t as a}from"./output-Bia1u2k5.mjs";import{t as o}from"./dry-run-CLX6Pbtq.mjs";import{t as s}from"./progress-Bpp73hIu.mjs";import{t as c}from"./run-ChM_YpZ0.mjs";import"./telemetry-CNt8H3aA.mjs";import{i as l,n as u,t as d}from"./body-parser-CUWbw_Tq.mjs";import{n as f}from"./input-validation-Ch4Vllrm.mjs";import{a as p}from"./prompt-CpZztV8c.mjs";import{t as m}from"./cli-types-tt_LZMbn.mjs";function h(e){return e.usage("$0 registrar-sandbox extensions get <extension>\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on a specific extension (TLD). Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").positional(`extension`,{type:`string`,description:"The extension name (e.g., `com`, `co.uk`).",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const g={command:`get <extension>`,describe:`Get extension`,builder:h,handler:async r=>c({command:`registrar-sandbox extensions get`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox extensions get`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/extensions/${r.extension==null?`<extension>`:encodeURIComponent(String(r.extension))}`,pathParams:{extension:String(r.extension??``)},bodyKind:`none`});return}let c=await i(r),l=r.local?e:await t();r.accountId=l,a(await s(`Loading`,async()=>c.registrarSandbox.extensions.get({account_id:l,extension:r.extension})),{successLabel:`Loaded`})})};function _(e){return e.usage("$0 registrar-sandbox extensions list\n\nReturns metadata and JSON Schema documents describing the expected input structure for registration and transfer operations on each supported extension (TLD). This endpoint uses cursor-based pagination. Results are ordered by extension name by default. To fetch the next page, pass the `cursor` value from the `result_info` object in the response as the `cursor` query parameter in your next request. An empty `cursor` string indicates there are no more pages. Supports HTTP conditional GET via `ETag`. Include the `ETag` value from a previous response in an `If-None-Match` header to receive a `304 Not Modified` when the data has not changed.").option(`name`,{type:`string`,description:"Filter extensions by exact name match.\nFor example, `name=com` returns only the `com` extension."}).option(`cursor`,{type:`string`,description:`Opaque token from a previous response's \`result_info.cursor\`.
|
|
3
3
|
Pass this value to fetch the next page of results. Omit (or
|
|
4
4
|
pass an empty string) for the first page.`}).option(`per-page`,{type:`number`,description:`Number of items to return per page.`}).option(`direction`,{type:`string`,description:`Sort direction for results. Defaults to ascending order.`,choices:[`asc`,`desc`]}).option(`sort-by`,{type:`string`,description:"Column to sort results by. Defaults to `name` when omitted.",choices:[`name`,`created_at`,`updated_at`]}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1})}const v={command:`list`,describe:`List extensions`,builder:m(_),handler:async r=>c({command:`registrar-sandbox extensions list`,classification:{safeFlags:[`direction`,`sort-by`,`dry-run`]}},r,async()=>{let c={name:r.name,cursor:r.cursor,per_page:r[`per-page`],direction:r.direction,sort_by:r[`sort-by`]};if(r.dryRun){o({command:`cf registrar-sandbox extensions list`,method:`GET`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/extensions`,pathParams:{},query:c,bodyKind:`none`});return}let l=await i(r),u=r.local?e:await t();r.accountId=u,a(await s(`Loading`,async()=>l.registrarSandbox.extensions.list({account_id:u,...c})),{successLabel:`Loaded`})})},y={command:`extensions`,describe:`Operations for extensions`,builder:e=>e.command(g).command(v).demandCommand(1,`Please specify a subcommand`),handler:()=>{}};function b(e){return e.usage("$0 registrar-sandbox registrations check <domains>\n\nPerforms real-time, authoritative availability checks directly against domain registries. Use this endpoint to verify a domain is available before attempting registration via `POST /registrations`. **Important:** Unlike the Search endpoint, these results are authoritative and reflect current registry status. Always check availability immediately before registration as domain status can change rapidly. **Note:** This endpoint uses POST to accept a list of domains in the request body. It is a read-only operation — it does not create, modify, or reserve any domains. ### Extension support Only domains on extensions supported for programmatic registration by this API can be registered. If you check a domain on an unsupported extension, the response will include `registrable: false` with a `reason` field explaining why: - `extension_not_supported_via_api` — Cloudflare Registrar supports this extension in the dashboard, but it is not yet available for programmatic registration via this API. Register via `https://dash.cloudflare.com/{account_id}/domains/registrations` instead. - `extension_not_supported` — This extension is not supported by Cloudflare Registrar. - `extension_disallows_registration` — The extension's registry has temporarily or permanently frozen new registrations. No registrar can register domains on this extension at this time. - `domain_premium` — The domain is premium priced. Premium registration is not currently supported by this API. - `domain_unavailable` — The domain is already registered, reserved, or otherwise not available for registration on a supported extension. The `reason` field is only present when `registrable` is `false`. ### Behavior - Maximum 20 domains per request - Pricing is only returned for domains where `registrable: true` - Results are not cached; each request queries the registry ### Workflow 1. Call this endpoint with domains the user wants to register. 2. For each domain where `registrable: true`, present pricing to the user. 3. If `tier: premium`, note that premium registration is not currently supported by this API and do not proceed to `POST /registrations`. 4. Proceed to `POST /registrations` only for supported non-premium domains.").positional(`domains`,{type:`string`,description:"List of fully qualified domain names (FQDNs) to check for availability. Each domain must include the extension. - Minimum: 1 domain. - Maximum: 20 domains per request. - The response returns domains on unsupported extensions with `registrable: false` and a `reason` field. - The response may omit malformed domain names (e.g., names missing an extension). ",demandOption:!0}).option(`dry-run`,{type:`boolean`,description:`Validate and show what would happen without executing`,default:!1}).option(`body`,{type:`string`,description:`List of fully qualified domain names (FQDNs) to check. Each domain must include the extension (e.g., "example.com", not "example").`})}const x={command:`check <domains>`,describe:`Check domain availability`,builder:b,handler:async r=>c({command:`registrar-sandbox registrations check`,classification:{safeFlags:[`dry-run`]}},r,async()=>{if(r.dryRun){o({command:`cf registrar-sandbox registrations check`,method:`POST`,url:`https://api.cloudflare.com/client/v4/accounts/${await n()??`<account-id>`}/registrar-sandbox/domain-check`,pathParams:{},bodyKind:`json`,body:r.body===void 0?void 0:u(r.body)});return}let c=await i(r),l=r.local?e:await t();if(r.accountId=l,r.body){let e=u(r.body);a(await s(`Creating`,async()=>c.registrarSandbox.registrations.check({...e,account_id:l})),{successLabel:`Created`});return}if(r.body===void 0)throw Error(`--body is required for this command. Pass --body '<json>' or --body @path/to/file.json.`)})};function S(e){return e.usage("$0 registrar-sandbox registrations create\n\nStarts a domain registration workflow. ### Prerequisites - The account must not already be at the maximum supported domain limit. A single account may own up to 500 domains in total across registrations created through either the dashboard or this API. - The domain must be on a supported extension for programmatic registration. - Use `POST /domain-check` immediately before calling this endpoint to confirm real-time availability and pricing. ### Defaults - `years`: defaults to the extension's minimum registration period (1 year for most extensions, but varies — for example, `.ai` (if supported) requires a minimum of 2 years). - `auto_renew`: defaults to `false`. Setting it to `true` is an explicit opt-in authorizing Cloudflare to charge the account's default payment method up to 30 days before domain expiry to renew the registration. Renewal pricing may change over time based on registry pricing. - `privacy_mode`: defaults to `redaction`. ### Premium domains Premium domain registration is not currently supported by this API. If `POST /domain-check` returns `tier: premium`, do not call this endpoint for that domain. ### Response behavior By default, the server holds the connection for a bounded, server-defined amount of time while the registration completes. Most registrations finish within this window and return `201 Created` with a completed workflow status. If the registration is still processing after this synchronous wait window, the server returns `202 Accepted`. Poll the URL in `links.self` to track progress. To skip the wait and receive an immediate `202`, send `Prefer: respond-async`.").option(`prefer`,{type:`string`,description:`Set to \`respond-async\` to receive an immediate \`202 Accepted\` without
|
|
5
5
|
waiting for the operation to complete (RFC 7240).
|